File manager - Edit - /opt/flussonic/wwwroot/flu/player/shaka-player.ba6d63bf3213ba56553b.js
Back
/*! For license information please see shaka-player.ba6d63bf3213ba56553b.js.LICENSE.txt */ (this.webpackJsonpLivePlayer=this.webpackJsonpLivePlayer||[]).push([[6],{55:function(e,t,n){(function(e){!function(){var n="undefined"!=typeof window?window:e,i={};for(var r in function(e,t,n){var i;function r(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var a="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};var o=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 s(e,t){if(t)e:{for(var n=o,i=e.split("."),r=0;r<i.length-1;r++){var s=i[r];if(!(s in n))break e;n=n[s]}(s=t(r=n[i=i[i.length-1]]))!=r&&null!=s&&a(n,i,{configurable:!0,writable:!0,value:s})}}function u(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function l(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:r(e)}}function c(e){if(!(e instanceof Array)){e=l(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}s("Symbol",(function(e){function t(e,t){this.g=e,a(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 new TypeError("Symbol is not a constructor");return new t(n+(r||"")+"_"+i++,r)}})),s("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 i=o[t[n]];"function"==typeof i&&"function"!=typeof i.prototype[e]&&a(i.prototype,e,{configurable:!0,writable:!0,value:function(){return u(r(this))}})}return e}));var d,f="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)d=Object.setPrototypeOf;else{var h;e:{var p={};try{p.__proto__={a:!0},h=p.a;break e}catch(e){}h=!1}d=h?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var g=d;function m(e,t){if(e.prototype=f(t.prototype),e.prototype.constructor=e,g)g(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.ug=t.prototype}function v(){this.s=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.C=this.i=null}function y(e){if(e.s)throw new TypeError("Generator is already running");e.s=!0}function b(e,t){e.i={Zd:t,de:!0},e.g=e.m||e.j}function w(e,t,n){return e.g=n,{value:t}}function T(e){e.g=0}function x(e,t,n){e.m=t,null!=n&&(e.j=n)}function S(e){e.m=0,e.j=2}function E(e,t){e.g=t,e.m=0}function A(e){e.m=0;var t=e.i.Zd;return e.i=null,t}function k(e){e.C=[e.i],e.m=0,e.j=0}function I(e,t){var n=e.C.splice(0)[0];(n=e.i=e.i||n)?n.de?e.g=e.m||e.j:null!=n.v&&e.j<n.v?(e.g=n.v,e.i=null):e.g=e.j:e.g=t}function M(e){this.g=new v,this.h=e}function C(e,t,n,i){try{var r=t.call(e.g.l,n);if(!(r instanceof Object))throw new TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.s=!1,r;var a=r.value}catch(t){return e.g.l=null,b(e.g,t),D(e)}return e.g.l=null,i.call(e.g,a),D(e)}function D(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.s=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,b(e.g,t)}if(e.g.s=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.de)throw t.Zd;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function R(e){this.next=function(t){return y(e.g),e.g.l?t=C(e,e.g.l.next,t,e.g.u):(e.g.u(t),t=D(e)),t},this.throw=function(t){return y(e.g),e.g.l?t=C(e,e.g.l.throw,t,e.g.u):(b(e.g,t),t=D(e)),t},this.return=function(t){return function(e,t){y(e.g);var n=e.g.l;return n?C(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),D(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function N(e,t){var n=new R(new M(t));return g&&e.prototype&&g(n,e.prototype),n}function P(e){return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise((function(i,r){!function e(a){a.done?i(a.value):Promise.resolve(a.value).then(t,n).then(e,r)}(e.next())}))}(new R(new M(e)))}function L(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function j(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function _(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{ga:r,xe:a}}return{ga:-1,xe:void 0}}function O(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}v.prototype.u=function(e){this.h=e},v.prototype.return=function(e){this.i={return:e},this.g=this.j},v.prototype.v=function(e){this.g=e},s("Promise",(function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.s=!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=o.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.I),reject:e(this.l)}},t.prototype.I=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.O(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.H(e):this.m(e)}},t.prototype.H=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.U(t,e):this.m(e)},t.prototype.l=function(e){this.u(2,e)},t.prototype.m=function(e){this.u(1,e)},t.prototype.u=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.L(),this.C()},t.prototype.L=function(){var e=this;r((function(){if(e.F()){var t=o.console;void 0!==t&&t.error(e.i)}}),1)},t.prototype.F=function(){if(this.s)return!1;var e=o.CustomEvent,t=o.Event,n=o.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=o.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.C=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.O=function(e){var t=this.j();e.vc(t.resolve,t.reject)},t.prototype.U=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.vc(i(e,r),i(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.vc=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.s=!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=l(e),a=r.next();!a.done;a=r.next())i(a.value).vc(t,n)}))},t.all=function(e){var n=l(e),r=n.next();return r.done?i([]):new t((function(e,t){function a(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,i(r.value).vc(a(o.length-1),t),r=n.next()}while(!r.done)}))},t})),s("WeakMap",(function(e){function t(e){if(this.g=(u+=Math.random()+1).toString(),e){e=l(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){if(!L(e,s)){var t=new n;a(e,s,{value:t})}}function o(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({}),n=Object.seal({}),i=new e([[t,2],[n,3]]);return 2==i.get(t)&&3==i.get(n)&&(i.delete(t),i.set(n,4),!i.has(t)&&4==i.get(n))}catch(e){return!1}}())return e;var s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var u=0;return t.prototype.set=function(e,t){if(!i(e))throw Error("Invalid WeakMap key");if(r(e),!L(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.g]=t,this},t.prototype.get=function(e){return i(e)&&L(e,s)?e[s][this.g]:void 0},t.prototype.has=function(e){return i(e)&&L(e,s)&&L(e[s],this.g)},t.prototype.delete=function(e){return!!(i(e)&&L(e,s)&&L(e[s],this.g))&&delete e[s][this.g]},t})),s("Map",(function(e){function t(){var e={};return e.Wa=e.next=e.head=e}function n(e,t){var n=e.g;return u((function(){if(n){for(;n.head!=e.g;)n=n.Wa;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}}))}function i(e,t){var n=t&&typeof t;"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t;var i=e.h[n];if(i&&L(e.h,n))for(var r=0;r<i.length;r++){var s=i[r];if(t!=t&&s.key!=s.key||t===s.key)return{id:n,list:i,index:r,ia:s}}return{id:n,list:i,index:-1,ia:void 0}}function r(e){if(this.h={},this.g=t(),this.size=0,e){e=l(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(l([[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();return!r.done&&r.value[0]==t&&"s"==r.value[1]&&!((r=i.next()).done||4!=r.value[0].x||"t"!=r.value[1]||!i.next().done)}catch(e){return!1}}())return e;var a=new WeakMap;r.prototype.set=function(e,t){var n=i(this,e=0===e?0:e);return n.list||(n.list=this.h[n.id]=[]),n.ia?n.ia.value=t:(n.ia={next:this.g,Wa:this.g.Wa,head:this.g,key:e,value:t},n.list.push(n.ia),this.g.Wa.next=n.ia,this.g.Wa=n.ia,this.size++),this},r.prototype.delete=function(e){return!(!(e=i(this,e)).ia||!e.list)&&(e.list.splice(e.index,1),e.list.length||delete this.h[e.id],e.ia.Wa.next=e.ia.next,e.ia.next.Wa=e.ia.Wa,e.ia.head=null,this.size--,!0)},r.prototype.clear=function(){this.h={},this.g=this.g.Wa=t(),this.size=0},r.prototype.has=function(e){return!!i(this,e).ia},r.prototype.get=function(e){return(e=i(this,e).ia)&&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})),s("Set",(function(e){function t(e){if(this.g=new Map,e){e=l(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(l([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();return!r.done&&r.value[0]==t&&r.value[1]==t&&(!(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}}()?e:(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)})),s("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),s("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var i=n.length,r=t||0;for(0>r&&(r=Math.max(r+i,0));r<i;r++){var a=n[r];if(a===e||Object.is(a,e))return!0}return!1}})),s("String.prototype.includes",(function(e){return e||function(e,t){return-1!==j(this,e,"includes").indexOf(e,t||0)}})),s("Array.prototype.findIndex",(function(e){return e||function(e,t){return _(this,e,t).ga}})),s("Array.prototype.values",(function(e){return e||function(){return O(this,(function(e,t){return t}))}})),s("Array.prototype.find",(function(e){return e||function(e,t){return _(this,e,t).xe}})),s("String.prototype.startsWith",(function(e){return e||function(e,t){for(var n=j(this,e,"startsWith"),i=n.length,r=e.length,a=Math.max(0,Math.min(0|t,n.length)),o=0;o<r&&a<i;)if(n[a++]!=e[o++])return!1;return o>=r}})),s("Array.prototype.keys",(function(e){return e||function(){return O(this,(function(e){return e}))}}));var U="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)L(i,r)&&(e[r]=i[r])}return e};s("Object.assign",(function(e){return e||U})),s("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}})),s("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}))}))}})),s("Array.prototype.entries",(function(e){return e||function(){return O(this,(function(e,t){return[e,t]}))}})),s("String.prototype.repeat",(function(e){return e||function(e){var t=j(this,null,"repeat");if(0>e||1342177279<e)throw new RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}})),s("Object.values",(function(e){return e||function(e){var t,n=[];for(t in e)L(e,t)&&n.push(e[t]);return n}})),s("Math.log2",(function(e){return e||function(e){return Math.log(e)/Math.LN2}})),s("Object.entries",(function(e){return e||function(e){var t,n=[];for(t in e)L(e,t)&&n.push([t,e[t]]);return n}}));var F=this||self;function B(e,t){var n,i=e.split("."),r=F;i[0]in r||void 0===r.execScript||r.execScript("var "+i[0]);for(;i.length&&(n=i.shift());)i.length||void 0===t?r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}:r[n]=t}function V(e){this.i=Math.exp(Math.log(.5)/e),this.h=this.g=0}function H(e,t,n){var i=Math.pow(e.i,t);n=n*(1-i)+i*e.g,isNaN(n)||(e.g=n,e.h+=t)}function K(e){return e.g/(1-Math.pow(e.i,e.h))}function G(){this.h=new V(2),this.i=new V(5),this.g=0}function q(){}function z(){}function X(){}function W(e,t){for(var n=[],i=1;i<arguments.length;++i)n[i-1]=arguments[i];$.has(e)||($.add(e),X.apply(q,c(n)))}function Y(){}G.prototype.getBandwidthEstimate=function(e){return 128e3>this.g?e:Math.min(K(this.h),K(this.i))};var $=new Set;if(e.console&&e.console.log.bind){var J={},Q=(J[1]=console.error.bind(console),J[2]=console.warn.bind(console),J[3]=console.info.bind(console),J[4]=console.log.bind(console),J[5]=console.debug.bind(console),J[6]=console.debug.bind(console),J);X=Q[2],z=Q[1]}function Z(e,t){for(var n=[],i=l(e),r=i.next();!r.done;r=i.next())n.push(t(r.value));return n}var ee=function e(t){var n;return N(e,(function(e){return 1==e.g&&(n=0),3!=e.g?n<t?w(e,n,3):e.v(0):(n++,e.v(2))}))},te=function e(t){var n,i,r,a,o,s;return N(e,(function(e){return 1==e.g&&(n=-1,r=i=void 0,a=l(t),o=a.next()),5!=e.g?o.done?-1==n?e.v(0):w(e,{ga:n,vf:i,item:r,next:void 0},0):(s=o.value,0<=n?w(e,{ga:n,item:r,vf:i,next:s},5):e.v(5)):(n++,i=r,r=s,o=a.next(),e.v(2))}))};function ne(){}function ie(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if(re(e)==re(t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;for(var n=oe(e),i=oe(t),r=l(ee(e.byteLength)),a=r.next();!a.done;a=r.next())if(n[a=a.value]!=i[a])return!1;return!0}function re(e){return e instanceof ArrayBuffer?e:e.buffer}function ae(e){return e instanceof ArrayBuffer?e:0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer}function oe(e,t,n){return ue(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function se(e,t,n){return ue(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function ue(e,t,n,i){var r=(e.byteOffset||0)+e.byteLength;return t=Math.max(0,Math.min((e.byteOffset||0)+t,r)),new i(re(e),t,Math.min(t+Math.max(n,0),r)-t)}function le(e,t,n,i){for(var r=[],a=3;a<arguments.length;++a)r[a-3]=arguments[a];this.severity=e,this.category=t,this.code=n,this.data=r,this.handled=!1}function ce(e){this.h=e,this.g=void 0}function de(){}function fe(e){return e?(239==(e=oe(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),(e=(new TextDecoder).decode(e)).includes("�")&&z('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),e):""}function he(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new le(2,2,2004);var i=Math.floor(e.byteLength/2);n=new Uint16Array(i),e=se(e);for(var r=(i=l(ee(i))).next();!r.done;r=i.next())n[r=r.value]=e.getUint16(2*r,t);return ve.value()(n)}function pe(e){function t(e){return n.byteLength<=e||32<=n[e]&&126>=n[e]}if(!e)return"";var n=oe(e);if(239==n[0]&&187==n[1]&&191==n[2])return fe(n);if(254==n[0]&&255==n[1])return he(n.subarray(2),!1);if(255==n[0]&&254==n[1])return he(n.subarray(2),!0);if(0==n[0]&&0==n[2])return he(e,!1);if(0==n[1]&&0==n[3])return he(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return fe(e);throw new le(2,2,2003)}function ge(e){return ae((new TextEncoder).encode(e))}function me(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=l(te(e)),a=r.next();!a.done;a=r.next())a=a.value,i.setUint16(2*a.ga,a.item.charCodeAt(0),t);return n}B("shaka.util.BufferUtils",ne),ne.toDataView=se,ne.toUint8=oe,ne.toArrayBuffer=ae,ne.equal=ie,le.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},B("shaka.util.Error",le),le.Severity={RECOVERABLE:1,CRITICAL:2},le.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},le.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,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,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,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,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,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,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,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},ce.prototype.value=function(){return null==this.g&&(this.g=this.h()),this.g},B("shaka.util.StringUtils",de),de.resetFromCharCode=function(){ve.g=void 0},de.toUTF16=me,de.toUTF8=ge,de.fromBytesAutoDetect=pe,de.fromUTF16=he,de.fromUTF8=fe;var ve=new ce((function(){function e(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}}for(var t={Ya:65536};0<t.Ya;(t={Ya:t.Ya}).Ya/=2)if(e(t.Ya))return function(e){return function(t){for(var n="",i=0;i<t.length;i+=e.Ya)n+=String.fromCharCode.apply(null,t.subarray(i,i+e.Ya));return n}}(t);return null}));function ye(e,t){this.R=se(e),this.h=t==we,this.g=0}function be(){return new le(2,3,3e3)}(i=ye.prototype).pa=function(){return this.g<this.R.byteLength},i.$=function(){return this.g},i.Te=function(){return this.R.byteLength},i.aa=function(){try{var e=this.R.getUint8(this.g);return this.g+=1,e}catch(e){throw be()}},i.Gb=function(){try{var e=this.R.getUint16(this.g,this.h);return this.g+=2,e}catch(e){throw be()}},i.N=function(){try{var e=this.R.getUint32(this.g,this.h);return this.g+=4,e}catch(e){throw be()}},i.ke=function(){try{var e=this.R.getInt32(this.g,this.h);return this.g+=4,e}catch(e){throw be()}},i.Hb=function(){try{if(this.h)var e=this.R.getUint32(this.g,!0),t=this.R.getUint32(this.g+4,!0);else t=this.R.getUint32(this.g,!1),e=this.R.getUint32(this.g+4,!1)}catch(e){throw be()}if(2097151<t)throw new le(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},i.bb=function(e){if(this.g+e>this.R.byteLength)throw be();var t=oe(this.R,this.g,e);return this.g+=e,t},i.skip=function(e){if(this.g+e>this.R.byteLength)throw be();this.g+=e},i.me=function(e){if(this.g<e)throw be();this.g-=e},i.seek=function(e){if(0>e||e>this.R.byteLength)throw be();this.g=e},i.cc=function(){for(var e=this.g;this.pa()&&0!=this.R.getUint8(this.g);)this.g+=1;return e=oe(this.R,e,this.g-e),this.g+=1,fe(e)},B("shaka.util.DataViewReader",ye),ye.prototype.readTerminatedString=ye.prototype.cc,ye.prototype.seek=ye.prototype.seek,ye.prototype.rewind=ye.prototype.me,ye.prototype.skip=ye.prototype.skip,ye.prototype.readBytes=ye.prototype.bb,ye.prototype.readUint64=ye.prototype.Hb,ye.prototype.readInt32=ye.prototype.ke,ye.prototype.readUint32=ye.prototype.N,ye.prototype.readUint16=ye.prototype.Gb,ye.prototype.readUint8=ye.prototype.aa,ye.prototype.getLength=ye.prototype.Te,ye.prototype.getPosition=ye.prototype.$,ye.prototype.hasMoreData=ye.prototype.pa;var we=1;function Te(e,t){this.g=e,this.h=t}function xe(e,t){var n=new Te(4,0),i=Ae,r=i.g,a=n.h-r.h;(0<(n.g-r.g||a)?i.i:i.h)(i.g,n,e,t)}function Se(e,t,n,i){X([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function Ee(e,t,n,i){z([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(""))}ye.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:we},Te.prototype.toString=function(){return"v"+this.g+"."+this.h};var Ae=null;function ke(e,t){return e.concat(t)}function Ie(){}function Me(e){return null!=e}function Ce(e){var t=Object.create(e.prototype||Object.prototype);try{var n=e.call(t);n||(xe("Factories requiring new","Factories should be plain functions"),n=t)}catch(t){xe("Factories requiring new","Factories should be plain functions"),n=new e}return n}function De(){this.i=[],this.h=[],this.g=!1}function Re(e){for(var t=_e(e);e.reader.pa()&&!e.parser.g;)e.parser.Kc(e.start+t,e.reader,e.partialOkay)}function Ne(e){for(var t=_e(e),n=e.reader.N(),i=(n=l(ee(n))).next();!i.done&&(e.parser.Kc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i=n.next());}function Pe(e){return function(t){e(t.reader.bb(t.reader.R.byteLength-t.reader.$()))}}function Le(e){for(var t=0,n=(e=l(e)).next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function je(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function _e(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}(i=De.prototype).box=function(e,t){var n=Le(e);return this.i[n]=Oe,this.h[n]=t,this},i.T=function(e,t){var n=Le(e);return this.i[n]=Ue,this.h[n]=t,this},i.stop=function(){this.g=!0},i.parse=function(e,t,n){for(e=new ye(e,0),this.g=!1;e.pa()&&!this.g;)this.Kc(0,e,t,n)},i.Kc=function(e,t,n,i){var r=t.$();if(i&&r+8>t.R.byteLength)this.g=!0;else{var a=t.N(),o=t.N(),s=!1;switch(a){case 0:a=t.R.byteLength-r;break;case 1:if(i&&t.$()+8>t.R.byteLength)return void(this.g=!0);a=t.Hb(),s=!0}var u=this.h[o];if(u){var l=null,c=null;if(this.i[o]==Ue){if(i&&t.$()+4>t.R.byteLength)return void(this.g=!0);l=(c=t.N())>>>24,c&=16777215}o=r+a,n&&o>t.R.byteLength&&(o=t.R.byteLength),i&&o>t.R.byteLength?this.g=!0:(i=o-t.$(),u({parser:this,partialOkay:n||!1,version:l,flags:c,reader:t=new ye(t=0<i?t.bb(i):new Uint8Array(0),0),size:a,start:r+e,has64BitSize:s}))}else t.skip(Math.min(r+a-t.$(),t.R.byteLength-t.$()))}},B("shaka.util.Mp4Parser",De),De.headerSize=_e,De.typeToString=je,De.allData=Pe,De.sampleDescription=Ne,De.children=Re,De.prototype.parseNext=De.prototype.Kc,De.prototype.parse=De.prototype.parse,De.prototype.stop=De.prototype.stop,De.prototype.fullBox=De.prototype.T,De.prototype.box=De.prototype.box;var Oe=0,Ue=1;function Fe(e){this.h=e,this.g=null}function Be(e){this.h=e,this.g=null}function Ve(){return!(!e.MediaSource||!MediaSource.isTypeSupported)}function He(e){return""!=Ye().canPlayType(e)}function Ke(){return We("Xbox One")}function Ge(){return We("Tizen")}function qe(){return We("CrKey")}function ze(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Ge()}function Xe(){if(!ze())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function We(e){return(navigator.userAgent||"").includes(e)}function Ye(){return Je||($e||($e=new Be((function(){Je=null}))),(Je=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Je=document.createElement("video")),$e.V(1),Je)}Fe.prototype.V=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},Fe.prototype.stop=function(){this.g&&(this.g(),this.g=null)},Be.prototype.hc=function(){return this.stop(),this.h(),this},Be.prototype.V=function(e){var t=this;return this.stop(),this.g=new Fe((function(){t.h()})).V(e),this},Be.prototype.Da=function(e){var t=this;return this.stop(),this.g=new Fe((function(){t.g.V(e),t.h()})).V(e),this},Be.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},B("shaka.util.Timer",Be),Be.prototype.stop=Be.prototype.stop,Be.prototype.tickEvery=Be.prototype.Da,Be.prototype.tickAfter=Be.prototype.V,Be.prototype.tickNow=Be.prototype.hc;var $e=null,Je=null;function Qe(){}function Ze(e){return e=oe(e),e=ve.value()(e),btoa(e)}function et(e,t){t=null==t||t;var n=Ze(e).replace(/\+/g,"-").replace(/\//g,"_");return t?n:n.replace(/[=]*$/,"")}function tt(t){var n=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));t=new Uint8Array(n.length);for(var i=(n=l(te(n))).next();!i.done;i=n.next())t[(i=i.value).ga]=i.item.charCodeAt(0);return t}function nt(t){for(var n=t.length/2,i=new Uint8Array(n),r=(n=l(ee(n))).next();!r.done;r=n.next())i[r=r.value]=e.parseInt(t.substr(2*r,2),16);return i}function it(e){var t=oe(e);e="";for(var n=(t=l(t)).next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}function rt(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];var i=0,r=l(t);for(n=r.next();!n.done;n=r.next())i+=n.value.byteLength;for(i=new Uint8Array(i),r=0,n=(t=l(t)).next();!n.done;n=t.next())n=n.value,i.set(oe(n),r),r+=n.byteLength;return i}function at(e,t,n,i,r){var a=st.value(),o=e.subarray(n.start,n.start+n.size),s=se(o),u=new Uint8Array(n.size+a.byteLength);for(u.set(o,0),(o=se(u)).setUint32(4,r),u.set(a,n.size),r=s.getUint32(4),o.setUint32(n.size+16,r),ot(u,0,u.byteLength),r=new Uint8Array(e.byteLength+u.byteLength),n=Ke()?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=l(i)).next();!i.done;i=e.next())ot(r,(i=i.value).start,i.size+u.byteLength);return u=se(r,t.start),t=_e(t),e=u.getUint32(t),u.setUint32(t,e+1),r}function ot(e,t,n){0!=(t=(e=se(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}B("shaka.util.Uint8ArrayUtils",Qe),Qe.concat=rt,Qe.toHex=it,Qe.fromHex=nt,Qe.fromBase64=tt,Qe.toBase64=et,Qe.toStandardBase64=Ze,Qe.equal=function(e,t){return xe("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead."),ie(e,t)};var st=new ce((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 ut(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function lt(e,t){var n=e.indexOf(t);-1<n&&e.splice(n,1)}function ct(e,t,n){if(n||(n=ut),e.length!=t.length)return!1;t=t.slice();for(var i={},r=(e=l(e)).next();!r.done;i={Uc:i.Uc},r=e.next()){if(i.Uc=r.value,-1==(r=t.findIndex(function(e){return function(t){return n(e.Uc,t)}}(i))))return!1;t[r]=t[t.length-1],t.pop()}return 0==t.length}function dt(e,t,n){if(n||(n=ut),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 ft(e,t,n){this.startTime=e,this.direction=bt,this.endTime=t,this.payload=n,this.region=new Ct,this.position=null,this.positionAlign=pt,this.size=0,this.textAlign=gt,this.writingMode=wt,this.lineInterpretation=Tt,this.line=null,this.lineHeight="",this.lineAlign=xt,this.displayAlign=vt,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=kt,this.fontStyle=It,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textDecoration=[],this.wrapLine=!0,this.id="",this.nestedCues=[],this.spacer=this.lineBreak=this.isContainer=!1,this.cellResolution={columns:32,rows:15}}function ht(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(!dt(e.nestedCues,t.nestedCues,ht))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(!dt(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1;return!0}ft.prototype.clone=function(){var e,t=new ft(0,0,"");for(e in this)t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=t[e].slice());return t},B("shaka.text.Cue",ft);var pt="auto";ft.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:pt};var gt="center",mt={LEFT:"left",RIGHT:"right",CENTER:gt,START:"start",END:"end"};ft.textAlign=mt;var vt="after",yt={BEFORE:"before",CENTER:"center",AFTER:vt};ft.displayAlign=yt;var bt="ltr";ft.direction={HORIZONTAL_LEFT_TO_RIGHT:bt,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var wt="horizontal-tb";ft.writingMode={HORIZONTAL_TOP_TO_BOTTOM:wt,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Tt=0;ft.lineInterpretation={LINE_NUMBER:Tt,PERCENTAGE:1};var xt="start",St={CENTER:"center",START:xt,END:"end"};ft.lineAlign=St;var Et={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};ft.defaultTextColor=Et;var At={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};ft.defaultTextBackgroundColor=At;var kt=400;ft.fontWeight={NORMAL:kt,BOLD:700};var It="normal",Mt={NORMAL:It,ITALIC:"italic",OBLIQUE:"oblique"};function Ct(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Dt,this.scroll=Rt}ft.fontStyle=Mt,ft.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},B("shaka.text.CueRegion",Ct);var Dt=1;Ct.units={PX:0,PERCENTAGE:Dt,LINES:2};var Rt="";function Nt(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=Pt(i,r,s,u,l,c);a<=o;a++){for(var f=n[a],h=-1,p=-1,g=0;g<f.length;g++)if(null!=f[g]&&""!==f[g].g.trim()){h=g;break}for(g=f.length-1;0<=g;g--)if(null!=f[g]&&""!==f[g].g.trim()){p=g;break}if(-1===h||-1===p)f=Lt(i,r),e.nestedCues.push(f);else{for(;h<=p;h++)if(g=f[h]){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=Pt(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=Lt(i,r),e.nestedCues.push(d)),d=Pt(i,r,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function Pt(e,t,n,i,r,a){return e=new ft(e,t,""),n&&e.textDecoration.push("underline"),i&&(e.fontStyle="italic"),e.color=r,e.backgroundColor=a,e}function Lt(e,t){var n=new ft(e,t,"");return n.lineBreak=!0,n}function jt(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function _t(){this.l=!1,this.F=this.I=0,this.H=Gt,this.i=[],this.g=this.h=this.j=0,this.C=this.s=!1,this.u="white",this.m="black",Ot(this)}function Ot(e){e.i=[];for(var t=0;15>t;t++)e.i.push(Ut())}function Ut(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function Ft(e,t){Bt(e)&&(e.i[e.h][e.g]=new jt(t,e.C,e.s,e.m,e.u),e.g++)}function Bt(e){var t=e.g<e.F&&0<=e.g;return e.h<e.I&&0<=e.h&&t}function Vt(e,t,n){var i=new ft(e.j,t,"");return i.textAlign=e.H===Ht?"left":e.H===Kt?"right":gt,(n=Nt(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}Ct.scrollMode={NONE:Rt,UP:"up"},_t.prototype.isVisible=function(){return this.l};var Ht=0,Kt=1,Gt=2;function qt(){this.i=[],this.h=null,this.g=0}function zt(e,t){3===t.type?(e.g=2*(63&t.value)-1,e.h=[]):e.h&&(0<e.g&&(e.h.push(t),e.g--),0===e.g&&(e.i.push(new Xt(e.h)),e.h=null,e.g=0))}function Xt(e){this.g=0,this.h=e}function Wt(e){if(!e.pa())throw new le(2,2,3e3);return e.h[e.g++]}function Yt(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function $t(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=Wt(t).value,t=null;for(var r=(n=l(Jt(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=Vt(r,i,e.i)),Ot(r);return t}if(137===n)for(t=Wt(t).value,n=(t=l(Jt(e,t))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=i),n.l=!0;else{if(138===n){for(n=Wt(t).value,t=null,r=(n=l(Jt(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=Vt(r,i,e.i)),r.l=!1;return t}if(139===n){for(n=Wt(t).value,t=null,r=(n=l(Jt(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=Vt(r,i,e.i):r.j=i,r.l=!r.l;return t}if(140===n)return Qt(e,t=Wt(t).value,i);if(143===n)return i=Qt(e,255,i),Zt(e),i;if(144===n)t.skip(1),i=Wt(t).value,e.g&&(e.g.s=0<(128&i),e.g.C=0<(64&i));else if(145===n)i=Wt(t).value,n=Wt(t).value,t.skip(1),e.g&&(t=en((48&n)>>4,(12&n)>>2,3&n),e.g.u=en((48&i)>>4,(12&i)>>2,3&i),e.g.m=t);else if(146===n)i=Wt(t).value,t=Wt(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=Wt(t).value,t.skip(1),e.g&&(e.g.H=3&i);else if(152<=n&&159>=n){if(n=(15&n)-8,!(r=null!==e.h[n])){var a=new _t;a.j=i,e.h[n]=a}i=Wt(t).value,Wt(t),Wt(t),a=Wt(t).value;var o=Wt(t).value;t=Wt(t).value,r&&!(7&t)||((t=e.h[n]).h=0,t.g=0,t.C=!1,t.s=!1,t.u="white",t.m="black"),(t=e.h[n]).l=0<(32&i),t.I=1+(15&a),t.F=1+(63&o),e.g=e.h[n]}}}return null}Xt.prototype.pa=function(){return this.g<this.h.length},Xt.prototype.$=function(){return this.g},Xt.prototype.skip=function(e){if(this.g+e>this.h.length)throw new le(2,2,3e3);this.g+=e};var Jt=function e(t,n){var i;return N(e,(function(e){return 1==e.g&&(i=0),5!=e.g?8>i?!(1&~n)&&t.h[i]?w(e,i,5):e.v(5):e.v(0):(n>>=1,i++,e.v(2))}))};function Qt(e,t,n){for(var i=null,r=(t=l(Jt(e,t))).next();!r.done;r=t.next()){r=r.value;var a=e.h[r];a.isVisible()&&(i=Vt(a,n,e.i)),e.h[r]=null}return i}function Zt(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function en(e,t,n){var i={0:0,1:0,2:1,3:1};return nn[(e=i[e])<<2|(t=i[t])<<1|(n=i[n])]}var tn=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),nn="black blue green cyan red magenta yellow white".split(" ");function rn(e,t){this.i=[],this.g=1,this.h=0,this.C=e,this.u=t,this.j=this.m=!1,this.l="white",this.s="black",on(this)}function an(e,t,n){return Nt(new ft(t,n,""),"CC"+(e.C<<1|e.u+1),e.i,t,n)}function on(e){ln(e,0,15),e.g=1}function sn(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case cn:i=pn.has(n)?pn.get(n):String.fromCharCode(n);break;case dn:i=gn.get(n);break;case fn:e.i[e.g].pop(),i=mn.get(n);break;case hn:e.i[e.g].pop(),i=vn.get(n)}i&&e.i[e.g].push(new jt(i,e.m,e.j,e.s,e.l))}}function un(e,t,n,i){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 ln(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var cn=0,dn=1,fn=2,hn=3,pn=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),gn=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57,"⠀"],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),mn=new Map([[32,"Á"],[33,"É"],[34,"Ó"],[35,"Ú"],[36,"Ü"],[37,"ü"],[38,"‘"],[39,"¡"],[40,"*"],[41,"'"],[42,"─"],[43,"©"],[44,"℠"],[45,"·"],[46,"“"],[47,"”"],[48,"À"],[49,"Â"],[50,"Ç"],[51,"È"],[52,"Ê"],[53,"Ë"],[54,"ë"],[55,"Î"],[56,"Ï"],[57,"ï"],[58,"Ô"],[59,"Ù"],[60,"ù"],[61,"Û"],[62,"«"],[63,"»"]]),vn=new Map([[32,"Ã"],[33,"ã"],[34,"Í"],[35,"Ì"],[36,"ì"],[37,"Ò"],[38,"ò"],[39,"Õ"],[40,"õ"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"Ä"],[49,"ä"],[50,"Ö"],[51,"ö"],[52,"ß"],[53,"¥"],[54,"¤"],[55,"│"],[56,"Å"],[57,"å"],[58,"Ø"],[59,"ø"],[60,"┌"],[61,"┐"],[62,"└"],[63,"┘"]]);function yn(e,t){this.h=xn,this.s=new rn(e,t),this.i=new rn(e,t),this.l=new rn(e,t),this.g=this.i,this.j=0,this.m=null}function bn(e,t,n){e.g=e.i;var i=e.g,r=null;return e.h!==En&&e.h!==An&&(r=an(i,e.j,n),(n=e.i).g=0<n.h?n.h:0,ln(n,0,15),(n=e.l).g=0<n.h?n.h:0,ln(n,0,15),i.g=15),e.h=En,i.h=t,r}function wn(e){e.h=Sn,e.g=e.l,e.g.h=0}function Tn(e){W("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.s,e.h=An}var xn=0,Sn=1,En=3,An=4,kn="black green blue cyan red yellow magenta black".split(" "),In="white green blue cyan red yellow magenta white_italics".split(" ");function Mn(){this.h=[],this.g=[],this.i=new qt,this.l=0,this.u=new Map([["CC1",new yn(0,0)],["CC2",new yn(0,1)],["CC3",new yn(1,0)],["CC4",new yn(1,1)]]),this.s=this.m=0,this.j=new Map,Cn(this)}function Cn(e){e.m=0,e.s=0;for(var t=(e=l(e.u.values())).next();!t.done;t=e.next())(t=t.value).h=2,t.g=t.i,t.m=null,on(t.i),on(t.l),on(t.s)}function Dn(e,t){var n=t.type;if(16==(112&t.Ba)){var i=t.Ba>>3&1;0===n?e.m=i:e.s=i}if(n=e.u.get("CC"+(n<<1|(n?e.s:e.m)+1)),255===t.Ba&&255===t.Ta||!t.Ba&&!t.Ta||!Nn(t.Ba)||!Nn(t.Ta))return 45<=++e.l&&Cn(e),null;if(e.l=0,t.Ba&=127,t.Ta&=127,!t.Ba&&!t.Ta)return null;if(i=null,16==(112&t.Ba))e:{var r=t.Ba;if(i=t.Ta,n.m===(r<<8|i))n.m=null;else if(n.m=r<<8|i,16==(240&r)&&64==(192&i)){r=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&r)<<1|i>>5&1];var a=(30&i)>>1,o="white",s=!1;if(7>a?o=In[a]:7===a&&(s=!0),i=!(1&~i),n.h!==An){if(a=n.g,n.h===En&&r!==a.g){var u=1+r-a.h;un(a,u,1+a.g-a.h,a.h),ln(a,0,u-1),ln(a,r+1,15-r)}a.g=r,n.g.m=i,n.g.j=s,n.g.l=o,n.g.s="black"}}else if(17==(247&r)&&32==(240&i))n.g.m=!1,n.g.j=!1,n.g.l="white",sn(n.g,cn,32),o=!1,"white_italics"===(r=In[(14&i)>>1])&&(r="white",o=!0),n.g.m=!(1&~i),n.g.j=o,n.g.l=r;else if(16==(247&r)&&32==(240&i)||23==(247&r)&&45==(255&i))o="black",!(7&r)&&(o=kn[(14&i)>>1]),n.g.s=o;else if(17==(247&r)&&48==(240&i))sn(n.g,dn,i);else if(18==(246&r)&&32==(224&i))sn(n.g,1&r?hn:fn,i);else if(20==(246&r)&&32==(240&i)){switch(i=t.pts,r=null,t.Ta){case 32:wn(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:r=bn(n,2,i);break;case 38:r=bn(n,3,i);break;case 39:r=bn(n,4,i);break;case 40:sn(n.g,cn,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.j=i;break;case 42:on(n.s),Tn(n);break;case 43:Tn(n);break;case 44:r=n.i,o=null,n.h!==An&&(o=an(r,n.j,i)),ln(r,0,15),r=o;break;case 45:r=n.g,n.h!==En?r=null:(o=an(r,n.j,i),un(r,(s=r.g-r.h+1)-1,s,r.h),ln(r,0,s-1),ln(r,r.g,15-r.g),n.j=i,r=o);break;case 46:ln(n.l,0,15);break;case 47:r=null,n.h!==An&&(r=an(n.i,n.j,i)),o=n.l,n.l=n.i,n.i=o,wn(n),n.j=i}i=r;break e}i=null}else r=t.Ta,sn(n.g,cn,t.Ba),sn(n.g,cn,r);return i}function Rn(e,t){var n=[];try{for(;t.pa();){var i=Wt(t).value,r=(224&i)>>5,a=31&i;if(7===r&&0!=a&&(r=63&Wt(t).value),0!=r){e.j.has(r)||e.j.set(r,new Yt(r));for(var o=e.j.get(r),s=t.$();t.$()-s<a;){var u=Wt(r=t),l=u.value,c=u.pts;if(16===l)l=l<<16|Wt(r).value;if(0<=l&&31>=l){var d=c;if(o.g){var f=o.g;switch(r=null,l){case 8:!Bt(f)||0>=f.g&&0>=f.h||(0>=f.g?(f.g=f.F-1,f.h--):f.g--,f.i[f.h][f.g]=null);break;case 13:if(f.isVisible()&&(r=Vt(f,d,o.i)),f.h+1>=f.I){d=f;for(var h=0,p=1;15>p;p++,h++)d.i[h]=d.i[p];for(p=0;1>p;p++,h++)d.i[h]=Ut()}else f.h++;f.g=0;break;case 14:f.isVisible()&&(r=Vt(f,d,o.i)),f.i[f.h]=Ut(),f.g=0;break;case 12:f.isVisible()&&(r=Vt(f,d,o.i)),Ot(f),(d=f).h=0,d.g=0}var g=r}else g=null}else if(128<=l&&159>=l)g=$t(o,r,l,c);else{if(4096<=l&&4127>=l)8<=(d=255&l)&&15>=d?r.skip(1):16<=d&&23>=d?r.skip(2):24<=d&&31>=d&&r.skip(3);else if(4224<=l&&4255>=l)128<=(d=255&l)&&135>=d?r.skip(4):136<=d&&143>=d&&r.skip(5);else if(32<=l&&127>=l)r=l,o.g&&Ft(o.g,127===r?"♪":String.fromCharCode(r));else if(160<=l&&255>=l)o.g&&Ft(o.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(r=255&l,o.g)if(tn.has(r)){var m=tn.get(r);Ft(o.g,m)}else Ft(o.g,"_")}else 4256<=l&&4351>=l&&o.g&&Ft(o.g,160!=(255&l)?"_":"[CC]");g=null}(r=g)&&n.push(r)}}}}catch(e){if(!(e instanceof le&&3e3===e.code))throw e;W("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function Nn(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function Pn(){}var Ln=function e(t,n){var i,r,a,o;return N(e,(function(e){if(1==e.g){for(var t=n,s=0,u=0;u<t.length;)2==s&&3==t[u]?(s=0,(t=[].concat(c(t))).splice(u,1),t=new Uint8Array(t)):0==t[u]?s++:s=0,u++;i=t,r=0}if(4!=e.g){if(!(r<i.length))return e.v(0);for(a=0;255==i[r];)a+=255,r++;for(a+=i[r++],o=0;255==i[r];)o+=255,r++;return o+=i[r++],4!=a?e.v(4):w(e,i.subarray(r,r+o),4)}return r+=o,e.v(2)}))};function jn(e,t){var n=null,i=null,r=e.N();return 1&t&&e.skip(8),2&t&&e.skip(4),8&t&&(n=e.N()),16&t&&(i=e.N()),{trackId:r,Xd:n,Le:i}}function _n(e,t){return{fd:1==t?e.Hb():e.N()}}function On(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),{timescale:e.N()}}function Un(e,t,n){var i=e.N(),r=[];1&n&&e.skip(4),4&n&&e.skip(4);for(var a=l(ee(i)),o=a.next();!o.done;o=a.next())o={Gd:null,sampleSize:null,Mc:null},256&n&&(o.Gd=e.N()),512&n&&(o.sampleSize=e.N()),1024&n&&e.skip(4),2048&n&&(o.Mc=0==t?e.N():e.ke()),r.push(o);return{tg:i,ne:r}}function Fn(){this.j=new Pn,this.i=new Map,this.h=this.g=0}function Bn(){this.h=new Fn,this.g=new Mn}function Vn(e,t){for(var n=e.h.parse(t),i=(n=l(n)).next();!i.done;i=n.next()){var r=i.value,a=oe(r.tf);if(0<a.length&&(i=e.g,r=r.pts,181===(a=new ye(a,0)).aa()&&49===a.Gb()&&1195456820===a.N()&&3===a.aa())){var o=a.aa();if(64&o){o&=31,a.skip(1);for(var s=0;s<o;s++){var u=a.aa(),d=(4&u)>>2,f=a.aa(),h=a.aa();d&&(0===(u&=3)||1===u?i.h.push({pts:r,type:u,Ba:f,Ta:h,order:i.h.length}):(i.g.push({pts:r,type:u,value:f,order:i.g.length}),i.g.push({pts:r,type:2,value:h,order:i.g.length})))}}}}return function(e){function t(e,t){return e.pts-t.pts||e.order-t.order}var n=[];e.h.sort(t),e.g.sort(t);for(var i=l(e.h),r=i.next();!r.done;r=i.next())(r=Dn(e,r.value))&&n.push(r);for(r=(i=l(e.g)).next();!r.done;r=i.next())zt(e.i,r.value);for(r=(i=l(e.i.i)).next();!r.done;r=i.next())r=Rn(e,r.value),n.push.apply(n,c(r));return e.i.i=[],e.h=[],e.g=[],n}(e.g)}function Hn(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Kn(e,t,n){return n=void 0===n?0:n,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+n>=e.start(0)}function Gn(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var n=0,i=l(qn(e)),r=i.next();!r.done;r=i.next()){var a=r.value;r=a.start,(a=a.end)>t&&(n+=a-Math.max(r,t))}return n}function qn(e){if(!e)return[];for(var t=[],n=l(ee(e.length)),i=n.next();!i.done;i=n.next())i=i.value,t.push({start:e.start(i),end:e.end(i)});return t}Fn.prototype.init=function(e){var t=this,n=[],i=[];if((new De).box("moov",Re).box("mvex",Re).T("trex",(function(e){var n=e.reader;n.skip(4),n.skip(4),e=n.N(),n=n.N(),t.g=e,t.h=n})).box("trak",Re).T("tkhd",(function(e){var t=e.reader;1==e.version?(t.skip(8),t.skip(8)):(t.skip(4),t.skip(4)),e=t.N(),n.push(e)})).box("mdia",Re).T("mdhd",(function(e){e=On(e.reader,e.version),i.push(e.timescale)})).parse(e,!0),!n.length||!i.length||n.length!=i.length)throw new le(2,2,2010);n.forEach((function(e,n){t.i.set(e,i[n])}))},Fn.prototype.parse=function(e){var t=this,n=[],i=this.g,r=this.h,a=[],o=null,s=9e4;return(new De).box("moof",Re).box("traf",Re).T("trun",(function(e){a=Un(e.reader,e.version,e.flags).ne})).T("tfhd",(function(e){e=jn(e.reader,e.flags),i=e.Xd||t.g,r=e.Le||t.h,e=e.trackId,t.i.has(e)&&(s=t.i.get(e))})).T("tfdt",(function(e){o=_n(e.reader,e.version).fd})).box("mdat",(function(e){if(null===o)throw new le(2,2,2010);e=e.reader;var u=o,c=s,d=i,f=r,h=a,p=0,g=f;for(h.length&&(g=h[0].sampleSize||f);e.pa();){var m=e.N();if(6==(31&e.aa())){var v=0;h.length>p&&(v=h[p].Mc||0),v=(u+v)/c;for(var y=l(Ln(t.j,e.bb(m-1))),b=y.next();!b.done;b=y.next())n.push({tf:b.value,pts:v})}else e.skip(m-1);0==(g-=m+4)&&(u=h.length>p?u+(h[p].Gd||d):u+d,p++,g=h.length>p&&h[p].sampleSize||f)}})).parse(e,!1),n},Bn.prototype.init=function(e){this.h.init(e)};var zn=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Xn(e){var t;e instanceof Xn?(Wn(this,e.Ga),this.qb=e.qb,this.Ia=e.Ia,Yn(this,e.Fb),this.ya=e.ya,$n(this,e.g.clone()),this.hb=e.hb):e&&(t=String(e).match(zn))?(Wn(this,t[1]||"",!0),this.qb=Jn(t[2]||""),this.Ia=Jn(t[3]||"",!0),Yn(this,t[4]),this.ya=Jn(t[5]||"",!0),$n(this,t[6]||"",!0),this.hb=Jn(t[7]||"")):this.g=new ai(null)}function Wn(e,t,n){e.Ga=n?Jn(t,!0):t,e.Ga&&(e.Ga=e.Ga.replace(/:$/,""))}function Yn(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Fb=t}else e.Fb=null}function $n(e,t,n){t instanceof ai?e.g=t:(n||(t=Qn(t,ii)),e.g=new ai(t))}function Jn(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Qn(e,t,n){return null!=e?(e=encodeURI(e).replace(t,Zn),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Zn(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(i=Xn.prototype).Ga="",i.qb="",i.Ia="",i.Fb=null,i.ya="",i.hb="",i.toString=function(){var e=[],t=this.Ga;if(t&&e.push(Qn(t,ei,!0),":"),t=this.Ia){e.push("//");var n=this.qb;n&&e.push(Qn(n,ei,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Fb)&&e.push(":",String(t))}return(t=this.ya)&&(this.Ia&&"/"!=t.charAt(0)&&e.push("/"),e.push(Qn(t,"/"==t.charAt(0)?ni:ti,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.hb)&&e.push("#",Qn(t,ri)),e.join("")},i.resolve=function(e){var t=this.clone();"data"===t.Ga&&(t=new Xn);var n=!!e.Ga;n?Wn(t,e.Ga):n=!!e.qb,n?t.qb=e.qb:n=!!e.Ia,n?t.Ia=e.Ia:n=null!=e.Fb;var i=e.ya;if(n)Yn(t,e.Fb);else if(n=!!e.ya){if("/"!=i.charAt(0))if(this.Ia&&!this.ya)i="/"+i;else{var r=t.ya.lastIndexOf("/");-1!=r&&(i=t.ya.substr(0,r+1)+i)}if(".."==i||"."==i)i="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var a=[],o=0;o<i.length;){var s=i[o++];"."==s?r&&o==i.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),r&&o==i.length&&a.push("")):(a.push(s),r=!0)}i=a.join("/")}}return n?t.ya=i:n=""!==e.g.toString(),n?$n(t,e.g.clone()):n=!!e.hb,n&&(t.hb=e.hb),t},i.clone=function(){return new Xn(this)};var ei=/[#\/\?@]/g,ti=/[#\?:]/g,ni=/[#\?]/g,ii=/[#\?@]/g,ri=/#/g;function ai(e){this.g=e||null}function oi(e,t){if(0==t.length)return e;var n=t.map((function(e){return new Xn(e)}));return e.map((function(e){return new Xn(e)})).map((function(e){return n.map((function(t){return e.resolve(t)}))})).reduce(ke,[]).map((function(e){return e.toString()}))}function si(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,sessionType:"",initData:t||[],keyIds:new Set}}function ui(e,t){if(1==t.length)return t[0];var n=li(e,t);if(null!=n)return n;throw new le(2,4,4025,t)}function li(e,t){for(var n=l(fi[e]),i=n.next();!i.done;i=n.next()){i=i.value;for(var r=l(t),a=r.next();!a.done;a=r.next())if(a=a.value,i.test(a.trim()))return a.trim()}return e==ci?"":null}(i=ai.prototype).va=null,i.xc=null,i.add=function(e,t){if(!this.va&&(this.va={},this.xc=0,this.g))for(var n=this.g.split("&"),i=0;i<n.length;i++){var r=n[i].indexOf("="),a=null;if(0<=r){var o=n[i].substring(0,r);a=n[i].substring(r+1)}else o=n[i];o=decodeURIComponent(o.replace(/\+/g," ")),a=a||"",this.add(o,decodeURIComponent(a.replace(/\+/g," ")))}return this.g=null,(n=this.va.hasOwnProperty(e)&&this.va[e])||(this.va[e]=n=[]),n.push(t),this.xc++,this},i.toString=function(){if(this.g)return this.g;if(!this.va)return"";var e,t=[];for(e in this.va)for(var n=encodeURIComponent(e),i=this.va[e],r=0;r<i.length;r++){var a=n;""!==i[r]&&(a+="="+encodeURIComponent(i[r])),t.push(a)}return this.g=t.join("&")},i.clone=function(){var e=new ai;if(e.g=this.g,this.va){var t,n={};for(t in this.va)n[t]=this.va[t].concat();e.va=n,e.xc=this.xc}return e};var ci="text",di={Ra:"video",eb:"audio",ba:ci,pc:"image",Sf:"application"},fi={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function hi(){var e,t,n=new Promise((function(n,i){e=n,t=i}));return n.resolve=e,n.reject=t,n}function pi(){}hi.prototype.resolve=function(){},hi.prototype.reject=function(){},B("shaka.dependencies",pi),pi.has=function(e){return mi.has(e)},pi.add=function(e,t){if(!gi[e])throw Error(e+" is not supported");mi.set(e,(function(){return t}))};var gi={muxjs:"muxjs"};pi.Allowed=gi;var mi=new Map([["muxjs",function(){return e.muxjs}]]);function vi(){var e=this;this.s=mi.get("muxjs")(),this.g=new this.s.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.h=null,this.m=[],this.j=[],this.i=[],this.l=!1,this.g.on("data",(function(t){e.j=t.captions,e.i=t.metadata,e.m.push(rt(t.initSegment,t.data))})),this.g.on("done",(function(){var t={data:rt.apply(Qe,c(e.m)),captions:e.j,metadata:e.i};e.h.resolve(t),e.l=!1}))}function yi(e,t){if(!mi.get("muxjs")()||!bi(e))return!1;if(t)return MediaSource.isTypeSupported(wi(t,e));var n=wi("audio",e),i=wi("video",e);return MediaSource.isTypeSupported(n)||MediaSource.isTypeSupported(i)}function bi(e){return"mp2t"==e.toLowerCase().split(";")[0].split("/")[1]}function wi(e,t){var n=t.replace(/mp2t/i,"mp4");"audio"==e&&(n=n.replace("video","audio"));var i=/avc1\.(66|77|100)\.(\d+)/.exec(n);if(i){var r="avc1.",a=i[1],o=Number(i[2]);r=("66"==a?r+"4200":"77"==a?r+"4d00":r+"6400")+(o>>4).toString(16),r+=(15&o).toString(16),n=n.replace(i[0],r)}return n}function Ti(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function xi(e,t,n){return e=Ti(e,t),mi.get("muxjs")()&&bi(e)?wi(n,e):e}function Si(e){var t=(e=e.split("."))[0];return e.pop(),t}function Ei(e){return(e=e.split(/ *; */)).shift(),(e=e.find((function(e){return e.startsWith("codecs=")})))?e.split("=")[1].replace(/^"|"$/g,""):""}vi.prototype.destroy=function(){return this.g.dispose(),this.g=null,Promise.resolve()};var Ai=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function ki(e){this.s=null,this.i=e,this.j=this.C=0,this.l=1/0,this.h=this.g=null,this.u="",this.m=new Map}function Ii(e){return!(!Ri[e]&&"application/cea-608"!=e&&"application/cea-708"!=e)}function Mi(e,t,n){if(e.u=t,t=e.m.get(t))for(var i=l(t.keys()),r=i.next();!r.done;r=i.next())(r=t.get(r.value).filter((function(e){return e.endTime<=n})))&&e.i.append(r)}function Ci(e,t,n){t.startTime+=n,t.endTime+=n;for(var i=(t=l(t.nestedCues)).next();!i.done;i=t.next())Ci(e,i.value,n)}function Di(e,t,n,i,r){for(var a=n+" "+i,o=new Map,s=(t=l(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,[]),Ci(e,u,r),u.startTime>=e.j&&u.startTime<e.l&&(o.get(s).get(a).push(u),s==e.u&&e.i.append([u]))}for(a=(r=l(o.keys())).next();!a.done;a=r.next())for(a=a.value,e.m.has(a)||e.m.set(a,new Map),s=(t=l(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,u=o.get(a).get(s),e.m.get(a).set(s,u);e.g=null==e.g?Math.max(n,e.j):Math.min(e.g,Math.max(n,e.j)),e.h=Math.max(e.h,Math.min(i,e.l))}ki.prototype.destroy=function(){return this.i=this.s=null,this.m.clear(),Promise.resolve()},ki.prototype.remove=function(e,t){var n=this;return P((function(i){if(1==i.g)return w(i,Promise.resolve(),2);!n.i||!n.i.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)),T(i)}))},B("shaka.text.TextEngine",ki),ki.prototype.destroy=ki.prototype.destroy,ki.findParser=function(e){return Ri[e]},ki.unregisterParser=function(e){delete Ri[e]},ki.registerParser=function(e,t){Ri[e]=t};var Ri={};function Ni(e){this.g=!1,this.h=new hi,this.i=e}function Pi(e,t){if(e.g){if(t instanceof le&&7003==t.code)throw t;throw new le(2,7,7003,t)}}function Li(){this.g={}}function ji(e,t){for(var n in e.g)t(n,e.g[n])}function _i(){this.g=new Li}function Oi(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(null==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=Ui;if(null==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}Ui=t}return t||!1}(e)?t:t.capture||!1}(e,i),this.target.addEventListener(t,n,this.g)}Ni.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()})))},Li.prototype.push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},Li.prototype.get=function(e){return(e=this.g[e])?e.slice():null},Li.prototype.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])},Li.prototype.size=function(){return Object.keys(this.g).length},(i=_i.prototype).release=function(){this.ob(),this.g=null},i.A=function(e,t,n,i){this.g&&(e=new Oi(e,t,n,i),this.g.push(t,e))},i.wa=function(e,t,n,i){var r=this;this.A(e,t,(function i(a){r.Ea(e,t,i),n(a)}),i)},i.Ea=function(e,t,n){if(this.g)for(var i=this.g.get(t)||[],r=(i=l(i)).next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.Ea(),this.g.remove(t,r))},i.ob=function(){if(this.g){var e,t=this.g,n=[];for(e in t.g)n.push.apply(n,c(t.g[e]));for(n=(t=l(n)).next();!n.done;n=t.next())n.value.Ea();this.g.g={}}},B("shaka.util.EventManager",_i),_i.prototype.removeAll=_i.prototype.ob,_i.prototype.unlisten=_i.prototype.Ea,_i.prototype.listenOnce=_i.prototype.wa,_i.prototype.listen=_i.prototype.A,_i.prototype.release=_i.prototype.release,Oi.prototype.Ea=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var Ui=void 0;function Fi(e,t,n,i){var r=this;this.g=e,this.m=n,this.j={},this.I={},this.i=null,this.L=i||function(){},this.l={},this.h=new _i,this.u={},this.C=t,this.F=new hi,this.s=function(e,t){var n=new MediaSource;return e.h.wa(n,"sourceopen",(function(){URL.revokeObjectURL(e.H),t.resolve()})),e.H=er(n),e.g.src=e.H,n}(this,this.F),this.J=new Ni((function(){return function(e){var t,n,i,r,a,o,s;return P((function(u){if(1==u.g){for(n in t=[],e.l)for(i=e.l[n],r=i[0],e.l[n]=i.slice(0,1),r&&t.push(r.p.catch(Ie)),a=l(i.slice(1)),o=a.next();!o.done;o=a.next())o.value.p.reject(new le(2,7,7003,void 0));for(s in e.i&&t.push(e.i.destroy()),e.m&&t.push(e.m.destroy()),e.u)t.push(e.u[s].destroy());return w(u,Promise.all(t),2)}e.h&&(e.h.release(),e.h=null),e.g&&(e.g.removeAttribute("src"),e.g.load(),e.g=null),e.s=null,e.i=null,e.m=null,e.j={},e.u={},e.C=null,e.l={},T(u)}))}(r)})),this.H=""}function Bi(e){var t=Ti(e.mimeType,e.codecs),n=function(e){var t=[e.mimeType];return Ai.forEach((function(n,i){var r=e[i];r&&t.push(n+'="'+r+'"')})),"PQ"==e.hdr&&t.push('eotf="smpte2084"'),t.join(";")}(e);return Ii(t)||MediaSource.isTypeSupported(n)||yi(t,e.type)}function Vi(e,t){e.i||(e.i=new ki(e.m)),"application/cea-608"!=t&&"application/cea-708"!=t&&(e.i.s=Ce(Ri[t]))}function Hi(e){return!e.s||"ended"==e.s.readyState}function Ki(e,t){if(t==ci)var n=e.i.g;else n=!(n=qi(e,t))||1==n.length&&1e-6>n.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function Gi(e,t){return t==ci?e.i.h:Hn(qi(e,t))}function qi(e,t){try{return e.j[t].buffered}catch(e){return null}}function zi(e,t,n,i,r,a){var o,s,u,c,d,f,h,p;return P((function(g){return 1==g.g?t==(o=di).ba?w(g,function(e,t,n,i){var r,a,o;return P((function(s){return 1==s.g?w(s,Promise.resolve(),2):e.s&&e.i?null==n||null==i?(e.s.parseInit(oe(t)),s.return()):(r={periodStart:e.C,segmentStart:n,segmentEnd:i},a=e.s.parseMedia(oe(t),r),o=a.filter((function(t){return t.startTime>=e.j&&t.startTime<e.l})),e.i.append(o),null==e.g&&(e.g=Math.max(n,e.j)),e.h=Math.min(i,e.l),void T(s)):s.return()}))}(e.i,n,i,r),0):e.u[t]?w(g,function(e,t){e.l=!0,e.h=new hi,e.m=[],e.j=[],e.i=[];var n=oe(t);return e.g.push(n),e.g.flush(),e.l&&e.h.reject(new le(2,3,3018)),e.h}(e.u[t],n),10):a?(e.i||Vi(e,"text/vtt"),null==i&&null==r?e.C.init(n):(s=Vn(e.C,n)).length&&(u=e.j[o.Ra].timestampOffset,Di(e.i,s,i,r,u)),n=Zi(e,n,i,t),w(g,Yi(e,t,(function(){e.j[t].appendBuffer(n)})),0)):(n=Zi(e,n,i,t),w(g,Yi(e,t,(function(){e.j[t].appendBuffer(n)})),0)):(c=g.h,e.i||Vi(e,"text/vtt"),c.metadata&&(d=e.j[t].timestampOffset,e.L(c.metadata,d,r)),c.captions&&c.captions.length&&(f=e.j[o.Ra].timestampOffset,h=function(e){for(var t=[],n=(e=l(e)).next();!n.done;n=e.next())n=n.value,t.push({stream:n.stream,cue:new ft(n.startTime,n.endTime,n.text)});return t}(c.captions),Di(e.i,h,i,r,f)),p=c.data,p=Zi(e,p,i,t),w(g,Yi(e,t,(function(){e.j[t].appendBuffer(p)})),0))}))}function Xi(e,t){return P((function(n){return t==di.ba?e.i?w(n,e.i.remove(0,1/0),0):n.return():w(n,Yi(e,t,(function(){var n=e.s.duration;0>=n?Wi(e,t):e.j[t].remove(0,n)})),0)}))}function Wi(e,t){var n=e.l[t][0];n&&(n.p.resolve(),Ji(e,t))}function Yi(e,t,n){return Pi(e.J),n={start:n,p:new hi},e.l[t].push(n),1==e.l[t].length&&Qi(e,t),n.p}function $i(e,t){var n,i,r,a,o;return P((function(s){switch(s.g){case 1:for(r in Pi(e.J),n=[],i={},e.j)i.Lb=new hi,a={start:function(e){return function(){return e.Lb.resolve()}}(i),p:i.Lb},e.l[r].push(a),n.push(i.Lb),1==e.l[r].length&&a.start(),i={Lb:i.Lb};return x(s,2),w(s,Promise.all(n),4);case 4:E(s,3);break;case 2:throw A(s);case 3:try{t()}catch(e){throw new le(2,3,3015,e)}finally{for(o in e.j)Ji(e,o)}T(s)}}))}function Ji(e,t){e.l[t].shift(),Qi(e,t)}function Qi(e,t){var n=e.l[t][0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new le(2,3,3017,t)):n.p.reject(new le(2,3,3015,i)),Ji(e,t)}}function Zi(e,t,n,i){var r=e.g.mediaKeys;return null==n&&r&&(Ge()||Ke())&&"mp4"==e.I[i].split(";")[0].split("/")[1]&&(t=function(e){function t(){r=!0}function n(e){a.push(e),Re(e)}e=oe(e);var i,r=!1,a=[],o=[];if((new De).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).T("stsd",(function(e){i=e,a.push(e),Ne(e)})).T("encv",t).T("enca",t).T("avc1",(function(e){o.push({box:e,$b:1701733238})})).T("avc3",(function(e){o.push({box:e,$b:1701733238})})).T("ac-3",(function(e){o.push({box:e,$b:1701733217})})).T("ec-3",(function(e){o.push({box:e,$b:1701733217})})).T("mp4a",(function(e){o.push({box:e,$b:1701733217})})).parse(e),r)return e;if(0==o.length||!i)throw it(e),new le(2,3,3019);o.reverse();for(var s=l(o),u=s.next();!u.done;u=s.next())u=u.value,e=at(e,i,u.box,a,u.$b);return e}(t)),t}(i=Fi.prototype).destroy=function(){return this.J.destroy()},i.init=function(e,t){var n,i,r,a,o,s,u,c=this;return P((function(d){if(1==d.g)return n=di,w(d,c.F,2);for(i={},r=l(e.keys()),a=r.next();!a.done;i={sa:i.sa},a=r.next())i.sa=a.value,o=e.get(i.sa),s=Ti(o.mimeType,o.codecs),i.sa==n.ba?Vi(c,s):(!t&&MediaSource.isTypeSupported(s)||!yi(s,i.sa)||(c.u[i.sa]=new vi,s=wi(i.sa,s)),u=c.s.addSourceBuffer(s),c.h.A(u,"error",function(e){return function(){c.l[e.sa][0].p.reject(new le(2,3,3014,c.g.error?c.g.error.code:0))}}(i)),c.h.A(u,"updateend",function(e){return function(){return Wi(c,e.sa)}}(i)),c.j[i.sa]=u,c.I[i.sa]=s,c.l[i.sa]=[]);T(d)}))},i.zc=function(){var e={total:qn(this.g.buffered),audio:qn(qi(this,"audio")),video:qn(qi(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},i.remove=function(e,t,n){var i=this;return P((function(r){return w(r,e==di.ba?i.i.remove(t,n):Yi(i,e,(function(){n<=t?Wi(i,e):i.j[e].remove(t,n)})),0)}))},i.flush=function(e){var t=this;return P((function(n){return e==di.ba?n.return():w(n,Yi(t,e,(function(){t.g.currentTime-=.001,Wi(t,e)})),0)}))},i.endOfStream=function(e){var t=this;return P((function(n){return w(n,$i(t,(function(){Hi(t)||(e?t.s.endOfStream(e):t.s.endOfStream())})),0)}))},i.Ma=function(e){var t=this;return P((function(n){return w(n,$i(t,(function(){t.s.duration=e})),0)}))},i.getDuration=function(){return this.s.duration};var er=e.URL.createObjectURL;function tr(e,t){return e=rr(e),t=rr(t),e.split("-")[0]==t.split("-")[0]}function nr(e,t){e=rr(e),t=rr(t);var n=e.split("-"),i=t.split("-");return n[0]==i[0]&&1==n.length&&2==i.length}function ir(e,t){e=rr(e),t=rr(t);var n=e.split("-"),i=t.split("-");return 2==n.length&&2==i.length&&n[0]==i[0]}function rr(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=ur.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function ar(e,t){return e=rr(e),(t=rr(t))==e?4:nr(t,e)?3:ir(t,e)?2:nr(e,t)?1:0}function or(e){return e.language?rr(e.language):e.audio&&e.audio.language?rr(e.audio.language):e.video&&e.video.language?rr(e.video.language):"und"}function sr(e,t){for(var n=rr(e),i=new Set,r=l(t),a=r.next();!a.done;a=r.next())i.add(rr(a.value));for(a=(r=l(i)).next();!a.done;a=r.next())if((a=a.value)==n)return a;for(a=(r=l(i)).next();!a.done;a=r.next())if(nr(a=a.value,n))return a;for(a=(r=l(i)).next();!a.done;a=r.next())if(ir(a=a.value,n))return a;for(a=(i=l(i)).next();!a.done;a=i.next())if(nr(n,a=a.value))return a;return null}var ur=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 lr(e,t){var n=Cr(e.variants,t);n=function(e){for(var t=new Li,n=(e=l(e)).next();!n.done;n=e.next()){var i=cr(n=n.value);t.push(i,n)}return t}(n),n=function(e){var t=0,n=new Map,i=e.size();return ji(e,(function(e,r){for(var a=l(r),o=a.next();!o.done;o=a.next()){var s=(o=o.value).video;if(s&&s.width&&s.height){s=s.width*s.height*(s.frameRate||1),n.has(s)||n.set(s,new Li);var u=n.get(s);u.push(e,o),u.size()===i&&(t=Math.max(t,s))}}})),t?n.get(t):e}(n);var i=function(e){var t="",n=1/0;return ji(e,(function(e,i){for(var r=0,a=0,o=l(i),s=o.next();!s.done;s=o.next())r+=s.value.bandwidth||0,++a;(r/=a)<n&&(t=e,n=r)})),t}(n);e.variants=e.variants.filter((function(e){return cr(e)==i}))}function cr(e){var t="";e.video&&(t=Si(e.video.codecs));var n="";return e.audio&&(n=Si(e.audio.codecs)),t+"-"+n}function dr(e,t,n){function i(e,t,n){return e>=t&&e<=n}var r=e.video;return!(r&&r.width&&r.height&&(!i(r.width,t.minWidth,Math.min(t.maxWidth,n.width))||!i(r.height,t.minHeight,Math.min(t.maxHeight,n.height))||!i(r.width*r.height,t.minPixels,t.maxPixels))||e&&e.video&&e.video.frameRate&&!i(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||!i(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function fr(e,t,n,i){return P((function(r){if(1==r.g)return i?w(r,pr(n,0<n.offlineSessionIds.length),2):(hr(n,e),gr(n),r.v(2));wr(t,n),function(e){e.textStreams=e.textStreams.filter((function(e){return Ii(Ti(e.mimeType,e.codecs))}))}(n),function(e){e.imageStreams=e.imageStreams.filter((function(e){var t=["image/svg+xml","image/png","image/jpeg"];return(We("Web0S")||Ge()||qe())&&t.push("image/webp"),t.includes(e.mimeType)}))}(n),T(r)}))}function hr(e,t){e.variants=e.variants.filter((function(e){return!t||!t.L||!!function(e,t){var n=t.audio,i=t.video;if(n&&n.encrypted&&(n=La(n),!Na(e,n))||i&&i.encrypted&&(i=La(i),!Na(e,i)))return!1;var r=Da(e.i);return i=Ha(t),0==i.length||i.some((function(e){return e.keySystem==r}))}(t,e)}))}function pr(e,t){return P((function(n){if(1==n.g)return w(n,mr(e.variants,t,!1),2);e.variants=e.variants.filter((function(e){var t=e.video;if(t){var n=br(t.codecs);if(t.codecs.includes(",")){var i=t.codecs.split(",");if(n=ui("video",i),i=ui("audio",i),i=xi(t.mimeType,i,"audio"),!MediaSource.isTypeSupported(i))return!1}if(n=xi(t.mimeType,n,"video"),!MediaSource.isTypeSupported(n))return!1}return!((n=e.audio)&&(i=yr(n.codecs),n=xi(n.mimeType,i,"audio"),!MediaSource.isTypeSupported(n)))&&(Ke()&&t&&(t.width&&1920<t.width||t.height&&1080<t.height)&&t.codecs.includes("avc1.")?(Nr(e),!1):((t=e.decodingInfos.some((function(e){return e.supported})))||Nr(e),t))})),T(n)}))}function gr(e){e.variants=e.variants.filter((function(e){var t=e.audio;return e=e.video,!(t&&!Bi(t)||e&&!Bi(e)||Ke()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))}))}function mr(e,t,n){var i,r,a,o,s,u,c,d,f,h;return P((function(p){if(e.some((function(e){return e.decodingInfos.length})))return p.return();for(i=navigator.mediaCapabilities,r=[],a=function(e,t){var n;return P((function(r){return 1==r.g?(x(r,2),w(r,i.decodingInfo(t),4)):2!=r.g?(n=r.h,e.decodingInfos.push(n),E(r,0)):(A(r),JSON.stringify(t),void T(r))}))},o=l(e),s=o.next();!s.done;s=o.next())for(u=s.value,c=vr(u,t,n),d=l(c),f=d.next();!f.done;f=d.next())h=f.value,r.push(a(u,h));return w(p,Promise.all(r),0)}))}function vr(e,t,n){var i=e.audio,r=e.video;if(n={type:n?"file":"media-source"},r){var a=r.codecs;if(r.codecs.includes(",")){var o=r.codecs.split(",");a=br(a=ui("video",o)),o=ui("audio",o),o=xi(r.mimeType,o,"audio"),n.audio={contentType:o,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1}}if(a=br(a),a=xi(r.mimeType,a,"video"),n.video={contentType:a,width:r.width||1,height:r.height||1,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||1},r.hdr)switch(r.hdr){case"SDR":n.video.transferFunction="srgb";break;case"PQ":n.video.transferFunction="pq";break;case"HLG":n.video.transferFunction="hlg"}}if(i&&(a=yr(i.codecs),a=xi(i.mimeType,a,"audio"),n.audio={contentType:a,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio}),!(o=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[n];e=[],a=new Map;for(var s=(o=l(o)).next();!s.done;s=o.next()){var u=s.value;a.get(u.keySystem)||a.set(u.keySystem,[]),a.get(u.keySystem).push(u)}o=t?"required":"optional",t=t?["persistent-license"]:["temporary"];for(var c=(u=l(a.keys())).next();!c.done;c=u.next()){var d=c.value;c=Object.assign({},n);var f=a.get(d);for(d={keySystem:d,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t},s=(f=l(f)).next();!s.done;s=f.next()){if((s=s.value).initData&&s.initData.length){for(var h=new Set,p=l(s.initData),g=p.next();!g.done;g=p.next())h.add(g.value.initDataType);d.initDataType=s.initData[0].initDataType}s.distinctiveIdentifierRequired&&(d.distinctiveIdentifier="required"),s.persistentStateRequired&&(d.persistentState="required"),s.sessionType&&(d.sessionTypes=[s.sessionType]),i&&(d.audio?d.audio.robustness=d.audio.robustness||s.audioRobustness:d.audio={robustness:s.audioRobustness}),r&&(d.video?d.video.robustness=d.video.robustness||s.videoRobustness:d.video={robustness:s.videoRobustness})}c.keySystemConfiguration=d,e.push(c)}return e}function yr(e){return Ge()&&"ac-3"==e.toLowerCase()?"ec-3":e}function br(e){return"vp9"==e?"vp09.00.10.08":e}function wr(e,t){t.variants=t.variants.filter((function(t){var n=t.audio;return t=t.video,!(n&&e&&e.audio&&!Tr(n,e.audio)||t&&e&&e.video&&!Tr(t,e.video))}))}function Tr(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]}function xr(e){var t=e.audio,n=e.video,i=t?t.codecs:null,r=n?n.codecs:null,a=[];r&&a.push(r),i&&a.push(i);var o=[];n&&o.push(n.mimeType),t&&o.push(t.mimeType),o=o[0]||null;var s=[];t&&s.push(t.kind),n&&s.push(n.kind),s=s[0]||null;var u=new Set;if(t)for(var c=l(t.roles),d=c.next();!d.done;d=c.next())u.add(d.value);if(n)for(d=(c=l(n.roles)).next();!d.done;d=c.next())u.add(d.value);return e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:s,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:o,codecs:a.join(", "),audioCodec:i,videoCodec:r,primary:e.primary,roles:Array.from(u),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null),t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.label=t.label,e.audioRoles=t.roles),e}function Sr(e){return{id:e.id,active:!1,type:ci,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:e.mimeType,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null}}function Er(e){return{id:e.id,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:e.width||null,height:e.height||null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:e.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e.tilesLayout||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId}}function Ar(e){return e.__shaka_id||(e.__shaka_id=Lr++),e.__shaka_id}function kr(e){var t=Ir(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 Ir(e){return{id:Ar(e),active:!1,type:"",bandwidth:0,language:rr(e.language),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles: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}}function Mr(e){return e.allowedByApplication&&e.allowedByKeySystem}function Cr(e,t){for(var n=e.filter((function(e){return e.audio&&e.audio.channelsCount})),i=new Map,r=(n=l(n)).next();!r.done;r=n.next()){var a=(r=r.value).audio.channelsCount;i.has(a)||i.set(a,[]),i.get(a).push(r)}return 0==(n=Array.from(i.keys())).length?e:(r=n.filter((function(e){return e<=t}))).length?i.get(Math.max.apply(Math,c(r))):i.get(Math.min.apply(Math,c(n)))}function Dr(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=sr(rr(t),e.map((function(e){return e.language})));s&&(r=e.filter((function(e){return rr(e.language)==s})))}if(r=r.filter((function(e){return e.forced==i})),n){if((e=Rr(r,n)).length)return e}else if(e=r.filter((function(e){return 0==e.roles.length})),e.length)return e;return e=r.map((function(e){return e.roles})).reduce(ke,[]),e.length?Rr(r,e[0]):r}function Rr(e,t){return e.filter((function(e){return e.roles.includes(t)}))}function Nr(e){var t=[];return e.audio&&t.push(Pr(e.audio)),e.video&&t.push(Pr(e.video)),t.join(", ")}function Pr(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"}var Lr=0;function jr(){var e=this;this.j=null,this.i=!1,this.g=new G,navigator.connection&&navigator.connection.addEventListener("change",(function(){if(e.o.useNetworkInformation&&e.i){e.g=new G;var t=e.chooseVariant();t&&e.j(t)}})),this.h=[],this.m=1,this.s=!1,this.o=this.l=null}function _r(e){var t=e.o.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&e.o.useNetworkInformation&&(t=1e6*navigator.connection.downlink),t}function Or(e,t){return e&&(t=t.filter((function(t){return dr(t,e,{width:1/0,height:1/0})}))),t.sort((function(e,t){return e.bandwidth-t.bandwidth}))}function Ur(e,t){this.h=e,this.g=new Set([e]);for(var n=l(t=t||[]),i=n.next();!i.done;i=n.next())this.add(i.value)}function Fr(e,t){var n;if(!(n=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(n=e.audio&&t.audio)){n=e.audio;var i=t.audio;n=!((!(!n.channelsCount||!i.channelsCount||2<n.channelsCount||2<i.channelsCount)||n.channelsCount==i.channelsCount)&&Br(n,i)&&Vr(n.roles,i.roles))}return!n&&(n=e.video&&t.video)&&(n=!(Br(n=e.video,i=t.video)&&Vr(n.roles,i.roles))),!n}function Br(e,t){if(e.mimeType!=t.mimeType)return!1;var n=e.codecs.split(",").map((function(e){return Si(e)})),i=t.codecs.split(",").map((function(e){return Si(e)}));if(n.length!=i.length)return!1;n.sort(),i.sort();for(var r=l(ee(n.length)),a=r.next();!a.done;a=r.next())if(n[a=a.value]!=i[a])return!1;return!0}function Vr(e,t){var n=new Set(e),i=new Set(t);if(n.delete("main"),i.delete("main"),n.size!=i.size)return!1;for(var r=(n=l(n)).next();!r.done;r=n.next())if(!i.has(r.value))return!1;return!0}function Hr(e){this.g=e,this.h=new Kr(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"")}function Kr(e,t,n,i){this.i=e,this.j=t,this.g=n,this.h=void 0===i?"":i}function Gr(){this.g=Xr,this.h=(new Map).set(Xr,2).set(zr,1)}function qr(e,t,n){e.h.set(Xr,n).set(zr,t)}(i=jr.prototype).stop=function(){this.j=null,this.i=!1,this.h=[],this.m=1,this.l=null},i.init=function(e){this.j=e},i.chooseVariant=function(){var e=Or(this.o.restrictions,this.h),t=this.g.getBandwidthEstimate(_r(this));this.h.length&&!e.length&&(e=[(e=Or(null,this.h))[0]]);for(var n=e[0]||null,i=(e=l(te(e))).next();!i.done;i=e.next()){var r=i.value;i=r.item;var a=isNaN(this.m)?1:Math.abs(this.m);r=a*(r.next||{bandwidth:1/0}).bandwidth/this.o.bandwidthUpgradeTarget,t>=a*i.bandwidth/this.o.bandwidthDowngradeTarget&&t<=r&&(n=i)}return this.l=Date.now(),n},i.enable=function(){this.i=!0},i.disable=function(){this.i=!1},i.segmentDownloaded=function(e,t){var n=this.g;if(!(16e3>t)){var i=8e3*t/e,r=e/1e3;n.g+=t,H(n.h,r,i),H(n.i,r,i)}if(null!=this.l&&this.i)e:{if(this.s){if(Date.now()-this.l<1e3*this.o.switchInterval)break e}else{if(!(128e3<=this.g.g))break e;this.s=!0}n=this.chooseVariant(),this.g.getBandwidthEstimate(_r(this)),n&&this.j(n)}},i.getBandwidthEstimate=function(){return this.g.getBandwidthEstimate(this.o.defaultBandwidthEstimate)},i.setVariants=function(e){this.h=e},i.playbackRateChanged=function(e){this.m=e},i.configure=function(e){this.o=e},B("shaka.abr.SimpleAbrManager",jr),jr.prototype.configure=jr.prototype.configure,jr.prototype.playbackRateChanged=jr.prototype.playbackRateChanged,jr.prototype.setVariants=jr.prototype.setVariants,jr.prototype.getBandwidthEstimate=jr.prototype.getBandwidthEstimate,jr.prototype.segmentDownloaded=jr.prototype.segmentDownloaded,jr.prototype.disable=jr.prototype.disable,jr.prototype.enable=jr.prototype.enable,jr.prototype.chooseVariant=jr.prototype.chooseVariant,jr.prototype.init=jr.prototype.init,jr.prototype.stop=jr.prototype.stop,Ur.prototype.add=function(e){return!!Fr(this.h,e)&&(this.g.add(e),!0)},Ur.prototype.values=function(){return this.g.values()},Hr.prototype.create=function(e){var t=this,n=e.filter((function(e){return Fr(t.g,e)}));return n.length?new Ur(n[0],n):this.h.create(e)},Kr.prototype.create=function(e){var t=[];t=function(e,t){var n=rr(t),i=sr(n,e.map((function(e){return or(e)})));return i?e.filter((function(e){return i==or(e)})):[]}(e,this.i);var n=e.filter((function(e){return e.primary}));for(e=function(e,t){return e.filter((function(e){return!!e.audio&&(t?e.audio.roles.includes(t):0==e.audio.roles.length)}))}(t=t.length?t:n.length?n:e,this.j),e.length&&(t=e),this.g&&((e=Cr(t,this.g)).length&&(t=e)),this.h&&(e=function(e,t){return e.filter((function(e){return!!e.audio&&e.audio.label.toLowerCase()==t.toLowerCase()}))}(t,this.h),e.length&&(t=e)),e=new Ur(t[0]),n=(t=l(t)).next();!n.done;n=t.next())n=n.value,Fr(e.h,n)&&e.add(n);return e};var zr=0,Xr=1;function Wr(e,t){var n={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4};this.l=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.s=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 Yr(e){var t,n;return P((function(i){if(1==i.g){if(e.g>=e.l){if(!e.i)throw new le(2,7,1010);e.g=1,e.h=e.j}return t=e.g,e.g++,0==t?i.return():(n=e.h*(1+(2*Math.random()-1)*e.s),w(i,new Promise((function(e){new Be(e).V(n/1e3)})),2))}e.h*=e.m,T(i)}))}function $r(e,t){this.promise=e,this.i=t,this.g=!1}function Jr(e){return new $r(Promise.reject(e),(function(){return Promise.resolve()}))}function Qr(){var e=Promise.reject(new le(2,7,7001));return e.catch((function(){})),new $r(e,(function(){return Promise.resolve()}))}function Zr(e){return new $r(Promise.resolve(e),(function(){return Promise.resolve()}))}function ea(e){return new $r(e,(function(){return e.catch((function(){}))}))}function ta(e){return new $r(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function na(t,n){if(n)if(n instanceof Map)for(var i=l(n.keys()),r=i.next();!r.done;r=i.next())r=r.value,Object.defineProperty(this,r,{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 ia(e){var t,n=new na(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}function ra(){this.U=new Li,this.sc=this}function aa(e){var t=new Set;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(t.has(n))return null;var i=n.constructor==Array;if(n.constructor!=Object&&!i)return null;t.add(n);var r,a=i?[]:{};for(r in n)a[r]=e(n[r]);return i&&(a.length=n.length),a}}(e)}function oa(e){var t,n={};for(t in e)n[t]=e[t];return n}function sa(){this.g=[]}function ua(e,t){e.g.push(t.finally((function(){lt(e.g,t)})))}function la(e){ra.call(this),this.i=!1,this.l=new sa,this.g=new Set,this.h=new Set,this.j=e||null,this.m=!1}function ca(e,t,n,i){n=n||ma;var r=va[e];(!r||n>=r.priority)&&(va[e]={priority:n,uf:t,wf:void 0!==i&&i})}function da(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===n?null:n}}function fa(e,t,n,i,r,a,o){e.m&&(n.uris[r]=n.uris[r].replace("http://","https://"));var s=new Xn(n.uris[r]),u=s.Ga,l=!1;u||(Wn(s,u=(u=location.protocol).slice(0,-1)),n.uris[r]=s.toString()),u=u.toLowerCase();var c=(u=va[u])?u.uf:null;if(!c)return Jr(new le(2,1,1e3,s));var d,f=u.wf,h=null,p=null,g=!1;return ea(Yr(i)).ca((function(){if(e.i)return Qr();d=Date.now();var i=c(n.uris[r],n,t,(function(n,i,r){h&&h.stop(),p&&p.V(s/1e3),e.j&&t==ga&&(e.j(n,i),l=!0,o.g=r)}));if(!f)return i;var a=n.retryParameters.connectionTimeout;a&&(h=new Be((function(){g=!0,i.abort()}))).V(a/1e3);var s=n.retryParameters.stallTimeout;return s&&(p=new Be((function(){g=!0,i.abort()}))),i})).ca((function(e){return h&&h.stop(),p&&p.stop(),null==e.timeMs&&(e.timeMs=Date.now()-d),{response:e,kf:l}}),(function(s){if(h&&h.stop(),p&&p.stop(),e.i)return Qr();if(g&&(s=new le(1,1,1003,n.uris[r],t)),s instanceof le){if(7001==s.code)throw s;if(1010==s.code)throw a;if(1==s.severity){var u=(new Map).set("error",s);return u=new na("retry",u),e.dispatchEvent(u),r=(r+1)%n.uris.length,fa(e,t,n,i,r,s,o)}}throw s}))}function ha(){this.g=0}function pa(e,t,n){$r.call(this,e,t),this.h=n}$r.prototype.abort=function(){return this.g=!0,this.i()},$r.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},$r.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);return i&&i.promise&&i.abort?(n.resolve(i.promise),function(){return i.abort()}):(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 hi,o=new le(2,7,7001);return this.promise.then(n(!0),n(!1)),new $r(a,(function(){return i()}))},B("shaka.util.AbortableOperation",$r),$r.prototype.chain=$r.prototype.ca,$r.prototype.finally=$r.prototype.finally,$r.all=ta,$r.prototype.abort=$r.prototype.abort,$r.notAbortable=ea,$r.completed=Zr,$r.aborted=Qr,$r.failed=Jr,na.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},na.prototype.stopImmediatePropagation=function(){this.g=!0},na.prototype.stopPropagation=function(){},B("shaka.util.FakeEvent",na),ra.prototype.addEventListener=function(e,t){this.U&&this.U.push(e,t)},ra.prototype.removeEventListener=function(e,t){this.U&&this.U.remove(e,t)},ra.prototype.dispatchEvent=function(e){if(!this.U)return!0;var t=this.U.get(e.type)||[],n=this.U.get("All");for(n&&(t=t.concat(n)),n=(t=l(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.sc,e.currentTarget=this.sc;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},ra.prototype.release=function(){this.U=null},sa.prototype.destroy=function(){for(var e=[],t=l(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)},m(la,ra),(i=la.prototype).Ld=function(e){this.m=e},i.xf=function(e){this.g.add(e)},i.Of=function(e){this.g.delete(e)},i.Ie=function(){this.g.clear()},i.yf=function(e){this.h.add(e)},i.Pf=function(e){this.h.delete(e)},i.Je=function(){this.h.clear()},i.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),ra.prototype.release.call(this),this.l.destroy()},i.request=function(e,t){var n=this,i=new ha;if(this.i){var r=Promise.reject(new le(2,7,7001));return r.catch((function(){})),new pa(r,(function(){return Promise.resolve()}),i)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?aa(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=aa(t.uris),r=function(e,t,n){for(var i=Zr(void 0),r={},a=(e=l(e.g)).next();!a.done;r={Zc:r.Zc},a=e.next())r.Zc=a.value,i=i.ca(function(e){return function(){return n.body&&(n.body=ae(n.body)),e.Zc(t,n)}}(r));return i.ca(void 0,(function(e){if(e instanceof le&&7001==e.code)throw e;throw new le(2,1,1006,e)}))}(this,e,t);var a=r.ca((function(){return fa(n,e,t,new Wr(t.retryParameters,!1),0,null,i)})),o=a.ca((function(t){return function(e,t,n){for(var i=Zr(void 0),r={},a=(e=l(e.h)).next();!a.done;r={$c:r.$c},a=e.next())r.$c=a.value,i=i.ca(function(e){return function(){var i=n.response;return i.data&&(i.data=ae(i.data)),e.$c(t,i)}}(r));return i.ca((function(){return n}),(function(e){var t=2;if(e instanceof le){if(7001==e.code)throw e;t=e.severity}throw new le(t,1,1007,e)}))}(n,e,t)})),s=Date.now(),u=0;r.promise.then((function(){u=Date.now()-s}),(function(){}));var c=0;a.promise.then((function(){c=Date.now()}),(function(){}));var d=o.ca((function(t){var i=Date.now()-c,r=t.response;return r.timeMs+=u,r.timeMs+=i,t.kf||!n.j||r.fromCache||e!=ga||n.j(r.timeMs,r.data.byteLength),r}),(function(e){throw e&&(e.severity=2),e}));return r=new pa(d.promise,(function(){return d.abort()}),i),ua(this.l,r),r},B("shaka.net.NetworkingEngine",la),la.prototype.request=la.prototype.request,la.prototype.destroy=la.prototype.destroy,la.makeRequest=da,la.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},la.prototype.clearAllResponseFilters=la.prototype.Je,la.prototype.unregisterResponseFilter=la.prototype.Pf,la.prototype.registerResponseFilter=la.prototype.yf,la.prototype.clearAllRequestFilters=la.prototype.Ie,la.prototype.unregisterRequestFilter=la.prototype.Of,la.prototype.registerRequestFilter=la.prototype.xf,la.unregisterScheme=function(e){delete va[e]},la.registerScheme=ca,la.prototype.setForceHTTPS=la.prototype.Ld,la.NumBytesRemainingClass=ha,m(pa,$r),la.PendingRequest=pa;var ga=1;la.RequestType={MANIFEST:0,SEGMENT:ga,LICENSE:2,APP:3,TIMING:4};var ma=3;la.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ma};var va={};function ya(){}function ba(e){return new Xn(e=pe(e)).Ia}function wa(e,t,n){function i(e){se(a).setUint32(o,e.byteLength,!0),o+=4,a.set(oe(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new le(2,6,6015);var r;r="string"==typeof t?me(t,!0):t,e=me(e=pe(e),!0);var a=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),o=0;return i(e),i(r),i(n),a}function Ta(e){for(var t=new Map,n=l(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function xa(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function Sa(e,t){if(!e&&!t)return!0;if(e&&!t||t&&!e)return!1;if(e.size!=t.size)return!1;for(var n=l(e),i=n.next();!i.done;i=n.next()){var r=l(i.value);if(i=r.next().value,r=r.next().value,!t.has(i))return!1;if((i=t.get(i))!=r||null==i)return!1}return!0}function Ea(e,t){var n=this;t=void 0===t?1:t,this.D=e,this.u=new Set,this.g=this.m=null,this.qa=this.L=!1,this.H=0,this.i=null,this.h=new _i,this.j=new Map,this.C=[],this.s=new hi,this.o=null,this.l=function(t){n.s.reject(t),e.onError(t)},this.ra=new Map,this.ea=new Map,this.U=new Be((function(){return function(e){var t=e.ra,n=e.ea;n.clear(),t.forEach((function(e,t){return n.set(t,e)})),t=Array.from(n.values()),t.length&&t.every((function(e){return"expired"==e}))&&e.l(new le(2,6,6014)),e.D.Ic(xa(n))}(n)})),this.F=!1,this.I=[],this.O=!1,this.la=new Be((function(){!function(e){e.j.forEach((function(t,n){var i=t.zd,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.D.onExpirationUpdated(n.sessionId,r),t.zd=r)}))}(n)})).Da(t),this.s.catch((function(){})),this.J=new Ni((function(){return function(e){return P((function(t){switch(t.g){case 1:return e.h.release(),e.h=null,e.s.reject(),e.la.stop(),e.la=null,e.U.stop(),e.U=null,w(t,Ba(e),2);case 2:if(!e.g){t.v(3);break}return x(t,4),w(t,e.g.setMediaKeys(null),6);case 6:E(t,5);break;case 4:A(t);case 5:e.g=null;case 3:e.i=null,e.u.clear(),e.m=null,e.C=[],e.o=null,e.l=function(){},e.D=null,e.W=!1,T(t)}}))}(n)})),this.W=!1}function Aa(e,t,n,i){return e.C=n,e.F=0<n.length,ka(e,t,!!i)}function ka(t,n,i){var r,a,o,s,u,d,f,h,p,g,m,v,y;return P((function(b){if(1==b.g){if(r=function(t){if(t=Ta(t.o.clearKeys),0==t.size)return null;var n=[],i=[];t.forEach((function(e,t){var r=nt(t),a=nt(e);r={kty:"oct",kid:et(r,!1),k:et(a,!1)},n.push(r),i.push(r.kid)})),t=JSON.stringify({keys:n});var r=JSON.stringify({kids:i});return r=[{initData:oe(ge(r)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,sessionType:"",initData:r,keyIds:new Set(i)}}(t))for(a=l(n),o=a.next();!o.done;o=a.next())(s=o.value).video&&(s.video.drmInfos=[r]),s.audio&&(s.audio.drmInfos=[r]);for((u=n.some((function(e){return!!(e.video&&e.video.drmInfos.length||e.audio&&e.audio.drmInfos.length)})))||(d=Ta(t.o.servers),function(e,t){var n=[];t.forEach((function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:new Set})}));for(var i=l(e),r=i.next();!r.done;r=i.next())(r=r.value).video&&(r.video.drmInfos=n),r.audio&&(r.audio.drmInfos=n)}(n,d)),f=l(n),o=f.next();!o.done;o=f.next())for(h=o.value,p=Ha(h),g=l(p),m=g.next();!m.done;m=g.next())qa(m.value,Ta(t.o.servers),Ta(t.o.advanced||{}));return i?w(b,mr(n,t.F,t.W),2):(v=function(e,t){for(var n=new Set,i=l(t),r=i.next();!r.done;r=i.next()){var a=l(Ha(r.value));for(r=a.next();!r.done;r=a.next())n.add(r.value)}for(i=l(n),r=i.next();!r.done;r=i.next())qa(r.value,Ta(e.o.servers),Ta(e.o.advanced||{}));a=e.F?"required":"optional";var o=e.F?["persistent-license"]:["temporary"];for(i=new Map,n=l(n),r=n.next();!r.done;r=n.next())r=r.value,i.set(r.keySystem,{initDataTypes:["cenc"],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:a,sessionTypes:o,label:r.keySystem,drmInfos:[]});for(n=l(t),r=n.next();!r.done;r=n.next())for(r=r.value,a=l([r.audio,r.video]),r=a.next();!r.done;r=a.next())if(o=r.value){var s=La(o),u=null;"ac-3"==o.codecs.toLowerCase()&&Ge()&&(u=La(o,"ec-3"));var d=l(o.drmInfos);for(r=d.next();!r.done;r=d.next()){var f=r.value;(r=i.get(f.keySystem)).drmInfos.push(f),f.initData&&f.initData.length&&(r.initDataTypes=[].concat(c(new Set(f.initData.map((function(e){return e.initDataType})))))),f.distinctiveIdentifierRequired&&(r.distinctiveIdentifier="required"),f.persistentStateRequired&&(r.persistentState="required"),f.sessionType&&(r.sessionTypes=[f.sessionType]);var h={robustness:(f="audio"==o.type?f.audioRobustness:f.videoRobustness)||"",contentType:s};"audio"==o.type?r.audioCapabilities.push(h):r.videoCapabilities.push(h),u&&(f={robustness:f||"",contentType:u},"audio"==o.type?r.audioCapabilities.push(f):r.videoCapabilities.push(f))}}return i}(t,n),b.v(2))}return u||Object.keys(t.o.servers).length?(y=ja(t,v,n,i),b.return(u?y:y.catch((function(){})))):(t.L=!0,b.return(Promise.resolve()))}))}function Ia(e){return P((function(t){if(1==t.g)return e.m&&e.i&&e.i.serverCertificate&&e.i.serverCertificate.length?(x(t,3),w(t,e.m.setServerCertificate(e.i.serverCertificate),5)):t.v(0);if(3!=t.g)return E(t,0);throw new le(2,6,6004,A(t).message)}))}function Ma(e){for(var t=(e.i?e.i.initData:[])||[],n=l(t),i=n.next();!i.done;i=n.next())Ca(e,(i=i.value).initDataType,i.initData);for(i=(n=l(e.C)).next();!i.done;i=n.next())_a(e,i.value);return t.length||e.C.length||e.s.resolve(),e.s}function Ca(e,t,n){for(var i=e.j.values(),r=(i=l(i)).next();!r.done;r=i.next())if(ie(n,r.value.initData)&&!We("Tizen 2"))return;!function(e,t,n){var i=e.i.sessionType;try{var r=e.m.createSession(i)}catch(t){return void e.l(new le(2,6,6005,t.message))}e.h.A(r,"message",(function(t){e.g&&e.o.delayLicenseRequestUntilPlayed&&e.g.paused&&!e.O?e.I.push(t):Ua(e,t)})),e.h.A(r,"keystatuseschange",(function(t){return Fa(e,t)})),e.j.set(r,{initData:n,loaded:!1,zd:1/0,Na:null,type:i});try{n=e.o.initDataTransform(n,t,e.i)}catch(n){return t=n,n instanceof le||(t=new le(2,6,6016,n)),void e.l(t)}e.o.logLicenseExchange&&et(n),r.generateRequest(t,n).catch((function(t){if(!e.J.g){e.j.delete(r);var n=t.errorCode;if(n&&n.systemCode){var i=n.systemCode;0>i&&(i+=Math.pow(2,32)),i="0x"+i.toString(16)}e.l(new le(2,6,6006,t.message,t,i))}}))}(e,t,n)}function Da(e){return e?e.keySystem:""}function Ra(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function Na(e,t){if(navigator.userAgent.match(/Edge\//))return!0;if(t=t.toLowerCase(),Ge()&&t.includes('codecs="ac-3"')){var n=t.replace("ac-3","ec-3");return e.u.has(t)||e.u.has(n)}return e.u.has(t)}function Pa(e){return e=Z(e=e.j.keys(),(function(e){return e.sessionId})),Array.from(e)}function La(e,t){var n=Ti(e.mimeType,t||e.codecs);return yi(n)?wi(e.type,n):n}function ja(e,t,n,i){var r,a,o,s,u,c,d,f,h,p,g,m,v;return P((function(y){switch(y.g){case 1:if(r=new Map,i){e:{for(var b=l(n),T=b.next();!T.done;T=b.next()){var S=l(Ha(T.value));for(T=S.next();!T.done;T=S.next()){var k=T.value;r.has(k.keySystem)||r.set(k.keySystem,[]),r.get(k.keySystem).push(k)}}if(1==r.size&&r.has(""))throw new le(2,6,6e3);for(S=(b=l([!0,!1])).next();!S.done;S=b.next())for(S=S.value,T=(k=l(n)).next();!T.done;T=k.next()){var I=l(T.value.decodingInfos);for(T=I.next();!T.done;T=I.next()){var M=T.value;if(M.supported&&M.keySystemAccess){var C=l(T=r.get(M.keySystemAccess.keySystem));for(T=C.next();!T.done;T=C.next())if(!!T.value.licenseServerUri==S){a=M.keySystemAccess;break e}}}}a=null}y.v(2);break}return w(y,function(e,t){var n,i,r,a,o,s,u,c,d,f,h,p;return P((function(g){switch(g.g){case 1:if(1==t.size&&t.has(""))throw new le(2,6,6e3);for(i=l(t.values()),r=i.next();!r.done;r=i.next())0==(a=r.value).audioCapabilities.length&&delete a.audioCapabilities,0==a.videoCapabilities.length&&delete a.videoCapabilities;o=l([!0,!1]),s=o.next();case 2:if(s.done){g.v(4);break}u=s.value,c=l(t.keys()),d=c.next();case 5:if(d.done){s=o.next(),g.v(2);break}if(f=d.value,h=t.get(f),p=h.drmInfos.some((function(e){return!!e.licenseServerUri})),p!=u){g.v(6);break}return x(g,8),w(g,navigator.requestMediaKeySystemAccess(f,[h]),10);case 10:return n=g.h,g.return(n);case 8:A(g);case 9:Pi(e.J);case 6:d=c.next(),g.v(5);break;case 4:return g.return(n)}}))}(e,t),3);case 3:a=y.h;case 2:if(!(o=a))throw new le(2,6,6001);for(Pi(e.J),x(y,4),e.u.clear(),s=o.getConfiguration(),u=s.audioCapabilities||[],c=s.videoCapabilities||[],d=l(u),f=d.next();!f.done;f=d.next())h=f.value,e.u.add(h.contentType.toLowerCase());for(p=l(c),f=p.next();!f.done;f=p.next())g=f.value,e.u.add(g.contentType.toLowerCase());if(i){for(S=o.keySystem,Ga(b=r.get(o.keySystem),k=[],T=[],I=[],M=new Set),C=e.F?"persistent-license":"temporary",S={keySystem:S,licenseServerUri:k[0],distinctiveIdentifierRequired:b[0].distinctiveIdentifierRequired,persistentStateRequired:b[0].persistentStateRequired,sessionType:b[0].sessionType||C,audioRobustness:b[0].audioRobustness||"",videoRobustness:b[0].videoRobustness||"",serverCertificate:T[0],initData:I,keyIds:M},k=(b=l(b)).next();!k.done;k=b.next())(k=k.value).distinctiveIdentifierRequired&&(S.distinctiveIdentifierRequired=k.distinctiveIdentifierRequired),k.persistentStateRequired&&(S.persistentStateRequired=k.persistentStateRequired);b=S}else b=o.keySystem,S=t.get(o.keySystem),k=[],T=[],I=[],M=new Set,Ga(S.drmInfos,k,T,I,M),b={keySystem:b,licenseServerUri:k[0],distinctiveIdentifierRequired:"required"==S.distinctiveIdentifier,persistentStateRequired:"required"==S.persistentState,sessionType:S.sessionTypes[0]||"temporary",audioRobustness:(S.audioCapabilities?S.audioCapabilities[0].robustness:"")||"",videoRobustness:(S.videoCapabilities?S.videoCapabilities[0].robustness:"")||"",serverCertificate:T[0],initData:I,keyIds:M};if(e.i=b,!e.i.licenseServerUri)throw new le(2,6,6012,e.i.keySystem);return w(y,o.createMediaKeys(),6);case 6:return m=y.h,Pi(e.J),e.m=m,e.L=!0,w(y,Ia(e),7);case 7:Pi(e.J),E(y,0);break;case 4:if(v=A(y),Pi(e.J,v),e.i=null,e.u.clear(),v instanceof le)throw v;throw new le(2,6,6002,v.message)}}))}function _a(e,t){var n,i,r,a,o;return P((function(s){switch(s.g){case 1:try{n=e.m.createSession("persistent-license")}catch(t){return i=new le(2,6,6005,t.message),e.l(i),s.return(Promise.reject(i))}return e.h.A(n,"message",(function(t){e.g&&e.o.delayLicenseRequestUntilPlayed&&e.g.paused&&!e.O?e.I.push(t):Ua(e,t)})),e.h.A(n,"keystatuseschange",(function(t){return Fa(e,t)})),r={initData:null,loaded:!1,zd:1/0,Na:null,type:"persistent-license"},e.j.set(n,r),x(s,2),w(s,n.load(t),4);case 4:return a=s.h,Pi(e.J),a?(r.loaded=!0,Ka(e)&&e.s.resolve(),s.return(n)):(e.j.delete(n),e.l(new le(2,6,6013)),s.return(Promise.resolve()));case 2:o=A(s),Pi(e.J,o),e.j.delete(n),e.l(new le(2,6,6005,o.message));case 3:return s.return(Promise.resolve())}}))}function Oa(e,t,n){return"skd"==t&&(t=n.serverCertificate,e=wa(e,n=ba(e),t)),e}function Ua(e,t){var n,i,r,a,o,s,u,c,d,f,h,p;P((function(g){switch(g.g){case 1:return n=t.target,e.o.logLicenseExchange&&et(t.message),i=e.j.get(n),r=e.i.licenseServerUri,a=e.o.advanced[e.i.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(r=a.individualizationServer),(o=da([r],e.o.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,Ra(e.i.keySystem)&&function(e){var t=he(e.body,!0,!0);if(t.includes("PlayReadyKeyMessage")){for(var n=l((t=(new DOMParser).parseFromString(t,"application/xml")).getElementsByTagName("HttpHeader")),i=n.next();!i.done;i=n.next())i=i.value,e.headers[i.getElementsByTagName("name")[0].textContent]=i.getElementsByTagName("value")[0].textContent;e.body=tt(t.getElementsByTagName("Challenge")[0].textContent)}else e.headers["Content-Type"]="text/xml; charset=utf-8"}(o),s=Date.now(),x(g,2),w(g,e.D.Cb.request(2,o).promise,4);case 4:u=g.h,E(g,3);break;case 2:return c=A(g),d=new le(2,6,6007,c),e.l(d),i&&i.Na&&i.Na.reject(d),g.return();case 3:return e.J.g?g.return():(e.H+=(Date.now()-s)/1e3,e.o.logLicenseExchange&&et(u.data),x(g,5),w(g,n.update(u.data),7));case 7:E(g,6);break;case 5:return f=A(g),h=new le(2,6,6008,f.message),e.l(h),i&&i.Na&&i.Na.reject(h),g.return();case 6:p=new na("drmsessionupdate"),e.D.onEvent(p),i&&(i.Na&&i.Na.resolve(),new Be((function(){i.loaded=!0,Ka(e)&&e.s.resolve()})).V(Xa)),T(g)}}))}function Fa(e,t){var n=t.target,i=e.j.get(n),r=!1;n.keyStatuses.forEach((function(t,n){if("string"==typeof n){var a=n;n=t,t=a}if(Ra(e.i.keySystem)&&16==n.byteLength&&navigator.userAgent.match(/Edge?\//)){var o=(a=se(n)).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&&(i.loaded=!0),"expired"==t&&(r=!0),a=it(n),e.ra.set(a,t)}));var a=n.expiration-Date.now();(0>a||r&&1e3>a)&&i&&!i.Na&&(e.j.delete(n),n.close().catch((function(){}))),Ka(e)&&(e.s.resolve(),e.U.V(Wa))}function Ba(e){var t;return P((function(n){return t=Array.from(e.j.entries()),e.j.clear(),w(n,Promise.all(t.map((function(t){var n=(t=l(t)).next().value,i=t.next().value;return P((function(t){return 1==t.g?(x(t,2),e.qa||e.C.includes(n.sessionId)||"persistent-license"!==i.type?w(t,function(e){var t;return P((function(n){return 1==n.g?(t=new Promise((function(e,t){new Be(t).V(za)})),x(n,2),w(n,Promise.race([Promise.all([e.close(),e.closed]),t]),4)):2!=n.g?E(n,0):(A(n),void T(n))}))}(n),5):w(t,n.remove(),5)):2!=t.g?E(t,0):(A(t),void T(t))}))}))),0)}))}function Va(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],i=l(e),r=i.next();!r.done;r=i.next()){r=r.value;for(var a={},o=l(t),s=o.next();!s.done;a={Fa:a.Fa},s=o.next())if(s=s.value,r.keySystem==s.keySystem){a.Fa=[],a.Fa=a.Fa.concat(r.initData||[]),a.Fa=a.Fa.concat(s.initData||[]),a.Fa=a.Fa.filter(function(e){return function(t,n){return void 0===t.keyId||n===e.Fa.findIndex((function(e){return e.keyId===t.keyId}))}}(a)),o=r.keyIds&&s.keyIds?new Set([].concat(c(r.keyIds),c(s.keyIds))):r.keyIds||s.keyIds,n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||s.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||s.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||s.persistentStateRequired,videoRobustness:r.videoRobustness||s.videoRobustness,audioRobustness:r.audioRobustness||s.audioRobustness,serverCertificate:r.serverCertificate||s.serverCertificate,initData:a.Fa,keyIds:o});break}}return n}function Ha(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function Ka(e){return function(e,t){for(var n=l(e),i=n.next();!i.done;i=n.next())if(!t(i.value))return!1;return!0}(e=e.j.values(),(function(e){return e.loaded}))}function Ga(e,t,n,i,r){for(var a={},o=(e=l(e)).next();!o.done;a={za:a.za},o=e.next()){if(a.za=o.value,t.includes(a.za.licenseServerUri)||t.push(a.za.licenseServerUri),a.za.serverCertificate&&(n.some(function(e){return function(t){return ie(t,e.za.serverCertificate)}}(a))||n.push(a.za.serverCertificate)),a.za.initData){o={};for(var s=l(a.za.initData),u=s.next();!u.done;o={lc:o.lc},u=s.next())o.lc=u.value,i.some(function(e){return function(t){var n=e.lc;return!(!t.keyId||t.keyId!=n.keyId)||t.initDataType==n.initDataType&&ie(t.initData,n.initData)}}(o))||i.push(o.lc)}if(a.za.keyIds)for(s=(o=l(a.za.keyIds)).next();!s.done;s=o.next())r.add(s.value)}}function qa(t,n,i){!t.keySystem||"org.w3.clearkey"==t.keySystem&&t.licenseServerUri||(n.size&&(n=n.get(t.keySystem)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=new Set),(i=i.get(t.keySystem))&&(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)),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==t.keySystem&&(t.keySystem="com.chromecast.playready"))}B("shaka.util.FairPlayUtils",ya),ya.initDataTransform=wa,ya.defaultGetContentId=ba,(i=Ea.prototype).destroy=function(){return this.J.destroy()},i.configure=function(e){this.o=e},i.Qb=function(e){var t,n=this;return P((function(i){if(1==i.g)return n.m?(n.g=e,n.h.wa(n.g,"play",(function(){for(var e=l(n.I),t=e.next();!t.done;t=e.next())Ua(n,t.value);n.O=!0,n.I=[]})),"webkitCurrentPlaybackTargetIsWireless"in n.g&&n.h.A(n.g,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return Ba(n)})),w(i,n.g.setMediaKeys(n.m).catch((function(e){return Promise.reject(new le(2,6,6003,e.message))})),2)):(n.h.wa(e,"encrypted",(function(){n.l(new le(2,6,6010))})),i.return());Pi(n.J),Ma(n),n.i.initData.length||n.C.length||(t=function(e){return Ca(n,e.initDataType,oe(e.initData))},n.h.A(n.g,"encrypted",t)),T(i)}))},i.Ub=function(){for(var e=1/0,t=this.j.keys(),n=(t=l(t)).next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},i.Bc=function(){return xa(this.ea)};var za=1,Xa=5,Wa=.5,Ya=new ce((function(){return ae(new Uint8Array([0]))}));function $a(){}function Ja(e,t,n,i){var r,a,o,s;return P((function(u){if(1==u.g)return i&&(r=eo[i.toLowerCase()])?u.return(r):(a=Za(e))&&(o=to[a])?u.return(o):i?u.v(2):w(u,Qa(e,t,n),3);if(2!=u.g&&(i=u.h)&&(s=eo[i]))return u.return(s);throw new le(2,4,4e3,e)}))}function Qa(e,t,n){var i,r,a;return P((function(o){return 1==o.g?((i=da([e],n)).method="HEAD",w(o,t.request(0,i).promise,2)):(r=o.h,a=r.headers["content-type"],o.return(a?a.toLowerCase().split(";").shift():""))}))}function Za(e){return 1==(e=new Xn(e).ya.split("/").pop().split(".")).length?"":e.pop().toLowerCase()}B("shaka.media.ManifestParser",$a),$a.unregisterParserByMime=function(e){delete eo[e]},$a.registerParserByMime=function(e,t){eo[e]=t},$a.registerParserByExtension=function(e,t){to[e]=t};var eo={},to={};function no(e,t,n){this.oa=e,this.ka=t,this.fa=n}function io(e,t,n,i,r,a,o,s,u,l){l=void 0===l?[]:l,this.startTime=e,this.j=this.endTime=t,this.i=n,this.ka=i,this.fa=r,this.h=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.g=l}function ro(e,t,n){this.j=e,this.Lc=t,this.m=this.l=1/0,this.g=1,this.h=this.i=null,this.s=0,this.u=!0,this.C=0,this.F=void 0===n||n,this.H=0}function ao(e,t){this.j=e,this.m=so(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.s=t,this.i=function(){}}function oo(e){this.g=e}function so(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime;for(var n=(e=l(qn(e.g.buffered))).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 uo(e,t,n,i,r){var a=this;this.g=e,this.C=t,this.o=n,this.u=r,this.h=new _i,this.s=!1,this.F=e.readyState,this.j=!1,this.i=i,this.m=!1,this.h.A(e,"waiting",(function(){return lo(a)})),this.l=new Be((function(){lo(a)})).Da(.25)}function lo(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.s)return}else e.s=!1;if(!e.g.paused||0==e.g.currentTime&&(e.g.autoplay||0!=e.g.currentTime)){var t;if(e.g.readyState!=e.F&&(e.j=!1,e.F=e.g.readyState),!(t=!e.i)){var n=(t=e.i).j,i=so(n),r=n.g.currentTime,a=Date.now()/1e3;t.g==r&&t.m==i||(t.l=a,t.g=r,t.m=i,t.h=!1),(i=(r=a-t.l)>=t.s&&i&&!t.h)&&(t.i(t.g,r),t.h=!0,t.g=n.g.currentTime),t=!i}if(t){r=e.o.smallGapLimit;var o=e.g.currentTime;if(n=function(e,t,n){return!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)?null:0<=(e=qn(e).findIndex((function(e,i,r){return e.start>t&&(0==i||r[i-1].end-t<=n)})))?e:null}(t=e.g.buffered,o,e.o.gapDetectionThreshold),!(null==n||0==n&&!e.m||(i=t.start(n),i>=e.C.Ua()))){var s=i-o;r=s<=r,a=!1,.001>s||(r||e.j||(e.j=!0,(o=new na("largegap",o=(new Map).set("currentTime",o).set("gapSize",s))).cancelable=!0,e.u(o),e.o.jumpLargeGaps&&!o.defaultPrevented&&(a=!0)),!r&&!a)||(0!=n&&t.end(n-1),e.g.currentTime=i)}}}}}function co(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=fo.value().get(t),n.wa(e,t,i))}no.prototype.Xb=function(){return this.ka},no.prototype.Tb=function(){return this.fa},B("shaka.media.InitSegmentReference",no),no.prototype.getEndByte=no.prototype.Tb,no.prototype.getStartByte=no.prototype.Xb,(i=io.prototype).oa=function(){return this.i()},i.df=function(){return this.startTime},i.Re=function(){return this.endTime},i.Xb=function(){return this.ka},i.Tb=function(){return this.fa},B("shaka.media.SegmentReference",io),io.prototype.getEndByte=io.prototype.Tb,io.prototype.getStartByte=io.prototype.Xb,io.prototype.getEndTime=io.prototype.Re,io.prototype.getStartTime=io.prototype.df,io.prototype.getUris=io.prototype.oa,(i=ro.prototype).getDuration=function(){return this.l},i.Xe=function(){return this.g},i.Ma=function(e){this.l=e},i.cf=function(){return this.j},i.se=function(e){this.s=e},i.fc=function(e){this.u=e},i.Od=function(e){this.m=e},i.Jf=function(e){this.Lc=e},i.Qe=function(){return this.Lc},i.Db=function(e){if(0!=e.length){var t=e[e.length-1].endTime;this.xd(e[0].startTime),this.g=e.reduce((function(e,t){return Math.max(e,t.endTime-t.startTime)}),this.g),this.h=Math.max(this.h,t),null!=this.j&&this.F&&(this.j=(Date.now()+this.s)/1e3-this.h-this.g)}},i.xd=function(e){this.i=null==this.i?e:Math.min(this.i,e)},i.wd=function(e){this.g=Math.max(this.g,e)},i.offset=function(e){null!=this.i&&(this.i+=e),null!=this.h&&(this.h+=e)},i.Z=function(){return 1/0==this.l&&!this.u},i.mb=function(){return 1/0!=this.l&&!this.u},i.Va=function(){return Math.max(this.C,this.ib()-this.m)},i.te=function(e){this.C=e},i.ib=function(){return this.Z()||this.mb()?Math.min(Math.max(0,(Date.now()+this.s)/1e3-this.g-this.j)+this.H,this.l):this.h||this.l},i.Wb=function(e){var t=Math.max(this.i,this.C);return 1/0==this.m?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.ib()-this.m+e,this.Ua()))},i.zb=function(){return this.Wb(0)},i.Ua=function(){return Math.max(0,this.ib()-(this.Z()||this.mb()?this.Lc:0))},i.we=function(){return!(null==this.j||null!=this.h&&this.F)},i.re=function(e){this.H=e},B("shaka.media.PresentationTimeline",ro),ro.prototype.setAvailabilityTimeOffset=ro.prototype.re,ro.prototype.usingPresentationStartTime=ro.prototype.we,ro.prototype.getSeekRangeEnd=ro.prototype.Ua,ro.prototype.getSeekRangeStart=ro.prototype.zb,ro.prototype.getSafeSeekRangeStart=ro.prototype.Wb,ro.prototype.getSegmentAvailabilityEnd=ro.prototype.ib,ro.prototype.setUserSeekStart=ro.prototype.te,ro.prototype.getSegmentAvailabilityStart=ro.prototype.Va,ro.prototype.isInProgress=ro.prototype.mb,ro.prototype.isLive=ro.prototype.Z,ro.prototype.offset=ro.prototype.offset,ro.prototype.notifyMaxSegmentDuration=ro.prototype.wd,ro.prototype.notifyMinSegmentStartTime=ro.prototype.xd,ro.prototype.notifySegments=ro.prototype.Db,ro.prototype.getDelay=ro.prototype.Qe,ro.prototype.setDelay=ro.prototype.Jf,ro.prototype.setSegmentAvailabilityDuration=ro.prototype.Od,ro.prototype.setStatic=ro.prototype.fc,ro.prototype.setClockOffset=ro.prototype.se,ro.prototype.getPresentationStartTime=ro.prototype.cf,ro.prototype.setDuration=ro.prototype.Ma,ro.prototype.getMaxSegmentDuration=ro.prototype.Xe,ro.prototype.getDuration=ro.prototype.getDuration,ao.prototype.release=function(){this.j=null,this.i=function(){}},uo.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.l&&(this.l.stop(),this.l=null),this.i&&(this.i.release(),this.i=null),this.g=this.C=this.u=null},uo.prototype.Bd=function(){this.m=!0,lo(this)};var fo=new ce((function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])}));function ho(e,t,n){var i=this;this.g=e,this.l=t,this.j=n,this.m=!1,this.h=new _i,this.i=new yo(e),co(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){mo(i,i.j)}))}function po(e){return e.m?e.g.currentTime:e.j}function go(e,t){0<e.g.readyState?bo(e.i,t):co(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){mo(e,e.j)}))}function mo(e,t){.001>Math.abs(e.g.currentTime-t)?vo(e):(e.h.wa(e.g,"seeking",(function(){vo(e)})),bo(e.i,0==e.g.currentTime?t:e.g.currentTime))}function vo(e){e.m=!0,e.h.A(e.g,"seeking",(function(){return e.l()}))}function yo(e){var t=this;this.h=e,this.m=10,this.l=this.j=this.i=0,this.g=new Be((function(){0>=t.i||t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)}))}function bo(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.m,e.h.currentTime=t,e.g.Da(.1)}function wo(e){var t=this;this.g=e,this.j=!1,this.i=null,this.h=new _i,co(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,(function(){null==t.i||0==t.i?t.j=!0:(t.h.wa(t.g,"seeking",(function(){t.j=!0})),t.g.currentTime=Math.max(0,t.g.currentTime+t.i))}))}function To(e,t,n,i,r,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.H=t.minBufferTime||0,this.o=n,this.C=r,this.u=null,this.j=new uo(e,t.presentationTimeline,n,function(e,t){if(!t.stallEnabled)return null;var n=t.stallSkip,i=new ao(new oo(e),t.stallThreshold);return function(e,t){e.i=t}(i,(function(){n?e.currentTime+=n:(e.pause(),e.play())})),i}(e,n),a),this.h=new ho(e,(function(){var e=o.j;e.s=!0,e.m=!1,e.j=!1;var t=po(o.h);return e=So(o,t),.001<Math.abs(e-t)&&(t=Date.now()/1e3,!o.u||o.u<t-1)?(o.u=t,go(o.h,e),e=void 0):(o.C(),e=void 0),e}),function(e,t){return null==t?t=1/0>e.g.getDuration()?e.g.zb():e.g.Ua():0>t&&(t=e.g.Ua()+t),xo(e,Eo(e,t))}(this,i)),this.s=new Be((function(){if(0!=o.i.readyState&&!o.i.paused){var e=po(o.h),t=o.g.zb(),n=o.g.Ua();3>n-t&&(t=n-3),e<t&&(e=So(o,e),o.i.currentTime=e)}})).Da(.25)}function xo(e,t){var n=e.g.getDuration();return t>=n?n-e.o.durationBackoff:t}function So(e,t){var n=Math.max(e.H,e.o.rebufferingGoal),i=e.o.safeSeekOffset,r=e.g.zb(),a=e.g.Ua(),o=e.g.getDuration();3>a-r&&(r=a-3);var s=e.g.Wb(n),u=e.g.Wb(i);return n=e.g.Wb(n+i),t>=o?xo(e,t):t>a?a:t<r?Kn(e.i.buffered,u)?u:n:t>=s||Kn(e.i.buffered,t)?t:n}function Eo(e,t){var n=e.g.zb();return t<n||t>(n=e.g.Ua())?n:t}function Ao(e){this.M=e,this.g=null,this.h=0,this.i=!1}function ko(e,t,n){return new Ao([new io(e,e+t,(function(){return n}),0,null,null,e,e,e+t)])}function Io(e,t,n){this.i=e,this.h=t,this.g=n}function Mo(){Ao.call(this,[]),this.j=[]}function Co(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Dc(),this.h=new Be((function(){t.g.ie(.25*t.i)}))}function Do(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.Dc()!=t&&e.g.Nd(t))}catch(e){}e.h.Da(.25),0!=e.g.Dc()&&e.g.Nd(0)}function Ro(e){var t=this;this.h=e,this.g=new Set,this.i=new Be((function(){No(t,!1)})).Da(.25)}function No(e,t){for(var n=l(e.g),i=n.next();!i.done;i=n.next()){i=i.value;for(var r=e.h.currentTime,a=t,o=l(i.i.g),s=o.next();!s.done;s=o.next()){s=s.value;var u=i.g.get(s),c=r<s.startTime?_o:r>s.endTime?Uo:Oo;i.g.set(s,c);for(var d=l(i.j),f=d.next();!f.done;f=d.next())(f=f.value).tb==u&&f.sb==c&&f.lb(s,a)}}}function Po(e){ra.call(this);var t=this;this.g=new Set,this.i=e,this.h=new Be((function(){for(var e=t.i(),n=l(t.g),i=n.next();!i.done;i=n.next())(i=i.value).endTime<e.start&&(t.g.delete(i),i=new na("regionremove",new Map([["region",i]])),t.dispatchEvent(i))})).Da(2)}function Lo(e){ra.call(this);var t=this;this.i=e,this.g=new Map,this.j=[{tb:null,sb:Oo,lb:function(e,n){return jo(t,"enter",e,n)}},{tb:_o,sb:Oo,lb:function(e,n){return jo(t,"enter",e,n)}},{tb:Uo,sb:Oo,lb:function(e,n){return jo(t,"enter",e,n)}},{tb:Oo,sb:_o,lb:function(e,n){return jo(t,"exit",e,n)}},{tb:Oo,sb:Uo,lb:function(e,n){return jo(t,"exit",e,n)}},{tb:_o,sb:Uo,lb:function(e,n){return jo(t,"skip",e,n)}},{tb:Uo,sb:_o,lb:function(e,n){return jo(t,"skip",e,n)}}],this.h=new _i,this.h.A(this.i,"regionremove",(function(e){t.g.delete(e.region)}))}function jo(e,t,n,i){t=new na(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}ho.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.l=function(){},this.g=null},yo.prototype.release=function(){this.g&&(this.g.stop(),this.g=null),this.h=null},wo.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.g=null},wo.prototype.m=function(e){this.i=this.j?this.i:e},wo.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0},wo.prototype.F=function(){},To.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.s&&(this.s.stop(),this.s=null),this.i=this.h=this.g=this.o=null,this.C=function(){}},To.prototype.m=function(e){go(this.h,e)},To.prototype.l=function(){var e=po(this.h);return 0<this.i.readyState&&!this.i.paused?Eo(this,e):e},To.prototype.F=function(){this.j.Bd()},(i=Ao.prototype).destroy=function(){return xe("shaka.media.SegmentIndex","Please use release() instead of destroy()."),this.release(),Promise.resolve()},i.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)},i.nf=function(){this.i=!0},i.find=function(e){for(var t=this.M.length-1,n=t;0<=n;--n){var i=this.M[n],r=n<t?this.M[n+1].startTime:i.endTime;if(e>=i.startTime&&e<r)return n+this.h}return this.M.length&&e<this.M[0].startTime?this.h:null},i.get=function(e){return 0==this.M.length||0>(e-=this.h)||e>=this.M.length?null:this.M[e]},i.offset=function(e){if(!this.i)for(var t=l(this.M),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.timestampOffset+=e},i.Gc=function(e){!this.i&&e.length&&(this.M=this.M.filter((function(t){return t.startTime<e[0].startTime})),this.M.push.apply(this.M,c(e)))},i.Bb=function(e,t){var n=this;e=e.filter((function(e){return e.endTime>t&&(0==n.M.length||e.endTime>n.M[0].startTime)})),this.Gc(e),this.gb(t)},i.gb=function(e){if(!this.i){var t=this.M.length;this.M=this.M.filter((function(t){return t.endTime>e})),this.h+=t-this.M.length}},i.ab=function(e,t,n){if(n=void 0!==n&&n,!this.i){for(;this.M.length&&this.M[this.M.length-1].startTime>=t;)this.M.pop();for(;this.M.length&&this.M[0].endTime<=e;)this.M.shift(),n||this.h++;0!=this.M.length&&(e=this.M[this.M.length-1],this.M[this.M.length-1]=new io(e.startTime,t,e.i,e.ka,e.fa,e.h,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd))}},i.Oc=function(e,t){var n=this;this.i||(this.g&&this.g.stop(),this.g=new Be((function(){var e=t();e?n.M.push.apply(n.M,c(e)):(n.g.stop(),n.g=null)})),this.g.Da(e))},Ao.prototype[Symbol.iterator]=function(){return this.yb(0)},Ao.prototype.yb=function(e){var t=this.find(e);if(null==t)return null;t--;var n=this.get(t+1),i=-1;if(n&&0<n.g.length)for(var r=n.g.length-1;0<=r;--r){var a=n.g[r];if(e>=a.startTime&&e<a.endTime){t++,i=r-1;break}}return new Io(this,t,i)},B("shaka.media.SegmentIndex",Ao),Ao.forSingleSegment=ko,Ao.prototype.getIteratorForTime=Ao.prototype.yb,Ao.prototype.updateEvery=Ao.prototype.Oc,Ao.prototype.fit=Ao.prototype.ab,Ao.prototype.evict=Ao.prototype.gb,Ao.prototype.mergeAndEvict=Ao.prototype.Bb,Ao.prototype.merge=Ao.prototype.Gc,Ao.prototype.offset=Ao.prototype.offset,Ao.prototype.get=Ao.prototype.get,Ao.prototype.find=Ao.prototype.find,Ao.prototype.markImmutable=Ao.prototype.nf,Ao.prototype.release=Ao.prototype.release,Ao.prototype.destroy=Ao.prototype.destroy,Io.prototype.seek=function(e){return xe("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek()."),(e=this.i.yb(e))?(this.h=e.h,this.g=e.g):(this.h=Number.MAX_VALUE,this.g=0),this.next().value},Io.prototype.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.oa().length&&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},Io.prototype.next=function(){var e=this.i.get(this.h);return e&&0<e.g.length?(this.g++,e.oa().length&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},B("shaka.media.SegmentIterator",Io),Io.prototype.next=Io.prototype.next,Io.prototype.current=Io.prototype.current,Io.prototype.seek=Io.prototype.seek,m(Mo,Ao),(i=Mo.prototype).clone=function(){var e=new Mo;return e.j=this.j.slice(),e},i.release=function(){for(var e=l(this.j),t=e.next();!t.done;t=e.next())t.value.release();this.j=[]},i.find=function(e){for(var t=0,n=l(this.j),i=n.next();!i.done;i=n.next()){var r=(i=i.value).find(e);if(null!=r)return r+t;t+=i.h+i.M.length}return null},i.get=function(e){for(var t=0,n=l(this.j),i=n.next();!i.done;i=n.next()){var r=(i=i.value).get(e-t);if(r)return r;t+=i.h+i.M.length}return null},i.offset=function(){},i.Gc=function(){},i.gb=function(){},i.Bb=function(){},i.ab=function(){},i.Oc=function(){},B("shaka.media.MetaSegmentIndex",Mo),Mo.prototype.updateEvery=Mo.prototype.Oc,Mo.prototype.fit=Mo.prototype.ab,Mo.prototype.mergeAndEvict=Mo.prototype.Bb,Mo.prototype.evict=Mo.prototype.gb,Mo.prototype.merge=Mo.prototype.Gc,Mo.prototype.offset=Mo.prototype.offset,Mo.prototype.get=Mo.prototype.get,Mo.prototype.find=Mo.prototype.find,Mo.prototype.release=Mo.prototype.release,Co.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},Co.prototype.set=function(e){this.i=e,Do(this)},Co.prototype.Ac=function(){return this.g.Ac()},Ro.prototype.release=function(){this.i.stop();for(var e=l(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},m(Po,ra),Po.prototype.release=function(){this.g.clear(),this.h.stop(),ra.prototype.release.call(this)},m(Lo,ra),Lo.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,ra.prototype.release.call(this)};var _o=1,Oo=2,Uo=3;function Fo(e,t,n,i,r){return e=da(e,i,r),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function Bo(e,t){var n=this;this.D=t,this.B=e,this.o=null,this.l=1,this.i=this.h=null,this.g=new Map,this.m=!1,this.s=null,this.j=!1,this.J=new Ni((function(){return function(e){var t,n,i,r;return P((function(a){if(1==a.g){for(t=[],n=l(e.g.values()),i=n.next();!i.done;i=n.next())Qo(r=i.value),t.push(Zo(r));return w(a,Promise.all(t),2)}e.g.clear(),e.D=null,e.B=null,e.o=null,T(a)}))}(n)}))}function Vo(e,t){var n=e.g.get("video");if(n){var i=n.stream;if(i)if(t){var r=i.trickModeVideo;r&&!n.pb&&(Go(e,r,!1,0,!1),n.pb=i)}else(i=n.pb)&&(n.pb=null,Go(e,i,!0,0,!1))}}function Ho(e,t,n,i,r){n=void 0!==n&&n,i=void 0===i?0:i,r=void 0!==r&&r,e.h=t,e.m&&(t.video&&Go(e,t.video,n,i,r),t.audio&&Go(e,t.audio,n,i,r))}function Ko(e,t){e.i=t,e.m&&Go(e,t,!0,0,!1)}function Go(e,t,n,i,r){var a=e.g.get(t.type);a||t.type!=ci?a&&(a.pb&&(t.trickModeVideo?(a.pb=t,t=t.trickModeVideo):a.pb=null),a.stream!=t||r)&&(t.type==ci&&Vi(e.D.S,Ti(t.mimeType,t.codecs)),a.stream=t,a.da=null,n&&(a.Rb?a.Rc=!0:a.La?(a.rb=!0,a.wc=i,a.Rc=!0):(Qo(a),$o(e,a,!0,i).catch((function(t){e.D&&e.D.onError(t)})))),function(e,t){var n,i;return P((function(r){if(1==r.g)return t.xa?(n=t.stream,i=t.xa,n.segmentIndex?r.v(2):w(r,n.createSegmentIndex(),2)):r.return();if(t.xa!=i||t.stream!=n)return r.return();var a=e.D.Cc(),o=Gi(e.D.S,t.type),s=t.stream.segmentIndex.find(t.Ca?t.Ca.endTime:a),u=null==s?null:t.stream.segmentIndex.get(s);s=u&&u.fa?u.fa-u.ka:null,u&&!s&&(s=(u.endTime-u.startTime)*(t.stream.bandwidth||0)/8),s?((u=u.h)&&(s+=(u.fa?u.fa-u.ka:null)||0),a=8*s/(u=e.D.getBandwidthEstimate())<(o||0)-a-Math.max(e.B.minBufferTime||0,e.o.rebufferingGoal)||t.xa.h.g>s):a=!1,a&&t.xa.abort(),T(r)}))}(e,a).catch((function(t){e.D&&e.D.onError(t)}))):function(e,t){var n,i,r,a;P((function(o){switch(o.g){case 1:return n=di,x(o,2),w(o,Xi(e.D.S,n.ba),4);case 4:E(o,3);break;case 2:i=A(o),e.D&&e.D.onError(i);case 3:r=Ti(t.mimeType,t.codecs),Vi(e.D.S,r),(e.D.S.m.isTextVisible()||e.o.alwaysStreamText)&&(a=zo(t),e.g.set(n.ba,a),Jo(e,a,0)),T(o)}}))}(e,t)}function qo(e,t){t.Rb||t.rb||(t.La?(t.rb=!0,t.wc=0):null==Ki(e.D.S,t.type)?null==t.Oa&&Jo(e,t,0):(Qo(t),$o(e,t,!1,0).catch((function(t){e.D&&e.D.onError(t)}))))}function zo(e){return{stream:e,type:e.type,da:null,Ca:null,Fc:null,td:null,sd:null,rd:null,pb:null,endOfStream:!1,La:!1,Oa:null,rb:!1,wc:0,Rc:!1,Rb:!1,Ed:!1,Yb:!1,xa:null}}function Xo(e,t,n,i,r,a){var o;return P((function(s){return 1==s.g?(o=i.closedCaptions&&0<i.closedCaptions.size,null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length&&(new De).T("emsg",(function(t){var n=i.emsgSchemeIdUris;if(0===t.version)var a=t.reader.cc(),o=t.reader.cc(),s=t.reader.N(),u=t.reader.N(),l=t.reader.N(),c=t.reader.N(),d=r.startTime+u/s;else s=t.reader.N(),u=(d=t.reader.Hb()/s+r.timestampOffset)-r.startTime,l=t.reader.N(),c=t.reader.N(),a=t.reader.cc(),o=t.reader.cc();t=t.reader.bb(t.reader.R.byteLength-t.reader.$()),n&&n.includes(a)&&("urn:mpeg:dash:event:2012"==a?e.D.sf():(n=(new Map).set("detail",{startTime:d,endTime:d+l/s,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:u,eventDuration:l,id:c,messageData:t}),n=new na(mu,n),e.D.onEvent(n)))})).parse(a),w(s,function(e,t,n){var i,r,a;return P((function(o){if(1==o.g)return i=Math.max(e.o.bufferBehind,e.B.presentationTimeline.g),null==(r=Ki(e.D.S,t.type))||.01>=(a=n-r-i)?o.return():w(o,e.D.S.remove(t.type,r,r+a),2);Pi(e.J),T(o)}))}(e,t,n),2)):3!=s.g?(Pi(e.J),w(s,zi(e.D.S,t.type,a,r.startTime,r.endTime,o),3)):(Pi(e.J),void T(s))}))}function Wo(e){return e&&e.type==ci&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function Yo(e,t,n,i){var r,a,o,s;return P((function(u){return 1==u.g?(r=ga,a=Fo(n.oa(),n.ka,n.fa,e.o.retryParameters,i),o=e.D.Cb.request(r,a),t.xa=o,w(u,o.promise,2)):(s=u.h,t.xa=null,u.return(s.data))}))}function $o(e,t,n,i){var r,a;return P((function(o){return 1==o.g?(t.rb=!1,t.Rc=!1,t.wc=0,t.Rb=!0,t.Ca=null,t.Fc=null,t.da=null,i?(r=e.D.Cc(),a=e.D.S.getDuration(),w(o,e.D.S.remove(t.type,r+i,a),3)):w(o,Xi(e.D.S,t.type),4)):3!=o.g?(Pi(e.J),n?w(o,e.D.S.flush(t.type),3):o.v(3)):(Pi(e.J),t.Rb=!1,t.endOfStream=!1,Jo(e,t,0),void T(o))}))}function Jo(e,t,n){var i=t.type;(i!=ci||e.g.has(i))&&(t.Oa=new Fe((function(){var n;return P((function(i){return 1==i.g?(x(i,2),w(i,e.ac(t),4)):2!=i.g?E(i,0):(n=A(i),e.D&&e.D.onError(n),void T(i))}))})).V(n))}function Qo(e){null!=e.Oa&&(e.Oa.stop(),e.Oa=null)}function Zo(e){return P((function(t){return e.xa?w(t,e.xa.abort(),0):t.v(0)}))}function es(e,t){return P((function(n){if(1==n.g)return w(n,Yr(e.s),2);Pi(e.J),e.D.onError(t),t.handled||e.o.failureCallback(t),T(n)}))}function ts(e,t){var n=cu(),i=this;this.j=t,this.i=e,this.l=n,this.s=null,this.m=[],this.h=this.g=null,this.u=Promise.resolve().then((function(){return function(e){return P((function(t){if(e.J.g)t=t.v(0);else{if(0==e.m.length||e.g&&!e.g.kb)var n=!1;else{e.g&&(e.g.Ja.nb(),e.g=null);var i=(n=e.m.shift()).create(e.l);i?(n.Ja.Eb(),e.g={node:i.node,payload:i.payload,kb:i.kb,Ja:n.Ja}):n.Ja.Jc(),n=!0}n?n=Promise.resolve():e.g?n=function(e){var t,n;return P((function(i){switch(i.g){case 1:return e.i=e.j.Ze(e.i,e.l,e.g.node,e.g.payload),x(i,2),e.h=e.j.Ne(e.i,e.l,e.g.payload),w(i,e.h.promise,4);case 4:e.h=null,e.i==e.g.node&&(e.g.Ja.Hc(),e.g=null),E(i,0);break;case 2:return 7001==(t=A(i)).code?e.g.Ja.nb():e.g.Ja.onError(t),e.g=null,e.h=null,n=e,w(i,e.j.handleError(e.l,t),5);case 5:n.i=i.h,T(i)}}))}(e):(e.j.rf(e.i),e.s=new hi,n=e.s),t=w(t,n,1)}return t}))}(i)})),this.J=new Ni((function(){return function(e){var t,n;return P((function(i){if(1==i.g)return e.h&&e.h.abort(),is(e),w(i,e.u,2);for(e.g&&e.g.Ja.nb(),t=l(e.m),n=t.next();!n.done;n=t.next())n.value.Ja.nb();e.g=null,e.m=[],e.j=null,T(i)}))}(i)}))}function ns(e,t){var n={Eb:function(){},Hc:function(){},nb:function(){},onError:function(){},Jc:function(){},sg:function(){}};return e.m.push({create:t,Ja:n}),e.h&&e.h.abort(),is(e),n}function is(e){e.s&&(e.s.resolve(),e.s=null)}function rs(e){this.g=null;for(var t=l(Array.from(e.textTracks)),n=t.next();!n.done;n=t.next())(n=n.value).mode="disabled","Shaka Player TextTrack"==n.label&&(this.g=n);this.g||(this.g=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.g.mode="hidden"}function as(e){if(e.startTime>=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,e.size&&(t.size=e.size);try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function os(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var i=l(Array.from(e.cues)),r=i.next();!r.done;r=i.next())(r=r.value)&&t(r)&&e.removeCue(r);e.mode=n}function ss(){}function us(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ls(t,n){var i=this;this.m=!1,this.l=[],this.g=t,this.u=n,this.i=document.createElement("div"),this.i.classList.add("shaka-text-container"),this.i.style.textAlign="center",this.i.style.display="flex",this.i.style.flexDirection="column",this.i.style.alignItems="center",this.i.style.justifyContent="flex-end",this.u.appendChild(this.i),this.C=new Be((function(){ds(i)})).Da(.25),this.j=new Map,this.h=new _i,this.h.A(document,"fullscreenchange",(function(){ds(i,!0)})),this.s=null,"ResizeObserver"in e&&(this.s=new ResizeObserver((function(){ds(i,!0)})),this.s.observe(this.i))}function cs(e,t,n,i,r){for(var a=!1,o=[],s=[],u=(t=l(t)).next();!u.done;u=t.next()){u=u.value,r.push(u);var c=e.j.get(u),d=u.startTime<=i&&u.endTime>i,f=c?c.ye:null;c&&(o.push(c.Vd),d||(a=!0,e.j.delete(u),c=null)),d&&(s.push(u),c||(fs(e,u,r),f=(c=e.j.get(u)).ye,a=!0)),0<u.nestedCues.length&&f&&cs(e,u.nestedCues,f,i,r),r.pop()}if(a){for(r=(i=l(o)).next();!r.done;r=i.next())n.removeChild(r.value);for(s.sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime})),u=(s=l(s)).next();!u.done;u=s.next())i=e.j.get(u.value),n.appendChild(i.Vd)}}function ds(e,t){if(e.i){var n=e.g.currentTime;if((!e.m||void 0!==t&&t)&&0<e.j.size&&(us(e.i),e.j.clear()),e.m){for(var i=new Map,r=l(e.j.keys()),a=r.next();!a.done;a=r.next())a=a.value,i.set(a,e.j.get(a));cs(e,e.l,e.i,n,[])}}}function fs(e,t,n){var i=1<n.length,r=i?"span":"div";(t.lineBreak||t.spacer)&&(t.spacer&&xe("shaka.extern.Cue","Please use lineBreak instead of spacer."),r="br"),i=!i&&0<t.nestedCues.length;var a=document.createElement(r);"br"!=r&&function(e,t,n,i,r){var a=t.style,o=0==n.nestedCues.length,s=1<i.length;a.whiteSpace="pre-wrap";var u=n.payload.replace(/\s+$/g,(function(e){return" ".repeat(e.length)}));if(a.backgroundColor=n.backgroundColor,a.border=n.border,a.color=n.color,a.direction=n.direction,a.opacity=n.opacity,a.paddingLeft=hs(n.linePadding,n,e.u),a.paddingRight=hs(n.linePadding,n,e.u),n.backgroundImage)a.backgroundImage="url('"+n.backgroundImage+"')",a.backgroundRepeat="no-repeat",a.backgroundSize="contain",a.backgroundPosition="center";else{if(n.nestedCues.length)var l=t;else l=document.createElement("span"),t.appendChild(l);n.border&&(l.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})))?l.style.backgroundColor=t:u&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)")),u&&(l.textContent=u)}s&&!i[i.length-1].isContainer?a.display="inline":(a.display="flex",a.flexDirection="column",a.alignItems="center",a.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end"),o||(a.margin="0"),a.fontFamily=n.fontFamily,a.fontWeight=n.fontWeight.toString(),a.fontStyle=n.fontStyle,a.letterSpacing=n.letterSpacing,a.fontSize=hs(n.fontSize,n,e.u),n.line?1==n.lineInterpretation&&(a.position="absolute",a.left="0",a.top="0",n.writingMode==wt?(a.width="100%",n.lineAlign==xt?a.top=n.line+"%":"end"==n.lineAlign&&(a.bottom=n.line+"%")):"vertical-lr"==n.writingMode?(a.height="100%",n.lineAlign==xt?a.left=n.line+"%":"end"==n.lineAlign&&(a.right=n.line+"%")):(a.height="100%",n.lineAlign==xt?a.right=n.line+"%":"end"==n.lineAlign&&(a.left=n.line+"%"))):n.region&&n.region.id&&(e=n.region.widthUnits==Dt?"%":"px",i=n.region.viewportAnchorUnits==Dt?"%":"px",a.height=n.region.height+(n.region.heightUnits==Dt?"%":"px"),a.width=n.region.width+e,a.position="absolute",a.top=n.region.viewportAnchorY+i,a.left=n.region.viewportAnchorX+i),a.lineHeight=n.lineHeight,n.position&&(n.writingMode==wt?a.paddingLeft=n.position:a.paddingTop=n.position),"line-left"==n.positionAlign?a.cssFloat="left":"line-right"==n.positionAlign&&(a.cssFloat="right"),a.textAlign=n.textAlign,a.textDecoration=n.textDecoration.join(" "),a.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&a.writingMode==n.writingMode||(a.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==wt?a.width=n.size+"%":a.height=n.size+"%")}(e,a,t,n,i),n=a,i&&((n=document.createElement("span")).classList.add("shaka-text-wrapper"),n.style.backgroundColor=t.backgroundColor,a.appendChild(n)),e.j.set(t,{Vd:a,ye:n})}function hs(e,t,n){var i=(i=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(i[1]),Nf:i[2]}:null;if(!i)return e;var r=i.value;switch(i.Nf){case"%":return r/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*r/t.cellResolution.rows+"px";default:return e}}function ps(){}function gs(e,t,n,i,r){var a,o=r in i,s=!0;for(a in t){var u=r+"."+a,l=o?i[r]:n[a];o||a in n?void 0===t[a]?void 0===l||o?delete e[a]:e[a]=aa(l):l.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=aa(l)),u=gs(e[a],t[a],l,i,u),s=s&&u):typeof t[a]!=typeof l||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=l.constructor?(z("Invalid config, wrong type for "+u),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&X("Unexpected number of arguments for "+u),e[a]=t[a]):(z("Invalid config, unrecognized key "+u),s=!1)}return s}function ms(e,t){for(var n={},i=n,r=0,a=0;!(0>(r=e.indexOf(".",r)));)0!=r&&"\\"==e[r-1]||(i[a=e.substring(a,r).replace(/\\\./g,".")]={},i=i[a],a=r+1),r+=1;return i[e.substring(a).replace(/\\\./g,".")]=t,n}function vs(){}function ys(){var e=1/0;navigator.connection&&navigator.connection.saveData&&(e=360);var t={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Oa,logLicenseExchange:!1,updateExpirationTime:1},n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"}},hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},failureCallback:function(e){return[e]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1};(navigator.userAgent.match(/Edge\//)||Ge()||qe())&&(i.gapDetectionThreshold=.5),(We("Web0S")||Ge()||qe())&&(i.stallSkip=0);var r={trackSelectionCallback:function(e){return P((function(t){return t.return(e)}))},downloadSizeCallback:function(e){var t;return P((function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?w(n,navigator.storage.estimate(),3):n.return(!0):(t=n.h,n.return(t.usage+e<.95*t.quota))}))},progressCallback:function(e,t){return[e,t]},usePersistentLicense:!0},a={drm:t,manifest:n,streaming:i,offline:r,abrFactory:function(){return new jr},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferForcedSubs:!1,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,useMediaCapabilities:!1,textDisplayFactory:function(){return null}};return r.trackSelectionCallback=function(e){return P((function(t){return t.return(function(e,t){var n=e.filter((function(e){return"variant"==e.type})),i=[],r=sr(t,n.map((function(e){return e.language})));r&&(i=n.filter((function(e){return rr(e.language)==r}))),0==i.length&&(i=n.filter((function(e){return e.primary}))),0==i.length&&(n.map((function(e){return e.language})),i=n);var a=i.filter((function(e){return e.height&&480>=e.height}));if(a.length&&(a.sort((function(e,t){return t.height-e.height})),i=a.filter((function(e){return e.height==a[0].height}))),n=[],i.length){var o=Math.floor(i.length/2);i.sort((function(e,t){return e.bandwidth-t.bandwidth})),n.push(i[o])}for(i=l(e),o=i.next();!o.done;o=i.next())(o=o.value).type!=ci&&"image"!=o.type||n.push(o);return n}(e,a.preferredAudioLanguage))}))},a}function bs(e,t,n){var i={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return gs(e,t,n||ys(),i,"")}function ws(){this.g=null,this.h=[]}function Ts(e,t){if(null==e.g)e.g={timestamp:Date.now()/1e3,state:t,duration:0};else{var n=Date.now()/1e3;e.g.duration=n-e.g.timestamp,e.g.state!=t&&(e.h.push(e.g),e.g={timestamp:n,state:t,duration:0})}}function xs(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var i=l(e.h),r=i.next();!r.done;r=i.next())n+=(r=r.value).state==t?r.duration:0;return n}function Ss(){this.i=this.h=null,this.g=[]}function Es(e,t,n){e.h!=t&&(e.h=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth}))}function As(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function ks(){this.s=this.u=this.I=this.F=this.m=this.j=this.H=this.l=this.i=this.L=this.O=this.U=this.C=this.W=NaN,this.h=new ws,this.g=new Ss}function Is(t,n){ra.call(this);var i=this;this.l=Ou,this.qc=this.g=null,this.ea=!1,this.h=new _i,this.dd=this.u=this.$a=this.B=this.tc=this.s=this.i=this.ic=this.I=this.rc=this.F=this.Pa=this.C=this.L=this.m=this.P=null,this.ld=1e9,this.o=_s(this),this.kd={width:1/0,height:1/0},this.j=null,this.qa=new Kr(this.o.preferredAudioLanguage,this.o.preferredVariantRole,this.o.preferredAudioChannelCount),this.ra=this.o.preferredTextLanguage,this.Ob=this.o.preferredTextRole,this.Nb=this.o.preferForcedSubs,this.ed=[],n&&n(this),this.P=function(e){return new la((function(t,n){e.u&&e.u.segmentDownloaded(t,n)}))}(this),this.P.Ld(this.o.streaming.forceHTTPS),this.H=null,Ku&&(this.H=Ce(Ku)),this.h.A(e,"online",(function(){i.Fd()})),this.ta={name:"detach"},this.Sa={name:"attach"},this.W={name:"unload"},this.nd={name:"manifest-parser"},this.jd={name:"manifest"},this.Ha={name:"media-source"},this.gd={name:"drm-engine"},this.O={name:"load"},this.od={name:"src-equals-drm-engine"},this.Qa={name:"src-equals"};var r=new Map;r.set(this.Sa,(function(e,t){return ea(function(e,t,n){return null==t.G&&(t.G=n.G,e.h.A(t.G,"error",(function(){var t=Zs(e);t&&Js(e,t)}))),e.g=t.G,Promise.resolve()}(i,e,t))})),r.set(this.ta,(function(e){return e.G&&(i.h.Ea(e.G,"error"),e.G=null),i.H&&i.H.release(),i.g=null,ea(e=Promise.resolve())})),r.set(this.W,(function(e){return ea(Cs(i,e))})),r.set(this.Ha,(function(e){return e=function(e,t){var n,i,r,a;return P((function(o){if(1==o.g)return n=new Bn,i=e.o.textDisplayFactory,r=Ce(i),e.hd=i,a=function(e,t,n,i){return new Fi(e,t,n,i)}(t.G,n,r,(function(t,n,i){for(var r=(t=l(t)).next();!r.done;r=t.next())if((r=r.value).data&&r.cueTime&&r.frames){for(var a=r.cueTime+n,o=i,s=l(r.frames),u=s.next();!u.done;u=s.next())Ds(e,a,o,"ID3",u.value);e.H&&e.H.onHlsTimedMetadata(r,a)}})),w(o,a.F,2);e.L=a,T(o)}))}(i,e),ea(e)})),r.set(this.nd,(function(e,t){var n=function(e,t,n){var i,r,a,o;return P((function(s){if(1==s.g)return t.mimeType=n.mimeType,t.uri=n.uri,i=t.uri,r=e.P,e.$a=i,a=e,w(s,Ja(i,r,e.o.manifest.retryParameters,t.mimeType),2);a.tc=s.h,e.s=Ce(e.tc),o=aa(e.o.manifest),n.G&&"AUDIO"===n.G.nodeName&&(o.disableVideo=!0),e.s.configure(o),T(s)}))}(i,e,t);return ea(n)})),r.set(this.jd,(function(e){return function(e,t){var n=t.uri,i=e.P;e.ic=new Po((function(){return e.Hd()})),e.ic.addEventListener("regionadd",(function(t){t=t.region,Qs(e,Cu,t),e.H&&e.H.onDashTimedMetadata(t)}));var r={networkingEngine:i,filter:function(t){return P((function(n){return n.return(e.yc(t))}))},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,i=l(t.textStreams),r=i.next();!r.done;r=i.next())"application/cea-608"!=(r=r.value).mimeType&&"application/cea-708"!=r.mimeType||n.add(r.originalId);for(i=l(t.variants),r=i.next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions)for(var a=l(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 Mo;s={id:e.ld++,originalId:o,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:r.closedCaptions.get(o),label:null,type:ci,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},t.textStreams.push(s),n.add(o)}}(e,t)},onTimelineRegionAdded:function(t){var n=e.ic;e:{for(var i=l(n.g),r=i.next();!r.done;r=i.next())if((r=r.value).schemeIdUri==t.schemeIdUri&&r.id==t.id&&r.startTime==t.startTime&&r.endTime==t.endTime){i=r;break e}i=null}null==i&&(n.g.add(t),t=new na("regionadd",new Map([["region",t]])),n.dispatchEvent(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return Js(e,t)},isLowLatencyMode:function(){return e.o.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return e.o.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){e.configure("streaming.lowLatencyMode",!0)}},a=Date.now()/1e3;return new $r(function(){var t,i,o,s;return P((function(u){if(1==u.g)return t=e,w(u,e.s.start(n,r),2);if(t.B=u.h,i=Ms(Tu),e.dispatchEvent(i),0==e.B.variants.length)throw new le(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))}(e.B),o=Date.now()/1e3,s=o-a,e.j.H=s,T(u)}))}(),(function(){return e.s.stop()}))}(i,e)})),r.set(this.gd,(function(e){return e=function(e,t){var n,i;return P((function(r){return 1==r.g?(n=Date.now()/1e3,i=!0,e.m=Rs(e,{Cb:e.P,onError:function(t){Js(e,t)},Ic:function(t){eu(e,t)},onExpirationUpdated:function(t,n){tu(e,t,n)},onEvent:function(t){e.dispatchEvent(t),t.type==gu&&i&&(i=!1,e.j.j=Date.now()/1e3-n)}}),e.o.useMediaCapabilities||gr(e.B),e.m.configure(e.o.drm),w(r,Aa(e.m,e.B.variants,e.B.offlineSessionIds,e.o.useMediaCapabilities),2)):3!=r.g?w(r,e.m.Qb(t.G),3):w(r,e.yc(e.B),0)}))}(i,e),ea(e)})),r.set(this.O,(function(e,t){return ea(function(e,t,n){var i,r,a,o,s,u,c,d,f,h;return P((function(p){switch(p.g){case 1:if(t.startTime=n.startTime,i=t.G,r=t.uri,e.$a=r,e.F=new Co({Dc:function(){return t.G.playbackRate},Ac:function(){return t.G.defaultPlaybackRate},Nd:function(e){t.G.playbackRate=e},ie:function(e){t.G.currentTime+=e}}),a=function(){return Bs(e)},o=function(){return Fs(e)},e.h.A(i,"playing",a),e.h.A(i,"pause",a),e.h.A(i,"ended",a),e.h.A(i,"ratechange",o),s=e.o.abrFactory,e.u&&e.dd==s||(e.dd=s,e.u=Ce(s),"function"!=typeof e.u.playbackRateChanged&&(xe("AbrManager","Please use an AbrManager with playbackRateChanged function."),e.u.playbackRateChanged=function(){}),e.u.configure(e.o.abr)),e.qa=new Kr(e.o.preferredAudioLanguage,e.o.preferredVariantRole,e.o.preferredAudioChannelCount),e.ra=e.o.preferredTextLanguage,e.Ob=e.o.preferredTextRole,e.Nb=e.o.preferForcedSubs,nu(e.B.presentationTimeline,e.o.playRangeStart,e.o.playRangeEnd),e.u.init((function(t,n,i){n=void 0!==n&&n,i=void 0===i?0:i,e.i&&t!=e.i.h&&(Es(e.j.g,t,!0),Ho(e.i,t,n,i),qs(e))})),e.C=function(e,t){return new To(e.g,e.B,e.o.streaming,t,(function(){if(e.Pa&&No(e.Pa,!0),e.i)for(var t=e.i,n=t.D.Cc(),i=t.o.smallGapLimit,r=l(t.g.keys()),a=r.next();!a.done;a=r.next()){a=a.value;var o=t.g.get(a);o.da=null;var s=t.D.S;if(a==ci?s=null!=(s=s.i).g&&null!=s.h&&(n>=s.g&&n<s.h):s=Kn(s=qi(s,a),n,i),!s&&((null!=Gi(t.D.S,a)||o.La)&&qo(t,o),o.xa&&(o.xa.abort(),o.xa=null),a===ci))for((a=t.D.S.C.g).l=0,a.h=[],a.g=[],(o=a.i).i=[],o.h=[],o.g=0,Cn(a),o=(a=l(a.j.values())).next();!o.done;o=a.next())Zt(o.value)}e.I&&Ps(e)}),(function(t){return e.dispatchEvent(t)}))}(e,t.startTime),e.Pa=function(e){var t=new Lo(e.ic);t.addEventListener("enter",(function(t){Qs(e,Du,t.region)})),t.addEventListener("exit",(function(t){Qs(e,Ru,t.region)})),t.addEventListener("skip",(function(t){var n=t.region;t.seeking||(Qs(e,Du,n),Qs(e,Ru,n))}));var n=new Ro(e.g);return n.g.add(t),n}(e),u=Math.max(e.B.minBufferTime,e.o.streaming.rebufferingGoal),Ns(e,u),lr(e.B,e.o.preferredAudioChannelCount),e.i=function(e){return new Bo(e.B,{Cc:function(){return e.C.l()},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},S:e.L,Cb:e.P,onError:function(t){return Js(e,t)},onEvent:function(t){return e.dispatchEvent(t)},sf:function(){e.s&&e.s.update&&e.s.update()},Bd:function(){e.C&&e.C.F(),Ps(e)}})}(e),e.i.configure(e.o.streaming),e.l=Uu,e.dispatchEvent(Ms(ku)),c=null,e.Ec().find((function(e){return e.active}))){p.v(2);break}if(c=Vs(e)?e.u.chooseVariant():null,Ks(e,c,!0,!1,0),!e.o.streaming.startAtSegmentBoundary){p.v(3);break}return d=e.C.l(),w(p,function(e,t){var n,i,r,a,o;return P((function(s){return 1==s.g?(n=e.audio,i=e.video,r=function(e,t){var n,i;return P((function(r){return 1==r.g?e?w(r,e.createSegmentIndex(),2):r.return(null):(n=e.segmentIndex[Symbol.iterator]().seek(t))?(i=n.startTime,r.return(i)):r.return(null)}))},w(s,r(n,t),2)):3!=s.g?(a=s.h,w(s,r(i,t),3)):null!=(o=s.h)&&null!=a?s.return(Math.max(o,a)):null!=o?s.return(o):null!=a?s.return(a):s.return(t)}))}(c,d),4);case 4:f=p.h,e.C.m(f);case 3:qs(e);case 2:return e.jb().find((function(e){return e.active}))||((h=Dr(e.B.textStreams,e.ra,e.Ob,e.Nb)[0]||null)&&As(e.j.g,h,!0),c&&(h?(c.audio&&function(e,t,n){return e=rr(e.o.preferredTextLanguage),t=rr(t.language),n=rr(n.language),tr(n,e)&&!tr(t,n)}(e,c.audio,h)&&(e.ea=!0),e.ea&&e.L.m.setTextVisibility(!0),Ys(e)):e.ea=!1),h&&(e.o.streaming.alwaysStreamText||e.qd())&&Ko(e.i,h)),w(p,e.i.start(),5);case 5:e.o.abr.enabled&&(e.u.enable(),$s(e)),wr(e.i?e.i.h:null,e.B),ru(e.B),zs(e),Vs(e),e.B.variants.some((function(e){return e.primary})),e.h.wa(i,"loadedmetadata",(function(){e.j.l=Date.now()/1e3-n.Pd})),T(p)}}))}(i,e,t))})),r.set(this.od,(function(e,t){var n=function(e,t,n){var i,r,a,o;return P((function(s){return 1==s.g?(i=di,r=Date.now()/1e3,a=!0,e.m=Rs(e,{Cb:e.P,onError:function(t){Js(e,t)},Ic:function(t){eu(e,t)},onExpirationUpdated:function(t,n){tu(e,t,n)},onEvent:function(t){e.dispatchEvent(t),t.type==gu&&a&&(a=!1,e.j.j=Date.now()/1e3-r)}}),e.m.configure(e.o.drm),o={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n.mimeType?n.mimeType.split(";")[0]:"video/mp4",codecs:n.mimeType?Ei(n.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:i.Ra,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.m.W=!0,w(s,Aa(e.m,[o],[]),2)):w(s,e.m.Qb(t.G),0)}))}(i,e,t);return ea(n)})),r.set(this.Qa,(function(e,t){return function(e,t,n){function i(){return Bs(e)}t.uri=n.uri,t.startTime=n.startTime,e.$a=t.uri,e.C=new wo(t.G),null!=t.startTime&&e.C.m(t.startTime),e.F=new Co({Dc:function(){return t.G.playbackRate},Ac:function(){return t.G.defaultPlaybackRate},Nd:function(e){t.G.playbackRate=e},ie:function(e){t.G.currentTime+=e}}),Ns(e,e.o.streaming.rebufferingGoal),e.h.A(t.G,"playing",i),e.h.A(t.G,"pause",i),e.h.A(t.G,"ended",i),e.h.A(t.G,"ratechange",(function(){return Fs(e)})),"none"!=e.g.preload&&e.h.wa(e.g,"loadedmetadata",(function(){e.j.l=Date.now()/1e3-n.Pd})),e.g.audioTracks&&(e.h.A(e.g.audioTracks,"addtrack",(function(){return zs(e)})),e.h.A(e.g.audioTracks,"removetrack",(function(){return zs(e)})),e.h.A(e.g.audioTracks,"change",(function(){return zs(e)}))),e.g.textTracks&&(e.h.A(e.g.textTracks,"addtrack",(function(t){zs(e),function(e,t){var n=t.track;"metadata"==n.kind&&(n.mode="hidden",e.h.A(n,"cuechange",(function(){if(n.activeCues)for(var t=l(n.activeCues),i=t.next();!i.done;i=t.next())i=i.value,Ds(e,i.startTime,i.endTime,i.type,i.value),e.H&&e.H.onCueMetadataChange(i.value)})),new Be((function(){for(var t=function(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"==e.kind}))}(e),n=(t=l(t)).next();!n.done;n=t.next())n.value.mode="hidden"})).hc().V(.5))}(e,t)})),e.h.A(e.g.textTracks,"removetrack",(function(){return zs(e)})),e.h.A(e.g.textTracks,"change",(function(){return zs(e)}))),t.G.src=t.uri,(Ge()||We("Web0S"))&&t.G.load(),e.l=Fu,e.dispatchEvent(Ms(ku));var r=new hi;co(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){r.resolve()}));var a=!1;return e.ed.push((function(){a=!0})),co(e.g,HTMLMediaElement.HAVE_CURRENT_DATA,e.h,(function(){return P((function(t){return 1==t.g?a?t.return():(function(e){var t=e.o.preferredAudioLanguage;if(""!=t){e.Id(t);var n=e.o.preferredVariantRole;""!=n&&e.Id(t,n)}}(e),js(e).find((function(e){return"disabled"!=e.mode}))?t.v(2):w(t,new Promise((function(t){e.h.wa(e.g.textTracks,"change",t),new Be(t).V(1)})),2)):a?t.return():(function(e){var t=e.o.preferredTextLanguage,n=e.o.preferForcedSubs;if(""!=t){e.Jd(t,"",n);var i=e.o.preferredTextRole;""!=i&&e.Jd(t,i,n)}}(e),void T(t))}))})),e.g.error?r.reject(Zs(e)):"none"==e.g.preload&&(X('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.'),r.resolve()),e.h.wa(e.g,"error",(function(){r.reject(Zs(e))})),new $r(r,(function(){return r.reject(new le(2,7,7001)),Promise.resolve()}))}(i,e,t)})),this.la=new ts(this.ta,{Ze:function(e,t,n,r){var a=null;return e==i.ta&&(a=n==i.ta?i.ta:i.Sa),e==i.Sa&&(a=n==i.ta||t.G!=r.G?i.ta:n==i.Sa?i.Sa:n==i.Ha||n==i.O?i.Ha:n==i.Qa?i.od:null),e==i.Ha&&(a=n==i.O&&t.G==r.G?i.nd:i.W),e==i.nd&&(a=lu(i.O,i.jd,i.W,n,t,r)),e==i.jd&&(a=lu(i.O,i.gd,i.W,n,t,r)),e==i.gd&&(a=lu(i.O,i.O,i.W,n,t,r)),e==i.od&&(a=n==i.Qa&&t.G==r.G?i.Qa:i.W),e!=i.O&&e!=i.Qa||(a=i.W),e==i.W&&(a=r.G&&t.G==r.G?i.Sa:i.ta),a},Ne:function(e,t,n){return i.dispatchEvent(Ms(Su,(new Map).set("state",e.name))),r.get(e)(t,n)},handleError:function(e){return P((function(t){return 1==t.g?w(t,Cs(i,e),2):t.return(e.G?i.Sa:i.ta)}))},rf:function(e){i.dispatchEvent(Ms(Eu,(new Map).set("state",e.name)))}}),t&&this.Qb(t,!0)}function Ms(e,t){return new na(e,t)}function Cs(e,t){var n,i,r,a,o,s,u,c,d;return P((function(f){switch(f.g){case 1:return e.l!=_u&&(e.l=Ou),n=e.ed.map((function(e){return e()})),e.ed=[],w(f,Promise.all(n),2);case 2:if(e.dispatchEvent(Ms(Pu)),t.mimeType=null,t.startTime=null,t.uri=null,t.G&&(e.h.Ea(t.G,"loadedmetadata"),e.h.Ea(t.G,"playing"),e.h.Ea(t.G,"pause"),e.h.Ea(t.G,"ended"),e.h.Ea(t.G,"ratechange")),e.Pa&&(e.Pa.release(),e.Pa=null),e.rc&&(e.rc.stop(),e.rc=null),!e.s){f.v(3);break}return w(f,e.s.stop(),4);case 4:e.s=null,e.tc=null;case 3:if(!e.u){f.v(5);break}return w(f,e.u.stop(),5);case 5:if(!e.i){f.v(7);break}return w(f,e.i.destroy(),8);case 8:e.i=null;case 7:if(e.F&&(e.F.release(),e.F=null),e.C&&(e.C.release(),e.C=null),!e.L){f.v(9);break}return w(f,e.L.destroy(),10);case 10:e.L=null;case 9:if(e.H&&e.H.onAssetUnload(),!t.G||!t.G.src){f.v(11);break}return w(f,new Promise((function(e){return new Be(e).V(.1)})),12);case 12:for(t.G.removeAttribute("src"),t.G.load();t.G.lastChild;)t.G.removeChild(t.G.firstChild);case 11:if(!e.m){f.v(13);break}return w(f,e.m.destroy(),14);case 14:e.m=null;case 13:if(e.$a=null,e.I=null,e.B){for(i=l(e.B.variants),r=i.next();!r.done;r=i.next())for(a=r.value,o=l([a.audio,a.video]),s=o.next();!s.done;s=o.next())(u=s.value)&&u.segmentIndex&&u.segmentIndex.release();for(c=l(e.B.textStreams),s=c.next();!s.done;s=c.next())(d=s.value).segmentIndex&&d.segmentIndex.release()}e.B=null,e.j=new ks,e.hd=null,Us(e),T(f)}}))}function Ds(e,t,n,i,r){t=(new Map).set("startTime",t).set("endTime",n).set("metadataType",i).set("payload",r),e.dispatchEvent(Ms(xu,t))}function Rs(e,t){return new Ea(t,e.o.drm.updateExpirationTime)}function Ns(e,t){e.I=new Gr,e.I.g=zr,qr(e.I,t,Math.min(.5,t/2)),Us(e),e.rc=new Be((function(){Ps(e)})).Da(.25)}function Ps(e){switch(e.l){case Fu:if(e.g.ended)var t=!0;else{var n=Hn(e.g.buffered);t=null!=n&&n>=e.g.duration-1}break;case Uu:e:if(e.g.ended||Hi(e.L))t=!0;else{if(e.B.presentationTimeline.Z()){n=e.B.presentationTimeline.ib();var i=Hn(e.g.buffered);if(null!=i&&i>=n){t=!0;break e}}t=!1}break;default:t=!1}i=Gn(e.g.buffered,e.g.currentTime);var r=t,a=(n=e.I).h.get(n.g);t=n.g,i=r||i>=a?Xr:zr,n.g=i,t!=i&&Us(e)}function Ls(e){if(e.s){var t=aa(e.o.manifest);e.g&&"AUDIO"===e.g.nodeName&&(t.disableVideo=!0),e.s.configure(t)}if(e.m&&e.m.configure(e.o.drm),e.i){e.i.configure(e.o.streaming);try{Os(e,e.B)}catch(t){Js(e,t)}e.u&&Vs(e),!(t=e.i.h)||t.allowedByApplication&&t.allowedByKeySystem||Hs(e)}if(e.P&&e.P.Ld(e.o.streaming.forceHTTPS),e.L&&(t=e.o.textDisplayFactory,e.hd!=t)){var n=Ce(t),i=e.L,r=i.m;i.m=n,r&&(n.setTextVisibility(r.isTextVisible()),r.destroy()),i.i&&(i.i.i=n),e.hd=t,e.i&&((n=(t=e.i).g.get(ci))&&Go(t,n.stream,!0,0,!0))}e.u&&(e.u.configure(e.o.abr),e.o.abr.enabled?e.u.enable():e.u.disable(),$s(e)),e.I&&(t=e.o.streaming.rebufferingGoal,e.B&&(t=Math.max(t,e.B.minBufferTime)),qr(e.I,t,Math.min(.5,t/2))),e.B&&nu(e.B.presentationTimeline,e.o.playRangeStart,e.o.playRangeEnd)}function js(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function _s(e){var t=ys();return t.streaming.failureCallback=function(t){e.Z()&&[1001,1002,1003].includes(t.code)&&(t.severity=1,e.Fd())},t.textDisplayFactory=function(){return e.qc?new ls(e.g,e.qc):new rs(e.g)},t}function Os(e,t){if(e.l!=_u){for(var n=e.o.restrictions,i=e.kd,r=!1,a=l(t.variants),o=a.next();!o.done;o=a.next()){var s=(o=o.value).allowedByApplication;o.allowedByApplication=dr(o,n,i),s!=o.allowedByApplication&&(r=!0)}if(r&&e.i&&zs(e),(n=e.m?e.m.i:null)&&e.m.m)for(r=(i=l(t.variants)).next();!r.done;r=i.next())for(a=(r=l(((r=r.value).video?r.video.drmInfos:[]).concat(r.audio?r.audio.drmInfos:[]))).next();!a.done;a=r.next())if((a=a.value).keySystem==n.keySystem)for(o=(a=l(a.initData||[])).next();!o.done;o=a.next())o=o.value,Ca(e.m,o.initDataType,o.initData);iu(e,t)}}function Us(e){var t=e.pd();if(e.j&&e.I&&e.C){var n=e.F;n.j=t,Do(n),Bs(e)}t=(new Map).set("buffering",t),e.dispatchEvent(Ms(pu,t))}function Fs(e){var t=e.g.playbackRate;0!=t&&(e.F&&e.F.set(t),t=Ms(Au),e.dispatchEvent(t))}function Bs(e){if(e.j&&e.I){var t=e.j.h;e.I.g==zr?Ts(t,"buffering"):e.g.paused?Ts(t,"paused"):e.g.ended?Ts(t,"ended"):Ts(t,"playing")}}function Vs(e){try{iu(e,e.B)}catch(t){return Js(e,t),!1}var t=e.B.variants.filter((function(e){return Mr(e)}));return t=e.qa.create(t),e.u.setVariants(Array.from(t.values())),!0}function Hs(e){var t;(t=Vs(e)?e.u.chooseVariant():null)&&(Ks(e,t,!0,!0,0),qs(e))}function Ks(e,t,n,i,r){var a=e.i.h;t==a?i&&Ho(e.i,t,i,r,!0):(Es(e.j.g,t,n),Ho(e.i,t,i,r),n=null,a&&(n=xr(a)),Xs(e,n,t=xr(t)))}function Gs(e,t){var n=Array.from(e.g.audioTracks).find((function(e){return e.enabled}));t.enabled=!0,t.id!==n.id&&(n.enabled=!1),Xs(e,n=kr(n),kr(t))}function qs(e){au(e,Ms(hu))}function zs(e){au(e,Ms(Nu))}function Xs(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),au(e,t=Ms(Lu,t))}function Ws(e){au(e,Ms(Iu))}function Ys(e){au(e,Ms(Mu))}function $s(e){var t=(new Map).set("newStatus",e.o.abr.enabled);au(e,Ms(fu,t))}function Js(e,t){if(e.l!=_u){var n=Ms(vu,(new Map).set("detail",t));e.dispatchEvent(n),n.defaultPrevented&&(t.handled=!0)}}function Qs(e,t,n){n=(new Map).set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}),e.dispatchEvent(Ms(t,n))}function Zs(e){if(!e.g.error)return null;var t=e.g.error.code;if(1==t)return null;var n=e.g.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new le(2,3,3016,t,n,e.g.error.message)}function eu(e,t){if(e.i){var n=Object.keys(t),i=1==n.length&&"00"==n[0],r=!1;if(n.length)for(var a=(n=l(e.B.variants)).next();!a.done;a=n.next()){var o=[];(a=a.value).audio&&o.push(a.audio),a.video&&o.push(a.video);for(var s=(o=l(o)).next();!s.done;s=o.next()){var u=s.value;if(s=a.allowedByKeySystem,u.keyIds.size){a.allowedByKeySystem=!0;for(var c=(u=l(u.keyIds)).next();!c.done;c=u.next())c=c.value,c=t[i?"00":c],a.allowedByKeySystem=a.allowedByKeySystem&&!!c&&!Vu.includes(c)}s!=a.allowedByKeySystem&&(r=!0)}}r&&Vs(e),(i=e.i.h)&&!i.allowedByKeySystem&&Hs(e),r&&zs(e)}}function tu(e,t,n){e.s&&e.s.onExpirationUpdated&&e.s.onExpirationUpdated(t,n),t=Ms(yu),e.dispatchEvent(t)}function nu(e,t,n){0<t&&(e.Z()||e.te(t)),n<(t=e.getDuration())&&(e.Z()||e.Ma(n))}function iu(e,t){var n=e.m?e.m.Bc():{},i=Object.keys(n);i=i.length&&"00"==i[0];for(var r=!1,a=!1,o=new Set,s=new Set,u=l(t.variants),c=u.next();!c.done;c=u.next()){var d=[];(c=c.value).audio&&d.push(c.audio),c.video&&d.push(c.video);for(var f=(d=l(d)).next();!f.done;f=d.next())if((f=f.value).keyIds.size)for(var h=(f=l(f.keyIds)).next();!h.done;h=f.next()){h=h.value;var p=n[i?"00":h];p?Vu.includes(p)&&s.add(p):o.add(h)}c.allowedByApplication?c.allowedByKeySystem&&(r=!0):a=!0}if(!r)throw new le(2,4,4012,n={hasAppRestrictions:a,missingKeys:Array.from(o),restrictedKeyStatuses:Array.from(s)})}function ru(e){if(!e.variants.some(Mr))throw new le(2,4,4032)}function au(e,t){P((function(n){if(1==n.g)return w(n,Promise.resolve(),2);e.l!=_u&&e.dispatchEvent(t),T(n)}))}function ou(e){for(var t=new Set,n=(e=l(e)).next();!n.done;n=e.next())(n=n.value).language?t.add(rr(n.language)):t.add("und");return t}function su(e){for(var t=new Map,n=new Map,i=(e=l(e)).next();!i.done;i=e.next()){var r="und",a=[];(i=i.value).language&&(r=rr(i.language)),(a="variant"==i.type?i.audioRoles:i.roles)&&a.length||(a=[""]),t.has(r)||t.set(r,new Set);for(var o=(a=l(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){for(var i=l(e),r=i.next();!r.done;r=i.next()){r=r.value;var a=null;n.has(t)&&n.get(t).has(r)&&(a=n.get(t).get(r)),s.push({language:t,role:r,label:a})}})),s}function uu(){return new le(2,7,7e3)}function lu(e,t,n,i,r,a){return i==e&&r.G==a.G&&r.uri==a.uri&&r.mimeType==a.mimeType?t:n}function cu(){return{G:null,mimeType:null,startTime:null,Pd:NaN,uri:null}}function du(e){return new Promise((function(t,n){e.nb=function(){return n(uu())},e.Hc=function(){return t()},e.onError=function(e){return n(e)},e.Jc=function(){return n(uu())}}))}Bo.prototype.destroy=function(){return this.J.destroy()},Bo.prototype.configure=function(e){this.o=e,this.s=new Wr({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)},Bo.prototype.start=function(){var e=this;return P((function(t){if(1==t.g)return w(t,function(e){var t,n,i,r,a,o,s,u,c,d;return P((function(f){if(1==f.g){if(t=di,!e.h)throw new le(2,5,5006);return n=new Map,i=new Set,e.h.audio&&(n.set(t.eb,e.h.audio),i.add(e.h.audio)),e.h.video&&(n.set(t.Ra,e.h.video),i.add(e.h.video)),e.i&&(n.set(t.ba,e.i),i.add(e.i)),r=e.D.S,a=e.o.forceTransmuxTS,w(f,r.init(n,a),2)}Pi(e.J);var h=e.B.presentationTimeline.getDuration();for(1/0>h?e.D.S.Ma(h):e.D.S.Ma(Math.pow(2,32)),o=l(n.keys()),s=o.next();!s.done;s=o.next())u=s.value,c=n.get(u),e.g.has(u)||(d=zo(c),e.g.set(u,d),Jo(e,d,0));T(f)}))}(e),2);Pi(e.J),e.m=!0,T(t)}))},Bo.prototype.ac=function(t){var n,i,r,a,o,s=this;return P((function(u){switch(u.g){case 1:if(Pi(s.J),t.La||null==t.Oa||t.Rb)return u.return();if(t.Oa=null,!t.rb){u.v(2);break}return w(u,$o(s,t,t.Rc,t.wc),3);case 3:return u.return();case 2:if(t.stream.segmentIndex){u.v(4);break}return n=t.stream,w(u,t.stream.createSegmentIndex(),5);case 5:if(n!=t.stream)return null==t.Oa&&Jo(s,t,0),u.return();case 4:x(u,6),i=function(t,n){if(Wo(n))return function(e,t){var n=Gi(e,"video")||0;Mi(e.i,t,n)}(t.D.S,n.stream.originalId||""),null;n.type==ci&&function(e){e.i&&Mi(e.i,"",0)}(t.D.S);var i=t.D.Cc(),r=n.Ca?n.Ca.endTime:i,a=function(e,t,n){return t==ci?null==(e=e.i).h||e.h<n?0:e.h-Math.max(n,e.g):Gn(e=qi(e,t),n)}(t.D.S,n.type,i),o=Math.max(t.B.minBufferTime||0,t.o.rebufferingGoal,t.o.bufferingGoal)*t.l;if(1e-6>t.B.presentationTimeline.getDuration()-r)return n.endOfStream=!0,"video"==n.type&&(i=t.g.get(ci))&&Wo(i)&&(i.endOfStream=!0),null;if(n.endOfStream=!1,a>=o)return.5;if(a=Gi(t.D.S,n.type),a=function(e,t,n,i){if(t.da)return t.da.current();if(t.Ca||i)return t.da=t.stream.segmentIndex.yb(t.Ca?t.Ca.endTime:i),t.da&&t.da.next().value;e=e.o.inaccurateManifestTolerance,i=Math.max(n-e,0);var r=null;return e&&(t.da=t.stream.segmentIndex.yb(i),r=t.da&&t.da.next().value),r||(t.da=t.stream.segmentIndex.yb(n),r=t.da&&t.da.next().value),r}(t,n,i,a),!a)return 1;o=1/0;for(var s=Array.from(t.g.values()),u=(s=l(s)).next();!u.done;u=s.next())Wo(u=u.value)||u.da&&!u.da.current()||(o=Math.min(o,u.Ca?u.Ca.endTime:i));return r>=o+t.B.presentationTimeline.g?1:(function(t,n,i,r){var a,o,s,u,l,c,d,f,h,p,g;return P((function(m){switch(m.g){case 1:return a=di,o=n.stream,s=n.da,n.La=!0,x(m,2),w(m,function(e,t,n){var i,r,a,o,s,u,l;return P((function(c){return i=[],r=Math.max(0,n.appendWindowStart-.1),a=n.appendWindowEnd+.01,(o=n.timestampOffset)==t.td&&r==t.sd&&a==t.rd||(s=function(){var n;return P((function(i){if(1==i.g)return x(i,2),t.sd=r,t.rd=a,t.td=o,w(i,function(e,t,n,i,r){return P((function(a){return t==di.ba?(e.i.C=n,function(e,t,n){e.j=t,e.l=n}(e.i,i,r),a.return()):w(a,Promise.all([Yi(e,t,(function(){var n=e.j[t].appendWindowStart,i=e.j[t].appendWindowEnd;e.j[t].abort(),e.j[t].appendWindowStart=n,e.j[t].appendWindowEnd=i,Wi(e,t)})),Yi(e,t,(function(){var i=n;0>i&&(i+=.001),e.j[t].timestampOffset=i,Wi(e,t)})),Yi(e,t,(function(){e.j[t].appendWindowStart=0,e.j[t].appendWindowEnd=r,e.j[t].appendWindowStart=i,Wi(e,t)}))]),0)}))}(e.D.S,t.type,o,r,a),4);if(2!=i.g)return E(i,0);throw n=A(i),t.sd=null,t.rd=null,t.td=null,n}))},i.push(s())),!function(e,t){return e&&t?e.Xb()==t.Xb()&&e.Tb()==t.Tb()&&dt(e.oa(),t.oa()):e==t}(n.h,t.Fc)&&(t.Fc=n.h)&&(u=Yo(e,t,n.h),l=function(){var n,i,r;return P((function(a){switch(a.g){case 1:return x(a,2),w(a,u,4);case 4:return n=a.h,Pi(e.J),i=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,w(a,zi(e.D.S,t.type,n,null,null,i),5);case 5:E(a,0);break;case 2:throw r=A(a),t.Fc=null,r}}))},i.push(l())),w(c,Promise.all(i),0)}))}(t,n,r),4);case 4:return Pi(t.J),t.j?m.return():(u="video/mp4"==o.mimeType||"audio/mp4"==o.mimeType,l=e.ReadableStream,t.o.lowLatencyMode&&l&&u?(d=new Uint8Array(0),f=function(e){var a,s,u;return P((function(l){return Pi(t.J),t.j?l.return():(d=function(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(d,e),a=!1,s=0,(new De).box("mdat",(function(e){s=e.size+e.start,a=!0})).parse(d,!1,!0),a?(u=d.subarray(0,s),d=d.subarray(s),w(l,Xo(t,n,i,o,r,u),0)):l.v(0))}))},w(m,Yo(t,n,r,f),6)):w(m,Yo(t,n,r),7));case 7:return c=m.h,Pi(t.J),t.j?m.return():n.rb?(n.La=!1,Jo(t,n,0),m.return()):w(m,Xo(t,n,i,o,r,c),6);case 6:if(Pi(t.J),t.j)return m.return();n.Ca=r,s.next(),n.La=!1,n.Ed=!1,h=t.D.S.zc(),p=h[n.type],JSON.stringify(p),n.rb||t.D.Bd(),Jo(t,n,0),E(m,0);break;case 2:if(g=A(m),Pi(t.J,g),t.j)return m.return();if(n.La=!1,7001==g.code)n.La=!1,n.Oa=null,Jo(t,n,0),m.v(0);else if(n.type==a.ba&&t.o.ignoreTextStreamFailures)t.g.delete(a.ba),m.v(0);else if(3017==g.code)(function(e,t,n){if(!Array.from(e.g.values()).some((function(e){return e!=t&&e.Ed}))){var i=Math.round(100*e.l);if(20<i)e.l-=.2;else{if(!(4<i))return t.Yb=!0,e.j=!0,void e.D.onError(n);e.l-=.04}t.Ed=!0}Jo(e,t,4)})(t,n,g),m.v(0);else{if(1001!=g.code||!g.data||404!=g.data[1])return n.Yb=!0,g.severity=2,w(m,es(t,g),0);n.La=!1,n.Oa=null,Jo(t,n,1),m.v(0)}}}))}(t,n,i,a).catch((function(){})),null)}(s,t),null!=i&&(Jo(s,t,i),t.Yb=!1),E(u,7);break;case 6:return r=A(u),w(u,es(s,r),8);case 8:return u.return();case 7:if(a=Array.from(s.g.values()),!s.m||!a.every((function(e){return e.endOfStream}))){u.v(0);break}return w(u,s.D.S.endOfStream(),10);case 10:Pi(s.J),0!=(o=s.D.S.getDuration())&&o<s.B.presentationTimeline.getDuration()&&s.B.presentationTimeline.Ma(o),T(u)}}))},ts.prototype.destroy=function(){return this.J.destroy()},(i=rs.prototype).remove=function(e,t){return!!this.g&&(os(this.g,(function(n){return n.startTime<t&&n.endTime>e})),!0)},i.append=function(e){function t(e){var n=[],i=700<=e.fontWeight,r="italic"==e.fontStyle,a=e.textDecoration.includes("underline");return i&&n.push("b"),r&&n.push("i"),a&&n.push("u"),i=n.reduce((function(e,t){return e+"<"+t+">"}),""),n=n.reduceRight((function(e,t){return e+"</"+t+">"}),""),e.lineBreak||e.spacer?(e.spacer&&xe("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):e.nestedCues.length?e.nestedCues.map(t).join(""):i+e.payload+n}var n=e.map((function(e){if(e.nestedCues.length){var n=e.clone();return n.nestedCues=[],n.payload=t(e),n}return e})),i=[];e=this.g.cues?Array.from(this.g.cues):[];for(var r={},a=(n=l(n)).next();!a.done;r={ub:r.ub},a=n.next())r.ub=a.value,e.some(function(e){return function(t){return t.startTime==e.ub.startTime&&t.endTime==e.ub.endTime&&t.text==e.ub.payload}}(r))||(a=as(r.ub))&&i.push(a);for(r=(e=l(e=i.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?i.indexOf(t)-i.indexOf(e):i.indexOf(e)-i.indexOf(t)})))).next();!r.done;r=e.next())this.g.addCue(r.value)},i.destroy=function(){return this.g&&(os(this.g,(function(){return!0})),this.g.mode="disabled"),this.g=null,Promise.resolve()},i.isTextVisible=function(){return"showing"==this.g.mode},i.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},B("shaka.text.SimpleTextDisplayer",rs),rs.prototype.setTextVisibility=rs.prototype.setTextVisibility,rs.prototype.isTextVisible=rs.prototype.isTextVisible,rs.prototype.destroy=rs.prototype.destroy,rs.prototype.append=rs.prototype.append,rs.prototype.remove=rs.prototype.remove,B("shaka.util.Dom",ss),ss.removeAllChildren=us,(i=ls.prototype).append=function(e){for(var t=[].concat(c(this.l)),n={},i=(e=l(e)).next();!i.done;n={jc:n.jc},i=e.next())n.jc=i.value,t.some(function(e){return function(t){return ht(t,e.jc)}}(n))||this.l.push(n.jc);ds(this)},i.destroy=function(){this.u.removeChild(this.i),this.i=null,this.m=!1,this.l=[],this.C&&this.C.stop(),this.j.clear(),this.h&&(this.h.release(),this.h=null),this.s&&(this.s.disconnect(),this.s=null)},i.remove=function(e,t){if(!this.i)return!1;var n=this.l.length;return this.l=this.l.filter((function(n){return n.startTime<e||n.endTime>=t})),ds(this,n>this.l.length),!0},i.isTextVisible=function(){return this.m},i.setTextVisibility=function(e){this.m=e},B("shaka.text.UITextDisplayer",ls),ls.prototype.setTextVisibility=ls.prototype.setTextVisibility,ls.prototype.isTextVisible=ls.prototype.isTextVisible,ls.prototype.remove=ls.prototype.remove,ls.prototype.destroy=ls.prototype.destroy,ls.prototype.append=ls.prototype.append,B("shaka.text.WebVttGenerator",(function(){})),B("shaka.util.ConfigUtils",ps),ps.convertToConfigObject=ms,ps.mergeConfigObjects=gs,B("shaka.util.PlayerConfiguration",vs),vs.mergeConfigObjects=bs,m(Is,ra),(i=Is.prototype).destroy=function(){var e,t=this;return P((function(n){switch(n.g){case 1:return t.l==_u?n.return():(t.l=_u,e=ns(t.la,(function(){return{node:t.ta,payload:cu(),kb:!1}})),w(n,new Promise((function(t){e.Eb=function(){},e.Hc=function(){t()},e.nb=function(){t()},e.onError=function(){t()},e.Jc=function(){t()}})),2));case 2:return w(n,t.la.destroy(),3);case 3:if(t.h&&(t.h.release(),t.h=null),t.dd=null,t.u=null,t.o=null,t.j=null,t.qc=null,!t.P){n.v(4);break}return w(n,t.P.destroy(),5);case 5:t.P=null;case 4:ra.prototype.release.call(t),T(n)}}))},i.Qb=function(e,t){if(t=void 0===t||t,this.l==_u)return Promise.reject(uu());var n=cu();n.G=e,Ve()||(t=!1);var i=t?this.Ha:this.Sa,r=ns(this.la,(function(){return{node:i,payload:n,kb:!1}}));return r.Eb=function(){},du(r)},i.detach=function(){var e=this;if(this.l==_u)return Promise.reject(uu());var t=ns(this.la,(function(){return{node:e.ta,payload:cu(),kb:!1}}));return t.Eb=function(){},du(t)},i.Rd=function(e){var t=this;if(e=void 0===e||e,this.l==_u)return Promise.reject(uu());Ve()||(e=!1);var n=cu(),i=ns(this.la,(function(i){var r=i.G&&e?t.Ha:i.G?t.Sa:t.ta;return n.G=i.G,{node:r,payload:n,kb:!1}}));return i.Eb=function(){},du(i)},i.load=function(e,t,n){var i=this;if(this.l==_u)return Promise.reject(uu());this.dispatchEvent(Ms(wu));var r=cu();r.uri=e,r.Pd=Date.now()/1e3,n&&(r.mimeType=n),void 0!==t&&(r.startTime=t);var a=function(e,t){if(!Ve())return!0;var n=t.mimeType,i=t.uri||"";if(n||(n={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",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[Za(i)]),n){if(""==(t.G||Ye()).canPlayType(n))return!1;if(!Ve()||!(n in eo)&&!(Za(i)in to)||e.o.streaming.preferNativeHls)return!0;if(ze())return e.o.streaming.useNativeHlsOnSafari}return!1}(this,r)?this.Qa:this.O,o=ns(this.la,(function(e){return null==e.G?null:(r.G=e.G,{node:a,payload:r,kb:!0})}));return this.j=new ks,o.Eb=function(){},new Promise((function(e,t){o.Jc=function(){return t(new le(2,7,7002))},o.Hc=function(){e(),i.dispatchEvent(Ms(bu))},o.nb=function(){return t(uu())},o.onError=function(e){return t(e)}}))},i.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=ms(e,t)),e.manifest&&e.manifest.dash&&"defaultPresentationDelay"in e.manifest.dash&&(xe("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),e.manifest.defaultPresentationDelay=e.manifest.dash.defaultPresentationDelay,delete e.manifest.dash.defaultPresentationDelay),e.streaming&&e.streaming.lowLatencyMode&&(null==e.streaming.inaccurateManifestTolerance&&(e.streaming.inaccurateManifestTolerance=0),null==e.streaming.rebufferingGoal&&(e.streaming.rebufferingGoal=.01));var n=bs(this.o,e,_s(this));return Ls(this),n},i.getConfiguration=function(){var e=_s(this);return bs(e,this.o,_s(this)),e},i.Df=function(){for(var e in this.o)delete this.o[e];bs(this.o,_s(this),_s(this)),Ls(this)},i.Ue=function(){return this.l},i.Ye=function(){return this.g},i.Vb=function(){return this.P},i.md=function(){return this.$a},i.ae=function(){return this.H?this.H:null},i.Z=function(){return this.B?this.B.presentationTimeline.Z():!(!this.g||!this.g.src)&&1/0==this.g.duration},i.mb=function(){return!!this.B&&this.B.presentationTimeline.mb()},i.lf=function(){if(this.B){var e=this.B.variants;return!!e.length&&!e[0].video}return!(!this.g||!this.g.src)&&(this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight)},i.Hd=function(){if(this.B){var e=this.B.presentationTimeline;return{start:e.zb(),end:e.Ua()}}return this.g&&this.g.src&&(e=this.g.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},i.keySystem=function(){return Da(this.drmInfo())},i.drmInfo=function(){return this.m?this.m.i:null},i.Ub=function(){return this.m?this.m.Ub():1/0},i.Bc=function(){return this.m?this.m.Bc():{}},i.pd=function(){return!!this.I&&this.I.g==zr},i.$e=function(){return this.g?this.F?this.F.i:1:0},i.Mf=function(e){0==e?X("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.F.set(e),this.l==Uu&&(this.u.playbackRateChanged(e),Vo(this.i,1<Math.abs(e))))},i.Ge=function(){var e=this.F.Ac();this.l==Fu&&this.F.set(e),this.l==Uu&&(this.F.set(e),this.u.playbackRateChanged(e),Vo(this.i,!1))},i.Ec=function(){if(this.B){for(var e=this.i?this.i.h:null,t=[],n=0,i=l(this.B.variants),r=i.next();!r.done;r=i.next())if(Mr(r=r.value)){var a=xr(r);a.active=r==e,a.active||1==n||null==e||r.video!=e.video||r.audio!=e.audio||(a.active=!0),a.active&&n++,t.push(a)}return t}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map((function(e){return kr(e)})):[]},i.jb=function(){if(this.B){for(var e=this.i?this.i.i:null,t=[],n=l(this.B.textStreams),i=n.next();!i.done;i=n.next()){var r=Sr(i=i.value);r.active=i==e,t.push(r)}return t}return this.g&&this.g.src&&this.g.textTracks?js(this).map((function(e){var t=Ir(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),e.kind&&(t.roles=[e.kind]),"forced"==e.kind&&(t.forced=!0),t})):[]},i.Se=function(){return this.B?this.B.imageStreams.map((function(e){return Er(e)})):[]},i.hf=function(e,t){var n,i,r,a,o,s,u,l,c,d,f,h,p,g,m,v,y,b=this;return P((function(T){return 1==T.g?b.B?(n=b.B.imageStreams.find((function(t){return t.id==e})))?n.segmentIndex?T.v(3):w(T,n.createSegmentIndex(),3):T.return(null):T.v(2):2!=T.g?null==(i=n.segmentIndex.find(t))?T.return(null):(r=n.segmentIndex.get(i),(a=/(\d+)x(\d+)/.exec(n.tilesLayout))?(o=n.width||0,s=n.height||0,u=parseInt(a[1],10),l=parseInt(a[2],10),c=o/u,d=s/l,f=u*l,h=r.j-r.startTime,p=h/f,g=r.startTime,v=m=0,1<f&&(y=Math.floor((t-r.startTime)/p),g=r.startTime+y*p,m=y%u*c,v=Math.floor(y/u)*d),T.return({height:d,positionX:m,positionY:v,startTime:g,duration:p,uris:r.oa(),width:c})):T.return(null)):T.return(null)}))},i.pe=function(e){if(this.B&&this.i){var t=this.B.textStreams.find((function(t){return t.id==e.id}));t&&t!=this.i.i&&(As(this.j.g,t,!1),Ko(this.i,t),Ws(this),this.ra=t.language)}else if(this.g&&this.g.src&&this.g.textTracks){for(var n=(t=l(t=js(this))).next();!n.done;n=t.next())Ar(n=n.value)==e.id?n.mode=this.ea?"showing":"hidden":n.mode="disabled";Ws(this)}},i.qe=function(e,t,n){if(t=void 0!==t&&t,n=void 0===n?0:n,this.B&&this.i){this.o.abr.enabled&&X("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var i=this.B.variants.find((function(t){return t.id==e.id}));i&&Mr(i)&&(Ks(this,i,!1,t,n),this.qa=new Hr(i),Vs(this))}else if(this.g&&this.g.audioTracks)for(n=(t=l(t=Array.from(this.g.audioTracks))).next();!n.done;n=t.next())if(Ar(n=n.value)==e.id){Gs(this,n);break}},i.Pe=function(){return su(this.Ec())},i.gf=function(){return su(this.jb())},i.Oe=function(){return Array.from(ou(this.Ec()))},i.ff=function(){return Array.from(ou(this.jb()))},i.Id=function(e,t){if(this.B&&this.C){if(this.qa=new Kr(e,t||"",0,""),!this.o.abr.enabled){for(var n=function(e,t){return e.video||t.video?e.video&&t.video?Math.abs((e.video.height||0)-(t.video.height||0))+Math.abs((e.video.width||0)-(t.video.width||0)):1/0:0},i=this.i.h,r=this.qa.create(this.B.variants),a=null,o=(r=l(r.values())).next();!o.done;o=r.next())o=o.value,(!a||n(a,i)>n(o,i))&&(a=o);if(a)return n=xr(a),void this.qe(n,!0)}Hs(this)}else if(this.g&&this.g.audioTracks){for(r=Array.from(this.g.audioTracks),n=rr(e),a=i=null,o=(r=l(r)).next();!o.done;o=r.next()){var s=kr(o=o.value);rr(s.language)==n&&(i=o,t?s.roles.includes(t)&&(a=o):0==s.roles.length&&(a=o))}a?Gs(this,a):i&&Gs(this,i)}},i.Jd=function(e,t,n){if(n=void 0!==n&&n,this.B&&this.C)this.ra=e,this.Ob=t||"",this.Nb=n,(e=Dr(this.B.textStreams,this.ra,this.Ob,this.Nb)[0]||null)&&e!=this.i.i&&(As(this.j.g,e,!1),this.o.streaming.alwaysStreamText||this.qd())&&(Ko(this.i,e),Ws(this));else{var i=rr(e);(e=this.jb().find((function(e){return rr(e.language)==i&&(!t||e.roles.includes(t))&&e.forced==n})))&&this.pe(e)}},i.Ef=function(e){if(this.B&&this.C){for(var t=null,n=l(this.B.variants),i=n.next();!i.done;i=n.next())if((i=i.value).audio.label==e){t=i;break}null!=t&&(this.qa=new Kr(t.language,"",0,e),Hs(this))}},i.qd=function(){var e=this.ea;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?js(this).some((function(e){return"showing"==e.mode})):e},i.Kf=function(e){if(e=!!e,this.ea!=e){if(this.ea=e,this.l==Uu)this.L.m.setTextVisibility(e),this.o.streaming.alwaysStreamText||(e?this.i.i||0<(e=Dr(this.B.textStreams,this.ra,this.Ob,this.Nb)).length&&(Ko(this.i,e[0]),Ws(this)):function(e){var t=e.g.get(ci);t&&(Qo(t),Zo(t).catch((function(){})),e.g.delete(ci)),e.i=null}(this.i));else if(this.g&&this.g.src&&this.g.textTracks)for(var t=js(this),n=(t=l(t)).next();!n.done;n=t.next())"disabled"!=(n=n.value).mode&&(n.mode=e?"showing":"hidden");Ys(this)}},i.bf=function(){if(!this.Z())return null;var e=this.la.l,t=0;if(this.C)t=this.C.l();else if(e){if(null==e.startTime)return new Date;t=e.startTime}return this.B?new Date(1e3*(this.B.presentationTimeline.j+t)):this.g&&this.g.getStartDate?(e=this.g.getStartDate(),isNaN(e.getTime())?null:new Date(e.getTime()+1e3*t)):null},i.be=function(){if(!this.Z())return null;if(this.B)return new Date(1e3*this.B.presentationTimeline.j);if(this.g&&this.g.getStartDate){var e=this.g.getStartDate();return isNaN(e.getTime())?null:e}return null},i.zc=function(){if(this.l==Uu)return this.L.zc();var e={total:[],audio:[],video:[],text:[]};return this.l==Fu&&(e.total=qn(this.g.buffered)),e},i.getStats=function(){if(this.l!=Uu&&this.l!=Fu)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Bs(this);var e=this.g,t=e.currentTime/e.duration;if(!isNaN(t)){var n=this.j;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}e.getVideoPlaybackQuality&&(e=e.getVideoPlaybackQuality(),n=this.j,t=Number(e.totalVideoFrames),n.U=Number(e.droppedVideoFrames),n.O=t,this.j.L=Number(e.corruptedVideoFrames)),this.m?e=(e=this.m).H?e.H:NaN:e=NaN,this.j.m=e,this.l==Uu&&((e=this.i.h)&&(this.j.u=(this.F?this.F.i:1)*e.bandwidth),e&&e.video&&(n=this.j,t=e.video.height||NaN,n.W=e.video.width||NaN,n.C=t),this.Z()&&(e=this.be().valueOf()+1e3*this.Hd().end,this.j.F=(Date.now()-e)/1e3),this.B&&this.B.presentationTimeline&&(this.j.I=this.B.presentationTimeline.g),e=this.u.getBandwidthEstimate(),this.j.s=e);var i=this.j;e=i.W,n=i.C,t=i.u;for(var r=i.O,a=i.U,o=i.L,s=i.s,u=i.i,c=i.l,d=i.H,f=i.j,h=xs(i.h,"playing"),p=xs(i.h,"paused"),g=xs(i.h,"buffering"),m=i.m,v=i.F,y=i.I,b=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],i=l(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(i.h),w=[],T=(i=l(i.g.g)).next();!T.done;T=i.next())T=T.value,w.push({timestamp:T.timestamp,id:T.id,type:T.type,fromAdaptation:T.fromAdaptation,bandwidth:T.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:r,droppedFrames:a,corruptedFrames:o,estimatedBandwidth:s,completionPercent:u,loadLatency:c,manifestTimeSeconds:d,drmTimeSeconds:f,playTime:h,pauseTime:p,bufferingTime:g,licenseTime:m,liveLatency:v,maxSegmentDuration:y,stateHistory:b,switchHistory:w}},i.addTextTrack=function(e,t,n,i,r,a,o){if(o=void 0!==o&&o,xe("addTextTrack","Please use an addTextTrackAsync."),this.l!=Uu&&this.l!=Fu)throw new le(1,7,7004);if(!i){var s=Za(e);if(!(i={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"}[s]))throw new le(1,2,2011,s)}if(this.l==Fu){if("text/vtt"!=i)throw new le(1,2,2013,i);if(o&&(n="forced"),(i=document.createElement("track")).src=e,i.label=a||"",i.kind=n,i.srclang=t,this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous"),this.g.appendChild(i),e=this.jb().find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return zs(this),e;throw new le(1,2,2012)}if(1/0==(s=this.B.presentationTimeline.getDuration()))throw new le(1,4,4033);if(!Ii(Ti((e={id:this.ld++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ko(0,s,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:ci,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}).mimeType,e.codecs)))throw new le(2,2,2014,i);return this.B.textStreams.push(e),zs(this),Sr(e)},i.Ce=function(e,t,n,i,r,a,o){o=void 0!==o&&o;var s,u,c,d,f,h,p,g,m,v,y,b=this;return P((function(T){switch(T.g){case 1:if(b.l!=Uu&&b.l!=Fu)throw new le(1,7,7004);if(i){T.v(2);break}if(s=Za(e),i={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"}[s]){T.v(3);break}return x(T,4),w(T,Qa(e,b.P,b.o.streaming.retryParameters),6);case 6:i=T.h,E(T,3);break;case 4:A(T);case 3:if(!i)throw new le(1,2,2011,s);case 2:if(b.l!=Fu){T.v(7);break}if("text/vtt"==i){T.v(8);break}return w(T,function(e,t,n){var i,r,a;return P((function(o){return 1==o.g?(i=ga,(r=da([e],n)).method="GET",w(o,t.request(i,r).promise,2)):(a=o.h,o.return(a.data))}))}(e,b.P,b.o.streaming.retryParameters),9);case 9:u=T.h,c=function(e,t,n){var i=Ri[n];if(i)return n=i(),e={periodStart:0,segmentStart:0,segmentEnd:e.g.duration},t=oe(t),t=n.parseMedia(t,e),function(e){function t(e){var n=[],i=700<=e.fontWeight,r="italic"==e.fontStyle,a=e.textDecoration.includes("underline");return i&&n.push("b"),r&&n.push("i"),a&&n.push("u"),i=n.reduce((function(e,t){return e+"<"+t+">"}),""),n=n.reduceRight((function(e,t){return e+"</"+t+">"}),""),e.lineBreak||e.spacer?(e.spacer&&xe("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):e.nestedCues.length?e.nestedCues.map(t).join(""):i+e.payload+n}var n=e.map((function(e){if(e.nestedCues.length){var n=e.clone();return n.nestedCues=[],n.payload=t(e),n}return e}));e="WEBVTT\n\n";for(var i=(n=l(n)).next();!i.done;i=n.next()){var r=function(e){var t=Math.floor(e/3600),n=Math.floor(e/60%60),i=Math.floor(e%60);return(10>t?"0":"")+t+":"+(10>n?"0":"")+n+":"+(10>i?"0":"")+i+"."+(100>(e=Math.floor(1e3*e%1e3))?10>e?"00":"0":"")+e};e+=r((i=i.value).startTime)+" --\x3e "+r(i.endTime)+"\n",e+=i.payload+"\n\n"}return e}(t);throw new le(2,2,2014,n)}(b,u,i),d=new Blob([c],{type:"text/vtt"}),e=er(d),i="text/vtt";case 8:if(o&&(n="forced"),(f=document.createElement("track")).src=e,f.label=a||"",f.kind=n,f.srclang=t,b.g.getAttribute("crossorigin")||b.g.setAttribute("crossorigin","anonymous"),b.g.appendChild(f),h=b.jb(),p=h.find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return zs(b),T.return(p);throw new le(1,2,2012);case 7:if(g=di,1/0==(m=b.B.presentationTimeline.getDuration()))throw new le(1,4,4033);if(v={id:b.ld++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ko(0,m,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:g.ba,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},y=Ti(v.mimeType,v.codecs),!Ii(y))throw new le(2,2,2014,i);return b.B.textStreams.push(v),zs(b),T.return(Sr(v))}}))},i.Md=function(e,t){this.kd.width=e,this.kd.height=t},i.Fd=function(){if(this.l==Uu){var e=this.i;if(e.J.g)e=!1;else if(e.j)e=!1;else{for(var t=l(e.g.values()),n=t.next();!n.done;n=t.next())(n=n.value).Yb&&(n.Yb=!1,Jo(e,n,.1));e=!0}}else e=!1;return e},i.Ve=function(){return X("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.B},i.We=function(){return this.tc},i.ue=function(e){this.qc=e},i.yc=function(e){var t=this;return P((function(n){if(1==n.g)return w(n,function(e,t){var n;return P((function(i){if(1==i.g)return n=e.i?e.i.h:null,w(i,fr(e.m,n,t,e.o.useMediaCapabilities),2);ru(t),T(i)}))}(t,e),2);Os(t,e),T(n)}))},B("shaka.Player",Is),Is.prototype.setVideoContainer=Is.prototype.ue,Is.prototype.getManifestParserFactory=Is.prototype.We,Is.prototype.getManifest=Is.prototype.Ve,Is.prototype.retryStreaming=Is.prototype.Fd,Is.prototype.setMaxHardwareResolution=Is.prototype.Md,Is.prototype.addTextTrackAsync=Is.prototype.Ce,Is.prototype.addTextTrack=Is.prototype.addTextTrack,Is.prototype.getStats=Is.prototype.getStats,Is.prototype.getBufferedInfo=Is.prototype.zc,Is.prototype.getPresentationStartTimeAsDate=Is.prototype.be,Is.prototype.getPlayheadTimeAsDate=Is.prototype.bf,Is.prototype.setTextTrackVisibility=Is.prototype.Kf,Is.prototype.isTextTrackVisible=Is.prototype.qd,Is.prototype.selectVariantsByLabel=Is.prototype.Ef,Is.prototype.selectTextLanguage=Is.prototype.Jd,Is.prototype.selectAudioLanguage=Is.prototype.Id,Is.prototype.getTextLanguages=Is.prototype.ff,Is.prototype.getAudioLanguages=Is.prototype.Oe,Is.prototype.getTextLanguagesAndRoles=Is.prototype.gf,Is.prototype.getAudioLanguagesAndRoles=Is.prototype.Pe,Is.prototype.selectVariantTrack=Is.prototype.qe,Is.prototype.selectTextTrack=Is.prototype.pe,Is.prototype.getThumbnails=Is.prototype.hf,Is.prototype.getImageTracks=Is.prototype.Se,Is.prototype.getTextTracks=Is.prototype.jb,Is.prototype.getVariantTracks=Is.prototype.Ec,Is.prototype.cancelTrickPlay=Is.prototype.Ge,Is.prototype.trickPlay=Is.prototype.Mf,Is.prototype.getPlaybackRate=Is.prototype.$e,Is.prototype.isBuffering=Is.prototype.pd,Is.prototype.getKeyStatuses=Is.prototype.Bc,Is.prototype.getExpiration=Is.prototype.Ub,Is.prototype.drmInfo=Is.prototype.drmInfo,Is.prototype.keySystem=Is.prototype.keySystem,Is.prototype.seekRange=Is.prototype.Hd,Is.prototype.isAudioOnly=Is.prototype.lf,Is.prototype.isInProgress=Is.prototype.mb,Is.prototype.isLive=Is.prototype.Z,Is.prototype.getAdManager=Is.prototype.ae,Is.prototype.getAssetUri=Is.prototype.md,Is.prototype.getNetworkingEngine=Is.prototype.Vb,Is.prototype.getMediaElement=Is.prototype.Ye,Is.prototype.getLoadMode=Is.prototype.Ue,Is.prototype.resetConfiguration=Is.prototype.Df,Is.prototype.getConfiguration=Is.prototype.getConfiguration,Is.prototype.configure=Is.prototype.configure,Is.prototype.load=Is.prototype.load,Is.prototype.unload=Is.prototype.Rd,Is.prototype.detach=Is.prototype.detach,Is.prototype.attach=Is.prototype.Qb,Is.probeSupport=function(e){var t,n,i,r,a;return e=void 0===e||e,P((function(o){if(1==o.g)return t={},e?w(o,function(){var e,t,n,i,r,a;return P((function(o){return 1==o.g?(e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),n=[{videoCapabilities:t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],persistentState:"required",sessionTypes:["persistent-license"]},{initDataTypes:["cenc"],videoCapabilities:t}],i=new Map,r=function(e){var t,r,a;return P((function(o){switch(o.g){case 1:return x(o,2),w(o,navigator.requestMediaKeySystemAccess(e,n),4);case 4:return t=o.h,a=!!(r=t.getConfiguration().sessionTypes)&&r.includes("persistent-license"),We("Tizen 3")&&(a=!1),i.set(e,{persistentState:a}),w(o,t.createMediaKeys(),5);case 5:E(o,0);break;case 2:A(o),i.set(e,null),T(o)}}))},a=e.map((function(e){return r(e)})),w(o,Promise.all(a),2)):o.return(xa(i))}))}(),3):o.v(2);2!=o.g&&(t=o.h);var s={};if(Ve()){for(var u in eo)s[u]=!0;for(var c in to)s[c]=!0}u={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var d=(c=l(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!d.done;d=c.next())s[d=d.value]=Ve()?!!eo[d]:He(d);for(var f in u)s[f]=Ve()?!!to[f]:He(u[f]);for(n=s,s={},u=(f=l('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(","))).next();!u.done;u=f.next())s[u=u.value]=Ve()?!!Ii(u)||(MediaSource.isTypeSupported(u)||yi(u)):He(u),s[c=u.split(";")[0]]=s[c]||s[u];for(a in i={manifest:n,media:s,drm:t},r=Hu)i[a]=r[a]();return o.return(i)}))},Is.isBrowserSupported=function(){if(e.Promise||X("A Promise implementation or polyfill is required"),e.TextDecoder&&e.TextEncoder||X("A TextDecoder/TextEncoder implementation or polyfill is required"),!(e.Promise&&e.Uint8Array&&e.TextDecoder&&e.TextEncoder&&Array.prototype.forEach)||We("Trident/"))return!1;var t=Xe();return!(t&&12>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!Ve()||He("application/x-mpegurl"))},Is.setAdManagerFactory=function(e){Ku=e},Is.registerSupportPlugin=function(e,t){Hu[e]=t},Is.prototype.destroy=Is.prototype.destroy;var fu="abrstatuschanged",hu="adaptation",pu="buffering",gu="drmsessionupdate",mu="emsg",vu="error",yu="expirationupdated",bu="loaded",wu="loading",Tu="manifestparsed",xu="metadata",Su="onstatechange",Eu="onstateidle",Au="ratechange",ku="streaming",Iu="textchanged",Mu="texttrackvisibility",Cu="timelineregionadded",Du="timelineregionenter",Ru="timelineregionexit",Nu="trackschanged",Pu="unloading",Lu="variantchanged",ju={Tf:fu,Uf:hu,Vf:pu,Wf:gu,Yf:mu,Error:vu,Zf:yu,$f:"largegap",ag:bu,bg:wu,cg:Tu,Metadata:xu,dg:Su,eg:Eu,fg:Au,gg:"sessiondata",hg:ku,ig:Iu,jg:Mu,kg:Cu,lg:Du,mg:Ru,ng:Nu,og:Pu,pg:Lu},_u=0,Ou=1,Uu=2,Fu=3;Is.LoadMode={DESTROYED:_u,NOT_LOADED:Ou,MEDIA_SOURCE:Uu,SRC_EQUALS:Fu},Is.version="v3.1.6";var Bu=["3","1"];Ae=new function(e){this.g=e,this.i=Se,this.h=Ee}(new Te(Number(Bu[0]),Number(Bu[1])));var Vu=["output-restricted","internal-error"],Hu={},Ku=null;function Gu(){this.h=[],this.j=this.i=this.g=0}function qu(e,t){var n=this;this.i=e,this.g=t,this.j=!1,this.l=this.g.getVolume(),this.h=new _i,this.h.A(this.g,google.ima.AdEvent.Type.PAUSED,(function(){n.j=!0})),this.h.A(this.g,google.ima.AdEvent.Type.RESUMED,(function(){n.j=!1}))}function zu(t,n,i,r){var a=this;this.m=t,this.g=n,this.u=null,this.C=NaN,this.j=r,this.s=null,this.h=new _i,google.ima.settings.setLocale(i),(t=new google.ima.AdDisplayContainer(this.m,this.g)).initialize(),this.l=new google.ima.AdsLoader(t),this.l.getSettings().setPlayerType("shaka-player"),this.l.getSettings().setPlayerVersion("v3.1.6"),this.i=null,this.h.wa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){!function(t,n){t.j(new na("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.C))),t.i=n.getAdsManager(t.g),t.j(new na("ima-ad-manager-loaded",(new Map).set("imaAdManager",t.i)));var i=t.i.getCuePoints();if(i.length){for(var r=[],a=(i=l(i)).next();!a.done;a=i.next())r.push(new Zu(a.value));t.j(new na("ad-cue-points-changed",(new Map).set("cuepoints",r)))}!function(e){function t(t,n){var i=(new Map).set("originalEvent",t);e.j(new na(n,i))}e.h.A(e.i,google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){Xu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,(function(t){Wu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.STARTED,(function(t){Wu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.FIRST_QUARTILE,(function(e){t(e,"ad-first-quartile")})),e.h.A(e.i,google.ima.AdEvent.Type.MIDPOINT,(function(e){t(e,"ad-midpoint")})),e.h.A(e.i,google.ima.AdEvent.Type.THIRD_QUARTILE,(function(e){t(e,"ad-third-quartile")})),e.h.A(e.i,google.ima.AdEvent.Type.COMPLETE,(function(e){t(e,"ad-complete")})),e.h.A(e.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,(function(t){Yu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(t){Yu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.SKIPPED,(function(e){t(e,"ad-skipped")})),e.h.A(e.i,google.ima.AdEvent.Type.VOLUME_CHANGED,(function(e){t(e,"ad-volume-changed")})),e.h.A(e.i,google.ima.AdEvent.Type.VOLUME_MUTED,(function(e){t(e,"ad-muted")})),e.h.A(e.i,google.ima.AdEvent.Type.PAUSED,(function(n){e.s.j=!0,t(n,"ad-paused")})),e.h.A(e.i,google.ima.AdEvent.Type.RESUMED,(function(n){e.s.j=!1,t(n,"ad-resumed")})),e.h.A(e.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,(function(e){t(e,"ad-skip-state-changed")})),e.h.A(e.i,google.ima.AdEvent.Type.CLICK,(function(e){t(e,"ad-clicked")})),e.h.A(e.i,google.ima.AdEvent.Type.AD_PROGRESS,(function(e){t(e,"ad-progress")})),e.h.A(e.i,google.ima.AdEvent.Type.AD_BUFFERING,(function(e){t(e,"ad-buffering")})),e.h.A(e.i,google.ima.AdEvent.Type.IMPRESSION,(function(e){t(e,"ad-impression")})),e.h.A(e.i,google.ima.AdEvent.Type.DURATION_CHANGE,(function(e){t(e,"ad-duration-changed")})),e.h.A(e.i,google.ima.AdEvent.Type.USER_CLOSE,(function(e){t(e,"ad-closed")})),e.h.A(e.i,google.ima.AdEvent.Type.LOADED,(function(e){t(e,"ad-loaded")})),e.h.A(e.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(e){t(e,"all-ads-completed")})),e.h.A(e.i,google.ima.AdEvent.Type.LINEAR_CHANGED,(function(e){t(e,"ad-linear-changed")})),e.h.A(e.i,google.ima.AdEvent.Type.AD_METADATA,(function(e){t(e,"ad-metadata")})),e.h.A(e.i,google.ima.AdEvent.Type.LOG,(function(e){t(e,"ad-recoverable-error")})),e.h.A(e.i,google.ima.AdEvent.Type.AD_BREAK_READY,(function(e){t(e,"ad-break-ready")})),e.h.A(e.i,google.ima.AdEvent.Type.INTERACTION,(function(e){t(e,"ad-interaction")}))}(t);try{t.i.init(t.g.offsetWidth,t.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),t.h.A(t.g,"loadeddata",(function(){t.i.resize(t.g.offsetWidth,t.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),"ResizeObserver"in e&&(t.u=new ResizeObserver((function(){t.i.resize(t.g.offsetWidth,t.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),t.u.observe(t.g)),t.i.start()}catch(e){Yu(t,null)}}(a,t)})),this.h.A(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){Xu(a,e)})),this.g.onended=function(){a.l.contentComplete()}}function Xu(e,t){t.getError(),Yu(e,null),e.j(new na("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function Wu(e,t){var n=t.getAd();e.s=new qu(n,e.i),n=(new Map).set("ad",e.s).set("sdkAdObject",n).set("originalEvent",t),e.j(new na("ad-started",n)),e.m.setAttribute("ad-active","true"),e.g.pause()}function Yu(e,t){e.j(new na("ad-stopped",(new Map).set("originalEvent",t))),e.m.removeAttribute("ad-active"),e.g.play()}function $u(e,t){this.i=e,this.h=null,this.g=t}function Ju(e,t,n,i){var r=this;this.u=e,this.g=t,this.l=null,this.I=NaN,this.j=i,this.H=!1,this.C=this.m=this.s=null,this.F="",this.h=new _i,(e=new google.ima.dai.api.UiSettings).setLocale(n),this.i=new google.ima.dai.api.StreamManager(this.g,this.u,e),this.j(new na("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i))),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,(function(e){!function(e,t){e.j(new na("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-e.I)));var n=t.getStreamData().url;e.l.resolve(n),e.l=null,e.H||e.h.A(e.g,"seeked",(function(){var t=e.g.currentTime;if(0!=t){e.i.streamTimeForContentTime(t);var n=e.i.previousCuePointForStreamTime(t);n&&!n.played&&(e.s=t,e.g.currentTime=n.start)}}))}(r,e)})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,(function(){r.F.length?r.l.resolve(r.F):r.l.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.l=null})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,(function(){})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,(function(e){e=e.getAd(),r.m=new $u(e,r.g),r.C&&(r.m.h=r.C),r.j(new na("ad-started",(new Map).set("ad",r.m))),r.u.setAttribute("ad-active","true")})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,(function(){r.u.removeAttribute("ad-active");var e=r.g.currentTime;r.s&&r.s>e&&(r.g.currentTime=r.s,r.s=null)})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,(function(e){r.C=e.getStreamData().adProgressData,r.m&&(r.m.h=r.C)})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,(function(){r.j(new na("ad-first-quartile"))})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,(function(){r.j(new na("ad-midpoint"))})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,(function(){r.j(new na("ad-third-quartile"))})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,(function(){r.j(new na("ad-complete")),r.j(new na("ad-stopped")),r.u.removeAttribute("ad-active"),r.m=null})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,(function(){r.j(new na("ad-skipped")),r.j(new na("ad-stopped"))})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,(function(e){var t=e.getStreamData();e=[];for(var n=(t=l(t.cuepoints)).next();!n.done;n=t.next())n=n.value,e.push(new Zu(n.start,n.end));r.j(new na("ad-cue-points-changed",(new Map).set("cuepoints",e)))}))}function Qu(){ra.call(this),this.g=this.h=null,this.j=new Gu,this.i=navigator.language}function Zu(e,t){this.start=e,this.end=void 0===t?null:t}function el(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof na){var n={};for(r in t){var i=t[r];i&&"object"==typeof i?"detail"==r&&(n[r]=i):r in Event||(n[r]=i)}return n}if(t instanceof Error){var r=new Set(["name","message","stack"]);for(n in t)r.add(n);for(n=(i=l(Object.getOwnPropertyNames(t))).next();!n.done;n=i.next())r.add(n.value);for(i={},n=(r=l(r)).next();!n.done;n=r.next())i[n=n.value]=t[n];r={__type__:"Error",contents:i}}else if(t instanceof TimeRanges)for(r={__type__:"TimeRanges",length:t.length,start:[],end:[]},i=(n=l(qn(t))).next();!i.done;i=n.next()){var a=(i=i.value).end;r.start.push(i.start),r.end.push(a)}else r=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return r}}))}function tl(e){return JSON.parse(e,(function(e,t){if("NaN"==t)var n=NaN;else if("-Infinity"==t)n=-1/0;else if("Infinity"==t)n=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__)n=function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t);else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)n=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){n=t.contents;var i,r=Error(n.message);for(i in n)r[i]=n[i];n=r}else n=t;return n}))}(i=qu.prototype).getDuration=function(){return this.i.getDuration()},i.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()},i.getRemainingTime=function(){return this.g.getRemainingTime()},i.isPaused=function(){return this.j},i.isSkippable=function(){return 0<=this.i.getSkipTimeOffset()},i.getTimeUntilSkippable=function(){var e=this.i.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},i.canSkipNow=function(){return this.g.getAdSkippableState()},i.skip=function(){return this.g.skip()},i.pause=function(){return this.g.pause()},i.play=function(){return this.g.resume()},i.getVolume=function(){return this.g.getVolume()},i.setVolume=function(e){return this.g.setVolume(e)},i.isMuted=function(){return 0==this.g.getVolume()},i.resize=function(e,t){this.g.resize(e,t,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},i.setMuted=function(e){e?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)},i.getSequenceLength=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getTotalAds()},i.getPositionInSequence=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getAdPosition()},i.release=function(){this.g=this.i=null},B("shaka.ads.ClientSideAd",qu),qu.prototype.release=qu.prototype.release,qu.prototype.getPositionInSequence=qu.prototype.getPositionInSequence,qu.prototype.getSequenceLength=qu.prototype.getSequenceLength,qu.prototype.setMuted=qu.prototype.setMuted,qu.prototype.resize=qu.prototype.resize,qu.prototype.isMuted=qu.prototype.isMuted,qu.prototype.setVolume=qu.prototype.setVolume,qu.prototype.getVolume=qu.prototype.getVolume,qu.prototype.play=qu.prototype.play,qu.prototype.pause=qu.prototype.pause,qu.prototype.skip=qu.prototype.skip,qu.prototype.canSkipNow=qu.prototype.canSkipNow,qu.prototype.getTimeUntilSkippable=qu.prototype.getTimeUntilSkippable,qu.prototype.isSkippable=qu.prototype.isSkippable,qu.prototype.isPaused=qu.prototype.isPaused,qu.prototype.getRemainingTime=qu.prototype.getRemainingTime,qu.prototype.getMinSuggestedDuration=qu.prototype.getMinSuggestedDuration,qu.prototype.getDuration=qu.prototype.getDuration,zu.prototype.stop=function(){this.i&&this.i.stop(),this.m&&us(this.m)},zu.prototype.release=function(){this.stop(),this.u&&this.u.disconnect(),this.h&&this.h.release(),this.i&&this.i.destroy(),this.l.destroy()},(i=$u.prototype).getDuration=function(){return this.h?this.h.duration:-1},i.getMinSuggestedDuration=function(){return this.getDuration()},i.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1},i.isPaused=function(){return this.g.paused},i.isSkippable=function(){return this.i.isSkippable()},i.getTimeUntilSkippable=function(){var e=this.i.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},i.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},i.skip=function(){this.g.currentTime+=this.getRemainingTime()},i.pause=function(){return this.g.pause()},i.play=function(){return this.g.play()},i.getVolume=function(){return this.g.volume},i.setVolume=function(e){this.g.volume=e},i.isMuted=function(){return this.g.muted},i.resize=function(){},i.setMuted=function(e){this.g.muted=e},i.getSequenceLength=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getTotalAds()},i.getPositionInSequence=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getAdPosition()},i.release=function(){this.g=this.h=this.i=null},B("shaka.ads.ServerSideAd",$u),$u.prototype.release=$u.prototype.release,$u.prototype.getPositionInSequence=$u.prototype.getPositionInSequence,$u.prototype.getSequenceLength=$u.prototype.getSequenceLength,$u.prototype.setMuted=$u.prototype.setMuted,$u.prototype.resize=$u.prototype.resize,$u.prototype.isMuted=$u.prototype.isMuted,$u.prototype.setVolume=$u.prototype.setVolume,$u.prototype.getVolume=$u.prototype.getVolume,$u.prototype.play=$u.prototype.play,$u.prototype.pause=$u.prototype.pause,$u.prototype.skip=$u.prototype.skip,$u.prototype.canSkipNow=$u.prototype.canSkipNow,$u.prototype.getTimeUntilSkippable=$u.prototype.getTimeUntilSkippable,$u.prototype.isSkippable=$u.prototype.isSkippable,$u.prototype.isPaused=$u.prototype.isPaused,$u.prototype.getRemainingTime=$u.prototype.getRemainingTime,$u.prototype.getMinSuggestedDuration=$u.prototype.getMinSuggestedDuration,$u.prototype.getDuration=$u.prototype.getDuration,Ju.prototype.stop=function(){this.F="",this.s=null},Ju.prototype.release=function(){this.stop(),this.h&&this.h.release()},Ju.prototype.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.i.onTimedMetadata(t)}},m(Qu,ra),(i=Qu.prototype).setLocale=function(e){this.i=e},i.initClientSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new le(2,10,1e4);this.h&&this.h.release(),this.h=new zu(t,n,this.i,(function(e){if(e&&e.type)switch(e.type){case"ads-loaded":i.j.h.push(e.loadTime);break;case"ad-started":i.j.g++;break;case"ad-complete":i.j.i++;break;case"ad-skipped":i.j.j++}i.dispatchEvent(e)}))},i.release=function(){this.h&&(this.h.release(),this.h=null),this.g&&(this.g.release(),this.g=null),ra.prototype.release.call(this)},i.onAssetUnload=function(){this.h&&this.h.stop(),this.g&&this.g.stop(),this.dispatchEvent(new na("ad-stopped")),this.j=new Gu},i.requestClientSideAds=function(e){if(!this.h)throw new le(1,10,10001);var t=this.h;t.C=Date.now()/1e3,t.l.requestAds(e)},i.initServerSide=function(t,n){var i=this;if(!e.google||!google.ima||!google.ima.dai)throw new le(2,10,10002);this.g&&this.g.release(),this.g=new Ju(t,n,this.i,(function(e){if(e&&e.type)switch(e.type){case"ads-loaded":i.j.h.push(e.loadTime);break;case"ad-started":i.j.g++;break;case"ad-complete":i.j.i++;break;case"ad-skipped":i.j.j++}i.dispatchEvent(e)}))},i.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.g)throw new le(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;(n.mpt||n.mpv)&&X('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="v3.1.6";var i=t;return(n=this.g).l?n=Promise.reject(new le(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.H=!0),n.l=new hi,n.i.requestStream(e),n.F=i||"",n.I=Date.now()/1e3,n=n.l),n},i.replaceServerSideAdTagParameters=function(e){if(!this.g)throw new le(1,10,10003);(e.mpt||e.mpv)&&X('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="v3.1.6",this.g.i.replaceAdTagParameters(e)},i.getStats=function(){var e=this.j;return{loadTimes:e.h,started:e.g,playedCompletely:e.i,skipped:e.j}},i.onDashTimedMetadata=function(e){if(this.g&&"urn:google:dai:2018"==e.schemeIdUri){var t=e.schemeIdUri,n=e.eventElement?e.eventElement.getAttribute("messageData"):null;this.g.i.processMetadata(t,n,e.startTime)}},i.onHlsTimedMetadata=function(e,t){this.g&&this.g.i.processMetadata("ID3",e.data,t)},i.onCueMetadataChange=function(e){this.g&&this.g.onCueMetadataChange(e)},B("shaka.ads.AdManager",Qu),Qu.prototype.onCueMetadataChange=Qu.prototype.onCueMetadataChange,Qu.prototype.onHlsTimedMetadata=Qu.prototype.onHlsTimedMetadata,Qu.prototype.onDashTimedMetadata=Qu.prototype.onDashTimedMetadata,Qu.prototype.getStats=Qu.prototype.getStats,Qu.prototype.replaceServerSideAdTagParameters=Qu.prototype.replaceServerSideAdTagParameters,Qu.prototype.requestServerSideStream=Qu.prototype.requestServerSideStream,Qu.prototype.initServerSide=Qu.prototype.initServerSide,Qu.prototype.requestClientSideAds=Qu.prototype.requestClientSideAds,Qu.prototype.onAssetUnload=Qu.prototype.onAssetUnload,Qu.prototype.release=Qu.prototype.release,Qu.prototype.initClientSide=Qu.prototype.initClientSide,Qu.prototype.setLocale=Qu.prototype.setLocale,Qu.ADS_LOADED="ads-loaded",Qu.AD_STARTED="ad-started",Qu.AD_FIRST_QUARTILE="ad-first-quartile",Qu.AD_MIDPOINT="ad-midpoint",Qu.AD_THIRD_QUARTILE="ad-third-quartile",Qu.AD_COMPLETE="ad-complete",Qu.AD_STOPPED="ad-stopped",Qu.AD_SKIPPED="ad-skipped",Qu.AD_VOLUME_CHANGED="ad-volume-changed",Qu.AD_MUTED="ad-muted",Qu.AD_PAUSED="ad-paused",Qu.AD_RESUMED="ad-resumed",Qu.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Qu.CUEPOINTS_CHANGED="ad-cue-points-changed",Qu.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Qu.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Qu.AD_CLICKED="ad-clicked",Qu.AD_PROGRESS="ad-progress",Qu.AD_BUFFERING="ad-buffering",Qu.AD_IMPRESSION="ad-impression",Qu.AD_DURATION_CHANGED="ad-duration-changed",Qu.AD_CLOSED="ad-closed",Qu.AD_LOADED="ad-loaded",Qu.ALL_ADS_COMPLETED="all-ads-completed",Qu.AD_LINEAR_CHANGED="ad-linear-changed",Qu.AD_METADATA="ad-metadata",Qu.AD_RECOVERABLE_ERROR="ad-recoverable-error",Qu.AD_BREAK_READY="ad-break-ready",Qu.AD_INTERACTION="ad-interaction",Ku=function(){return new Qu};var nl="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),il="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),rl=["loop","playbackRate"],al=["pause","play"],ol={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},sl={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},ul=[["getConfiguration","configure"]],ll=[["isTextTrackVisible","setTextTrackVisibility"]],cl="addTextTrack addTextTrackAsync cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),dl=["attach","detach","load","unload"];function fl(e,t,n,i,r,a){var o=this;this.L=e,this.j=new Be(t),this.ea=n,this.C=!1,this.u=i,this.I=r,this.U=a,this.h=this.m=!1,this.W="",this.s=null,this.F=function(){return vl(o)},this.H=function(e,t){var n=tl(t);switch(n.type){case"event":var i=n.targetName;n=ia(n.event),o.u(i,n);break;case"update":for(var r in i=n.update)for(var a in n=o.g[r]||{},i[r])n[a]=i[r][a];o.C&&(o.ea(),o.C=!1);break;case"asyncComplete":if(r=n.id,n=n.error,a=o.i[r],delete o.i[r],a)if(n){for(i in r=new le(n.severity,n.category,n.code),n)r[i]=n[i];a.reject(r)}else a.resolve()}},this.g={video:{},player:{}},this.O=0,this.i={},this.l=null,Sl.add(this)}function hl(e,t,n){xl=n,n.addUpdateListener(e.F),n.addMessageListener("urn:x-cast:com.google.shaka.v2",e.H),vl(e),bl(e,{type:"init",initState:t,appData:e.s}),e.l.resolve()}function pl(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.l.reject(new le(2,8,n,t))}function gl(e,t){var n=e.U();e.l=new hi,e.C=!0,hl(e,n,t)}function ml(e){var t=xl;t.removeUpdateListener(e.F),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.H)}function vl(e){var t=!!xl&&"connected"==xl.status;if(e.h&&!t){for(var n in e.I(),e.g)e.g[n]={};yl(e)}e.h=t,e.W=t?xl.receiver.friendlyName:"",e.j.hc()}function yl(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new le(1,7,7e3))}}function bl(e,t){var n=el(t),i=xl;try{i.sendMessage("urn:x-cast:com.google.shaka.v2",n,(function(){}),Y)}catch(t){throw n=new le(2,8,8005,t),i=new na("error",(new Map).set("detail",n)),e.u("player",i),e.wb(),n}}(i=fl.prototype).destroy=function(){return Sl.delete(this),yl(this),xl&&ml(this),this.j&&(this.j.stop(),this.j=null),this.I=this.u=null,this.h=this.m=!1,this.H=this.F=this.l=this.i=this.g=this.s=null,Promise.resolve()},i.ua=function(){return this.h},i.Dd=function(){return this.W},i.init=function(){if(this.L.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.hc();var t=new chrome.cast.SessionRequest(this.L);t=new chrome.cast.ApiConfig(t,(function(e){for(var t=l(Sl),n=t.next();!n.done;n=t.next())gl(n.value,e)}),(function(e){for(var t=l(Sl),n=t.next();!n.done;n=t.next())n=n.value,Tl="available"==e,n.j.hc()}),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),Tl&&this.j.V(wl),(t=xl)&&t.status!=chrome.cast.SessionStatus.STOPPED?gl(this,t):xl=null}else e.__onGCastApiAvailable||(e.__onGCastApiAvailable=El),e.__onGCastApiAvailable!=El&&X("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")},i.Kd=function(e){this.s=e,this.h&&bl(this,{type:"appData",appData:this.s})},i.cast=function(e){var t=this;return P((function(n){if(!t.m)throw new le(1,8,8e3);if(!Tl)throw new le(1,8,8001);if(t.h)throw new le(1,8,8002);return t.l=new hi,chrome.cast.requestSession((function(n){return hl(t,e,n)}),(function(e){return pl(t,e)})),w(n,t.l,0)}))},i.wb=function(){if(this.h){if(yl(this),xl){ml(this);try{xl.stop((function(){}),(function(){}))}catch(e){}xl=null}vl(this)}},i.get=function(e,t){var n=this;if("video"==e){if(al.includes(t))return function(i){for(var r=[],a=0;a<arguments.length;++a)r[a]=arguments[a];return n.le.apply(n,[e,t].concat(c(r)))}}else if("player"==e){if(sl[t]&&!this.get("player","isLive")())return function(){};if(cl.includes(t))return function(i){for(var r=[],a=0;a<arguments.length;++a)r[a]=arguments[a];return n.le.apply(n,[e,t].concat(c(r)))};if(dl.includes(t))return function(i){for(var r=[],a=0;a<arguments.length;++a)r[a]=arguments[a];return n.Af.apply(n,[e,t].concat(c(r)))};if(ol[t])return function(){return n.g[e][t]}}return this.g[e][t]},i.set=function(e,t,n){this.g[e][t]=n,bl(this,{type:"set",targetName:e,property:t,value:n})},i.le=function(e,t,n){for(var i=[],r=2;r<arguments.length;++r)i[r-2]=arguments[r];bl(this,{type:"call",targetName:e,methodName:t,args:i})},i.Af=function(e,t,n){for(var i=[],r=2;r<arguments.length;++r)i[r-2]=arguments[r];r=new hi;var a=this.O.toString();this.O++,this.i[a]=r;try{bl(this,{type:"asyncCall",targetName:e,methodName:t,args:i,id:a})}catch(e){r.reject(e)}return r};var wl=.02,Tl=!1,xl=null,Sl=new Set;function El(e){if(e)for(var t=(e=l(Sl)).next();!t.done;t=e.next())t.value.init()}function Al(e,t,n){ra.call(this);var i=this;this.j=e,this.i=t,this.h=this.s=this.l=this.u=this.m=null,this.F=n,this.C=new Map,this.g=new fl(n,(function(){return Ml(i)}),(function(){return Cl(i)}),(function(e,t){return Nl(i,e,t)}),(function(){return Dl(i)}),(function(){return Il(i)})),function(e){e.g.init(),e.h=new _i;for(var t=l(nl),n=t.next();!n.done;n=t.next())e.h.A(e.j,n.value,(function(t){e.g.ua()||(t=ia(t),e.l.dispatchEvent(t))}));for(var i in ju)e.h.A(e.i,ju[i],(function(t){e.g.ua()||e.s.dispatchEvent(t)}));for(var r in e.m={},t={},e.j)t.Jb=r,Object.defineProperty(e.m,t.Jb,{configurable:!1,enumerable:!0,get:function(t){return function(){return Rl(e,t.Jb)}}(t),set:function(t){return function(n){var i=t.Jb;e.g.ua()?e.g.set("video",i,n):e.j[i]=n}}(t)}),t={Jb:t.Jb};e.u={},kl(e,(function(t){Object.defineProperty(e.u,t,{configurable:!1,enumerable:!0,get:function(){return function(e,t){if(e.C.has(t)&&(t=e.C.get(t)),"addEventListener"==t)return function(t,n,i){return e.s.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.s.removeEventListener(t,n,i)};if("getMediaElement"==t)return function(){return e.m};if("getSharedConfiguration"==t)return e.g.get("player","getConfiguration");if("getNetworkingEngine"==t)return function(){return e.i.Vb()};if("getAdManager"==t)return function(){return e.i.ae()};if("setVideoContainer"==t)return function(t){return e.i.ue(t)};if(e.g.ua()){if("getManifest"==t||"drmInfo"==t)return function(){return X(t+"() does not work while casting!"),null};if("attach"==t||"detach"==t)return function(){return X(t+"() does not work while casting!"),Promise.resolve()}}return e.g.ua()&&0==Object.keys(e.g.g.video).length&&ol[t]||!e.g.ua()?e.i[t].bind(e.i):e.g.get("player",t)}(e,t)}})})),function(e){var t=new Map;kl(e,(function(n,i){if(t.has(i)){var r=t.get(i);n.length<r.length?e.C.set(n,r):e.C.set(r,n)}else t.set(i,n)}))}(e),e.l=new ra,e.l.sc=e.m,e.s=new ra,e.s.sc=e.u}(this)}function kl(e,t){function n(e){return"constructor"!=e&&"function"==typeof i[e]&&!r.has(e)}var i=e.i,r=new Set;for(a in i)n(a)&&(r.add(a),t(a,i[a]));for(var a=Object.getPrototypeOf(i),o=Object.getPrototypeOf({});a&&a!=o;){for(var s=l(Object.getOwnPropertyNames(a)),u=s.next();!u.done;u=s.next())n(u=u.value)&&(r.add(u),t(u,i[u]));a=Object.getPrototypeOf(a)}}function Il(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.i.md(),startTime:null};e.j.pause();for(var n=l(rl),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.j[i];for(e.j.ended||(t.startTime=e.j.currentTime),i=(n=l(ul)).next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.i[r[0]](),t.player[i]=r}for(i=(n=l(ll)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.i[r[0]](),t.playerAfterLoad[i]=r;return t}function Ml(e){var t=new na("caststatuschanged");e.dispatchEvent(t)}function Cl(e){var t=new na(e.m.paused?"pause":"play");e.l.dispatchEvent(t)}function Dl(e){for(var t=l(ul),n=t.next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.i[n](i)}var r=e.g.get("player","getAssetUri")();n=e.g.get("video","ended"),t=Promise.resolve();var a=e.j.autoplay;i=null,n||(i=e.g.get("video","currentTime")),r&&(e.j.autoplay=!1,t=e.i.load(r,i));var o={};for(i=(n=l(rl)).next();!i.done;i=n.next())i=i.value,o[i]=e.g.get("video",i);t.then((function(){if(e.j){for(var t=l(rl),n=t.next();!n.done;n=t.next())n=n.value,e.j[n]=o[n];for(n=(t=l(ll)).next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.i[n](i)}e.j.autoplay=a,r&&e.j.play()}}),(function(t){t=(new Map).set("detail",t),t=new na(vu,t),e.i.dispatchEvent(t)}))}function Rl(e,t){if("addEventListener"==t)return function(t,n,i){return e.l.addEventListener(t,n,i)};if("removeEventListener"==t)return function(t,n,i){return e.l.removeEventListener(t,n,i)};if(e.g.ua()&&0==Object.keys(e.g.g.video).length){var n=e.j[t];if("function"!=typeof n)return n}return e.g.ua()?e.g.get("video",t):("function"==typeof(n=e.j[t])&&(n=n.bind(e.j)),n)}function Nl(e,t,n){e.g.ua()&&("video"==t?e.l.dispatchEvent(n):"player"==t&&e.s.dispatchEvent(n))}function Pl(e,t,n,i){ra.call(this);var r=this;this.g=e,this.i=t,this.h=new _i,this.O={video:e,player:t},this.H=n||function(){},this.W=i||function(e){return e},this.j=null,this.I=!1,this.s=!0,this.m=0,this.F=!1,this.C=!0,this.u=this.l=null,this.L=new Be((function(){Ol(r)})),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return Ll(e)},t.onSenderDisconnected=function(){return Ll(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&Vl(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),Vl(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.u=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.u.onMessage=function(t){return function(e,t){var n=tl(t.data);switch(n.type){case"PLAY":e.g.play(),Hl(e);break;case"PAUSE":e.g.pause(),Hl(e);break;case"SEEK":var i=n.currentTime,r=n.resumeState;null!=i&&(e.g.currentTime=Number(i)),r&&"PLAYBACK_START"==r?(e.g.play(),Hl(e)):r&&"PLAYBACK_PAUSE"==r&&(e.g.pause(),Hl(e));break;case"STOP":e.i.Rd().then((function(){e.i&&Hl(e)}));break;case"GET_STATUS":Fl(e,Number(n.requestId));break;case"VOLUME":i=(r=n.volume).level,r=r.muted;var a=e.g.volume,o=e.g.muted;null!=i&&(e.g.volume=Number(i)),null!=r&&(e.g.muted=r),a==e.g.volume&&o==e.g.muted||Hl(e);break;case"LOAD":e.m=0,e.F=!1,e.C=!1,i=n.media,r=n.currentTime,a=e.W(i.contentId),o=n.autoplay||!0,e.H(i.customData),o&&(e.g.autoplay=!0),e.i.load(a,r).then((function(){e.i&&Fl(e)})).catch((function(t){var i="LOAD_FAILED";7==t.category&&7e3==t.code&&(i="LOAD_CANCELLED"),Vl(e,{requestId:Number(n.requestId),type:i},e.u)}));break;default:Vl(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.u)}}(e,t)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(t){return function(e,t){var n=tl(t.data);switch(n.type){case"init":e.m=0,e.F=!1,e.C=!0,function(e,t,n){var i,r,a,o,s,u,l,c,d,f,h;P((function(p){switch(p.g){case 1:for(i in t.player)r=t.player[i],e.i[i](r);return e.H(n),a=e.g.autoplay,t.manifest?(e.g.autoplay=!1,x(p,5),w(p,e.i.load(t.manifest,t.startTime),7)):w(p,Promise.resolve(),3);case 7:E(p,3);break;case 5:return o=A(p),s=vu,u=(new Map).set("detail",o),l=new na(s,u),e.i&&e.i.dispatchEvent(l),p.return();case 3:if(!e.i)return p.return();for(c in t.video)d=t.video[c],e.g[c]=d;for(f in t.playerAfterLoad)h=t.playerAfterLoad[f],e.i[f](h);e.g.autoplay=a,t.manifest&&(e.g.play(),Hl(e)),T(p)}}))}(e,n.initState,n.appData),Ol(e);break;case"appData":e.H(n.appData);break;case"set":var i=n.targetName,r=n.property;if(n=n.value,"video"==i){var a=cast.receiver.CastReceiverManager.getInstance();if("volume"==r){a.setSystemVolumeLevel(n);break}if("muted"==r){a.setSystemVolumeMuted(n);break}}e.O[i][r]=n;break;case"call":(i=e.O[n.targetName])[n.methodName].apply(i,n.args);break;case"asyncCall":i=n.targetName,r=n.methodName,"player"==i&&"load"==r&&(e.m=0,e.F=!1);var o=n.id,s=t.senderId;n=(a=e.O[i])[r].apply(a,n.args),"player"==i&&"load"==r&&(n=n.then((function(){e.C=!0}))),n.then((function(){return Bl(e,s,o,null)}),(function(t){return Bl(e,s,o,t)}))}}(e,t)},t.start();for(var n=(t=l(nl)).next();!n.done;n=t.next())e.h.A(e.g,n.value,(function(t){return _l(e,"video",t)}));for(var i in ju)e.h.A(e.i,ju[i],(function(t){return _l(e,"player",t)}));cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.i.Md(3840,2160):e.i.Md(1920,1080),e.h.A(e.g,"loadeddata",(function(){e.F=!0})),e.h.A(e.i,"loading",(function(){e.s=!1,jl(e)})),e.h.A(e.g,"playing",(function(){e.s=!1,jl(e)})),e.h.A(e.g,"pause",(function(){jl(e)})),e.h.A(e.i,"unloading",(function(){e.s=!0,jl(e)})),e.h.A(e.g,"ended",(function(){new Be((function(){e.g&&e.g.ended&&(e.s=!0,jl(e))})).V(Gl)}))}(this)}function Ll(e){e.m=0,e.C=!0,e.I=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,jl(e)}function jl(e){var t;P((function(n){return 1==n.g?w(n,Promise.resolve(),2):e.i?(t=new na("caststatuschanged"),e.dispatchEvent(t),Ul(e)||Hl(e),void T(n)):n.return()}))}function _l(e,t,n){e.i&&(Ol(e),Vl(e,{type:"event",targetName:t,event:n},e.l))}function Ol(e){e.L.V(Kl);for(var t={video:{},player:{}},n=l(il),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.g[i];if(e.i.Z())for(var r in sl)0==e.m%sl[r]&&(t.player[r]=e.i[r]());for(var a in ol)0==e.m%ol[a]&&(t.player[a]=e.i[a]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),e.F&&(e.m+=1),Vl(e,{type:"update",update:t},e.l),Ul(e)}function Ul(e){return!(!e.C||!e.g.duration&&!e.i.Z())&&(Fl(e),e.C=!1,!0)}function Fl(e,t){var n={contentId:e.i.md(),streamType:e.i.Z()?"LIVE":"BUFFERED",contentType:""};e.i.Z()||(n.duration=e.g.duration),e.j&&(n.metadata=e.j),Hl(e,void 0===t?0:t,n)}function Bl(e,t,n,i){e.i&&Vl(e,{type:"asyncComplete",id:n,error:i},e.l,t)}function Vl(e,t,n,i){e.I&&(e=el(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function Hl(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.s?ql:e.i.pd()?Xl:e.g.paused?Wl:zl,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(i.media=n),Vl(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.u)}m(Al,ra),(i=Al.prototype).destroy=function(e){return e&&this.g.wb(),this.h&&(this.h.release(),this.h=null),e=[],this.i&&(e.push(this.i.destroy()),this.i=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.m=this.j=null,ra.prototype.release.call(this),Promise.all(e)},i.jf=function(){return this.m},i.af=function(){return this.u},i.Ee=function(){return this.g.m&&Tl},i.ua=function(){return this.g.ua()},i.Dd=function(){return this.g.Dd()},i.cast=function(){var e,t=this;return P((function(n){return 1==n.g?(e=Il(t),w(n,t.g.cast(e),2)):t.i?w(n,t.i.Rd(),0):n.return()}))},i.Kd=function(e){this.g.Kd(e)},i.Lf=function(){!function(e){if(e.h){var t=e.U();chrome.cast.requestSession((function(n){return hl(e,t,n)}),(function(t){return pl(e,t)}))}}(this.g)},i.wb=function(){this.g.wb()},i.He=function(e){var t=this;return P((function(n){if(1==n.g)return e==t.F?n.return():(t.F=e,t.g.wb(),w(n,t.g.destroy(),2));t.g=null,t.g=new fl(e,(function(){return Ml(t)}),(function(){return Cl(t)}),(function(e,n){return Nl(t,e,n)}),(function(){return Dl(t)}),(function(){return Il(t)})),t.g.init(),T(n)}))},B("shaka.cast.CastProxy",Al),Al.prototype.changeReceiverId=Al.prototype.He,Al.prototype.forceDisconnect=Al.prototype.wb,Al.prototype.suggestDisconnect=Al.prototype.Lf,Al.prototype.setAppData=Al.prototype.Kd,Al.prototype.cast=Al.prototype.cast,Al.prototype.receiverName=Al.prototype.Dd,Al.prototype.isCasting=Al.prototype.ua,Al.prototype.canCast=Al.prototype.Ee,Al.prototype.getPlayer=Al.prototype.af,Al.prototype.getVideo=Al.prototype.jf,Al.prototype.destroy=Al.prototype.destroy,m(Pl,ra),(i=Pl.prototype).isConnected=function(){return this.I},i.mf=function(){return this.s},i.Hf=function(e){this.j=e},i.Ke=function(){this.j=null},i.If=function(e){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.j.title=e},i.Gf=function(e){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.j.images=[{url:e}]},i.Ff=function(e){this.j||(this.j={}),this.j.artist=e,this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},i.destroy=function(){var e,t=this;return P((function(n){if(1==n.g)return t.h&&(t.h.release(),t.h=null),e=[],t.i&&(e.push(t.i.destroy()),t.i=null),t.L&&(t.L.stop(),t.L=null),t.g=null,t.O=null,t.H=null,t.I=!1,t.s=!0,t.l=null,t.u=null,ra.prototype.release.call(t),w(n,Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),T(n)}))},B("shaka.cast.CastReceiver",Pl),Pl.prototype.destroy=Pl.prototype.destroy,Pl.prototype.setContentArtist=Pl.prototype.Ff,Pl.prototype.setContentImage=Pl.prototype.Gf,Pl.prototype.setContentTitle=Pl.prototype.If,Pl.prototype.clearContentMetadata=Pl.prototype.Ke,Pl.prototype.setContentMetadata=Pl.prototype.Hf,Pl.prototype.isIdle=Pl.prototype.mf,Pl.prototype.isConnected=Pl.prototype.isConnected;var Kl=.5,Gl=5,ql="IDLE",zl="PLAYING",Xl="BUFFERING",Wl="PAUSED";function Yl(e){var t=this;this.g=[],this.h=[],this.data=[],(new De).box("moov",Re).T("pssh",(function(e){if(!(1<e.version)){var n=oe(e.reader.R,-12,e.size);if(t.data.push(n),t.g.push(it(e.reader.bb(16))),0<e.version){n=e.reader.N();for(var i=(n=l(ee(n))).next();!i.done;i=n.next())i=it(e.reader.bb(16)),t.h.push(i)}}})).parse(e)}function $l(e,t){var n=e.length,i=t.length+16+n,r=new Uint8Array(i),a=se(r),o=0;return a.setUint32(o,i),o+=4,a.setUint32(o,1886614376),o+=4,a.setUint32(o,0),o+=4,r.set(t,o),o+=t.length,a.setUint32(o,n),r.set(e,o+4),r}function Jl(e,t){var n=Zl(e,t);return 1!=n.length?null:n[0]}function Ql(e,t,n){return 1!=(e=ec(e,t,n)).length?null:e[0]}function Zl(e,t){return Array.from(e.childNodes).filter((function(e){return e instanceof Element&&e.tagName==t}))}function ec(e,t,n){return Array.from(e.childNodes).filter((function(e){return e instanceof Element&&e.localName==n&&e.namespaceURI==t}))}function tc(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function nc(e,t,n){for(var i=(t=l(t)).next();!i.done;i=t.next())if(i=i.value,e.hasAttributeNS(i,n))return e.getAttributeNS(i,n);return null}function ic(e){return Array.from(e.childNodes).every(rc)?e.textContent.trim():null}function rc(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}function ac(e,t,n,i){i=void 0===i?null:i;var r=null;return null!=(e=e.getAttribute(t))&&(r=n(e)),null==r?i:r}function oc(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:Math.floor(e/1e3)):null}function sc(e){return e&&(e=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(e))?(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),isFinite(e)?e:null):null}function uc(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null}function lc(e){return 0==(e=Number(e))%1?e:null}function cc(e){return 0==(e=Number(e))%1&&0<e?e:null}function dc(e){return 0==(e=Number(e))%1&&0<=e?e:null}function fc(e){return e=Number(e),isNaN(e)?null:e}function hc(e){var t;return e=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e),isNaN(e)?null:e}function pc(e,t){var n=new DOMParser,i=null,r=null;try{r=n.parseFromString(e,"text/xml")}catch(e){}return r&&r.documentElement.tagName==t&&(i=r.documentElement),i&&0<i.getElementsByTagName("parsererror").length?null:i}function gc(e,t){try{return pc(fe(e),t)}catch(e){return null}}function mc(e,t,n){var i=function(e){for(var t=[],n=(e=l(e)).next();!n.done;n=e.next())(n=yc(n.value))&&t.push(n);return t}(e),r=null;e=[];var a=[],o=new Set(i.map((function(e){return e.keyId})));if(o.delete(null),1<o.size)throw new le(2,4,4010);if(t||(a=i.filter((function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.oe||(r=e.init||r,!1)}))).length&&(e=function(e,t,n){for(var i=[],r=(t=l(t)).next();!r.done;r=t.next()){var a=n[(r=r.value).oe];if(a){var o;if(o=Ql(r.node,"urn:microsoft:playready","pro"))o=[{initData:$l(o=tt(o.textContent),new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149])),initDataType:"cenc",keyId:r.keyId}];else o=null;o=si(a,r.init||e||o),(a=wc.get(a))&&(o.licenseServerUri=a(r)),i.push(o)}}return i}(r,a,n),0==e.length&&(e=[si("",r)])),i.length&&(t||!a.length))for(e=[],n=(t=l(Object.values(n))).next();!n.done;n=t.next())"org.w3.clearkey"!=(n=n.value)&&e.push(si(n,r));if(o=Array.from(o)[0]||null)for(n=(t=l(e)).next();!n.done;n=t.next())for(i=(n=l(n.value.initData)).next();!i.done;i=n.next())i.value.keyId=o;return{Wd:o,qg:r,drmInfos:e,$d:!0}}function vc(e){return(e=Ql(e.node,"urn:microsoft:playready","pro"))&&(e=function(e){var t=0,n=se(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,1&r||r+e>n.byteLength){n=[];break e}var a=oe(n,e,r);t.push({type:i,value:a}),e+=r}n=t}return n}(e=tt(e.textContent)).filter((function(e){return e.type===bc}))[0])&&(e=pc(e=he(e.value,!0),"WRMHEADER"))?function(e){for(var t=(e=l(e.getElementsByTagName("DATA"))).next();!t.done;t=e.next())for(var n=(t=l(t.value.childNodes)).next();!n.done;n=t.next())if((n=n.value)instanceof Element&&"LA_URL"==n.tagName)return n.textContent;return""}(e):""}function yc(e){var t=e.getAttribute("schemeIdUri"),n=tc(e,"urn:mpeg:cenc:2013","default_KID"),i=ec(e,"urn:mpeg:cenc:2013","pssh").map(ic);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new le(2,4,4009);var r=[];try{r=i.map((function(e){return{initDataType:"cenc",initData:tt(e),keyId:null}}))}catch(e){throw new le(2,4,4007)}return{node:e,oe:t,keyId:n,init:0<r.length?r:null}}var bc=1,wc=(new Map).set("com.widevine.alpha",(function(e){return(e=Ql(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""})).set("com.microsoft.playready",vc).set("com.microsoft.playready.recommendation",vc).set("com.microsoft.playready.software",vc).set("com.microsoft.playready.hardware",vc);function Tc(t,n,i,r,a){var o={RepresentationID:n,Number:i,Bandwidth:r,Time:a};return t.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(t,n,i,r){if("$$"==t)return"$";var a=o[n];if(null==a)return t;switch("RepresentationID"==n&&i&&(i=void 0),"Time"==n&&(a=Math.round(a)),r){case void 0:case"d":case"i":case"u":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();break;default:t=a.toString()}return i=e.parseInt(i,10)||1,Array(Math.max(0,i-t.length)+1).join("0")+t}))}function xc(e,t){var n=Sc(e,t,"timescale"),i=1;n&&(i=cc(n)||1);var r=Sc(e,t,"duration");n=cc(r||""),"image"==e.K.contentType&&(n=fc(r||"")),n&&(n/=i);var a=Sc(e,t,"startNumber");r=Number(Sc(e,t,"presentationTimeOffset"))||0;var o=dc(a||"");null!=a&&null!=o||(o=1);var s=Ec(e,t,"SegmentTimeline");if(a=null,s){a=i;var u=e.X.duration||1/0,c=Zl(s,"S");s=[];for(var d=-r,f=(c=l(te(c))).next();!f.done;f=c.next()){var h=(f=f.value).item,p=f.next,g=ac(h,"t",dc);f=ac(h,"d",dc);var m=ac(h,"r",lc);if(null!=g&&(g-=r),!f)break;if(h=null!=g?g:d,0>(g=m||0))if(p){if(null==(p=ac(p,"t",dc)))break;if(h>=p)break;g=Math.ceil((p-h)/f)-1}else{if(1/0==u)break;if(h/a>=u)break;g=Math.ceil((u*a-h)/f)-1}for(0<s.length&&h!=d&&(s[s.length-1].end=h/a),g=(p=l(ee(g+1))).next();!g.done;g=p.next())d=h+f,s.push({start:h/a,end:d/a,Qf:h}),h=d}a=s}return{timescale:i,ja:n,Ib:o,Xa:r/i||0,Sd:r,timeline:a}}function Sc(e,t,n){return[t(e.K),t(e.ma),t(e.ha)].filter(Me).map((function(e){return e.getAttribute(n)})).reduce((function(e,t){return e||t}))}function Ec(e,t,n){return[t(e.K),t(e.ma),t(e.ha)].filter(Me).map((function(e){return Jl(e,n)})).reduce((function(e,t){return e||t}))}function Ac(e,t,n,i,r,a){if(a=void 0===a?0:a,tc(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,i,r,a){for(var o=tc(e,"http://www.w3.org/1999/xlink","href"),s=tc(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",u=l(Array.from(e.attributes)),c=u.next();!c.done;c=u.next())"http://www.w3.org/1999/xlink"==(c=c.value).namespaceURI&&e.removeAttributeNS(c.namespaceURI,c.localName);if(5<=a)return Jr(new le(2,4,4028));if("onLoad"!=s)return Jr(new le(2,4,4027));var d=oi([i],[o]);return r.request(0,da(d,t)).ca((function(i){if(!(i=gc(i.data,e.tagName)))return Jr(new le(2,4,4001,o));for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);for(;i.childNodes.length;){var s=i.childNodes[0];i.removeChild(s),e.appendChild(s)}for(s=(i=l(Array.from(i.attributes))).next();!s.done;s=i.next())e.setAttributeNode(s.value.cloneNode(!1));return Ac(e,t,n,d[0],r,a+1)}))}(e,t,n,i,r,a);return n&&(o=o.ca(void 0,(function(){return Ac(e,t,n,i,r,a)}))),o}o=[];for(var s=l(Array.from(e.childNodes)),u=s.next();!u.done;u=s.next())(u=u.value)instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==tc(u,"http://www.w3.org/1999/xlink","href")?e.removeChild(u):"SegmentTimeline"!=u.tagName&&o.push(Ac(u,t,n,i,r,a)));return ta(o).ca((function(){return e}))}function kc(e,t,n,i,r,a,o){var s,u=(new De).T("sidx",(function(e){s=function(e,t,n,i,r,a,o){var s=[];o.reader.skip(4);var u=o.reader.N();if(0==u)throw new le(2,3,3005);if(0==o.version)var c=o.reader.N(),d=o.reader.N();else c=o.reader.Hb(),d=o.reader.Hb();o.reader.skip(2);var f=o.reader.Gb();for(e=e+o.size+d,f=l(ee(f)),d=f.next();!d.done;d=f.next()){var h=o.reader.N();d=(2147483648&h)>>>31,h&=2147483647;var p=o.reader.N();if(o.reader.skip(4),1==d)throw new le(2,3,3006);s.push(new io(c/u+n,(c+p)/u+n,(function(){return a}),e,e+h-1,t,n,i,r)),c+=p,e+=h}return o.parser.stop(),s}(t,i,r,a,o,n,e)}));if(e&&u.parse(e),s)return s;throw new le(2,3,3004)}function Ic(e){this.h=se(e),this.g=new ye(this.h,0)}function Mc(e){var t=Cc(e);if(7<t.length)throw new le(2,3,3002);for(var n=0,i=(t=l(t)).next();!i.done;i=t.next())n=256*n+i.value;t=Cc(e);e:{for(var r=(i=l(Dc)).next();!r.done;r=i.next())if(ie(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.$();else{if(8==t.length&&224&t[1])throw new le(2,3,3001);i=0;for(var a=(r=l(te(t))).next();!a.done;a=r.next()){var o=(a=a.value).item;i=0==a.ga?o&(1<<8-t.length)-1:256*i+o}t=i}return t=e.g.$()+t<=e.h.byteLength?t:e.h.byteLength-e.g.$(),i=se(e.h,e.g.$(),t),e.g.skip(t),new Rc(n,i)}function Cc(e){var t=e.g.$(),n=e.g.aa();if(0==n)throw new le(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),oe(e.h,t,n)}Ic.prototype.pa=function(){return this.g.pa()};var Dc=[[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 Rc(e,t){this.id=e,this.g=t}function Nc(e){if(8<e.g.byteLength)throw new le(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new le(2,3,3001);for(var t=0,n=l(ee(e.g.byteLength)),i=n.next();!i.done;i=n.next())t=256*t+(i=e.g.getUint8(i.value));return t}function Pc(e){var t=new Ic(e.g);if(179!=(e=Mc(t)).id)throw new le(2,3,3013);if(e=Nc(e),183!=(t=Mc(t)).id)throw new le(2,3,3012);t=new Ic(t.g);for(var n=0;t.pa();){var i=Mc(t);if(241==i.id){n=Nc(i);break}}return{Rf:e,zf:n}}function Lc(e,t){var n=Ec(e,t,"Initialization");if(!n)return null;var i=e.K.Aa,r=n.getAttribute("sourceURL");r&&(i=oi(e.K.Aa,[r])),r=0;var a=null;return(n=ac(n,"range",uc))&&(r=n.start,a=n.end),new no((function(){return i}),r,a)}function jc(e,t){var n=Number(Sc(e,Oc,"presentationTimeOffset"))||0,i=Sc(e,Oc,"timescale"),r=1;i&&(r=cc(i)||1);var a=n/r||0,o=Lc(e,Oc);!function(e,t){if(Fc(e,t),!Uc(e))throw new le(2,4,4002)}(e,o);var s=oa(e);return{xb:function(){var e=Ec(s,Oc,"RepresentationIndex"),n=s.K.Aa;return e&&(e=e.getAttribute("sourceURL"))&&(n=oi(s.K.Aa,[e])),e=Uc(s),_c(s,t,o,n,e.start,e.end,a)}}}function _c(e,t,n,i,r,a,o){var s,u,l,c,d,f,h,p,g,m,v,y,b,T,x;return P((function(S){if(1==S.g)return s=e.presentationTimeline,u=!e.fb||!e.X.ee,l=e.X.start,c=e.X.duration,d=e.K.mimeType.split("/")[1],h=null,p=[(f=t)(i,r,a),"webm"==d?f(n.oa(),n.ka,n.fa):null],f=null,w(S,Promise.all(p),2);if(g=S.h,m=g[0],v=g[1]||null,null,b=l-o,T=l,x=c?l+c:1/0,"mp4"==d)var E=kc(m,r,i,n,b,T,x);else{if(440786851!=Mc(E=new Ic(v)).id)throw new le(2,3,3008);var A=Mc(E);if(408125543!=A.id)throw new le(2,3,3009);E=A.g.byteOffset,A=new Ic(A.g);for(var k=null;A.pa();){var I=Mc(A);if(357149030==I.id){k=I;break}}if(!k)throw new le(2,3,3010);for(k=new Ic(k.g),I=1e6,A=null;k.pa();){var M=Mc(k);if(2807729==M.id)I=Nc(M);else if(17545==M.id)if(4==M.g.byteLength)A=M.g.getFloat32(0);else{if(8!=M.g.byteLength)throw new le(2,3,3003);A=M.g.getFloat64(0)}}if(null==A)throw new le(2,3,3011);if(A*=k=I/1e9,475249515!=(I=Mc(new Ic(m))).id)throw new le(2,3,3007);E=function(e,t,n,i,r,a,o,s,u){function l(){return r}var c=[];e=new Ic(e.g);for(var d=null,f=null;e.pa();){var h=Mc(e);if(187==h.id){var p=Pc(h);p&&(h=n*p.Rf,p=t+p.zf,null!=d&&c.push(new io(d+o,h+o,l,f,p-1,a,o,s,u)),d=h,f=p)}}return null!=d&&c.push(new io(d+o,i+o,l,f,null,a,o,s,u)),c}(I,E,k,A,i,n,b,T,x)}return y=E,s.Db(y),h=new Ao(y),u&&h.ab(T,x,!0),S.return(h)}))}function Oc(e){return e.dc}function Uc(e){var t=Ec(e,Oc,"RepresentationIndex");return e=uc((e=Sc(e,Oc,"indexRange"))||""),t&&(e=ac(t,"range",uc,e)),e}function Fc(e,t){var n=e.K.mimeType.split("/")[1];if(e.K.contentType!=ci&&"mp4"!=n&&"webm"!=n)throw new le(2,4,4006);if("webm"==n&&!t)throw new le(2,4,4005)}function Bc(e,t){var n=Lc(e,Vc),i=function(e){var t=function(e){return[e.K.cb,e.ma.cb,e.ha.cb].filter(Me).map((function(e){return Zl(e,"SegmentURL")})).reduce((function(e,t){return 0<e.length?e:t})).map((function(t){return t.getAttribute("indexRange")&&!e.ce&&(e.ce=!0),{qf:t.getAttribute("media"),start:(t=ac(t,"mediaRange",uc,{start:0,end:null})).start,end:t.end}}))}(e);e=xc(e,Vc);var n=e.Ib;0==n&&(n=1);var i=0;return e.ja?i=e.ja*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{ja:e.ja,startTime:i,Ib:n,Xa:e.Xa,timeline:e.timeline,Ab:t}}(e);if(!i.ja&&!i.timeline&&1<i.Ab.length)throw new le(2,4,4002);if(!i.ja&&!e.X.duration&&!i.timeline&&1==i.Ab.length)throw new le(2,4,4002);if(i.timeline&&0==i.timeline.length)throw new le(2,4,4002);var r=null,a=null;return e.ha.id&&e.K.id&&(a=e.ha.id+","+e.K.id,r=t[a]),n=function(e,t,n,i,r){var a=i.Ab.length;i.timeline&&i.timeline.length!=i.Ab.length&&(a=Math.min(i.timeline.length,i.Ab.length));for(var o=e-i.Xa,s=t?e+t:1/0,u=[],c=i.startTime,d={},f=(a=l(ee(a))).next();!f.done;d={Wc:d.Wc},f=a.next()){f=f.value;var h=i.Ab[f];d.Wc=oi(n,[h.qf]);var p=void 0;p=null!=i.ja?c+i.ja:i.timeline?i.timeline[f].end:c+t,u.push(new io(e+c,e+p,function(e){return function(){return e.Wc}}(d),h.start,h.end,r,o,e,s)),c=p}return u}(e.X.start,e.X.duration,e.K.Aa,i,n),i=!r,r?r.Bb(n,e.presentationTimeline.Va()):(r=new Ao(n),a&&e.fb&&(t[a]=r)),e.presentationTimeline.Db(n),e.fb&&e.X.ee||r.ab(e.X.start,e.X.duration?e.X.start+e.X.duration:1/0,i),{xb:function(){return Promise.resolve(r)}}}function Vc(e){return e.cb}function Hc(e,t,n,i,r,a){var o=function(e){var t=Sc(e,Kc,"initialization");if(!t)return null;var n=e.K.id,i=e.bandwidth||null,r=e.K.Aa;return new no((function(){var e=Tc(t,n,null,i,null);return oi(r,[e])}),0,null)}(e),s=function(e){var t=xc(e,Kc),n=Sc(e,Kc,"media");return e=Sc(e,Kc,"index"),{ja:t.ja,timescale:t.timescale,Ib:t.Ib,Xa:t.Xa,Sd:t.Sd,timeline:t.timeline,vd:n,Zb:e}}(e);!function(e){var t=e.Zb?1:0;if(t+=e.timeline?1:0,t+=e.ja?1:0,0==t)throw new le(2,4,4002);if(1!=t&&(e.Zb&&(e.timeline=null),e.ja=null),!e.Zb&&!e.vd)throw new le(2,4,4002)}(s);var u=oa(e);if(s.Zb)return Fc(e,o),{xb:function(){var e=Tc(s.Zb,u.K.id,null,u.bandwidth||null,null);return e=oi(u.K.Aa,[e]),_c(u,t,o,e,0,null,s.Xa)}};if(s.ja)return i||(e.presentationTimeline.wd(s.ja),e.presentationTimeline.xd(e.X.start)),{xb:function(){return function(e,t,n,i,r){function a(e){var n=(e-p)*h,r=n+t.Xa,a=n+c;return n=a+h,(a=new io(a,Math.min(n,s()),(function(){var t=Tc(m,y,e,v,r*g);return oi(b,[t])}),0,null,i,w,c,s())).j=n,a}function o(){var e=[Math.max(u.Va(),c),Math.min(u.ib(),s())].map((function(e){return e-c}));return[Math.ceil(e[0]/h),Math.ceil(e[1]/h)-1].map((function(e){return e+p}))}function s(){var e=null!=d&&r[d]||f;return e?c+e:1/0}var u=e.presentationTimeline,c=e.X.start,d=e.ha.id,f=e.X.duration,h=t.ja,p=t.Ib,g=t.timescale,m=t.vd,v=e.bandwidth||null,y=e.K.id,b=e.K.Aa,w=c-t.Xa,T=o();e=e.fb?Math.max(T[0],T[1]-n+1):T[0],T=T[1],n=[];for(var x=e;x<=T;++x){var S=a(x);n.push(S)}var E=new Ao(n);if(n=u.ib()<s(),x=u.Z(),n||x){var A=Math.max(e,T+1);E.Oc(h,(function(){var e=u.Va();E.gb(e);var t=l(o());t.next(),t=t.next().value;for(var n=[];A<=t;){var i=a(A);n.push(i),A++}return e>s()&&!n.length?null:n}))}return Promise.resolve(E)}(u,s,r,o,a)}};var c=null;i=null,e.ha.id&&e.K.id&&(i=e.ha.id+","+e.K.id,c=n[i]);var d=function(e,t,n){var i=e.X.start,r=e.X.duration,a=i-t.Xa;r=r?i+r:1/0;for(var o=[],s={},u=l(te(t.timeline)),c=u.next();!c.done;s={Vc:s.Vc,Yc:s.Yc,ad:s.ad,Sc:s.Sc,cd:s.cd,Tc:s.Tc},c=u.next()){var d=(c=c.value).item,f=d.start,h=d.Qf;d=d.end,s.ad=c.ga+t.Ib,s.cd=h+t.Sd,s.Yc=e.K.id,s.Sc=e.bandwidth||null,s.Vc=t.vd,s.Tc=e.K.Aa,o.push(new io(i+f,i+d,function(e){return function(){var t=Tc(e.Vc,e.Yc,e.ad,e.Sc||null,e.cd);return oi(e.Tc,[t]).map((function(e){return e.toString()}))}}(s),0,null,n,a,i,r))}return o}(u,s,o),f=e.X.start,h=e.X.duration?e.X.start+e.X.duration:1/0,p=1/0!=h;return c?(p&&new Ao(d).ab(f,h,!0),c.Bb(d,e.presentationTimeline.Va())):(c=new Ao(d),i&&e.fb&&(n[i]=c)),e.presentationTimeline.Db(d),p&&c.ab(f,h),{xb:function(){return Promise.resolve(c)}}}function Kc(e){return e.ec}function Gc(){this.l=[],this.g=[],this.h=[],this.j=[],this.i=[],this.m=new Set}function qc(e,t,n){var i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,x,S,E,A,k,I,M,C,D,R,N,L,j,_,O;return P((function(P){switch(P.g){case 1:if(i=di,function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).uc),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.channelsCount==s.channelsCount&&r.language==s.language&&r.bandwidth==s.bandwidth&&r.label==s.label&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&ct(r.roles,s.roles)&&r.audioSamplingRate==s.audioSamplingRate&&r.primary==s.primary&&(a=!0);a||n.push(r)}t.uc=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).Qc),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.width==s.width&&r.frameRate==s.frameRate&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&r.label==s.label&&ct(r.roles,s.roles)&&Sa(r.closedCaptions,s.closedCaptions)&&r.bandwidth==s.bandwidth&&(a=!0);a||n.push(r)}t.Qc=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).textStreams),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.language==s.language&&r.label==s.label&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&ct(r.roles,s.roles)&&(a=!0);a||n.push(r)}t.textStreams=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],i=l((t=t.value).imageStreams),r=i.next();!r.done;r=i.next()){r=r.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,r.id!=s.id&&r.width==s.width&&r.codecs==s.codecs&&r.mimeType==s.mimeType&&(a=!0);a||n.push(r)}t.imageStreams=n}}(t),!n&&1==t.length){r=t[0],e.g=r.uc,e.h=r.Qc,e.j=r.textStreams,e.i=r.imageStreams,P.v(2);break}for(a=-1,o=l(te(t)),s=o.next();!s.done;s=o.next())u=s.value,c=u.ga,d=u.item,e.m.has(d.id)||(e.m.add(d.id),-1==a&&(a=c));if(-1==a)return P.return();for(f=t.map((function(e){return e.uc})),h=t.map((function(e){return e.Qc})),p=t.map((function(e){return e.textStreams})),g=t.map((function(e){return e.imageStreams})),m=l(p),v=m.next();!v.done;v=m.next())v.value.push(ld(i.ba));for(y=l(g),b=y.next();!b.done;b=y.next())b.value.push(ld(i.pc));return w(P,Xc(e.g,f,a,$c,Qc),3);case 3:return w(P,Xc(e.h,h,a,$c,Qc),4);case 4:return w(P,Xc(e.j,p,a,$c,Qc),5);case 5:return w(P,Xc(e.i,g,a,$c,Qc),2);case 2:if(x=0,S=[],e.h.length&&e.g.length)for(C=l(e.g),D=C.next();!D.done;D=C.next())for(R=D.value,N=l(e.h),L=N.next();!L.done;L=N.next())j=L.value,_=Va(R.drmInfos,j.drmInfos),R.drmInfos.length&&j.drmInfos.length&&!_.length||(O=x++,S.push({id:O,language:R.language,primary:R.primary,audio:R,video:j,bandwidth:(R.bandwidth||0)+(j.bandwidth||0),drmInfos:_,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(E=e.h.concat(e.g),A=l(E),k=A.next();!k.done;k=A.next())I=k.value,M=x++,S.push({id:M,language:I.language,primary:I.primary,audio:I.type==i.eb?I:null,video:I.type==i.Ra?I:null,bandwidth:I.bandwidth||0,drmInfos:I.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});e.l=S,T(P)}}))}function zc(e){var t,n,i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,T,x,S,E,A,k;return P((function(I){switch(I.g){case 1:if(t=di,1==e.length)return I.return(e[0]);for(n=e.map((function(e){return e.filter((function(e){return e.type==t.eb}))})),i=e.map((function(e){return e.filter((function(e){return e.type==t.Ra}))})),r=e.map((function(e){return e.filter((function(e){return e.type==t.ba}))})),a=e.map((function(e){return e.filter((function(e){return e.type==t.pc}))})),o=l(r),s=o.next();!s.done;s=o.next())s.value.push(ud(t.ba));for(u=l(a),c=u.next();!c.done;c=u.next())c.value.push(ud(t.pc));return w(I,Xc([],n,0,Jc,Zc),2);case 2:return d=I.h,w(I,Xc([],i,0,Jc,Zc),3);case 3:return f=I.h,w(I,Xc([],r,0,Jc,Zc),4);case 4:return h=I.h,w(I,Xc([],a,0,Jc,Zc),5);case 5:if(p=I.h,g=0,f.length&&d.length)for(b=l(d),T=b.next();!T.done;T=b.next())for(x=T.value,S=l(f),E=S.next();!E.done;E=S.next())A=E.value,k=g++,A.variantIds.push(k),x.variantIds.push(k);else for(m=f.concat(d),v=l(m),y=v.next();!y.done;y=v.next())y.value.variantIds=[g++];return I.return(f.concat(d).concat(h).concat(p))}}))}function Xc(e,t,n,i,r){var a,o,s,u,c,d,f,h,p,g,m,v,y,b,T,x,S,E,A,k,I;return P((function(M){switch(M.g){case 1:for(a=di,o=[],s=l(te(t)),u=s.next();!u.done;u=s.next())c=u.value,d=c.ga,f=c.item,d>=n?o.push(new Set(f)):o.push(new Set);h=l(e),p=h.next();case 2:if(p.done){M.v(4);break}return w(M,function(e,t,n,i,r){var a;return P((function(o){return 1==o.g?(a=ed(t,e))?w(o,Wc(a),2):o.return(!1):(Yc(e,a,n,i,r),o.return(!0))}))}(p.value,t,n,r,o),5);case 5:if(!M.h)throw new le(2,4,4037);p=h.next(),M.v(2);break;case 4:g=l(o),m=g.next();case 6:if(m.done){M.v(8);break}v=m.value,y=l(v),b=y.next();case 9:if(b.done){m=g.next(),M.v(6);break}return w(M,function(e,t,n,i,r){var a,o;return P((function(s){return 1==s.g?(a=n(e),(o=ed(t,a))?a.createSegmentIndex?w(s,Wc(o),2):s.v(2):s.return(null)):(Yc(a,o,0,i,r),s.return(a))}))}(b.value,t,i,r,o),12);case 12:(T=M.h)&&e.push(T),b=y.next(),M.v(9);break;case 8:for(x=l(o),m=x.next();!m.done;m=x.next())for(S=m.value,E={},A=l(S),b=A.next();!b.done;E={Za:E.Za},b=A.next())if(E.Za=b.value,k=E.Za.type==a.ba&&!E.Za.language,I=E.Za.type==a.pc&&!E.Za.tilesLayout,!k&&!I&&e.some(function(e){return function(t){return t.mimeType==e.Za.mimeType&&Si(t.codecs)==Si(e.Za.codecs)}}(E)))throw new le(2,4,4037);return M.return(e)}}))}function Wc(e){for(var t=[],n=(e=l(e)).next();!n.done;n=e.next())n=n.value,t.push(n.createSegmentIndex()),n.trickModeVideo&&!n.trickModeVideo.segmentIndex&&t.push(n.trickModeVideo.createSegmentIndex());return Promise.all(t)}function Yc(e,t,n,i,r){for(var a=(t=l(te(t))).next();!a.done;a=t.next()){var o=a.value;if(a=o.ga,o=o.item,a>=n){i(e,o);var s=!0;"audio"==e.type&&0==ar(e.language,o.language)&&(s=!1),s&&r[a].delete(o)}}}function $c(e){return(e=Object.assign({},e)).originalId=null,e.createSegmentIndex=function(){return Promise.resolve()},e.segmentIndex=new Mo,e.emsgSchemeIdUris=[],e.keyIds=new Set,e.closedCaptions=null,e.trickModeVideo=null,e}function Jc(e){return(e=Object.assign({},e)).keyIds=new Set,e.segments=[],e.variantIds=[],e.closedCaptions=null,e}function Qc(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles))),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=Array.from(new Set(e.emsgSchemeIdUris.concat(t.emsgSchemeIdUris))));var n=t.keyIds;if(n=new Set([].concat(c(e.keyIds),c(n))),e.keyIds=n,null==e.originalId?e.originalId=t.originalId:e.originalId+=","+(t.originalId||""),n=Va(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!n.length)throw new le(2,4,4038);if(e.drmInfos=n,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions){e.closedCaptions||(e.closedCaptions=new Map);for(var i=(n=l(t.closedCaptions)).next();!i.done;i=n.next()){var r=l(i.value);i=r.next().value,r=r.next().value,e.closedCaptions.set(i,r)}}e.segmentIndex.j.push(t.segmentIndex),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=$c(t.trickModeVideo),e.trickModeVideo.segmentIndex=e.segmentIndex.clone()),Qc(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&Qc(e.trickModeVideo,t)}function Zc(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles)));var n=t.keyIds;if(n=new Set([].concat(c(e.keyIds),c(n))),e.keyIds=n,e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,c(t.segments)),t.closedCaptions){e.closedCaptions||(e.closedCaptions=new Map);for(var i=(n=l(t.closedCaptions)).next();!i.done;i=n.next()){var r=l(i.value);i=r.next().value,r=r.next().value,e.closedCaptions.set(i,r)}}}function ed(e,t){for(var n=[],i=l(e),r=i.next();!r.done;r=i.next()){for(var a=t,o={audio:td,video:td,text:nd,image:id}[a.type],s={audio:rd,video:ad,text:od,image:sd}[a.type],u=null,c=(r=l(r.value)).next();!c.done;c=r.next())!o(a,c=c.value)||u&&!s(a,u,c)||(u=c);if(!(a=u))return null;n.push(a)}return n}function td(e,t){var n;if(!(n=t.mimeType!=e.mimeType||Si(t.codecs)!=Si(e.codecs))&&(n=e.drmInfos)){n=e.drmInfos;var i=t.drmInfos;n=!(!n.length||!i.length||0<Va(n,i).length)}return!n}function nd(e,t){return!!e.language&&(!t.language||0!=ar(e.language,t.language)&&t.kind==e.kind)}function id(e){return!!e.tilesLayout}function rd(e,t,n){if(e.id==n.id)return!0;var i=ar(e.language,t.language),r=ar(e.language,n.language);return r>i||!(r<i)&&(!(t.primary||!n.primary)||!(t.primary&&!n.primary)&&(e.roles.length?(i=t.roles.filter((function(t){return e.roles.includes(t)})),(r=n.roles.filter((function(t){return e.roles.includes(t)}))).length>i.length||!(r.length<i.length)&&n.roles.length<t.roles.length):!(n.roles.length||!t.roles.length)||!(n.roles.length&&!t.roles.length)&&((i=cd(e.channelsCount,t.channelsCount,n.channelsCount))==fd||i!=pd&&((i=cd(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==fd||i!=pd&&!(!e.bandwidth||dd(e.bandwidth,t.bandwidth,n.bandwidth)!=fd)))))}function ad(e,t,n){if(e.id==n.id)return!0;var i=cd(e.width*e.height,t.width*t.height,n.width*n.height);if(i==fd)return!0;if(i==pd)return!1;if(e.frameRate){if((i=cd(e.frameRate,t.frameRate,n.frameRate))==fd)return!0;if(i==pd)return!1}return!(!e.bandwidth||dd(e.bandwidth,t.bandwidth,n.bandwidth)!=fd)}function od(e,t,n){if(e.id==n.id)return!0;var i=ar(e.language,t.language),r=ar(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(e.roles.length){if(i=t.roles.filter((function(t){return e.roles.includes(t)})),(r=n.roles.filter((function(t){return e.roles.includes(t)}))).length>i.length)return!0;if(r.length<i.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return n.mimeType==e.mimeType&&n.codecs==e.codecs&&(t.mimeType!=e.mimeType||t.codecs!=e.codecs)}function sd(e,t,n){return e.id==n.id||cd(e.width*e.height,t.width*t.height,n.width*n.height)==fd}function ud(e){return{id:0,originalId:"",primary:!1,type:e,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}function ld(e){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ao([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:e,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}function cd(e,t,n){if(t==e&&e!=n)return pd;if(n==e&&e!=t)return fd;if(t>e){if(n<=e||n-e<t-e)return fd;if(n-e>t-e)return pd}else{if(n>e)return pd;if(e-n<e-t)return fd;if(e-n>e-t)return pd}return hd}function dd(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?fd:t<e?pd:hd}Gc.prototype.release=function(){for(var e=l(this.g.concat(this.h,this.j,this.i)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.g=[],this.h=[],this.j=[],this.i=[],this.l=[]};var fd=1,hd=0,pd=-1;function gd(){var e=this;this.D=this.o=null,this.h=[],this.B=null,this.F=1,this.m={},this.L={},this.g=new Gc,this.C=0,this.H=new V(5),this.u=new Be((function(){e.ac()})),this.i=new sa,this.j=null,this.I=[],this.l=1/0,this.s=!1}function md(e){var t,n,i,r,a,o,s;return P((function(u){return 1==u.g?(t=da(e.h,e.o.retryParameters),n=e.D.networkingEngine,i=Date.now(),r=n.request(0,t),ua(e.i,r),w(u,r.promise,2)):3!=u.g?(a=u.h,e.D?(a.uri&&!e.h.includes(a.uri)&&e.h.unshift(a.uri),w(u,function(e,t,n){var i,r,a,o;return P((function(s){if(1==s.g){if(!(i=gc(t,"MPD")))throw new le(2,4,4001,n);return e.o.dash.disableXlinkProcessing?s.return(vd(e,i,n)):(r=e.o.dash.xlinkFailGracefully,a=Ac(i,e.o.retryParameters,r,n,e.D.networkingEngine),ua(e.i,a),w(s,a.promise,2))}return o=s.h,s.return(vd(e,o,n))}))}(e,a.data,a.uri),3)):u.return(0)):(o=Date.now(),s=(o-i)/1e3,H(e.H,1,s),u.return(s))}))}function vd(e,t,n){var i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,S,k,I,M,C,D,R,N,L,j,_;return P((function(O){switch(O.g){case 1:if(i=[n],0<(r=Zl(t,"Location").map(ic).filter(Me)).length&&(a=oi(i,r),i=e.h=a),o=Zl(t,"BaseURL"),s=o.map(ic),u=oi(i,s),c=0,o&&o.length&&(c=ac(o[0],"availabilityTimeOffset",fc)||0),d=e.o.dash.ignoreMinBufferTime,f=0,d||(f=ac(t,"minBufferTime",sc)||0),e.C=ac(t,"minimumUpdatePeriod",sc,-1),h=ac(t,"availabilityStartTime",oc),p=ac(t,"timeShiftBufferDepth",sc),g=e.o.dash.ignoreSuggestedPresentationDelay,m=null,g||(m=ac(t,"suggestedPresentationDelay",sc)),v=e.o.dash.ignoreMaxSegmentDuration,y=null,v||(y=ac(t,"maxSegmentDuration",sc)),b=t.getAttribute("type")||"static",e.B)for(S=e.B.presentationTimeline,k=l(Object.values(e.m)),I=k.next();!I.done;I=k.next())I.value.gb(S.Va());else M=e.o.defaultPresentationDelay||1.5*f,S=new ro(h,null!=m?m:M,e.o.dash.autoCorrectDrift);return S.fc("static"==b),S.Z()&&!isNaN(e.o.availabilityWindowOverride)&&(p=e.o.availabilityWindowOverride),null==p&&(p=1/0),S.Od(p),C=t.getAttribute("profiles")||"",D={fb:"static"!=b,presentationTimeline:S,ha:null,X:null,ma:null,K:null,bandwidth:0,ce:!1,vb:c,profiles:C.split(",")},R=function(e,t,n,i){var r=ac(i,"mediaPresentationDuration",sc),a=[],o=0;i=Zl(i,"Period");for(var s=l(te(i)),u=s.next();!u.done;u=s.next()){var c=u.value;u=c.ga;var d=c.item,f=c.next;c=ac(d,"start",sc,o);var h=d.id,p=ac(d,"duration",sc),g=null;if(f){var m=ac(f,"start",sc);null!=m&&(g=m-c)}else null!=r&&(g=r-c);if(null==g&&(g=p),!(null!==e.j&&null!==h&&null!==c&&c<e.j)||e.I.includes(h)||u+1==i.length){if(null!==c&&(null===e.j||c>e.j)&&(e.j=c),o=yd(e,t,n,{start:c,duration:g,node:d,ee:null==g||!f}),a.push(o),t.ha.id&&g&&(e.L[t.ha.id]=g),null==g){o=null;break}o=c+g}}return e.I=a.map((function(e){return e.id})),null!=r?{periods:a,duration:r,Yd:!1}:{periods:a,duration:o,Yd:!0}}(e,D,u,t),N=R.duration,L=R.periods,"static"!=b&&R.Yd||S.Ma(N||1/0),e.l&&!e.s&&e.D.isAutoLowLatencyMode()&&(e.D.enableLowLatencyMode(),e.s=e.D.isLowLatencyMode()),e.s?S.re(e.l):e.l&&X("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."),S.wd(y||1),w(O,qc(e.g,L,D.fb),2);case 2:if(e.B){e.B.variants=e.g.l,e.B.textStreams=e.g.j.slice(),e.B.imageStreams=e.g.i,e.D.filter(e.B),O.v(3);break}if(e.B={presentationTimeline:S,variants:e.g.l,textStreams:e.g.j.slice(),imageStreams:e.g.i,offlineSessionIds:[],minBufferTime:f||0},!S.we()){O.v(3);break}return j=Zl(t,"UTCTiming"),w(O,function(e,t,n){var i,r,a,o,s,u,c,d;return P((function(f){switch(f.g){case 1:i=n.map((function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}})),r=e.o.dash.clockSyncUri,!i.length&&r&&i.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),a=l(i),o=a.next();case 2:if(o.done){f.v(4);break}switch(s=o.value,x(f,5),u=s.scheme,c=s.value,u){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return f.v(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 f.v(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return d=Date.parse(c),f.return(isNaN(d)?0:d-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":X("NTP UTCTiming scheme is not supported");break;default:X("Unrecognized scheme in UTCTiming element",u)}f.v(9);break;case 7:return w(f,xd(e,t,c,"HEAD"),10);case 10:return f.return(f.h);case 8:return w(f,xd(e,t,c,"GET"),11);case 11:return f.return(f.h);case 9:E(f,3);break;case 5:A(f);case 3:o=a.next(),f.v(2);break;case 4:return X("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),f.return(0)}}))}(e,u,j),5);case 5:if(_=O.h,!e.D)return O.return();S.se(_);case 3:e.D.makeTextStreamsForClosedCaptions(e.B),T(O)}}))}function yd(e,t,n,i){t.ha=Td(i.node,null,n),t.X=i,t.ha.vb=t.vb,t.ha.id||(t.ha.id="__shaka_period_"+i.start);var r=Zl(i.node,"EventStream");n=t.presentationTimeline.Va();for(var a=(r=l(r)).next();!a.done;a=r.next())Sd(e,i.start,i.duration,a.value,n);if(n=Zl(i.node,"AdaptationSet").map((function(n){return function(e,t,n){function i(e){switch(e){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.ma=Td(n,t.ha,null);var r,a=!1,o=Zl(n,"Role"),s=o.map((function(e){return e.getAttribute("value")})).filter(Me),u=void 0,d=t.ma.contentType==ci;d&&(u="subtitle");for(var f=(o=l(o)).next();!f.done;f=o.next()){var h=(f=f.value).getAttribute("schemeIdUri");if(null==h||"urn:mpeg:dash:role:2011"==h)switch(f=f.getAttribute("value"),f){case"main":a=!0;break;case"caption":case"subtitle":u=f}}h=Zl(n,"EssentialProperty"),o=null,f=!1;for(var p=(h=l(h)).next();!p.done;p=h.next()){var g=(p=p.value).getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==g?o=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==g?r=i(parseInt(p.getAttribute("value"),10)):f=!0}for(h=l(h=Zl(n,"SupplementalProperty")),p=h.next();!p.done;p=h.next())"urn:mpeg:mpegB:cicp:TransferCharacteristics"==(p=p.value).getAttribute("schemeIdUri")&&(r=i(parseInt(p.getAttribute("value"),10)));h=Zl(n,"Accessibility");var m=new Map;for(h=l(h),p=h.next();!p.done;p=h.next())if(g=p.value,p=g.getAttribute("schemeIdUri"),g=g.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=g)for(var v=l(g=g.split(";")),y=v.next();!y.done;y=v.next()){var b=y.value,x=y=void 0;b.includes("=")?(y=(b=b.split("="))[0].startsWith("CC")?b[0]:"CC"+b[0],x=b[1]||"und"):(y="CC"+p,2==g.length?p+=2:p++,x=b),m.set(y,rr(x))}else m.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=g)for(g=l(g.split(";")),y=g.next();!y.done;y=g.next())y=y.value,b=v=void 0,y.includes("=")?(y=y.split("="),v="svc"+y[0],b=y[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,b=y),m.set(v,rr(b));else m.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=g&&(s.push(g),"captions"==g&&(u="caption"));if(f)return null;f=Zl(n,"ContentProtection");var S=mc(f,e.o.dash.ignoreDrmInfo,e.o.dash.keySystemsByURI),E=rr(n.getAttribute("lang")||"und"),A=n.getAttribute("label");if((f=Zl(n,"Label"))&&f.length&&(f=f[0],f.textContent&&(A=f.textContent)),f=Zl(n,"Representation"),n=f.map((function(n){return(n=function(e,t,n,i,r,a,o,s,u,l){if(t.K=Td(l,t.ma,null),e.l=Math.min(e.l,t.K.vb),!function(e){var t=e.dc?1:0;return t+=e.cb?1:0,t+=e.ec?1:0,0==t?e.contentType==ci||"application"==e.contentType:(1!=t&&(e.dc&&(e.cb=null),e.ec=null),!0)}(t.K))return null;var c=t.X.start;t.bandwidth=ac(l,"bandwidth",cc)||0;var d=t.K.contentType,f=d==ci||"application"==d;d="image"==d;try{var h=function(t,n,i){return function(e,t,n,i){var r,a,o,s,u;return P((function(l){return 1==l.g?(r=ga,a=Fo(t,n,i,e.o.retryParameters),o=e.D.networkingEngine,s=o.request(r,a),ua(e.i,s),w(l,s.promise,2)):(u=l.h,l.return(u.data))}))}(e,t,n,i)};if(t.K.dc)var p=jc(t,h);else if(t.K.cb)p=Bc(t,e.m);else if(t.K.ec)p=Hc(t,h,e.m,!!e.B,e.o.dash.initialSegmentLimit,e.L);else{var g=t.K.Aa,m=t.X.duration||0;p={xb:function(){return Promise.resolve(ko(c,m,g))}}}}catch(e){if((f||d)&&4002==e.code)return null;throw e}h=Zl(l,"ContentProtection"),h=function(e,t,n,i){var r=mc(e,n,i);if(t.$d)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.$d=!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 le(2,4,4008);return r.Wd||t.Wd}(h,n,e.o.dash.ignoreDrmInfo,e.o.dash.keySystemsByURI),h=new Set(h?[h]:[]);var v=!1;Zl(l,"SupplementalProperty").some((function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.getAttribute("schemeIdUri")&&"JOC"==e.getAttribute("value")}))&&(t.K.mimeType="audio/eac3-joc",v=!0);var y,b,x=!1;if(f&&(x=s.includes("forced_subtitle")||s.includes("forced-subtitle")),d&&((l=Zl(l,"EssentialProperty").find((function(e){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(e.getAttribute("schemeIdUri"))})))&&(y=l.getAttribute("value")),!y))return null;l=t.K.codecs,t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(b="PQ");var S={id:e.F++,originalId:t.K.id,createSegmentIndex:function(){var e;return P((function(t){if(1==t.g)return S.segmentIndex?t.v(0):(e=S,w(t,p.xb(),3));e.segmentIndex=t.h,T(t)}))},segmentIndex:null,mimeType:t.K.mimeType,codecs:t.K.codecs,frameRate:t.K.frameRate,pixelAspectRatio:t.K.pixelAspectRatio,bandwidth:t.bandwidth,width:t.K.width,height:t.K.height,kind:i,encrypted:0<n.drmInfos.length,drmInfos:n.drmInfos,keyIds:h,language:r,label:a,type:t.ma.contentType,primary:o,trickModeVideo:null,emsgSchemeIdUris:t.K.emsgSchemeIdUris,roles:s,forced:x,channelsCount:t.K.yd,audioSamplingRate:t.K.audioSamplingRate,spatialAudio:v,closedCaptions:u,hdr:b,tilesLayout:y};return S}(e,t,S,u,E,A,a,s,m,n))&&(n.hdr=n.hdr||r),n})).filter((function(e){return!!e})),0==n.length){if(o="image"==t.ma.contentType,e.o.dash.ignoreEmptyAdaptationSet||d||o)return null;throw new le(2,4,4003)}if(!t.ma.contentType||"application"==t.ma.contentType)for(t.ma.contentType=Ed(n[0].mimeType,n[0].codecs),d=l(n),h=d.next();!h.done;h=d.next())h.value.type=t.ma.contentType;for(d=l(n),h=d.next();!h.done;h=d.next())for(h=h.value,p=l(S.drmInfos),g=p.next();!g.done;g=p.next())(g=g.value).keyIds=g.keyIds&&h.keyIds?new Set([].concat(c(g.keyIds),c(h.keyIds))):g.keyIds||h.keyIds;return d=f.map((function(e){return e.getAttribute("id")})).filter(Me),{id:t.ma.id||"__fake__"+e.F++,contentType:t.ma.contentType,language:E,rg:a,streams:n,drmInfos:S.drmInfos,Qd:o,Cf:d}}(e,t,n)})).filter(Me),t.fb){for(i=[],a=(r=l(n)).next();!a.done;a=r.next())for(var o=(a=l(a.value.Cf)).next();!o.done;o=a.next())i.push(o.value);if(i.length!=new Set(i).size)throw new le(2,4,4018)}for(i=n.filter((function(e){return!e.Qd})),r=(n=l(n=n.filter((function(e){return e.Qd})))).next();!r.done;r=n.next()){a=(r=r.value).Qd.split(" ");for(var s=(o=l(i)).next();!s.done;s=o.next()){var u=s.value;if(a.includes(u.id)){s={};for(var d=(u=l(u.streams)).next();!d.done;s={oc:s.oc},d=u.next())s.oc=d.value,s.oc.trickModeVideo=r.streams.find(function(e){return function(t){return Si(e.oc.codecs)==Si(t.codecs)}}(s))}}}if(r=e.o.disableAudio?[]:bd(i,"audio"),o=e.o.disableVideo?[]:bd(i,"video"),a=e.o.disableText?[]:bd(i,ci),n=e.o.disableThumbnails?[]:bd(i,"image"),!o.length&&!r.length)throw new le(2,4,4004);for(i=[],s=(r=l(r)).next();!s.done;s=r.next())i.push.apply(i,c(s.value.streams));for(r=[],s=(o=l(o)).next();!s.done;s=o.next())r.push.apply(r,c(s.value.streams));for(o=[],s=(a=l(a)).next();!s.done;s=a.next())o.push.apply(o,c(s.value.streams));for(a=[],s=(n=l(n)).next();!s.done;s=n.next())a.push.apply(a,c(s.value.streams));return{id:t.ha.id,uc:i,Qc:r,textStreams:o,imageStreams:a}}function bd(e,t){return e.filter((function(e){return e.contentType==t}))}function wd(e,t){0>e.C||e.u.V(Math.max(3,e.C-t,K(e.H)))}function Td(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,yd:null,audioSamplingRate:null,vb:0},n=n||t.Aa;for(var i=Zl(e,"BaseURL"),r=i.map(ic),a=e.getAttribute("contentType")||t.contentType,o=e.getAttribute("mimeType")||t.mimeType,s=e.getAttribute("codecs")||t.codecs,u=ac(e,"frameRate",hc)||t.frameRate,c=e.getAttribute("sar")||t.pixelAspectRatio,d=Zl(e,"InbandEventStream"),f=t.emsgSchemeIdUris.slice(),h=(d=l(d)).next();!h.done;h=d.next())h=h.value.getAttribute("schemeIdUri"),f.includes(h)||f.push(h);d=function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){var n=t.value;if((t=n.getAttribute("schemeIdUri"))&&(n=n.getAttribute("value")))switch(t){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(t=parseInt(n,10)))continue;return t;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(t=parseInt(n,16)))continue;for(e=0;t;)1&t&&++e,t>>=1;return e;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(t=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(n=parseInt(n,10))&&0<n&&n<t.length)return t[n]}}return null}(d=Zl(e,"AudioChannelConfiguration"))||t.yd,h=ac(e,"audioSamplingRate",dc)||t.audioSamplingRate,a||(a=Ed(o,s));var p=Jl(e,"SegmentBase"),g=Jl(e,"SegmentTemplate"),m=p&&ac(p,"availabilityTimeOffset",fc)||0,v=g&&ac(g,"availabilityTimeOffset",fc)||0;return i=i&&i.length&&ac(i[0],"availabilityTimeOffset",fc)||0,i=t.vb+i+m+v,{Aa:oi(n,r),dc:p||t.dc,cb:Jl(e,"SegmentList")||t.cb,ec:g||t.ec,width:ac(e,"width",dc)||t.width,height:ac(e,"height",dc)||t.height,contentType:a,mimeType:o,codecs:s,frameRate:u,pixelAspectRatio:c,emsgSchemeIdUris:f,id:e.getAttribute("id"),yd:d,audioSamplingRate:h,vb:i}}function xd(e,t,n,i){var r,a,o,s,u,l;return P((function(c){if(1==c.g)return r=oi(t,[n]),(a=da(r,e.o.retryParameters)).method=i,o=e.D.networkingEngine.request(4,a),ua(e.i,o),w(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=fe(s.data);return l=Date.parse(u),isNaN(l)?c.return(0):c.return(l-Date.now())}))}function Sd(e,t,n,i,r){for(var a=i.getAttribute("schemeIdUri")||"",o=i.getAttribute("value")||"",s=ac(i,"timescale",dc)||1,u=(i=l(Zl(i,"Event"))).next();!u.done;u=i.next()){var c=ac(u=u.value,"presentationTime",dc)||0,d=ac(u,"duration",dc)||0;d=(c=c/s+t)+d/s,null!=n&&(c=Math.min(c,t+n),d=Math.min(d,t+n)),d<r||(u={schemeIdUri:a,value:o,startTime:c,endTime:d,id:u.getAttribute("id")||"",eventElement:u},e.D.onTimelineRegionAdded(u))}}function Ed(e,t){return Ii(Ti(e,t))?ci:e.split("/")[0]}function Ad(e,t,n,i){this.g=e,this.type=t,this.Y=n,this.segments=i||null}function kd(e,t,n,i){this.id=e,this.name=t,this.g=n,this.value=void 0===i?null:i}function Id(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function Md(e,t){var n=e.getAttribute(t);if(!n)throw new le(2,4,4023,t);return n.value}function Cd(e,t,n){n=void 0===n?[]:n,this.Y=t,this.g=e,this.h=n}function Dd(e,t){this.name=e,this.value=t}function Rd(e,t){return e.filter((function(e){return e.name==t}))}function Nd(e,t){return e.filter((function(e){return Md(e,"TYPE")==t}))}function Pd(e,t){var n=Rd(e,t);return n.length?n[0]:null}function Ld(e,t,n){return n=void 0===n?0:n,(e=Pd(e,t))?Number(e.value):n}function jd(e){this.h=e,this.g=0}function _d(e){Od(e,/[ \t]+/gm)}function Od(e,t){t.lastIndex=e.g;var n=t.exec(e.h);return n=null==n?null:{position:n.index,length:n[0].length,results:n},e.g==e.h.length||null==n||n.position!=e.g?null:(e.g+=n.length,n.results)}function Ud(e){return e.g==e.h.length?null:(e=Od(e,/[^ \t\n]*/gm))?e[0]:null}function Fd(){this.g=0}function Bd(e,t,n){var i=(t=(t=fe(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(i[0]))throw new le(2,4,4015);t=0;for(var r=!0,a=l(i),o=a.next();!o.done;o=a.next())if(o=o.value,/^#(?!EXT)/m.test(o)||r)r=!1;else{if(o=Vd(e.g++,o),--e.g,Hd.includes(o.name)){t=1;break}"EXT-X-STREAM-INF"==o.name&&(r=!0)}a=[],r=!0;for(var s=(o=l(te(i))).next();!s.done;s=o.next()){var u=s.value;s=u.ga;var c=u.item;if(u=u.next,/^#(?!EXT)/m.test(c)||r)r=!1;else{if(c=Vd(e.g++,c),Kd.includes(c.name)){if(1!=t)throw new le(2,4,4017);u=i.splice(s,i.length-s),i=n,r=[],o=[],s=[],c=null;for(var d=(u=l(u)).next();!d.done;d=u.next())d=d.value,/^(#EXT)/.test(d)?(d=Vd(e.g++,d),Hd.includes(d.name)?a.push(d):"EXT-X-MAP"==d.name?c=d:"EXT-X-PART"==d.name?s.push(d):"EXT-X-PRELOAD-HINT"==d.name?"PART"==Id(d,"TYPE")?s.push(d):"MAP"==Id(d,"TYPE")&&(d.name="EXT-X-MAP",c=d):o.push(d)):/^#(?!EXT)/m.test(d)||(d=oi([i],[d.trim()])[0],c&&o.push(c),r.push(new Cd(d,o,s)),o=[],s=[]);return s.length&&(c&&o.push(c),r.push(new Cd("",o,s))),new Ad(n,t,a,r)}a.push(c),"EXT-X-STREAM-INF"==c.name&&(c.g.push(new Dd("URI",u)),r=!0)}}return new Ad(n,t,a)}function Vd(e,t){var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new le(2,4,4016,t);var i,r=n[1],a=n[2];if(n=[],a){var o;(o=Od(a=new jd(a),/^([^,=]+)(?:,|$)/g))&&(i=o[1]);for(var s=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;o=Od(a,s);)n.push(new Dd(o[1],o[2]||o[3])),_d(a)}return new kd(e,r,n,i)}(i=gd.prototype).configure=function(e){this.o=e},i.start=function(e,t){var n,i=this;return P((function(r){if(1==r.g)return i.s=t.isLowLatencyMode(),i.h=[e],i.D=t,w(r,md(i),2);if(n=r.h,i.D&&wd(i,n),!i.D)throw new le(2,7,7001);return r.return(i.B)}))},i.stop=function(){for(var e=l(Object.values(this.m)),t=e.next();!t.done;t=e.next())t.value.release();return this.g&&this.g.release(),this.o=this.D=null,this.h=[],this.B=null,this.m={},this.g=null,null!=this.u&&(this.u.stop(),this.u=null),this.i.destroy()},i.update=function(){var e,t=this;return P((function(n){return 1==n.g?(x(n,2),w(n,md(t),4)):2!=n.g?E(n,0):(e=A(n),t.D&&e?(t.D.onError(e),void T(n)):n.return())}))},i.onExpirationUpdated=function(){},i.ac=function(){var e,t,n=this;return P((function(i){switch(i.g){case 1:return e=0,x(i,2),w(i,md(n),4);case 4:e=i.h,E(i,3);break;case 2:t=A(i),n.D&&(t.severity=1,n.D.onError(t));case 3:if(!n.D)return i.return();wd(n,e),T(i)}}))},B("shaka.dash.DashParser",gd),to.mpd=function(){return new gd},eo["application/dash+xml"]=function(){return new gd},eo["video/vnd.mpeg.dash.mpd"]=function(){return new gd},kd.prototype.toString=function(){var e="#"+this.name,t=this.g?this.g.map((function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)})):[];return this.value&&t.unshift(this.value),0<t.length&&(e+=":"+t.join(",")),e},kd.prototype.getAttribute=function(e){var t=this.g.filter((function(t){return t.name==e}));return t.length?t[0]:null};var Hd="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".split(" "),Kd="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Gd(){}function qd(e){try{var t=zd(e);return Zr({uri:e,je:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return Jr(e)}}function zd(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw new le(2,1,1004,t);if(2>(n=n.slice(1).join(":").split(",")).length)throw new le(2,1,1004,t);var i=n[0];t=e.decodeURIComponent(n.slice(1).join(",")),n=i.split(";"),i=n[0];var r=!1;return 1<n.length&&"base64"==n[n.length-1]&&(r=!0,n.pop()),{data:r?tt(t):ge(t),contentType:i}}function Xd(){var e=this;this.o=this.D=null,this.Pa=1,this.u=new Map,this.m=new Map,this.Ha=new Set,this.h=new Map,this.g=null,this.L="",this.ea=new Fd,this.ra=0,this.s=new Be((function(){e.ac()})),this.j=pf,this.B=null,this.qa=0,this.F=1/0,this.W=this.$a=0,this.C=new sa,this.U=[],this.I=new Map,this.Qa=!1,this.l=new Map,this.O=null,this.la=new Map,this.H=new Map,this.i=!1}function Wd(e,t){var n,i,r,a,o,s,u,l,c,d,f,h;return P((function(p){if(1==p.g)return n=vf,i=t.Be,r=new Xn(i),e.i&&t.Fe&&$n(r,new ai("_HLS_skip=YES")),w(p,cf(e,da([r.toString()],e.o.retryParameters),0),2);if(3!=p.g){if(a=p.h,1!=(o=Bd(e.ea,a.data,a.uri)).type)throw new le(2,4,4017);return s=Rd(o.Y,"EXT-X-DEFINE"),u=Yd(e,s),l=t.stream,w(p,af(e,t.Pc,o,l.mimeType,t.ud,u,t.Me),3)}c=p.h,l.segmentIndex.Bb(c,e.g.Va()),c.length&&(d=Ld(o.Y,"EXT-X-MEDIA-SEQUENCE",0),f=t.ud.get(d),l.segmentIndex.gb(f)),h=c[c.length-1],Pd(o.Y,"EXT-X-ENDLIST")&&(lf(e,n.Ae),e.g.Ma(h.endTime)),T(p)}))}function Yd(e,t){for(var n=new Map,i=l(t),r=i.next();!r.done;r=i.next()){var a=r.value;r=Id(a,"NAME");var o=Id(a,"VALUE");a=Id(a,"IMPORT"),r&&o&&n.set(r,o),a&&(r=e.u.get(a))&&n.set(a,r)}return n}function $d(e,t){var n=[];e.o.disableVideo||n.push("avc1.42E01E"),e.o.disableAudio||n.push("mp4a.40.2");var i=Id(t,"CODECS",n.join(",")).split(/\s*,\s*/);n=new Set;for(var r=[],a=(i=l(i)).next();!a.done;a=i.next()){var o=Si(a=a.value);n.has(o)||(r.push(a),n.add(o))}return r}function Jd(e){return rr(e=Id(e,"LANGUAGE")||"und")}function Qd(e,t){var n,i,r,a,o,s,u,l,c,d,f,h,p;return P((function(g){if(1==g.g){n=Md(t,"GROUP-ID"),i="";var m=Md(t,"TYPE").toLowerCase();return"subtitles"==m&&(m=ci),(r=m)!=ci&&n&&e.l.has(n)&&(i=e.l.get(n)),a=uf(Md(t,"URI"),e.u),e.h.has(a)?g.return(e.h.get(a)):(o=Jd(t),s=Id(t,"NAME"),u=Id(t,"DEFAULT"),l="YES"==u,m="audio"==r&&(m=Id(t,"CHANNELS"))?parseInt(m.split("/")[0],10):null,c=m,m="audio"==r&&(!!(m=Id(t,"CHANNELS"))&&m.includes("/JOC")),d=m,f=Id(t,"CHARACTERISTICS"),h=Id(t,"FORCED"),w(g,Zd(e,a,i,r,o,l,s,c,null,f,"YES"==h,d),2))}return p=g.h,e.m.has(n)?e.m.get(n).push(p):e.m.set(n,[p]),null==p?g.return(null):e.h.has(a)?g.return(e.h.get(a)):(e.h.set(a,p),g.return(p))}))}function Zd(e,t,n,i,r,a,o,s,u,d,f,h){var p,g,m,v,y,b,T,S,k,I,M,C,D,R,N,L,j,_,O,U,F,B,V,H,K,G,q,z,W,Y,$,J,Q,Z,ee,te,ne,ie,re;return P((function(ae){switch(ae.g){case 1:return p=oi([e.L],[t])[0],w(ae,cf(e,da([p],e.o.retryParameters),0),2);case 2:if(g=ae.h,p=g.uri,1!=(m=Bd(e.ea,g.data,p)).type)throw new le(2,4,4017);if(v=[],m.segments)for(y=l(m.segments),b=y.next();!b.done;b=y.next())T=b.value,S=Rd(T.Y,"EXT-X-KEY"),v.push.apply(v,c(S));for(k=!1,I=[],M=new Set,C=l(v),D=C.next();!D.done;D=C.next())if(R=D.value,"NONE"!=(N=Md(R,"METHOD"))){if(k=!0,"AES-128"==N)return e.Qa=!0,ae.return(null);if(L=Md(R,"KEYFORMAT"),_=(j=hf[L])?j(R):null){if(_.keyIds)for(O=l(_.keyIds),U=O.next();!U.done;U=O.next())F=U.value,M.add(F);I.push(_)}}if(k&&!I.length)throw new le(2,4,4026);return B=Rd(m.Y,"EXT-X-DEFINE"),V=Yd(e,B),function(e,t){var n=Pd(t.Y,"EXT-X-PLAYLIST-TYPE"),i=Pd(t.Y,"EXT-X-ENDLIST");if(i=n&&"VOD"==n.value||i,n=n&&"EVENT"==n.value&&!i,n=!i&&!n,i)lf(e,pf);else{if(lf(e,n?mf:gf),!(i=Pd(t.Y,"EXT-X-TARGETDURATION")))throw new le(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),n=Pd(t.Y,"EXT-X-PART-INF"),e.i&&n?(e.$a=Number(Md(n,"PART-TARGET")),e.F=Math.min(e.$a,e.F),n=Pd(t.Y,"EXT-X-SERVER-CONTROL"),e.W=n?Number(Md(n,"PART-HOLD-BACK")):0):e.F=Math.min(i,e.F),e.qa=Math.max(i,e.qa)}}(e,m),w(ae,function(e,t,n,i,r){var a,o,s,u,l,c,d,f,h,p,g;return P((function(m){return 1==m.g?(a=di,o=ga,s=uf(i.segments[0].g,r),u=new Xn(s),l=u.ya.split(".").pop(),c=ff[t],(d=c[l])?m.return(d):t==a.ba?n&&"vtt"!=n&&"wvtt"!=n?m.return("application/mp4"):m.return("text/vtt"):((f=da([s],e.o.retryParameters)).method="HEAD",w(m,cf(e,f,o),2))):(h=m.h,(p=h.headers["content-type"])?m.return(p.split(";")[0]):(g=c.mp4,m.return(g)))}))}(e,i,n,m,V),3);case 3:return H=ae.h,df.includes(H)&&(n=""),K=new Map,G=new Map,x(ae,4),w(ae,af(e,t,m,H,K,V,G),6);case 6:q=ae.h,E(ae,5);break;case 4:if(4035==(z=A(ae)).code)return X("Skipping unsupported HLS stream",H,t),ae.return(null);throw z;case 5:if(W=q[0].startTime,Y=q[q.length-1].endTime,$=new Ao(q),J=i==ci?"subtitle":void 0,Q=[],d)for(Z=l(d.split(",")),ee=Z.next();!ee.done;ee=Z.next())te=ee.value,Q.push(te);return ie=!!(ne=Pd(m.Y,"EXT-X-SERVER-CONTROL"))&&null!=ne.getAttribute("CAN-SKIP-UNTIL"),re={id:e.Pa++,originalId:o,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:$,mimeType:H,codecs:n,kind:J,encrypted:k,drmInfos:I,keyIds:M,language:r,label:o,type:i,primary:a,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Q,forced:f,channelsCount:s,audioSamplingRate:null,spatialAudio:h,closedCaptions:u,hdr:void 0,tilesLayout:void 0},ae.return({stream:re,Pc:t,Be:p,he:W,pf:Y,ud:K,Me:G,Fe:ie})}}))}function ef(e,t,n,i){return(n=Pd(n,"EXT-X-MAP"))?(t=[i=uf(oi([t],[Md(n,"URI")])[0],i),Id(n,"BYTERANGE","")].join("-"),e.la.has(t)||(n=function(e,t){var n=0,i=null,r=Id(t,"BYTERANGE");return r&&(n=r.split("@"),i=Number(n[0]),n=Number(n[1]),i=n+i-1),new no((function(){return[e]}),n,i)}(i,n),e.la.set(t,n)),e.la.get(t)):null}function tf(e,t,n,i,r,a,o,s){var u=i.Y,c=uf(i.g,o),d=Pd(u,"EXTINF"),f=o=0,h=null,p=[];if(e.i&&i.h.length){e={};for(var g=(i=l(te(i.h))).next();!g.done;e={Xc:e.Xc},g=i.next()){var m=(g=g.value).ga;g=g.item;var v=0==m?n:p[p.length-1];m=0==m?r:v.endTime;var y=Number(Id(g,"DURATION"));y=m+y;var b=0,w=null;"EXT-X-PRELOAD-HINT"==g.name?b=(v=Id(g,"BYTERANGE-START"))?Number(v):0:(b=(v=l(nf(v,b=Id(g,"BYTERANGE")))).next().value,w=v.next().value),g=Id(g,"URI"),e.Xc=oi([s],[g])[0],p.push(new io(m,y,function(e){return function(){return[e.Xc]}}(e),b,w,t,a,0,1/0))}}else if(!d)throw new le(2,4,4024,"EXTINF");return o=d?r+Number(d.value.split(",")[0]):p[p.length-1].endTime,(s=Pd(u,"EXT-X-BYTERANGE"))?(f=(n=l(nf(n,s.value))).next().value,h=n.next().value):p.length&&(f=p[0].ka,h=p[p.length-1].fa),new io(r,o,(function(){return c.length?[c]:[]}),f,h,t,a,0,1/0,p)}function nf(e,t){var n=0,i=null;return t&&(n=t.split("@"),i=Number(n[0]),i=(n=n[1]?Number(n[1]):e.fa+1)+i-1),[n,i]}function rf(e){if(e.g){for(var t=l(e.U),n=t.next();!n.done;n=t.next())e.g.Db(n.value);e.U=[]}}function af(e,t,n,i,r,a,o){var s,u,c,d,f,h,p,g,m,v,y,b,T,x,S,E,A,k,I,M;return P((function(C){switch(C.g){case 1:if(s=n.segments,c=Ld(n.Y,"EXT-X-MEDIA-SEQUENCE",0),f=(d=Pd(n.Y,"EXT-X-SKIP"))?Number(Id(d,"SKIPPED-SEGMENTS")):0,h=c+f,e.j!=pf&&r.has(h)){p=r.get(h),C.v(2);break}if(null!=e.O){C.v(3);break}return u=ef(e,n.g,s[0].Y,a),g=e,w(C,sf(e,t,u,i,h,!1,s[0],a),4);case 4:g.O=C.h;case 3:p=e.O;case 2:if(s[0].g.split("/").pop(),m=Ld(n.Y,"EXT-X-DISCONTINUITY-SEQUENCE"),e.i&&(o.has(m)||o.set(m,h),f))for(;o.has(m+1)&&o.get(m+1)<h;)m++;v=e.H.get(m)||0,y=[],b=l(function(e){return te(e)}(s)),T=b.next();case 5:if(T.done){C.v(7);break}if(x=T.value,S=x.ga,E=x.item,A=y[y.length-1],k=0==S?p:A.endTime,h=c+f+S,r.set(h,k),u=ef(e,n.g,E.Y,a),!Pd(E.Y,"EXT-X-DISCONTINUITY")){C.v(8);break}return m++,o.set(m,h),w(C,function(e,t,n,i,r,a,o,s,u){var l,c;return P((function(d){return 1==d.g?(l=0,e.H.has(t)?(l=e.H.get(t),d.v(2)):w(d,sf(e,n,i,r,a,!0,o,s),3)):(2!=d.g&&(c=d.h,l=u-c,e.H.set(t,l)),d.return(l))}))}(e,m,t,u,i,h,E,a,k),9);case 9:v=C.h;case 8:!e.i&&e.D.isAutoLowLatencyMode()&&(e.D.enableLowLatencyMode(),e.i=e.D.isLowLatencyMode()),I=Pd(E.Y,"EXTINF"),e.i||I?(M=tf(e,u,A,E,k,v,a,n.g),y.push(M)):e.i||X("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."),T=b.next(),C.v(5);break;case 7:return C.return(y)}}))}function of(e,t){var n,i,r,a,o,s;return P((function(u){switch(u.g){case 1:return n=ga,i=Fo(t.oa(),t.ka,t.fa,e.o.retryParameters),e.o.hls.useFullSegmentsForStartTime?u.return(cf(e,i,n)):(r=Fo(t.oa(),t.ka,t.ka+2048-1,e.o.retryParameters),x(u,2),w(u,cf(e,r,n),4));case 4:return a=u.h,u.return(a);case 2:if(7001==(o=A(u)).code)throw o;return X("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",r.uris[0]),w(u,cf(e,i,n),5);case 5:return s=u.h,u.return(s)}}))}function sf(e,t,n,i,r,a,o,s){var u,l,c,d,f,h,p,g;return P((function(m){switch(m.g){case 1:if(u=tf(e,n,null,o,0,0,s,""),e.B&&!a&&(l=e.h.get(t),null!=(c=l.ud.get(r))))return m.return(c);if(i=i.toLowerCase(),df.includes(i))throw X("Raw formats are not yet supported. Skipping "+i),new le(1,4,4035);if("video/webm"==i)throw X("WebM in HLS is not yet supported. Skipping."),new le(1,4,4035);if("video/mp4"!=i&&"audio/mp4"!=i){m.v(2);break}return d=[of(e,u)],n&&d.push(of(e,n)),w(m,Promise.all(d),3);case 3:return f=m.h,h=f[0],p=f[1]||f[0],m.return(function(e,t,n,i){var r=0;if((new De).box("moov",Re).box("trak",Re).box("mdia",Re).T("mdhd",(function(e){r=On(e.reader,e.version).timescale,e.parser.stop()})).parse(i,!0),!r)throw new le(2,4,4030,e,t);var a=0,o=!1;if((new De).box("moof",Re).box("traf",Re).T("tfdt",(function(e){a=_n(e.reader,e.version).fd/r,o=!0,e.parser.stop()})).parse(n,!0),!o)throw new le(2,4,4030,e,t);return a}(t,h.uri,h.data,p.data));case 2:if("video/mp2t"!=i){m.v(4);break}return w(m,of(e,u),5);case 5:return g=m.h,m.return(function(e,t,n){function i(){a.seek(o+188),71!=(s=a.aa())&&(a.seek(o+192),s=a.aa()),71!=s&&(a.seek(o+204),s=a.aa()),71!=s&&r(),a.me(1)}function r(){throw new le(2,4,4030,e,t)}var a=new ye(n,0),o=0,s=0;for(n=Math.min(a.R.byteLength-188,940);;){if(o=a.$(),71!=(s=a.aa())){if(0<n){--n;continue}r()}n=0;var u=a.Gb();if(8191&~u)if(16384&u){if(0!=(u=(48&a.aa())>>4)&&2!=u||r(),3==u&&(u=a.aa(),a.skip(u)),1==a.N()>>8)return a.skip(3),0!=(n=a.aa()>>6)&&1!=n||r(),0==a.aa()&&r(),(1073741824*((14&(n=a.aa()))>>1)+((65534&(u=a.Gb()))<<14|(65534&a.Gb())>>1))/9e4;i()}else i();else i()}}(t,g.uri,g.data));case 4:throw new le(2,4,4030,t)}}))}function uf(e,t){var n=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}"),i=n.match(/{\$\w*}/g);if(i)for(var r=(i=l(i)).next();!r.done;r=i.next()){var a=(r=r.value).slice(2,r.length-1),o=t.get(a);if(!o)throw new le(2,4,4039,a);n=n.replace(r,o)}return n}function lf(e,t){e.j=t,e.g&&e.g.fc(e.j==pf),e.j!=pf||e.s.stop()}function cf(e,t,n){if(!e.C)throw new le(2,7,7001);return t=e.D.networkingEngine.request(n,t),ua(e.C,t),t.promise}B("shaka.net.DataUriPlugin",Gd),Gd.parse=qd,ca("data",qd),(i=Xd.prototype).configure=function(e){this.o=e},i.start=function(e,t){var n,i,r=this;return P((function(a){return 1==a.g?(r.D=t,r.i=t.isLowLatencyMode(),w(a,cf(r,da([e],r.o.retryParameters),0),2)):3!=a.g?(n=a.h,r.L=n.uri,w(a,function(e,t){var n,i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,S,E,k,I,M,C,D,R,N,L,j,_,O,U,F,B,V;return P((function(H){switch(H.g){case 1:if(0!=(n=Bd(e.ea,t,e.L)).type)throw new le(2,4,4022);for(i=Rd(n.Y,"EXT-X-DEFINE"),function(e,t){for(var n=l(t),i=n.next();!i.done;i=n.next()){var r=i.value;i=Id(r,"NAME"),r=Id(r,"VALUE"),i&&r&&(e.u.has(i)||e.u.set(i,r))}}(e,i),r=Rd(n.Y,"EXT-X-MEDIA"),a=Rd(n.Y,"EXT-X-STREAM-INF"),function(e,t){for(var n=l(t),i=n.next();!i.done;i=n.next()){var r=i.value,a=Id(r,"AUDIO");i=Id(r,"VIDEO");var o=Id(r,"SUBTITLES");if(r=$d(e,r),o){var s=li(ci,r);e.l.set(o,s),lt(r,s)}a&&(o=ui("audio",r),e.l.set(a,o)),i&&(a=ui("video",r),e.l.set(i,a))}}(e,a),o=Rd(n.Y,"EXT-X-SESSION-DATA"),s=l(o),u=s.next();!u.done;u=s.next())c=u.value,d=Id(c,"DATA-ID"),f=Id(c,"URI"),h=Id(c,"LANGUAGE"),p=Id(c,"VALUE"),g=(new Map).set("id",d),f&&g.set("uri",oi([e.L],[f])[0]),h&&g.set("language",h),p&&g.set("value",p),m=new na("sessiondata",g),e.D&&e.D.onEvent(m);return w(H,function(e,t){var n;return P((function(i){return 1==i.g?(t=t.filter((function(e){var t=Id(e,"URI")||"";return"SUBTITLES"!=Id(e,"TYPE")&&""!=t})),t.length?w(i,Qd(e,t[0]),2):i.v(2)):(n=t.slice(1).map((function(t){return Qd(e,t)})),w(i,Promise.all(n),0))}))}(e,r),2);case 2:return function(e,t){for(var n=Nd(t,"CLOSED-CAPTIONS"),i=(n=l(n)).next();!i.done;i=n.next()){var r=i.value;i=Jd(r);var a=Md(r,"GROUP-ID");r=Md(r,"INSTREAM-ID"),e.I.get(a)||e.I.set(a,new Map),e.I.get(a).set(r,i)}}(e,r),w(H,function(e,t){var n,i,r;return P((function(a){return 1==a.g?(n=t.map((function(t){var n,i,r,a,o,s,u,c;return P((function(d){if(1==d.g)return n=Id(t,"FRAME-RATE"),i=Number(Id(t,"AVERAGE-BANDWIDTH"))||Number(Md(t,"BANDWIDTH")),r=Id(t,"RESOLUTION"),a=l(r?r.split("x"):[null,null]),o=a.next().value,s=a.next().value,u=Id(t,"VIDEO-RANGE"),w(d,function(e,t){var n,i,r,a,o,s,u,c,d,f,h,p,g,m;return P((function(v){if(1==v.g)return n=di,i=$d(e,t),r=Id(t,"AUDIO"),a=Id(t,"VIDEO"),s=(o=r||a)&&e.m.has(o)?e.m.get(o):[],u={audio:r?s:[],video:a?s:[]},d=!1,f=Md(t,"URI"),h=u.audio.find((function(e){return e&&e.Pc==f})),p=li(n.Ra,i),(g=li(n.eb,i))&&!p?c=n.eb:!s.length&&g&&p?(c=n.Ra,i=[[p,g].join()]):u.audio.length&&h?(c=n.eb,d=!0):c=u.video.length?n.eb:n.Ra,d?v.v(2):w(v,function(e,t,n,i){var r,a,o,s;return P((function(u){if(1==u.g){if(r=uf(Md(t,"URI"),e.u),e.h.has(r))return u.return(e.h.get(r));var l=Id(t,"CLOSED-CAPTIONS");return a="video"==i&&l&&"NONE"!=l?e.I.get(l):null,o=ui(i,n),w(u,Zd(e,r,o,i,"und",!1,null,null,a,null,!1,!1),2)}return null==(s=u.h)?u.return(null):e.h.has(r)?u.return(e.h.get(r)):(e.h.set(r,s),u.return(s))}))}(e,t,i,c),3);if(2!=v.g&&(m=v.h),m)u[m.stream.type]=[m];else if(null===m)return v.return(null);return function(e){for(var t=(e=l(e.audio.concat(e.video))).next();!t.done;t=e.next())if(t=t.value){var n=t.stream.codecs.split(",");n=n.filter((function(e){return"mp4a.40.34"!=e})),t.stream.codecs=n.join(",")}}(u),v.return(u)}))}(e,t),2);if(c=d.h){for(var f=d.return,h=c.audio,p=c.video,g=l(p),m=g.next();!m.done;m=g.next())(m=m.value.stream)&&(m.width=Number(o)||void 0,m.height=Number(s)||void 0,m.frameRate=Number(n)||void 0,m.hdr=u||void 0);for(g=e.o.disableAudio,h.length&&!g||(h=[null]),g=e.o.disableVideo,p.length&&!g||(p=[null]),g=[],m=(h=l(h)).next();!m.done;m=h.next()){m=m.value;for(var v=l(p),y=v.next();!y.done;y=v.next()){var b=y.value;y=m?m.stream:null;var T=b?b.stream:null,x=m?m.stream.drmInfos:null,S=b?b.stream.drmInfos:null;b=(b?b.Pc:"")+" - "+(m?m.Pc:""),y&&T&&x.length&&S.length&&!(0<Va(x,S).length)||e.Ha.has(b)||(y={id:e.Pa++,language:y?y.language:"und",primary:!!y&&y.primary||!!T&&T.primary,audio:y,video:T,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},g.push(y),e.Ha.add(b))}}d=f.call(d,g)}else d=d.return([]);return d}))})),w(a,Promise.all(n),2)):(i=a.h,r=(r=i.reduce(ke,[])).filter((function(e){return null!=e})),a.return(r))}))}(e,a),3);case 3:return v=H.h,w(H,function(e,t){var n,i,r,a,o,s,u,c,d,f,h;return P((function(p){if(1==p.g)return n=Nd(t,"SUBTITLES"),i=n.map((function(t){var n,i;return P((function(r){if(1==r.g)return e.o.disableText?r.return(null):(x(r,2),w(r,Qd(e,t),4));if(2!=r.g)return n=r.h,r.return(n.stream);if(i=A(r),e.o.hls.ignoreTextStreamFailures)return r.return(null);throw i}))})),w(p,Promise.all(i),2);for(r=p.h,a=l(n),o=a.next();!o.done;o=a.next())if(s=o.value,u=Md(s,"GROUP-ID"),(c=e.l.get(u))&&(d=e.m.get(u)))for(f=l(d),h=f.next();!h.done;h=f.next())h.value.stream.codecs=c;return p.return(r.filter((function(e){return e})))}))}(e,r),4);case 4:if(y=H.h,!e.D)throw new le(2,7,7001);if(e.Qa&&0==v.length)throw new le(2,4,4034);for(S=b=1/0,E=l(e.h.values()),k=E.next();!k.done;k=E.next())I=k.value,b=Math.min(b,I.he),"text"!=I.stream.type&&(S=Math.min(S,I.pf-I.he));if(e.j!=pf?(e.g=new ro(0,e.o.defaultPresentationDelay?e.o.defaultPresentationDelay:e.W?e.W:3*e.qa),e.g.fc(!1)):(e.g=new ro(null,0),e.g.fc(!0)),rf(e),e.j!=pf)e.ra=e.F,M=vf,e.j==M.ze&&(C=e.g.Lc,isNaN(e.o.availabilityWindowOverride)||(C=e.o.availabilityWindowOverride),e.g.Od(C));else for(e.g.Ma(S),e.g.offset(-b),D=l(e.h.values()),k=D.next();!k.done;k=D.next())(R=k.value).stream.segmentIndex.offset(-b),R.stream.segmentIndex.ab(0,S);for(e.U=[],N=[],L=l(v),j=L.next();!j.done;j=L.next())for(_=j.value,O=l([_.video,_.audio]),U=O.next();!U.done;U=O.next())(F=U.value)&&N.push(F);return w(H,Promise.all(N.map((function(e){return P((function(t){return w(t,e.createSegmentIndex(),0)}))}))),5);case 5:for(B=l(N),U=B.next();!U.done;U=B.next())V=U.value,e.U.push(V.segmentIndex.M);rf(e),e.B={presentationTimeline:e.g,variants:v,textStreams:y,imageStreams:[],offlineSessionIds:[],minBufferTime:0},e.D.makeTextStreamsForClosedCaptions(e.B),T(H)}}))}(r,n.data),3)):(0<(i=r.ra)&&r.s.V(i),a.return(r.B))}))},i.stop=function(){this.s&&(this.s.stop(),this.s=null);var e=[];return this.C&&(e.push(this.C.destroy()),this.C=null),this.o=this.D=null,this.Ha.clear(),this.B=null,this.h.clear(),this.m.clear(),this.l.clear(),this.u.clear(),Promise.all(e)},i.update=function(){var e,t,n,i=this;return P((function(r){if(1==r.g)return i.j==pf?r.return():(e=[],i.O=null,(t=Array.from(i.h.values())).length?w(r,Wd(i,t[0]),2):r.v(2));for(n=1;n<t.length;n++)e.push(Wd(i,t[n]));return w(r,Promise.all(e),0)}))},i.onExpirationUpdated=function(){},i.ac=function(){var e,t,n=this;return P((function(i){return 1==i.g?n.D?(x(i,2),w(i,n.update(),4)):i.return():2!=i.g?(e=n.ra,n.s.V(e),E(i,0)):(t=A(i),n.D?(t.severity=1,n.D.onError(t),n.s.V(.1),void T(i)):i.return())}))},B("shaka.hls.HlsParser",Xd);var df=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],ff={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",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},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"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}},hf={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=Md(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?(t=si("com.widevine.alpha",[{initDataType:"cenc",initData:t=oe((t=zd(t=Md(e,"URI"))).data)}]),(e=Id(e,"KEYID"))&&(t.keyIds=new Set([e.toLowerCase().substr(2)])),t):null},"com.microsoft.playready":function(e){var t=Md(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?si("com.microsoft.playready",[{initDataType:"cenc",initData:e=$l(e=oe((e=zd(e=Md(e,"URI"))).data),t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]))}]):null}},pf="VOD",gf="EVENT",mf="LIVE",vf={Ae:pf,Xf:gf,ze:mf};function yf(e,t,n,i,r,a){if(200<=n&&299>=n&&202!=n)return{uri:r||i,je:i,data:t,headers:e,fromCache:!!e["x-shaka-from-cache"]};r=null;try{r=pe(t)}catch(e){}throw new le(401==n||403==n?2:1,1,1001,i,n,r,e,a)}function bf(){}function wf(e,t,n,i){var r=new Af;Ta(t.headers).forEach((function(e,t){r.append(t,e)}));var a=new Sf,o={Td:!1,ve:!1};if(e=function(e,t,n,i,r,a){var o,s,u,l,c,d,f,h,p,g,m,v;return P((function(y){switch(y.g){case 1:return o=xf,s=Ef,d=c=0,f=Date.now(),x(y,2),w(y,o(e,n),4);case 4:return u=y.h,h=u.clone().body.getReader(),g=(p=u.headers.get("Content-Length"))?parseInt(p,10):0,new s({start:function(e){function t(){var n,i;return P((function(o){switch(o.g){case 1:return x(o,2),w(o,h.read(),4);case 4:n=o.h,E(o,3);break;case 2:return A(o),o.return();case 3:if(n.done){o.v(5);break}if(c+=n.value.byteLength,!a){o.v(5);break}return w(o,a(n.value),5);case 5:(100<(i=Date.now())-f||n.done)&&(r(i-f,c-d,g-c),d=c,f=i),n.done?e.close():(e.enqueue(n.value),t()),T(o)}}))}t()}}),w(y,u.arrayBuffer(),5);case 5:l=y.h,E(y,3);break;case 2:if(m=A(y),i.Td)throw new le(1,1,7001,e,t);if(i.ve)throw new le(1,1,1003,e,t);throw new le(1,1,1002,e,m,t);case 3:return v={},u.headers.forEach((function(e,t){v[t.trim()]=e})),y.return(yf(v,l,u.status,e,u.url,t))}}))}(e,n,{body:t.body||void 0,headers:r,method:t.method,signal:a.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},o,i,t.streamDataCallback),e=new $r(e,(function(){return o.Td=!0,a.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var s=new Be((function(){o.ve=!0,a.abort()}));s.V(t/1e3),e.finally((function(){s.stop()}))}return e}function Tf(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)}to.m3u8=function(){return new Xd},eo["application/x-mpegurl"]=function(){return new Xd},eo["application/vnd.apple.mpegurl"]=function(){return new Xd},B("shaka.net.HttpFetchPlugin",bf),bf.isSupported=Tf,bf.parse=wf;var xf=e.fetch,Sf=e.AbortController,Ef=e.ReadableStream,Af=e.Headers;function kf(){}function If(e,t,n,i){var r=new Mf,a=Date.now(),o=0,s=new Promise((function(s,u){for(var c in r.open(t.method,e,!0),r.responseType="arraybuffer",r.timeout=t.retryParameters.timeout,r.withCredentials=t.allowCrossSiteCredentials,r.onabort=function(){u(new le(1,1,7001,e,n))},r.onload=function(t){for(var i=(t=t.target).getAllResponseHeaders().trim().split("\r\n"),r={},a=(i=l(i)).next();!a.done;a=i.next())r[(a=a.value.split(": "))[0].toLowerCase()]=a.slice(1).join(": ");try{var o=yf(r,t.response,t.status,e,t.responseURL,n);s(o)}catch(e){u(e)}},r.onerror=function(t){u(new le(1,1,1002,e,t,n))},r.ontimeout=function(){u(new le(1,1,1003,e,n))},r.onprogress=function(e){var t=Date.now();(100<t-a||e.lengthComputable&&e.loaded==e.total)&&(i(t-a,e.loaded-o,e.total-e.loaded),o=e.loaded,a=t)},t.headers)r.setRequestHeader(c.toLowerCase(),t.headers[c]);r.send(t.body)}));return new $r(s,(function(){return r.abort(),Promise.resolve()}))}Tf()&&(ca("http",wf,2,!0),ca("https",wf,2,!0)),B("shaka.net.HttpXHRPlugin",kf),kf.parse=If;var Mf=e.XMLHttpRequest;function Cf(){this.h=this.j=this.i=0,this.g=new Map,this.l=0}function Df(e){var t=this;this.P=e,this.g=new Map,this.J=new Ni((function(){var e=Array.from(t.g.values());return Promise.all(e.map((function(e){return e.catch((function(){}))})))})),this.h=[],this.ge=function(){},this.fe=function(){},this.Pb=new Cf}function Rf(e){var t=e.h.map((function(e){return e()}));return e.h=[],Promise.all(t)}function Nf(e,t,n,i,r,a){Pi(e.J);var o=function(e,t){e.i+=t;var n=e.l;return e.l++,e.g.set(n,t),n}(e.Pb,i);return i=(e.g.get(t)||Promise.resolve()).then((function(){var t,i,s,u,l,c,d;return P((function(f){if(1==f.g)return w(f,function(e,t){var n,i,r,a;return P((function(o){return 1==o.g?(n=ga,i=e.P.request(n,t),r=function(){return i.abort()},e.h.push(r),w(o,i.promise,2)):(a=o.h,lt(e.h,r),o.return(a.data))}))}(e,n),2);if(t=f.h,e.J.g)throw new le(2,9,7001);if(r)for(u in i=oe(t),(s=new Yl(i)).data)l=Number(u),c=s.data[l],d=s.g[l],e.fe(c,d);e.Pb.close(o,t.byteLength);var h=e.Pb;return e.ge(0==h.i?0:h.j/h.i,e.Pb.h),f.return(a(t))}))})),e.g.set(t,i),i}function Pf(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new hi,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 Lf(e,t){return new Promise((function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var e;return P((function(i){if(1==i.g)return null==r.result?(n(),i.return()):(e=r.result,w(i,t(e.key,e.value,e),2));e.continue(),T(i)}))}}))}function jf(e){this.h=e,this.g=[]}function _f(e,t){return Of(e,t,"readwrite")}function Of(e,t,n){var i=new Pf(n=e.h.transaction([t],n),t);return e.g.push(i),i.promise().then((function(){lt(e.g,i)}),(function(){lt(e.g,i)})),i}function Uf(e,t,n){this.g=new jf(e),this.i=t,this.h=n}function Ff(e){return Promise.reject(new le(2,9,9011,"Cannot add new value to "+e))}function Bf(e,t,n,i){t=(e=_f(e.g,t)).store();for(var r={},a=(n=l(n)).next();!a.done;r={mc:r.mc},a=n.next())r.mc=a.value,t.delete(r.mc).onsuccess=function(e){return function(){return i(e.mc)}}(r);return e.promise()}function Vf(e,t,n){var i,r,a,o,s,u,c;return P((function(d){if(1==d.g){for(i=Of(e.g,t,"readonly"),r=i.store(),a={},o=[],s={},u=l(n),c=u.next();!c.done;s={Mb:s.Mb,Kb:s.Kb},c=u.next())s.Kb=c.value,s.Mb=r.get(s.Kb),s.Mb.onsuccess=function(e){return function(){null==e.Mb.result&&o.push(e.Kb),a[e.Kb]=e.Mb.result}}(s);return w(d,i.promise(),2)}if(o.length)throw new le(2,9,9012,"Could not find values for "+o);return d.return(n.map((function(e){return a[e]})))}))}function Hf(e){this.g=new jf(e)}function Kf(){this.g=new Map}function Gf(e,t,n){if(!(e=e.g.get(t)))throw new le(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new le(2,9,9013,"Could not find cell with name "+n);return t}function qf(e,t){zf.set(e,t)}ca("http",If,1,!0),ca("https",If,1,!0),Cf.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}},Df.prototype.destroy=function(){return this.J.destroy()},Pf.prototype.abort=function(){var e=this;return P((function(t){if(1==t.g){try{e.i.abort()}catch(e){}return x(t,2),w(t,e.g,4)}if(2!=t.g)return E(t,0);A(t),T(t)}))},Pf.prototype.store=function(){return this.h},Pf.prototype.promise=function(){return this.g},jf.prototype.destroy=function(){return Promise.all(this.g.map((function(e){return e.abort()})))},(i=Uf.prototype).destroy=function(){return this.g.destroy()},i.hasFixedKeySpace=function(){return!0},i.addSegments=function(){return Ff(this.i)},i.removeSegments=function(e,t){return Bf(this,this.i,e,t)},i.getSegments=function(e){var t,n=this;return P((function(i){return 1==i.g?w(i,Vf(n,n.i,e),2):(t=i.h,i.return(t.map((function(e){return n.Ud(e)}))))}))},i.addManifests=function(){return Ff(this.h)},i.updateManifestExpiration=function(e,t){var n=_f(this.g,this.h),i=n.store();return i.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,i.put(n,e))},n.promise()},i.removeManifests=function(e,t){return Bf(this,this.h,e,t)},i.getManifests=function(e){var t,n=this;return P((function(i){return 1==i.g?w(i,Vf(n,n.h,e),2):(t=i.h,i.return(Promise.all(t.map((function(e){return n.Sb(e)})))))}))},i.getAllManifests=function(){var e,t,n=this;return P((function(i){return 1==i.g?(e=Of(n.g,n.h,"readonly"),t=new Map,w(i,Lf(e,(function(e,i){var r;return P((function(a){if(1==a.g)return w(a,n.Sb(i),2);r=a.h,t.set(e,r),T(a)}))})),2)):3!=i.g?w(i,e.promise(),3):i.return(t)}))},i.Ud=function(e){return e},i.Sb=function(e){return Promise.resolve(e)},i.add=function(e,t){var n,i,r,a,o,s,u,c=this;return P((function(d){if(1==d.g){for(n=_f(c.g,e),i=n.store(),r=[],a={},o=l(t),s=o.next();!s.done;a={nc:a.nc},s=o.next())u=s.value,a.nc=i.add(u),a.nc.onsuccess=function(e){return function(){r.push(e.nc.result)}}(a);return w(d,n.promise(),2)}return d.return(r)}))},Hf.prototype.destroy=function(){return this.g.destroy()},Hf.prototype.getAll=function(){var e,t,n=this;return P((function(i){return 1==i.g?(e=Of(n.g,"session-ids","readonly"),t=[],w(i,Lf(e,(function(e,n){t.push(n)})),2)):3!=i.g?w(i,e.promise(),3):i.return(t)}))},Hf.prototype.add=function(e){for(var t=_f(this.g,"session-ids"),n=t.store(),i=(e=l(e)).next();!i.done;i=e.next())n.add(i.value);return t.promise()},Hf.prototype.remove=function(e){var t,n=this;return P((function(i){return 1==i.g?w(i,Lf(t=_f(n.g,"session-ids"),(function(t,n,i){e.includes(n.sessionId)&&i.delete()})),2):w(i,t.promise(),0)}))},Kf.prototype.destroy=function(){for(var e=[],t=l(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},Kf.prototype.init=function(){var e=this;zf.forEach((function(t,n){var i=t();i&&e.g.set(n,i)}));for(var t=[],n=l(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)},B("shaka.offline.StorageMuxer",Kf),Kf.unregister=function(e){zf.delete(e)},Kf.register=qf,Kf.prototype.destroy=Kf.prototype.destroy;var zf=new Map;function Xf(){Uf.apply(this,arguments)}function Wf(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=l(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(i=(n=l(e)).next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){var r=n++,a=l(e);for(i=a.next();!i.done;i=a.next())i.value.variantIds.push(r)}if(!e.length&&t.length)for(r=n++,i=(a=l(t)).next();!i.done;i=a.next())i.value.variantIds.push(r);if(e.length&&t.length)for(i=(t=l(t)).next();!i.done;i=t.next())for(i=i.value,a=(r=l(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=l(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?Yf(e.initSegmentUri):null,r=t+e.presentationTimeOffset,a=t+n;return{id:e.id,originalId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:e.kind,language:e.language,label:e.label,width:e.width,height:e.height,initSegmentKey:i,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map((function(e){var n=Yf(e.uri);return{startTime:t+e.startTime,endTime:t+e.endTime,dataKey:n,initSegmentKey:i,appendWindowStart:t,appendWindowEnd:a,timestampOffset:r}})),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}(n,e.startTime,t)}))}function Yf(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 le(2,9,9004,"Could not parse uri "+e)}function $f(){Uf.apply(this,arguments)}function Jf(e,t,n){return{id:e.id,originalId:e.originalId,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,kind:e.kind,language:e.language,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map((function(i){return{startTime:t+i.startTime,endTime:t+i.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:i.dataKey}})),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}function Qf(){Uf.apply(this,arguments)}function Zf(){this.m=this.j=this.i=this.h=this.g=this.l=null}function eh(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j=["offline:",e,"/",t,"/",n,"/",i].join("")}function th(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 eh(t,n,i,Number(e[4])):null}function nh(e,t){this.h=e,this.g=t}function ih(e,t){var n=new ro(null,0);n.Ma(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=l(t),o=a.next();!o.done;o=a.next()){var s=l(o.value.variantIds);for(o=s.next();!o.done;o=s.next())r.add(o.value)}for(a=l(n),o=a.next();!o.done;o=a.next())for(s=l(o.value.variantIds),o=s.next();!o.done;o=s.next())r.add(o.value);for(a=new Map,r=l(r),o=r.next();!o.done;o=r.next())o=o.value,a.set(o,{id:o,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=l(t),r=t.next();!r.done;r=t.next())for(r=r.value,o=rh(e,r,i),s=l(r.variantIds),r=s.next();!r.done;r=s.next())(r=a.get(r.value)).language=o.language,r.primary=r.primary||o.primary,r.audio=o;for(n=l(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=rh(e,r,i),o=l(r.variantIds),r=o.next();!r.done;r=o.next())(r=a.get(r.value)).primary=r.primary||t.primary,r.video=t;return a}(e,i,r,n),r=t.streams.filter((function(e){return e.type==ci})).map((function(t){return rh(e,t,n)}));var a=t.streams.filter((function(e){return"image"==e.type})).map((function(t){return rh(e,t,n)})),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=l(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}}function rh(e,t,n){var i=t.segments.map((function(t){return function(e,t){var n=new eh("segment",e.h,e.g,t.dataKey);return new io(t.startTime,t.endTime,(function(){return[n.toString()]}),0,null,null!=t.initSegmentKey?function(e,t){var n=new eh("segment",e.h,e.g,t);return new no((function(){return[n.toString()]}),0,null)}(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd)}(e,t)}));return n.Db(i),{id:t.id,originalId:t.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ao(i),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout}}function ah(){this.g=null}function oh(){}function sh(e){var t=th(e);return t&&"manifest"==t.g?e=Zr(e={uri:e,je:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}}):e=t&&"segment"==t.g?function(e,t){var n=new Kf;return Zr(void 0).ca((function(){return n.init()})).ca((function(){return Gf(n,t.Ka(),t.na())})).ca((function(e){return e.getSegments([t.key()])})).ca((function(e){return{uri:t,data:e[0].data,headers:{}}})).finally((function(){return n.destroy()}))}(t.key(),t):Jr(new le(2,1,9004,e)),e}function uh(e,t,n){var i,r,a,o,s,u;return P((function(c){switch(c.g){case 1:i=[];for(var d=[],f=l(n),h=f.next();!h.done;h=f.next()){h=h.value;for(var p=!1,g=l(d),m=g.next();!m.done;m=g.next())if(lh((m=m.value).info,h)){m.sessionIds.push(h.sessionId),p=!0;break}p||d.push({info:h,sessionIds:[h.sessionId]})}r=l(d),a=r.next();case 2:if(a.done){c.v(4);break}return o=a.value,s=function(e,t,n){var i,r;return P((function(a){switch(a.g){case 1:return i=new Ea({Cb:t,onError:function(){},Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),x(a,2),i.configure(e),w(a,function(e,t,n,i,r,a){var o=new Map;return(r={audioCapabilities:r,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t}).drmInfos=[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:i,initData:null,keyIds:null}],o.set(t,r),ja(e,o,[],!1)}(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:E(a,3);break;case 2:return A(a),w(a,i.destroy(),5);case 5:case 9:return a.return([]);case 3:return x(a,6),w(a,Ia(i),8);case 8:E(a,7);break;case 6:return A(a),w(a,i.destroy(),9);case 7:return r=[],w(a,Promise.all(n.sessionIds.map((function(e){return P((function(t){return 1==t.g?(x(t,2),w(t,function(e,t){var n,i,r;return P((function(a){return 1==a.g?w(a,_a(e,t),2):3!=a.g?(n=a.h)?(i=[],(r=e.j.get(n))&&(r.Na=new hi,i.push(r.Na)),i.push(n.remove()),w(a,Promise.all(i),3)):a.return():(e.j.delete(n),void T(a))}))}(i,e),4)):2!=t.g?(r.push(e),E(t,0)):(A(t),void T(t))}))}))),10);case 10:return w(a,i.destroy(),11);case 11:return a.return(r)}}))}(e,t,o),w(c,s,5);case 5:u=c.h,i=i.concat(u),a=r.next(),c.v(2);break;case 4:return c.return(i)}}))}function lh(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&ct(e.audioCapabilities,t.audioCapabilities,n)&&ct(e.videoCapabilities,t.videoCapabilities,n)}function ch(e,t){var n=ih(new nh(e.Ka(),e.na()),t),i=t.appMetadata||{};return n=dh(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:i}}function dh(e){for(var t=[],n=function(e){return e.filter((function(e){return Mr(e)}))}(e.variants),i=(n=l(n)).next();!i.done;i=n.next())t.push(xr(i.value));for(n=(e=l(e.textStreams)).next();!n.done;n=e.next())t.push(Sr(n.value));return t}function fh(){this.g={}}function hh(e,t){var n=e.g[t];return null==n&&(n=0),n}function ph(e){var t=this;if(e&&e.constructor!=Is)throw new le(2,9,9008);this.P=this.o=null,e?(this.o=e.o,this.P=e.Vb()):(this.o=ys(),this.P=new la),this.Nc=[],this.bc=[],this.Cd=[];var n=!e;this.J=new Ni((function(){var e,i,r,a,o;return P((function(s){switch(s.g){case 1:return w(s,Promise.all(t.Cd.map((function(e){return Rf(e)}))),2);case 2:for(e=function(){},i=[],r=l(t.bc),a=r.next();!a.done;a=r.next())o=a.value,i.push(o.then(e,e));return w(s,Promise.all(i),3);case 3:if(!n){s.v(4);break}return w(s,t.P.destroy(),4);case 4:t.o=null,t.P=null,T(s)}}))}))}function gh(){if(Ve())e:{for(var e=l(zf.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 mh(e,t){for(var n=[],i=l(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&"video"==r.type?n.push({contentType:Ti(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:Ti(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function vh(e,t,n){return P((function(i){return w(i,function(e,t,n,i){var r,a,o;return P((function(s){return 1==s.g?i.drmInfo?(r=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new le(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(n),a=i.sessionIds.map((function(e){return{sessionId:e,keySystem:i.drmInfo.keySystem,licenseUri:i.drmInfo.licenseServerUri,serverCertificate:i.drmInfo.serverCertificate,audioCapabilities:mh(i,!1),videoCapabilities:mh(i,!0)}})),w(s,uh(t,e,a),2)):s.return():3!=s.g?(o=s.h,w(s,r.remove(o),3)):w(s,r.add(a.filter((function(e){return!o.includes(e.sessionId)}))),0)}))}(e.P,e.o.drm,n,t),0)}))}function yh(e,t,n){function i(){}var r=function(e){for(var t=[],n=(e=l(e.streams)).next();!n.done;n=e.next())for(var i=(n=l(n.value.segments)).next();!i.done;i=n.next())null!=(i=i.value).initSegmentKey&&t.push(i.initSegmentKey),t.push(i.dataKey);return t}(n);return ch(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}function bh(e,t,n,i,r,a,o,s,u){var l={id:a.id,originalId:a.originalId,primary:a.primary,type:a.type,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:a.hdr,kind:a.kind,language:a.language,label:a.label,width:a.width||null,height:a.height||null,encrypted:a.encrypted,keyIds:a.keyIds,segments:[],variantIds:[],roles:a.roles,forced:a.forced,channelsCount:a.channelsCount,audioSamplingRate:a.audioSamplingRate,spatialAudio:a.spatialAudio,closedCaptions:a.closedCaptions,tilesLayout:a.tilesLayout},c=a.id;return function(e,t,n){if(t=e.segmentIndex.find(t),null!=t)for(var i=e.segmentIndex.get(t);i;)n(i),i=e.segmentIndex.get(++t)}(a,r.presentationTimeline.Va(),(function(r){var d=function(e,t,n,i,r,a,o,s,u){return u.has(o)?u.get(o):(s=Fo(o.oa(),o.ka,o.fa,s.streaming.retryParameters),t=Nf(t,n,s,.5*hh(a,i),!0,(function(t){var n;return P((function(i){return 1==i.g?w(i,r.addSegments([{data:t}]),2):(n=i.h,e.Nc.push(n[0]),i.return(n[0]))}))})),u.set(o,t),t)}(e,t,c,a.id,n,i,r.h,o,s),f=function(e,t,n,i,r,a,o,s,u){var l=[o.oa()[0],o.ka,o.fa].join("-");return u.has(l)?u.get(l):(s=Fo(o.oa(),o.ka,o.fa,s.streaming.retryParameters),t=Nf(t,n,s,function(e,t,n){return n=n.endTime-n.startTime,hh(e,t)*n}(a,i,o),!1,(function(t){var n;return P((function(i){return 1==i.g?w(i,r.addSegments([{data:t}]),2):(n=i.h,e.Nc.push(n[0]),i.return(n[0]))}))})),u.set(l,t),t)}(e,t,c,a.id,n,i,r,o,u);!function(e,t,n){Pi(e.J);var i=(e.g.get(t)||Promise.resolve()).then((function(){return P((function(e){return w(e,n(),0)}))}));e.g.set(t,i)}(t,c,(function(){var e,t;return P((function(n){return 1==n.g?w(n,d,2):3!=n.g?(e=n.h,w(n,f,3)):(t=n.h,l.segments.push({initSegmentKey:e,startTime:r.startTime,endTime:r.endTime,appendWindowStart:r.appendWindowStart,appendWindowEnd:r.appendWindowEnd,timestampOffset:r.timestampOffset,dataKey:t}),void T(n))}))}))})),l}function wh(e){if(e.J.g)throw new le(2,9,7001)}function Th(){if(!gh())throw new le(2,9,9e3)}function xh(e,t){return P((function(n){return 1==n.g?(e.bc.push(t),S(n),w(n,t,4)):2!=n.g?n.return(n.h):(k(n),lt(e.bc,t),I(n,0))}))}function Sh(e){for(var t=new Set,n=l(e.textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(i=(n=l(e.imageStreams)).next();!i.done;i=n.next())t.add(i.value);for(n=(e=l(e.variants)).next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}m(Xf,Uf),Xf.prototype.updateManifestExpiration=function(e,t){var n,i,r,a=this;return P((function(o){return n=_f(a.g,a.h),i=n.store(),r=new hi,i.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,i.put(n),r.resolve()):r.reject(new le(2,9,9012,"Could not find values for "+e))},w(o,Promise.all([n.promise(),r]),0)}))},Xf.prototype.Sb=function(e){var t,n,i,r,a,o;return P((function(s){if(1==s.g){for(t=[],n=0;n<e.periods.length;++n)i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime,a=Wf(e.periods[n],r),t.push(a);return w(s,zc(t),2)}return o=s.h,s.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,streams:o,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata})}))},Xf.prototype.Ud=function(e){return{data:e.data}},m($f,Uf),$f.prototype.Sb=function(e){var t,n,i,r,a,o;return P((function(s){if(1==s.g){for(t=[],n=0;n<e.periods.length;++n){i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime;for(var u=e.periods[n],c=[],d=l(u.streams),f=d.next();!f.done;f=d.next())0!=(f=f.value).variantIds.length&&c.push(Jf(f,u.startTime,u.startTime+r));a=c,t.push(a)}return w(s,zc(t),2)}return o=s.h,s.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:o})}))},m(Qf,Uf),Qf.prototype.hasFixedKeySpace=function(){return!1},Qf.prototype.addSegments=function(e){return this.add(this.i,e)},Qf.prototype.addManifests=function(e){return this.add(this.h,e)},Qf.prototype.Sb=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(i=Zf.prototype).init=function(){var t=this,n=new hi,i=e.indexedDB.open("shaka_offline_db",5);return i.onsuccess=function(){var e=i.result;t.l=e;var r=e.objectStoreNames;r=r.contains("manifest")&&r.contains("segment")?new Xf(e,"segment","manifest"):null,t.g=r,r=(r=e.objectStoreNames).contains("manifest-v2")&&r.contains("segment-v2")?new $f(e,"segment-v2","manifest-v2"):null,t.h=r,r=(r=e.objectStoreNames).contains("manifest-v3")&&r.contains("segment-v3")?new $f(e,"segment-v3","manifest-v3"):null,t.i=r,r=(r=e.objectStoreNames).contains("manifest-v5")&&r.contains("segment-v5")?new Qf(e,"segment-v5","manifest-v5"):null,t.j=r,e=e.objectStoreNames.contains("session-ids")?new Hf(e):null,t.m=e,n.resolve()},i.onupgradeneeded=function(){for(var e=i.result,t=l(["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})},i.onerror=function(e){n.reject(new le(2,9,9001,i.error)),e.preventDefault()},n},i.destroy=function(){var e=this;return P((function(t){switch(t.g){case 1:if(!e.g){t.v(2);break}return w(t,e.g.destroy(),2);case 2:if(!e.h){t.v(4);break}return w(t,e.h.destroy(),4);case 4:if(!e.i){t.v(6);break}return w(t,e.i.destroy(),6);case 6:if(!e.j){t.v(8);break}return w(t,e.j.destroy(),8);case 8:if(!e.m){t.v(10);break}return w(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),T(t)}}))},i.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},i.getEmeSessionCell=function(){return this.m},i.erase=function(){var t=this;return P((function(n){switch(n.g){case 1:if(!t.g){n.v(2);break}return w(n,t.g.destroy(),2);case 2:if(!t.h){n.v(4);break}return w(n,t.h.destroy(),4);case 4:if(!t.i){n.v(6);break}return w(n,t.i.destroy(),6);case 6:if(!t.j){n.v(8);break}return w(n,t.j.destroy(),8);case 8:return t.l&&t.l.close(),w(n,function(){var t=new hi,n=e.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new le(2,9,9001,n.error)),e.preventDefault()},t}(),10);case 10:return t.l=null,t.g=null,t.h=null,t.i=null,t.j=null,w(n,t.init(),0)}}))},qf("idb",(function(){return qe()||!e.indexedDB?null:new Zf})),eh.prototype.Ka=function(){return this.i},eh.prototype.na=function(){return this.h},eh.prototype.key=function(){return this.l},eh.prototype.toString=function(){return this.j},(i=ah.prototype).configure=function(){},i.start=function(e,t){var n,i,r,a,o,s,u=this;return P((function(l){switch(l.g){case 1:if(n=th(e),u.g=n,null==n||"manifest"!=n.g)throw new le(2,1,9004,e);return i=new Kf,S(l),w(l,i.init(),4);case 4:return w(l,Gf(i,n.Ka(),n.na()),5);case 5:return w(l,l.h.getManifests([n.key()]),6);case 6:return r=l.h,a=r[0],o=new nh(n.Ka(),n.na()),s=ih(o,a),t.makeTextStreamsForClosedCaptions(s),l.return(s);case 2:return k(l),w(l,i.destroy(),7);case 7:I(l,0)}}))},i.stop=function(){return Promise.resolve()},i.update=function(){},i.onExpirationUpdated=function(e,t){var n,i,r,a,o,s,u,l=this;return P((function(c){switch(c.g){case 1:return n=l.g,i=new Kf,x(c,2,3),w(c,i.init(),5);case 5:return w(c,Gf(i,n.Ka(),n.na()),6);case 6:return w(c,(r=c.h).getManifests([n.key()]),7);case 7:if(a=c.h,o=a[0],s=o.sessionIds.includes(e),u=null==o.expiration||o.expiration>t,!s||!u){c.v(3);break}return w(c,r.updateManifestExpiration(n.key(),t),3);case 3:return k(c),w(c,i.destroy(),10);case 10:I(c,0);break;case 2:A(c),c.v(3)}}))},eo["application/x-offline-manifest"]=function(){return new ah},B("shaka.offline.OfflineScheme",oh),oh.plugin=sh,ca("offline",sh),(i=ph.prototype).destroy=function(){return this.J.destroy()},i.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=ms(e,t)),e.manifest&&e.manifest.dash&&"defaultPresentationDelay"in e.manifest.dash&&(xe("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),e.manifest.defaultPresentationDelay=e.manifest.dash.defaultPresentationDelay,delete e.manifest.dash.defaultPresentationDelay),bs(this.o,e)},i.getConfiguration=function(){var e=ys();return bs(e,this.o,ys()),e},i.Vb=function(){return this.P},i.store=function(e,t,n){var i=this,r=this.getConfiguration(),a=new Df(this.P);this.Cd.push(a),t=function(e,t,n,i,r,a){var o,s,u,c,d,f,h,p,g,m;return P((function(v){switch(v.g){case 1:return Th(),s=o=null,u=new Kf,d=c=null,x(v,2,3),w(v,i(),5);case 5:return o=v.h,w(v,function(e,t,n,i){var r,a,o,s,u;return P((function(l){if(1==l.g)return r=null,a=e.P,o={networkingEngine:a,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){r=e},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},n.configure(i.manifest),wh(e),w(l,n.start(t,o),2);if(3!=l.g)return s=l.h,wh(e),u=Sh(s),w(l,Promise.all(Z(u,(function(e){return e.createSegmentIndex()}))),3);if(wh(e),r)throw r;return l.return(s)}))}(e,t,o,r),6);case 6:if(f=v.h,wh(e),!(!f.presentationTimeline.Z()&&!f.presentationTimeline.mb()))throw new le(2,9,9005,t);return w(v,function(e,t,n,i){var r;return P((function(a){switch(a.g){case 1:return(r=new Ea({Cb:e.P,onError:n,Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(i.drm),w(a,function(e,t,n,i){return e.qa=!0,e.C=[],e.F=n,ka(e,t,!!i)}(r,t.variants,i.offline.usePersistentLicense,i.useMediaCapabilities),2);case 2:return w(a,Ia(r),3);case 3:return w(a,Ma(r),4);case 4:return a.return(r)}}))}(e,f,(function(e){d=d||e}),r),7);case 7:if(s=v.h,wh(e),d)throw d;return w(v,e.yc(f,s,r),8);case 8:return w(v,u.init(),9);case 9:return wh(e),w(v,function(e){var t=null;if(e.g.forEach((function(e,n){e.getCells().forEach((function(e,i){e.hasFixedKeySpace()||t||(t={path:{Ka:n,na:i},na:e})}))})),t)return t;throw new le(2,9,9013,"Could not find a cell that supports add-operations")}(u),10);case 10:return c=v.h,wh(e),w(v,function(e,t,n,i,r,a,o,s){var u,c,d,f,h,p,g,m,v,y;return P((function(b){switch(b.g){case 1:return u=function(e,t,n){return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:t=dh(t),appMetadata:n}}(r,i,a),c=o.offline.progressCallback,function(e,t,n){e.ge=t,e.fe=n}(s,(function(e,t){u.size=t,c(u,e)}),(function(e,t){h&&o.offline.usePersistentLicense&&p==t&&Ca(n,"cenc",e)})),d=i.variants.some((function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t})),f=i.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}))})),p=null,(h=d&&!f)&&(g=n.i,p=Eh.get(g.keySystem)),S(b),v=m=function(e,t,n,i,r,a,o,s){for(var u=new fh,c=l(r.variants),d=c.next();!d.done;d=c.next()){var f=u,h=(d=d.value).audio,p=d.video;if(h&&!p&&(f.g[h.id]=h.bandwidth||d.bandwidth),!h&&p&&(f.g[p.id]=p.bandwidth||d.bandwidth),h&&p){var g=h.bandwidth||393216,m=p.bandwidth||d.bandwidth-g;0>=m&&(m=d.bandwidth),f.g[h.id]=g,f.g[p.id]=m}}for(c=l(r.textStreams),f=c.next();!f.done;f=c.next())u.g[f.value.id]=52;for(c=l(r.imageStreams),f=c.next();!f.done;f=c.next())f=f.value,u.g[f.id]=f.bandwidth||2048;for((f=new Map).set(null,Promise.resolve(null)),d=new Map,h=Sh(r),c=new Map,h=l(h),p=h.next();!p.done;p=h.next())p=p.value,g=bh(e,t,n,u,r,p,s,f,d),c.set(p.id,g);for(e=l(r.variants),d=e.next();!d.done;d=e.next())(t=d.value).audio&&c.get(t.audio.id).variantIds.push(t.id),t.video&&c.get(t.video.id).variantIds.push(t.id);return e=Array.from(c.values()),s=s.offline.usePersistentLicense,(t=i.i)&&s&&(t.initData=[]),{creationTime:Date.now(),originalManifestUri:a,duration:r.presentationTimeline.getDuration(),size:0,expiration:i.Ub(),streams:e,sessionIds:s?Pa(i):[],drmInfo:t,appMetadata:o}}(e,s,t,n,i,r,a,o),w(b,function(e){return P((function(t){return 1==t.g?w(t,Promise.all(e.g.values()),2):t.return(e.Pb.h)}))}(s),4);case 4:if(v.size=b.h,m.expiration=n.Ub(),y=Pa(n),m.sessionIds=o.offline.usePersistentLicense?y:[],d&&o.offline.usePersistentLicense&&!y.length)throw new le(2,9,9007);return b.return(m);case 2:return k(b),w(b,s.destroy(),5);case 5:I(b,0)}}))}(e,c.na,s,f,t,n,r,a),11);case 11:if(h=v.h,wh(e),d)throw d;return w(v,c.na.addManifests([h]),12);case 12:return p=v.h,wh(e),g=new eh("manifest",c.path.Ka,c.path.na,p[0]),v.return(ch(g,h));case 3:return k(v),e.Nc=[],w(v,u.destroy(),13);case 13:if(!o){v.v(14);break}return w(v,o.stop(),14);case 14:if(!s){v.v(16);break}return w(v,s.destroy(),16);case 16:I(v,0);break;case 2:if(m=A(v),!c){v.v(18);break}return w(v,c.na.removeSegments(e.Nc,(function(){})),18);case 18:throw d||m}}))}(this,e,t||{},(function(){var t;return P((function(a){return 1==a.g?w(a,Ja(e,i.P,r.manifest.retryParameters,n||null),2):(t=a.h,a.return(Ce(t)))}))}),r,a);var o=new $r(t,(function(){return Rf(a)}));return o.finally((function(){lt(i.Cd,a)})),o.then=function(e){return xe("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead."),o.promise.then(e)},function(e,t){var n=t.promise;return e.bc.push(n),t.finally((function(){lt(e.bc,n)}))}(this,o)},i.ef=function(){return xe("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported."),!1},i.yc=function(e,t,n){var i,r,a,o,s,u,c,d,f,h,p,g,m,v,y,b,S,k,I,M,C,D,R,N,L;return P((function(P){switch(P.g){case 1:if(i={width:1/0,height:1/0},function(e,t,n){e.variants=e.variants.filter((function(e){return dr(e,t,n)}))}(e,n.restrictions,i),!n.useMediaCapabilities){gr(e),hr(e,t),P.v(2);break}return w(P,pr(e,n.offline.usePersistentLicense),2);case 2:for(r=[],a=n.preferredAudioChannelCount,lr(e,a),o=l(e.variants),s=o.next();!s.done;s=o.next())u=s.value,r.push(xr(u));for(c=l(e.textStreams),d=c.next();!d.done;d=c.next())f=d.value,r.push(Sr(f));for(h=l(e.imageStreams),p=h.next();!p.done;p=h.next())g=p.value,r.push(Er(g));return w(P,n.offline.trackSelectionCallback(r),4);case 4:for(m=P.h,v=e.presentationTimeline.getDuration(),y=0,b=l(m),S=b.next();!S.done;S=b.next())k=S.value,I=k.bandwidth*v/8,y+=I;return x(P,5),w(P,n.offline.downloadSizeCallback(y),7);case 7:if(!P.h)throw new le(2,9,9014);E(P,6);break;case 5:if((M=A(P))instanceof le)throw M;throw new le(2,9,9015);case 6:for(C=new Set,D=new Set,R=new Set,N=l(m),S=N.next();!S.done;S=N.next())"variant"==(L=S.value).type&&C.add(L.id),"text"==L.type&&D.add(L.id),"image"==L.type&&R.add(L.id);e.variants=e.variants.filter((function(e){return C.has(e.id)})),e.textStreams=e.textStreams.filter((function(e){return D.has(e.id)})),e.imageStreams=e.imageStreams.filter((function(e){return R.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=l(t),i=n.next();!i.done;i=n.next())for(var r=(i=l(t)).next();!r.done;r=i.next());for(t=l(e),n=t.next();!n.done;n=t.next())for(n=l(e),i=n.next();!i.done;i=n.next());}(e),T(P)}}))},i.remove=function(e){return xh(this,function(e,t){var n,i,r,a,o,s;return P((function(u){switch(u.g){case 1:if(Th(),null==(n=th(t))||"manifest"!=n.g)throw new le(2,9,9004,t);return i=n,r=new Kf,S(u),w(u,r.init(),4);case 4:return w(u,Gf(r,i.Ka(),i.na()),5);case 5:return w(u,(a=u.h).getManifests([i.key()]),6);case 6:return o=u.h,s=o[0],w(u,Promise.all([vh(e,s,r),yh(a,i,s)]),2);case 2:return k(u),w(u,r.destroy(),8);case 8:I(u,0)}}))}(this,e))},i.Bf=function(){return xh(this,function(e){var t,n,i,r,a,o,s,u,c,d;return P((function(f){switch(f.g){case 1:return Th(),t=e.P,n=e.o.drm,i=new Kf,r=!1,S(f),w(f,i.init(),4);case 4:a=[],function(e,t){e.g.forEach((function(e){t(e.getEmeSessionCell())}))}(i,(function(e){return a.push(e)})),o=l(a),s=o.next();case 5:if(s.done){f.v(2);break}return w(f,(u=s.value).getAll(),8);case 8:return c=f.h,w(f,uh(n,t,c),9);case 9:return d=f.h,w(f,u.remove(d),10);case 10:d.length!=c.length&&(r=!0),s=o.next(),f.v(5);break;case 2:return k(f),w(f,i.destroy(),11);case 11:I(f,3);break;case 3:return f.return(!r)}}))}(this))},i.list=function(){return xh(this,P((function(i){switch(i.g){case 1:return Th(),e=[],t=new Kf,S(i),w(i,t.init(),4);case 4:return n=Promise.resolve(),function(e,t){e.g.forEach((function(e,n){e.getCells().forEach((function(e,i){t({Ka:n,na:i},e)}))}))}(t,(function(t,i){n=n.then((function(){return P((function(n){if(1==n.g)return w(n,i.getAllManifests(),2);n.h.forEach((function(n,i){var r=ch(new eh("manifest",t.Ka,t.na,i),n);e.push(r)})),T(n)}))}))})),w(i,n,2);case 2:return k(i),w(i,t.destroy(),6);case 6:I(i,3);break;case 3:return i.return(e)}})));var e,t,n},B("shaka.offline.Storage",ph),ph.deleteAll=function(){var e;return P((function(t){return 1==t.g?(e=new Kf,S(t),w(t,function(e){var t,n;return P((function(i){return 1==i.g?(t=Array.from(e.g.values()),(n=0<t.length)||zf.forEach((function(e){(e=e())&&t.push(e)})),w(i,Promise.all(t.map((function(e){return e.erase()}))),2)):n?i.v(0):w(i,Promise.all(t.map((function(e){return e.destroy()}))),0)}))}(e),2)):5!=t.g?(k(t),w(t,e.destroy(),5)):I(t,0)}))},ph.prototype.list=ph.prototype.list,ph.prototype.removeEmeSessions=ph.prototype.Bf,ph.prototype.remove=ph.prototype.remove,ph.prototype.getStoreInProgress=ph.prototype.ef,ph.prototype.store=ph.prototype.store,ph.prototype.getNetworkingEngine=ph.prototype.Vb,ph.prototype.getConfiguration=ph.prototype.getConfiguration,ph.prototype.configure=ph.prototype.configure,ph.prototype.destroy=ph.prototype.destroy,ph.support=gh;var Eh=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");function Ah(){}function kh(e,t){for(var n={priority:t||0,De:e},i=l(te(Ih)),r=i.next();!r.done;r=i.next()){var a=(r=r.value).ga;if(r.item.priority<n.priority)return void Ih.splice(a,0,n)}Ih.push(n)}Hu.offline=gh,B("shaka.polyfill",Ah),Ah.register=kh,Ah.installAll=function(){for(var e=l(Ih),t=e.next();!t.done;t=e.next()){t=t.value;try{t.De()}catch(e){X("Error installing polyfill!",e)}}};var Ih=[];function Mh(){}function Ch(){hm()}function Dh(){}function Rh(){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",Nh),document.addEventListener("webkitfullscreenerror",Nh),document.addEventListener("mozfullscreenchange",Nh),document.addEventListener("mozfullscreenerror",Nh),document.addEventListener("MSFullscreenChange",Nh),document.addEventListener("MSFullscreenError",Nh)}}function Nh(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 Ph(){}function Lh(){}function jh(){}function _h(){(qe()||ze()||We("PlayStation 5")||!navigator.mediaCapabilities)&&(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Uh=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Oh)}function Oh(e){var t,n,i,r,a,o,s,u,l,c,d,f;return P((function(h){switch(h.g){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},!e)return h.return(t);if("media-source"==e.type){if(!Ve()||e.video&&(n=e.video.contentType,!MediaSource.isTypeSupported(n))||e.audio&&(i=e.audio.contentType,!MediaSource.isTypeSupported(i)))return h.return(t)}else{if("file"!=e.type)return h.return(t);if(e.video&&(r=e.video.contentType,!He(r))||e.audio&&(a=e.audio.contentType,!He(a)))return h.return(t)}return e.keySystemConfiguration?(o=e.keySystemConfiguration,s=[],u=[],o.audio&&(l={robustness:o.audio.robustness||"",contentType:e.audio.contentType},s.push(l)),o.video&&(c={robustness:o.video.robustness||"",contentType:e.video.contentType},u.push(c)),d={initDataTypes:[o.initDataType],distinctiveIdentifier:o.distinctiveIdentifier,persistentState:o.persistentState,sessionTypes:o.sessionTypes},s.length&&(d.audioCapabilities=s),u.length&&(d.videoCapabilities=u),x(h,3),w(h,navigator.requestMediaKeySystemAccess(o.keySystem,[d]),5)):(t.supported=!0,h.return(Promise.resolve(t)));case 5:f=h.h,E(h,4);break;case 3:A(h);case 4:f&&(t.supported=!0,t.keySystemAccess=f);case 2:return h.return(t)}}))}Ah.EncryptionScheme=Mh,Mh.install=Ch,kh(Ch,-2),Ah.Fullscreen=Dh,Dh.install=Rh,kh(Rh),Ah.MathRound=Ph,Ph.install=Lh,kh(Lh),Ah.MediaCapabilities=jh,jh.install=_h;var Uh=null;function Fh(){}function Bh(){var t=Xe();e.MediaSource&&(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */);return n.shift(),n.some((function(e){return e.startsWith("codecs=")}))?cast.__platform__.canDisplayType(t):e(t)}}():t?(function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"mp2t"!=t.split(/ *; */)[0].split("/")[1].toLowerCase()&&e(t)}}(),12>=t?(Vh(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):Vh()):(We("Tizen 2")||We("Tizen 3")||We("Tizen 4"))&&function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=Si(t)&&e(t)}}()),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&function(){var e=MediaSource.isTypeSupported;We("Web0S")||(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),i=n.findIndex((function(e){return e.startsWith("codecs=")}));if(0>i)return e(t);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(",")+'"',t=n.join("; ")),e(t)})}()}function Vh(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(t){for(var n=[],i=0;i<arguments.length;++i)n[i]=arguments[i];return(n=e.apply(this,n)).abort=function(){},n}}function Hh(){}function Kh(){screen.orientation||null!=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 Gh;screen.orientation=n,t(),e.addEventListener("orientationchange",(function(){t();var e=new na("change");n.dispatchEvent(e)}))}()}function Gh(){ra.call(this),this.type="",this.angle=0}function qh(){}function zh(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Wh,e.MediaKeys=Jh,e.MediaKeySystemAccess=$h,navigator.requestMediaKeySystemAccess=Xh)}function Xh(e,t){try{var n=new $h(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Wh(e){var t=this.mediaKeys;return t&&t!=e&&Qh(t,null),delete this.mediaKeys,(this.mediaKeys=e)?Qh(e,this):Promise.resolve()}function Yh(e){if(se(e=oe(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=ge(e=he(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=ae(e),this.dispatchEvent(t)}function $h(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(var n=l(t),i=n.next();!i.done;i=n.next()){var r=i.value;if("required"==r.persistentState)i=null;else{i={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:r.initDataTypes,sessionTypes:["temporary"],label:r.label};var a=!1,o=!1;if(r.audioCapabilities)for(var s=l(r.audioCapabilities),u=s.next();!u.done;u=s.next())(u=u.value).contentType&&(a=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,u.contentType.split(";")[0])&&(i.audioCapabilities.push(u),o=!0));if(r.videoCapabilities)for(u=(r=l(r.videoCapabilities)).next();!u.done;u=r.next())(s=u.value).contentType&&(a=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,s.contentType.split(";")[0])&&(i.videoCapabilities.push(s),o=!0));a||(o=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),i=o?i:null}if(i)return void(this.g=i)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Jh(e){this.g=new WebKitMediaKeys(e),this.h=new _i}function Qh(e,t){if(e.h.ob(),!t)return Promise.resolve();e.h.A(t,"webkitneedkey",Yh);try{return co(t,HTMLMediaElement.HAVE_METADATA,e.h,(function(){t.webkitSetMediaKeys(e.g)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function Zh(e){ra.call(this),this.j=null,this.l=e,this.i=this.g=null,this.h=new _i,this.sessionId="",this.expiration=NaN,this.closed=new hi,this.keyStatuses=new tp}function ep(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new na("keystatuseschange"),e.dispatchEvent(n)}function tp(){this.size=0,this.g=void 0}function np(){}function ip(){!e.HTMLVideoElement||!e.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,e.MediaKeys=up,e.MediaKeySystemAccess=op,navigator.requestMediaKeySystemAccess=rp,HTMLMediaElement.prototype.setMediaKeys=sp)}function rp(e,t){try{var n=new op(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function ap(e){if(e.initData){var t=new CustomEvent("encrypted");t.initDataType="cenc",t.initData=ae(function(e){if(!e)return e;var t=new Yl(e);if(1>=t.data.length)return e;e=[];for(var n={},i=(t=l(t.data)).next();!i.done;n={kc:n.kc},i=t.next())n.kc=i.value,e.some(function(e){return function(t){return ie(t,e.kc)}}(n))||e.push(n.kc);return rt.apply(Qe,c(e))}(e.initData)),this.dispatchEvent(t)}}function op(e,t){this.keySystem=e;for(var n=!1,i=l(t),r=i.next();!r.done;r=i.next()){var a={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(r=r.value).initDataTypes,sessionTypes:["temporary"],label:r.label},o=!1;if(r.audioCapabilities)for(var s=l(r.audioCapabilities),u=s.next();!u.done;u=s.next())(u=u.value).contentType&&(o=!0,MSMediaKeys.isTypeSupported(this.keySystem,u.contentType.split(";")[0])&&(a.audioCapabilities.push(u),n=!0));if(r.videoCapabilities)for(u=(s=l(r.videoCapabilities)).next();!u.done;u=s.next())(u=u.value).contentType&&(o=!0,MSMediaKeys.isTypeSupported(this.keySystem,u.contentType.split(";")[0])&&(a.videoCapabilities.push(u),n=!0));if(o||(n=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==r.persistentState&&(n=!1),n)return void(this.g=a)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function sp(e){var t=this.mediaKeys;return t&&t!=e&&lp(t,null),delete this.mediaKeys,(this.mediaKeys=e)?lp(e,this):Promise.resolve()}function up(e){this.g=new MSMediaKeys(e),this.h=new _i}function lp(e,t){if(e.h.ob(),!t)return Promise.resolve();e.h.A(t,"msneedkey",ap);try{return co(t,HTMLMediaElement.HAVE_METADATA,e.h,(function(){t.msSetMediaKeys(e.g)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function cp(e){ra.call(this),this.j=null,this.l=e,this.i=this.g=null,this.h=new _i,this.sessionId="",this.expiration=NaN,this.closed=new hi,this.keyStatuses=new fp}function dp(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new na("keystatuseschange"),e.dispatchEvent(n)}function fp(){this.size=0,this.g=void 0}function hp(){}function pp(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=gp,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=mp,e.MediaKeys=vp,e.MediaKeySystemAccess=yp)}function gp(){return Promise.reject(Error("The key system specified is not supported."))}function mp(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function vp(){throw new TypeError("Illegal constructor.")}function yp(){throw this.keySystem="",new TypeError("Illegal constructor.")}function bp(){}function wp(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Pp="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=xp,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Sp,e.MediaKeys=Ap,e.MediaKeySystemAccess=Ep}}function Tp(e){return Pp?Pp+e.charAt(0).toUpperCase()+e.slice(1):e}function xp(e,t){try{var n=new Ep(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Sp(e){var t=this.mediaKeys;return t&&t!=e&&kp(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&kp(e,this),Promise.resolve()}function Ep(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");for(var a=l(t),o=a.next();!o.done;o=a.next()){var s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(o=o.value).initDataTypes,sessionTypes:["temporary"],label:o.label},u=!1;if(o.audioCapabilities)for(var c=l(o.audioCapabilities),d=c.next();!d.done;d=c.next())(d=d.value).contentType&&(u=!0,r.canPlayType(d.contentType.split(";")[0],this.g)&&(s.audioCapabilities.push(d),i=!0));if(o.videoCapabilities)for(d=(c=l(o.videoCapabilities)).next();!d.done;d=c.next())(d=d.value).contentType&&(u=!0,r.canPlayType(d.contentType,this.g)&&(s.videoCapabilities.push(d),i=!0));if(u||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),"required"==o.persistentState&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):i=!1),i)return void(this.h=s)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),(n=Error(n)).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Ap(e){this.l=e,this.g=null,this.h=new _i,this.i=[],this.j=new Map}function kp(e,t){e.g=t,e.h.ob();var n=Pp;t&&(e.h.A(t,n+"needkey",(function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=ae(t.initData),e.g.dispatchEvent(n)})),e.h.A(t,n+"keymessage",(function(t){var n=Ip(e,t.sessionId);n&&(t=new na("message",t=(new Map).set("messageType",null==n.keyStatuses.g?"licenserequest":"licenserenewal").set("message",t.message)),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))})),e.h.A(t,n+"keyadded",(function(t){(t=Ip(e,t.sessionId))&&(Rp(t,"usable"),t.g&&t.g.resolve(),t.g=null)})),e.h.A(t,n+"keyerror",(function(t){var n=Ip(e,t.sessionId);n&&n.handleError(t)})))}function Ip(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 Mp(e,t,n){ra.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 hi,this.keyStatuses=new Np}function Cp(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=oe(ge("LOAD_SESSION|"+n));else{var r=ge("PERSISTENT|");i=rt(r,t)}else i=oe(t)}catch(e){return Promise.reject(e)}e.h=new hi;var a=Tp("generateKeyRequest");try{e.j[a](e.i,i)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new Be((function(){try{e.j[a](e.i,i)}catch(t){e.h.reject(t),e.h=null}})).V(.01)}return e.h}function Dp(e,t,n){if(e.g)e.g.then((function(){return Dp(e,t,n)})).catch((function(){return Dp(e,t,n)}));else{if(e.g=t,"webkit-org.w3.clearkey"==e.i){var i=fe(n),r=JSON.parse(i);"oct"!=r.keys[0].kty&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),i=tt(r.keys[0].k),r=tt(r.keys[0].kid)}else i=oe(n),r=null;var a=Tp("addKey");try{e.j[a](e.i,i,r,e.sessionId)}catch(t){e.g.reject(t),e.g=null}}}function Rp(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new na("keystatuseschange"),e.dispatchEvent(n)}function Np(){this.size=0,this.g=void 0}jh.originalMcap=Uh,kh(_h,-1),Ah.MediaSource=Fh,Fh.install=Bh,kh(Bh),Ah.Orientation=Hh,Hh.install=Kh,m(Gh,ra),Gh.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))},Gh.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},kh(Kh),Ah.PatchedMediaKeysApple=qh,qh.install=zh,$h.prototype.createMediaKeys=function(){var e=new Jh(this.keySystem);return Promise.resolve(e)},$h.prototype.getConfiguration=function(){return this.g},Jh.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Zh(this.g,e)},Jh.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(Zh,ra),(i=Zh.prototype).generateRequest=function(e,t){var n=this;this.g=new hi;try{var i=this.l.createSession("video/mp4",oe(t));this.j=i,this.sessionId=i.sessionId||"",this.h.A(this.j,"webkitkeymessage",(function(e){n.g&&(n.g.resolve(),n.g=null),e=new na("message",e=(new Map).set("messageType",null==n.keyStatuses.g?"license-request":"license-renewal").set("message",ae(e.message))),n.dispatchEvent(e)})),this.h.A(i,"webkitkeyadded",(function(){n.i&&(ep(n,"usable"),n.i.resolve(),n.i=null)})),this.h.A(i,"webkitkeyerror",(function(){var e=Error("EME PatchedMediaKeysApple key error");if(e.errorCode=n.j.error,null!=n.g)n.g.reject(e),n.g=null;else if(null!=n.i)n.i.reject(e),n.i=null;else switch(n.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ep(n,"output-not-allowed");break;default:ep(n,"internal-error")}})),ep(this,"status-pending")}catch(e){this.g.reject(e)}return this.g},i.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},i.update=function(e){this.i=new hi;try{this.j.update(oe(e))}catch(e){this.i.reject(e)}return this.i},i.close=function(){try{this.j.close(),this.closed.resolve(),this.h.ob()}catch(e){this.closed.reject(e)}return this.closed},i.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(i=tp.prototype).forEach=function(e){this.g&&e(this.g,Ya.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=Ya.value();return!(!this.g||!ie(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){},kh(zh),Ah.PatchedMediaKeysMs=np,np.install=ip,op.prototype.createMediaKeys=function(){var e=new up(this.keySystem);return Promise.resolve(e)},op.prototype.getConfiguration=function(){return this.g},up.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new cp(this.g,e)},up.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(cp,ra),(i=cp.prototype).generateRequest=function(e,t){var n=this;this.g=new hi;try{this.j=this.l.createSession("video/mp4",oe(t),null),this.h.A(this.j,"mskeymessage",(function(e){n.g&&(n.g.resolve(),n.g=null),e=new na("message",e=(new Map).set("messageType",null==n.keyStatuses.g?"license-request":"license-renewal").set("message",ae(e.message))),n.dispatchEvent(e)})),this.h.A(this.j,"mskeyadded",(function(){n.g?(dp(n,"usable"),n.g.resolve(),n.g=null):n.i&&(dp(n,"usable"),n.i.resolve(),n.i=null)})),this.h.A(this.j,"mskeyerror",(function(){var e=Error("EME PatchedMediaKeysMs key error");if(e.errorCode=n.j.error,null!=n.g)n.g.reject(e),n.g=null;else if(null!=n.i)n.i.reject(e),n.i=null;else switch(n.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:dp(n,"output-not-allowed");break;default:dp(n,"internal-error")}})),dp(this,"status-pending")}catch(e){this.g.reject(e)}return this.g},i.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},i.update=function(e){this.i=new hi;try{this.j.update(oe(e))}catch(e){this.i.reject(e)}return this.i},i.close=function(){try{this.j.close(),this.closed.resolve(),this.h.ob()}catch(e){this.closed.reject(e)}return this.closed},i.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(i=fp.prototype).forEach=function(e){this.g&&e(this.g,Ya.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=Ya.value();return!(!this.g||!ie(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){},kh(ip),Ah.PatchedMediaKeysNop=hp,hp.install=pp,vp.prototype.createSession=function(){},vp.prototype.setServerCertificate=function(){},yp.prototype.getConfiguration=function(){},yp.prototype.createMediaKeys=function(){},kh(pp,-10),Ah.PatchedMediaKeysWebkit=bp,bp.install=wp,Ep.prototype.createMediaKeys=function(){var e=new Ap(this.g);return Promise.resolve(e)},Ep.prototype.getConfiguration=function(){return this.h},Ap.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.g||document.createElement("video");return t.src||(t.src="about:blank"),e=new Mp(t,this.l,e),this.i.push(e),e},Ap.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(Mp,ra),(i=Mp.prototype).handleError=function(e){var t=Error("EME v0.1b key error"),n=e.errorCode;n.systemCode=e.systemCode,t.errorCode=n,!e.sessionId&&this.h?(45==e.systemCode&&(t.message="Unsupported session type."),this.h.reject(t),this.h=null):e.sessionId&&this.g?(this.g.reject(t),this.g=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Rp(this,"output-restricted"):Rp(this,1==t?"expired":"internal-error"))},i.generateRequest=function(e,t){return Cp(this,t,null)},i.load=function(e){return"persistent-license"==this.l?Cp(this,null,e):Promise.reject(Error("Not a persistent session."))},i.update=function(e){var t=new hi;return Dp(this,t,e),t},i.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Tp("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},i.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(i=Np.prototype).forEach=function(e){this.g&&e(this.g,Ya.value())},i.get=function(e){if(this.has(e))return this.g},i.has=function(e){var t=Ya.value();return!(!this.g||!ie(e,t))},i.entries=function(){},i.keys=function(){},i.values=function(){};var Pp="";function Lp(){}function jp(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=Op,Object.defineProperty(t,"disablePictureInPicture",{get:Fp,set:Bp,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Up,document.addEventListener("webkitpresentationmodechanged",_p,!0))}}function _p(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 Op(){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 Up(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function Fp(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Bp(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Vp(){}function Hp(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Kp)}function Kp(){return new Promise((function(e,t){navigator.webkitTemporaryStorage.queryUsageAndQuota((function(t,n){e({usage:t,quota:n})}),t)}))}function Gp(){}function qp(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}}function zp(){}function Xp(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=Wp)}}function Wp(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function Yp(){}function $p(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=Jp;else if(6==n)t=Qp;else{try{var i=!!Jp(1,2,"")}catch(e){i=!1}i&&(t=Jp)}t&&(e.VTTCue=function(e,n,i){return t(e,n,i)})}}function Jp(t,n,i){return new e.TextTrackCue(t,n,i)}function Qp(t,n,i){return new e.TextTrackCue(t+"-"+n+"-"+i,t,n,i)}function Zp(){}kh(wp),Ah.PiPWebkit=Lp,Lp.install=jp,kh(jp),Ah.StorageEstimate=Vp,Vp.install=Hp,kh(Hp),Ah.VideoPlayPromise=Gp,Gp.install=qp,kh(qp),Ah.VideoPlaybackQuality=zp,zp.install=Xp,kh(Xp),Ah.VTTCue=Yp,Yp.install=$p,kh($p),Zp.prototype.parseInit=function(){},Zp.prototype.parseMedia=function(e,t){for(var n=null,i=[],r=fe(e).split(/\r?\n/),a=(r=l(r)).next();!a.done;a=r.next())if((a=a.value)&&!/^\s+$/.test(a)&&(a=eg.exec(a))){var o=tg.exec(a[1]);a=new ft(o=60*parseInt(o[1],10)+parseFloat(o[2].replace(",",".")),t.segmentEnd?t.segmentEnd:o+2,a[2]),n&&(n.endTime=o,i.push(n)),n=a}return n&&i.push(n),i},B("shaka.text.LrcTextParser",Zp),Zp.prototype.parseMedia=Zp.prototype.parseMedia,Zp.prototype.parseInit=Zp.prototype.parseInit;var eg=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,tg=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function ng(){}function ig(e,t,n,i,r,a,o,s,u,c,d){var f=e.parentNode;if(e.nodeType==Node.COMMENT_NODE)return null;if(e.nodeType==Node.TEXT_NODE){if(!d)return null;var h=document.createElement("span");h.textContent=e.textContent}else h=e;for(var p=null,g=l(Cg),m=g.next();!m.done&&!(p=lg(h,"backgroundImage",i,"#",m.value)[0]);m=g.next());if(g=d,("p"==e.nodeName||p)&&(d=!0),s="default"==(h.getAttribute("xml:space")||(s?"default":"preserve")),e=[],!(m=Array.from(h.childNodes).every((function(e){return e.nodeType==Node.TEXT_NODE}))))for(var v=l(h.childNodes),y=v.next();!y.done;y=v.next())(y=ig(y.value,t,n,i,r,a,o,s,u,h,d))&&e.push(y);i=null!=c,v=/\S/.test(h.textContent);var b=h.hasAttribute("begin")||h.hasAttribute("end")||h.hasAttribute("dur");if(!(b||v||"br"==h.tagName||0!=e.length||i&&!s))return null;for(v=(y=dg(h,n)).start,y=y.end;f&&f.nodeType==Node.ELEMENT_NODE&&"tt"!=f.tagName;)v=(y=cg(f,n,v,y)).start,y=y.end,f=f.parentNode;if(null==v&&(v=0),v+=t,y=null==y?1/0:y+t,!b&&0<e.length)for(v=1/0,y=0,n=(t=l(e)).next();!n.done;n=t.next())n=n.value,v=Math.min(v,n.startTime),y=Math.max(y,n.endTime);if("br"==h.tagName)return(r=new ft(v,y,"")).lineBreak=!0,r;if(t="",m&&(t=h.textContent,s&&(t=(t=t.trim()).replace(/\s+/g," "))),(t=new ft(v,y,t)).nestedCues=e,d||(t.isContainer=!0),u&&(t.cellResolution=u),u=lg(h,"region",a,"")[0],h.hasAttribute("region")&&u&&u.getAttribute("xml:id")){var w=u.getAttribute("xml:id");t.region=o.filter((function(e){return e.id==w}))[0]}return o=u,c&&i&&!h.getAttribute("region")&&!h.getAttribute("style")&&(o=lg(c,"region",a,"")[0]),function(e,t,n,i,r,a,o){a=a||o,"rtl"==ag(t,n,r,"direction",a)&&(e.direction="rtl"),o=ag(t,n,r,"writingMode",a),"tb"==o||"tblr"==o?e.writingMode="vertical-lr":"tbrl"==o?e.writingMode="vertical-rl":"rltb"==o||"rl"==o?e.direction="rtl":o&&(e.direction=bt),(o=ag(t,n,r,"textAlign",!0))?(e.positionAlign=kg[o],e.lineAlign=Ag[o],e.textAlign=mt[o.toUpperCase()]):e.textAlign="start",(o=ag(t,n,r,"displayAlign",!0))&&(e.displayAlign=yt[o.toUpperCase()]);(o=ag(t,n,r,"color",a))&&(e.color=o);(o=ag(t,n,r,"backgroundColor",a))&&(e.backgroundColor=o);(o=ag(t,n,r,"border",a))&&(e.border=o);(o=ag(t,n,r,"fontFamily",a))&&(e.fontFamily=o);(o=ag(t,n,r,"fontWeight",a))&&"bold"==o&&(e.fontWeight=700),o=ag(t,n,r,"wrapOption",a),e.wrapLine=!o||"noWrap"!=o,(o=ag(t,n,r,"lineHeight",a))&&o.match(vg)&&(e.lineHeight=o),(o=ag(t,n,r,"fontSize",a))&&(o.match(vg)||o.match(mg))&&(e.fontSize=o),(o=ag(t,n,r,"fontStyle",a))&&(e.fontStyle=Mt[o.toUpperCase()]);if(i){o=i.getAttribute("imageType")||i.getAttribute("imagetype");var s=i.getAttribute("encoding");i=i.textContent.trim(),"PNG"==o&&"Base64"==s&&i&&(e.backgroundImage="data:image/png;base64,"+i)}(i=ag(t,n,r,"letterSpacing",a))&&i.match(vg)&&(e.letterSpacing=i),(i=ag(t,n,r,"linePadding",a))&&i.match(vg)&&(e.linePadding=i),(a=ag(t,n,r,"opacity",a))&&(e.opacity=parseFloat(a));(n=og(n,r,"textDecoration"))&&rg(e,n),(t=sg(t,r,"textDecoration"))&&rg(e,t)}(t,h,o,p,r,g,0==e.length),t}function rg(e,t){for(var n=l(t.split(" ")),i=n.next();!i.done;i=n.next())switch(i.value){case"underline":e.textDecoration.includes("underline")||e.textDecoration.push("underline");break;case"noUnderline":e.textDecoration.includes("underline")&<(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&<(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&<(e.textDecoration,"overline")}}function ag(e,t,n,i,r){return r=void 0===r||r,(e=sg(e,n,i))?e:r?og(t,n,i):null}function og(e,t,n){if(!e)return null;var i=nc(e,Mg,n);return i||ug(e,t,n)}function sg(e,t,n){var i=nc(e,Mg,n);return i||ug(e,t,n)}function ug(e,t,n){e=lg(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var a=tc(e[r],"urn:ebu:tt:style",n);a||(a=nc(e[r],Mg,n)),a||(a=sg(e[r],t,n)),a&&(i=a)}return i}function lg(e,t,n,i,r){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;o&&!(e=r?tc(o,r,t):o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e)for(r=(t=l(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,o=(e=l(n)).next();!o.done;o=e.next())if(i+(o=o.value).getAttribute("xml:id")==r){a.push(o);break}return a}function cg(e,t,n,i){return e=dg(e,t),null==n?n=e.start:null!=e.start&&(n+=e.start),null==i?i=e.end:null!=e.start&&(i+=e.start),{start:n,end:i}}function dg(e,t){var n=fg(e.getAttribute("begin"),t),i=fg(e.getAttribute("end"),t),r=fg(e.getAttribute("dur"),t);return null==i&&null!=r&&(i=n+r),{start:n,end:i}}function fg(e,t){var n=null;if(bg.test(e)){n=bg.exec(e);var i=Number(n[1]),r=Number(n[2]),a=Number(n[3]),o=Number(n[4]);n=(a+=(o+=(Number(n[5])||0)/t.h)/t.frameRate)+60*r+3600*i}else if(wg.test(e))n=hg(wg,e);else if(Tg.test(e))n=hg(Tg,e);else if(xg.test(e))n=xg.exec(e),n=Number(n[1])/t.frameRate;else if(Sg.test(e))n=Sg.exec(e),n=Number(n[1])/t.g;else if(Eg.test(e))n=hg(Eg,e);else if(e)throw new le(2,2,2001,"Could not parse cue time range in TTML");return n}function hg(e,t){var n=e.exec(t);return null==n||""==n[0]?null:(Number(n[4])||0)/1e3+(Number(n[3])||0)+60*(Number(n[2])||0)+3600*(Number(n[1])||0)}function pg(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]))}Ri["application/x-subtitle-lrc"]=function(){return new Zp},ng.prototype.parseInit=function(){},ng.prototype.parseMedia=function(e,t){var n=fe(e),i=[],r=new DOMParser,a=null;if(""==n)return i;try{a=r.parseFromString(n,"text/xml")}catch(e){throw new le(2,2,2005,"Failed to parse TTML.")}if(a){if(n=a.getElementsByTagName("parsererror")[0])throw new le(2,2,2005,n.textContent);var o=a.getElementsByTagName("tt")[0];if(!o)throw new le(2,2,2005,"TTML does not contain <tt> tag.");if(!(a=o.getElementsByTagName("body")[0]))return[];var s=nc(o,Ig,"frameRate"),u=nc(o,Ig,"subFrameRate"),c=nc(o,Ig,"frameRateMultiplier"),d=nc(o,Ig,"tickRate"),f=nc(o,Ig,"cellResolution");if(n=o.getAttribute("xml:space")||"default",r=nc(o,Mg,"extent"),"default"!=n&&"preserve"!=n)throw new le(2,2,2005,"Invalid xml:space value: "+n);n="default"==n,s=new pg(s,u,c,d),f=f&&(f=/^(\d+) (\d+)$/.exec(f))?{columns:parseInt(f[1],10),rows:parseInt(f[2],10)}:null,u=(u=o.getElementsByTagName("metadata")[0])?function(e){return Array.from(e.childNodes).filter((function(e){return e instanceof Element}))}(u):[],c=Array.from(o.getElementsByTagName("style")),d=[];for(var h=l(o=Array.from(o.getElementsByTagName("region"))),p=h.next();!p.done;p=h.next()){var g=p.value;p=new Ct;var m=g.getAttribute("xml:id");if(m){p.id=m;var v,y,b=null;r&&(b=gg.exec(r)||yg.exec(r)),m=b?Number(b[1]):null,b=b?Number(b[2]):null,(v=og(g,c,"extent"))&&(null!=(v=(y=gg.exec(v))||yg.exec(v))&&(p.width=Number(v[1]),p.height=Number(v[2]),y||(null!=m&&(p.width=100*p.width/m),null!=b&&(p.height=100*p.height/b)),p.widthUnits=y||null!=m?Dt:0,p.heightUnits=y||null!=b?Dt:0)),(g=og(g,c,"origin"))&&(null!=(v=(y=gg.exec(g))||yg.exec(g))&&(p.viewportAnchorX=Number(v[1]),p.viewportAnchorY=Number(v[2]),y||(null!=b&&(p.viewportAnchorY=100*p.viewportAnchorY/b),null!=m&&(p.viewportAnchorX=100*p.viewportAnchorX/m)),p.viewportAnchorUnits=y||null!=m?Dt:0))}else p=null;p&&d.push(p)}if(Zl(a,"p").length)throw new le(2,2,2001,"<p> can only be inside <div> in TTML");for(h=(r=l(Zl(a,"div"))).next();!h.done;h=r.next())if(Zl(h.value,"span").length)throw new le(2,2,2001,"<span> can only be inside <p> in TTML");(a=ig(a,t.periodStart,s,u,c,o,d,n,f,null,!1))&&i.push(a)}return i},B("shaka.text.TtmlTextParser",ng),ng.prototype.parseMedia=ng.prototype.parseMedia,ng.prototype.parseInit=ng.prototype.parseInit;var gg=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,mg=/^(\d{1,2}(?:\.\d+)?|100)%$/,vg=/^(\d+px|\d+em|\d*\.?\d+c)$/,yg=/^(\d+)px (\d+)px$/,bg=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,wg=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Tg=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,xg=/^(\d*(?:\.\d*)?)f$/,Sg=/^(\d*(?:\.\d*)?)t$/,Eg=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Ag={left:xt,center:"center",right:"end",start:xt,end:"end"},kg={left:"line-left",center:"center",right:"line-right"},Ig=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Mg=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Cg=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function Dg(){this.s=new ng}function Rg(){}function Ng(e){for(var t=l(Object.entries(Et)),n=t.next();!n.done;n=t.next()){var i=l(n.value);n=i.next().value,i=i.next().value;var r=new ft(0,0,"");r.color=i,e.set(n,r)}for(n=(t=l(Object.entries(At))).next();!n.done;n=t.next())n=(i=l(n.value)).next().value,i=i.next().value,(r=new ft(0,0,"")).backgroundColor=i,e.set(n,r)}function Pg(e,t,n){0===n.size&&Ng(n),e=function(e){for(var t=[],n=-1,i="",r=0;r<e.length;r++)if("/"===e[r]){var a=e.indexOf(">",r);if(a<=r)return e;a=e.substring(r+1,a);var o=t.pop();if(!a||!o)return e;if(o===a)i+="/"+a+">";else{if(!o.startsWith("c.")||"c"!==a)return e;i+="/"+o+">"}r+=a.length+1}else"<"===e[r]?n=r+1:">"===e[r]&&0<n&&(t.push(e.substr(n,r-n)),n=-1),i+=e[r];return i}(e);var i=pc("<span>"+e+"</span>","span");if(i){var r=[];if(1==(i=i.childNodes).length){var a=i[0];if(a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE)return void(t.payload=e)}for(i=(e=l(i)).next();!i.done;i=e.next())jg(i.value,t,r,n);t.nestedCues=r}else t.payload=e}function Lg(e,t){return e&&0<e.length?e:t}function jg(e,t,n,i){var r=t.clone();if(e.nodeType===Node.ELEMENT_NODE&&e.nodeName)for(var a=l(e.nodeName.split(/[ .]+/)),o=a.next();!o.done;o=a.next()){if(o=o.value,i.has(o)){var s=i.get(o);s&&(r.backgroundColor=Lg(s.backgroundColor,r.backgroundColor),r.color=Lg(s.color,r.color),r.fontFamily=Lg(s.fontFamily,r.fontFamily),r.fontSize=Lg(s.fontSize,r.fontSize),r.fontWeight=s.fontWeight,r.fontStyle=s.fontStyle,r.opacity=s.opacity,r.wrapLine=s.wrapLine)}switch(o){case"b":r.fontWeight=700;break;case"i":r.fontStyle="italic";break;case"u":r.textDecoration.push("underline")}}if(rc(e))for(a=!0,i=l(e.textContent.split("\n")),e=i.next();!e.done;e=i.next())e=e.value,a||((a=t.clone()).lineBreak=!0,n.push(a)),0<e.length&&((a=r.clone()).payload=e,n.push(a)),a=!1;else for(e=(t=l(e.childNodes)).next();!e.done;e=t.next())jg(e.value,r,n,i)}function _g(e,t,n){var i;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=i[1],e.textAlign="middle"==t?gt:mt[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|center|start|end))?$/.exec(t))?(e.position=Number(i[1]),i[2]&&(t=i[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center")):(i=/^region:(.*)$/.exec(t))?(t=function(e,t){var n=e.filter((function(e){return e.id==t}));return n.length?n[0]:null}(n,i[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=St[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=Tt,e.line=Number(n[1]),n[2]&&(e.lineAlign=St[n[2].toUpperCase()]))}function Og(e){if(null==(e=Od(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function Ug(){this.g=null}function Fg(e,t,n){var i,r,a;return(new De).box("payl",Pe((function(e){i=fe(e)}))).box("iden",Pe((function(e){r=fe(e)}))).box("sttg",Pe((function(e){a=fe(e)}))).parse(e),i?function(e,t,n,i,r){if(i=new ft(i,r,""),Pg(e,i,new Map),t&&(i.id=t),n)for(e=new jd(n),t=Ud(e);t;)_g(i,t,[]),_d(e),t=Ud(e);return i}(i,r,a,t,n):null}function Bg(){}function Vg(e){if(null==(e=Od(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function Hg(){this.s=new Rg}function Kg(e){var t="WEBVTT\n\n";if(""==e)return t;for(var n=(e=l((e=(e=e.replace(/\r+/g,"")).trim()).split("\n\n"))).next();!n.done;n=e.next())(n=n.value.split(/\n/))[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join("\n")+"\n\n";return t}function Gg(){}function qg(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=zg(n))&&(e.color=n),(n=t.BackColour)&&(n=zg(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=700),t.Italic&&(e.fontStyle="italic"),t.Underline&&e.textDecoration.push("underline"),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=vt,e.textAlign="start";break;case 2:e.displayAlign=vt,e.textAlign=gt;break;case 3:e.displayAlign=vt,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=gt;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=gt;break;case 11:e.displayAlign="center",e.textAlign="end"}(n=t.AlphaLevel)&&(e.opacity=parseFloat(n))}function zg(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 Xg(e){return 3600*((e=Zg.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Ri["application/ttml+xml"]=function(){return new ng},Dg.prototype.parseInit=function(e){var t=!1;if((new De).box("moov",Re).box("trak",Re).box("mdia",Re).box("minf",Re).box("stbl",Re).T("stsd",Ne).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new le(2,2,2007)},Dg.prototype.parseMedia=function(e,t){var n=this,i=!1,r=[];if((new De).box("mdat",Pe((function(e){i=!0,r=r.concat(n.s.parseMedia(e,t))}))).parse(e,!1),!i)throw new le(2,2,2007);return r},B("shaka.text.Mp4TtmlParser",Dg),Dg.prototype.parseMedia=Dg.prototype.parseMedia,Dg.prototype.parseInit=Dg.prototype.parseInit,Ri['application/mp4; codecs="stpp"']=function(){return new Dg},Ri['application/mp4; codecs="stpp.ttml"']=function(){return new Dg},Ri['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Dg},Ri['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Dg},Rg.prototype.parseInit=function(){},Rg.prototype.parseMedia=function(e,t){var n=fe(e),i=(n=n.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(i[0]))throw new le(2,2,2e3);if(n=t.periodStart,i[0].includes("X-TIMESTAMP-MAP")){var r=i[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),a=i[0].match(/MPEGTS:(\d+)/m);if(r&&a){if(null==(n=Og(new jd(r[1]))))throw new le(2,2,2e3);for(a=Number(a[1]),r=t.segmentStart;95443.7176888889<=r;)r-=95443.7176888889,a+=8589934592;n=t.periodStart+a/9e4-n}}a=[];for(var o=(r=l(i[0].split("\n"))).next();!o.done;o=r.next())if(o=o.value,/^Region:/.test(o)){o=new jd(o);var s=new Ct;Ud(o),_d(o);for(var u=Ud(o);u;){var c=s,d=u;(u=/^id=(.*)$/.exec(d))?c.id=u[1]:(u=/^width=(\d{1,2}|100)%$/.exec(d))?c.width=Number(u[1]):(u=/^lines=(\d+)$/.exec(d))?(c.height=Number(u[1]),c.heightUnits=2):(u=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.regionAnchorX=Number(u[1]),c.regionAnchorY=Number(u[2])):(u=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.viewportAnchorX=Number(u[1]),c.viewportAnchorY=Number(u[2])):/^scroll=up$/.exec(d)&&(c.scroll="up"),_d(o),u=Ud(o)}a.push(s)}for(Ng(r=new Map),o=[],s=(i=l(i.slice(1))).next();!s.done;s=i.next()){if((1!=(s=s.value.split("\n")).length||s[0])&&!/^NOTE($|[ \t])/.test(s[0])&&"STYLE"==s[0]&&s[1].includes("::cue")){c="global",(u=s[1].match(/\((.*)\)/))&&(c=u.pop()),u=s.slice(2,-1),s[1].includes("}")&&(d=/\{(.*?)\}/.exec(s[1]))&&(u=d[1].split(";")),d=new ft(0,0,"");for(var f=!1,h=0;h<u.length;h++){var p=/^\s*([^:]+):\s*(.*)/.exec(u[h]);if(p){var g=p[2].trim().replace(";","");switch(p[1].trim()){case"background-color":f=!0,d.backgroundColor=g;break;case"color":f=!0,d.color=g;break;case"font-family":f=!0,d.fontFamily=g;break;case"font-size":f=!0,d.fontSize=g;break;case"font-weight":700<=parseInt(g,10)&&(f=!0,d.fontWeight=700);break;case"font-style":switch(g){case"normal":f=!0,d.fontStyle=It;break;case"italic":f=!0,d.fontStyle="italic";break;case"oblique":f=!0,d.fontStyle="oblique"}break;case"opacity":f=!0,d.opacity=parseFloat(g);break;case"white-space":f=!0,d.wrapLine="noWrap"!=g}}}f&&r.set(c,d)}if(h=n,1==s.length&&!s[0]||/^NOTE($|[ \t])/.test(s[0])||"STYLE"==s[0])s=null;else{if(c=null,s[0].includes("--\x3e")||(c=s[0],s.splice(0,1)),d=Og(u=new jd(s[0])),p=Od(u,/[ \t]+--\x3e[ \t]+/g),f=Og(u),null==d||null==p||null==f)throw new le(2,2,2001,"Could not parse cue time range in WebVTT");for(d+=h,f+=h,h=s.slice(1).join("\n").trim(),r.has("global")?((s=r.get("global").clone()).startTime=d,s.endTime=f,s.payload=""):s=new ft(d,f,""),Pg(h,s,r),_d(u),d=Ud(u);d;)_g(s,d,a),_d(u),d=Ud(u);null!=c&&(s.id=c)}s&&o.push(s)}return o},B("shaka.text.VttTextParser",Rg),Rg.prototype.parseMedia=Rg.prototype.parseMedia,Rg.prototype.parseInit=Rg.prototype.parseInit,Ri["text/vtt"]=function(){return new Rg},Ri['text/vtt; codecs="vtt"']=function(){return new Rg},Ri['text/vtt; codecs="wvtt"']=function(){return new Rg},Ug.prototype.parseInit=function(e){var t=this,n=!1;if((new De).box("moov",Re).box("trak",Re).box("mdia",Re).T("mdhd",(function(e){e=On(e.reader,e.version),t.g=e.timescale})).box("minf",Re).box("stbl",Re).T("stsd",Ne).box("wvtt",(function(){n=!0})).parse(e),!this.g)throw new le(2,2,2008);if(!n)throw new le(2,2,2008)},Ug.prototype.parseMedia=function(e,t){if(!this.g)throw new le(2,2,2008);var n,i=0,r=[],a=[],o=!1,s=!1,u=!1,c=null;if((new De).box("moof",Re).box("traf",Re).T("tfdt",(function(e){o=!0,i=_n(e.reader,e.version).fd})).T("tfhd",(function(e){c=jn(e.reader,e.flags).Xd})).T("trun",(function(e){s=!0,r=Un(e.reader,e.version,e.flags).ne})).box("mdat",Pe((function(e){u=!0,n=e}))).parse(e,!1),!u&&!o&&!s)throw new le(2,2,2008);for(var d=i,f=new ye(n,0),h=l(r),p=h.next();!p.done;p=h.next()){var g=(p=p.value).Gd||c,m=p.Mc?i+p.Mc:d;d=m+(g||0);var v=0;do{var y=f.N();v+=y;var b=null;"vttc"==je(f.N())?8<y&&(b=f.bb(y-8)):f.skip(y-8),g&&b&&(y=Fg(b,t.periodStart+m/this.g,t.periodStart+d/this.g),a.push(y))}while(p.sampleSize&&v<p.sampleSize)}return a.filter(Me)},B("shaka.text.Mp4VttParser",Ug),Ug.prototype.parseMedia=Ug.prototype.parseMedia,Ug.prototype.parseInit=Ug.prototype.parseInit,Ri['application/mp4; codecs="wvtt"']=function(){return new Ug},Bg.prototype.parseInit=function(){},Bg.prototype.parseMedia=function(e){var t=fe(e).replace(/\r+/g,"");if(e=[],""==(t=t.trim()))return e;for(var n=(t=l(t.split("\n\n"))).next();!n.done;n=t.next()){var i=new jd((n=n.value.split("\n"))[0]),r=Vg(i),a=Od(i,/,/g);if(i=Vg(i),null==r||null==a||null==i)throw new le(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new ft(r,i,n.slice(1).join("\n").trim()))}return e},B("shaka.text.SbvTextParser",Bg),Bg.prototype.parseMedia=Bg.prototype.parseMedia,Bg.prototype.parseInit=Bg.prototype.parseInit,Ri["text/x-subviewer"]=function(){return new Bg},Hg.prototype.parseInit=function(){},Hg.prototype.parseMedia=function(e,t){var n=fe(e);return n=oe(ge(n=Kg(n))),this.s.parseMedia(n,t)},B("shaka.text.SrtTextParser",Hg),Hg.srt2webvtt=Kg,Hg.prototype.parseMedia=Hg.prototype.parseMedia,Hg.prototype.parseInit=Hg.prototype.parseInit,Ri["text/srt"]=function(){return new Hg},Gg.prototype.parseInit=function(){},Gg.prototype.parseMedia=function(e){for(var t="",n="",i=(e=l(e=fe(e).split(/\r?\n\s*\r?\n/))).next();!i.done;i=e.next()){var r=$g.exec(i.value);r&&(i=r[1],r=r[2],"V4 Styles"==i||"V4+ Styles"==i?t=r:"Events"==i&&(n=r))}e=[],i=null;for(var a=(t=l(t.split(/\r?\n/))).next();!a.done;a=t.next())if(r=a.value,!/^\s*;/.test(r)&&(a=Jg.exec(r)))if(r=a[1].trim(),a=a[2].trim(),"Format"==r)i=a.split(Qg);else if("Style"==r){r=a.split(Qg),a={};for(var o=0;o<i.length&&o<r.length;o++)a[i[o]]=r[o];e.push(a)}for(i=[],t=null,r={},a=(n=l(n.split(/\r?\n/))).next();!a.done;r={bd:r.bd},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=Jg.exec(a)))if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(Qg);else if("Dialogue"==a){o=o.split(Qg),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new ft(s=Xg(a.Start),Xg(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),r.bd=a.Style,(a=e.find(function(e){return function(t){return t.Name==e.bd}}(r)))&&qg(o,a),i.push(o)}return i},B("shaka.text.SsaTextParser",Gg),Gg.prototype.parseMedia=Gg.prototype.parseMedia,Gg.prototype.parseInit=Gg.prototype.parseInit;var Wg,Yg,$g=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Jg=/^\s*([^:]+):\s*(.*)/,Qg=/\s*,\s*/,Zg=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function em(){}function tm(){Wg?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Wg=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=nm):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function nm(e,t){var n,i=this;return P((function(r){return 1==r.g?(console.assert(i==navigator,'bad "this" for requestMediaKeySystemAccess'),w(r,Wg.call(i,e,t),2)):dm(n=r.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Wg,r.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=im,r.return(im.call(i,e,t)))}))}function im(e,t){var n,i,r,a,o,s,u,c,d,f,h=this;return P((function(p){if(1==p.g){for(console.assert(h==navigator,'bad "this" for requestMediaKeySystemAccess'),n=cm(e),i=[],r=l(t),a=r.next();!a.done;a=r.next())o=a.value,s=rm(o.videoCapabilities,n),u=rm(o.audioCapabilities,n),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!u.length||((c=Object.assign({},o)).videoCapabilities=s,c.audioCapabilities=u,i.push(c));if(!i.length)throw(d=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",d.code=DOMException.NOT_SUPPORTED_ERR,d;return w(p,Wg.call(h,e,i),2)}return f=p.h,p.return(new lm(f,n))}))}function rm(e,t){return e?e.filter((function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function am(){}function om(){Yg?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Yg=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=sm):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function sm(e){var t,n,i=this;return P((function(r){return 1==r.g?(console.assert(i==navigator.mediaCapabilities,'bad "this" for decodingInfo'),w(r,Yg.call(i,e),2)):(t=r.h,e.keySystemConfiguration?(n=t.keySystemAccess)&&dm(n)?(console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Yg,r.return(t)):(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=um,r.return(um.call(i,e))):r.return(t))}))}function um(e){var t,n,i,r,a,o,s,u,l,c=this;return P((function(d){switch(d.g){case 1:return console.assert(c==navigator.mediaCapabilities,'bad "this" for decodingInfo'),t=null,e.keySystemConfiguration&&(n=e.keySystemConfiguration,i=n.keySystem,r=n.audio&&n.audio.encryptionScheme,a=n.video&&n.video.encryptionScheme,t=cm(i),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},r&&r!=t||a&&a!=t)?d.return(o):w(d,Yg.call(c,e),2);case 2:if((s=d.h).keySystemAccess){s.keySystemAccess=new lm(s.keySystemAccess,t),d.v(3);break}if(!e.keySystemConfiguration){d.v(3);break}var f=e.keySystemConfiguration,h=[],p=[];return f.audio&&h.push({robustness:f.audio.robustness||"",contentType:e.audio.contentType}),f.video&&p.push({robustness:f.video.robustness||"",contentType:e.video.contentType}),f={initDataTypes:f.initDataType?[f.initDataType]:[],distinctiveIdentifier:f.distinctiveIdentifier,persistentState:f.persistentState,sessionTypes:f.sessionTypes},h.length&&(f.audioCapabilities=h),p.length&&(f.videoCapabilities=p),u=f,l=s,w(d,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[u]),5);case 5:l.keySystemAccess=d.h;case 3:return d.return(s)}}))}function lm(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function cm(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function dm(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function fm(){}function hm(){tm(),om()}Ri["text/x-ssa"]=function(){return new Gg},B("EmeEncryptionSchemePolyfill",em),em.install=tm,B("McEncryptionSchemePolyfill",am),am.install=om,lm.prototype.getConfiguration=function(){var e=this.h.getConfiguration();if(e.videoCapabilities)for(var t=l(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.g;if(e.audioCapabilities)for(n=(t=l(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.g;return e},lm.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},B("EncryptionSchemePolyfills",fm),fm.install=hm,void 0!==n&&n.exports&&(n.exports=fm)}.call(i,n,n,void 0),i.shaka)t[r]=i.shaka[r]}()}).call(this,n(31))}}]);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.09 |
proxy
|
phpinfo
|
Settings