/* @license Shaka Player Copyright 2016 Google LLC SPDX-License-Identifier: Apache-2.0 */ (function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/* Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ var p;function aa(a){var b=0;return function(){return b>>0)+"_",e=0;return b}); fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;cc&&(c=Math.max(c+e,0));ce||1114111=e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}}); function Ra(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e=f}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Na(b,d)&&c.push([d,b[d]]);return c}}); var Sa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;cb||1342177279>>=1)c+=c;return d}});fa("Number.EPSILON",function(){return Math.pow(2,-52)}); fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});fa("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Na(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}}); fa("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Pa(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0=e}});fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});function Ta(a){a=Math.trunc(a)||0;0>a&&(a+=this.length);if(!(0>a||a>=this.length))return this[a]} fa("Array.prototype.at",function(a){return a?a:Ta});function Va(a){return a?a:Ta}fa("Int8Array.prototype.at",Va);fa("Uint8Array.prototype.at",Va);fa("Uint8ClampedArray.prototype.at",Va);fa("Int16Array.prototype.at",Va);fa("Uint16Array.prototype.at",Va);fa("Int32Array.prototype.at",Va);fa("Uint32Array.prototype.at",Va);fa("Float32Array.prototype.at",Va);fa("Float64Array.prototype.at",Va);fa("String.prototype.at",function(a){return a?a:Ta});var Wa=this||self; function S(a,b){a=a.split(".");var c=Wa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/* @license Shaka Player Copyright 2016 Google LLC SPDX-License-Identifier: Apache-2.0 */ function Xa(){}function Ya(){};function T(a,b){if(b)if(b instanceof Map)for(var c=u(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1} function Za(a){var b=new T(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}T.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};T.prototype.stopImmediatePropagation=function(){this.g=!0};T.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",T); var $a={wl:"abrstatuschanged",xl:"adaptation",yl:"audiotrackchanged",zl:"buffering",Al:"complete",Bl:"downloadcompleted",Cl:"downloadfailed",Dl:"downloadheadersreceived",El:"drmsessionupdate",Gl:"emsg",$l:"prft",Error:"error",Hl:"expirationupdated",Il:"firstquartile",Jl:"gapjumped",Ml:"keystatuschanged",Ql:"loaded",Rl:"loading",Tl:"manifestparsed",Ul:"manifestupdated",Vl:"mediaqualitychanged",Wl:"mediasourcerecovered",Metadata:"metadata",Xl:"midpoint",Yl:"nospatialvideoinfo",Zl:"onstatechange",am:"ratechange", cm:"segmentappended",dm:"sessiondata",em:"spatialvideoinfo",fm:"stalldetected",gm:"started",hm:"statechanged",im:"streaming",jm:"textchanged",lm:"texttrackvisibility",mm:"thirdquartile",nm:"timelineregionadded",om:"timelineregionenter",pm:"timelineregionexit",qm:"trackschanged",sm:"unloading",um:"variantchanged"};function ab(){}function bb(){}function cb(){}function db(a){var b=Ma.apply(1,arguments);eb.has(a)||(eb.add(a),cb.apply(ab,x(b)))}function fb(){}function gb(){}function ib(){}var eb=new Set;window.console&&(cb=function(){return console.warn.apply(console,x(Ma.apply(0,arguments)))},bb=function(){console.error.apply(console,x(Ma.apply(0,arguments)))});function jb(){this.g={}}p=jb.prototype;p.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};p.get=function(a){return(a=this.g[a])?a.slice():null};p.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};p.forEach=function(a){for(var b in this.g)a(b,this.g[b])};p.size=function(){return Object.keys(this.g).length};p.keys=function(){return Object.keys(this.g)};function kb(){this.Va=new jb;this.re=this}kb.prototype.addEventListener=function(a,b){this.Va&&this.Va.push(a,b)};kb.prototype.removeEventListener=function(a,b){this.Va&&this.Va.remove(a,b)};kb.prototype.dispatchEvent=function(a){if(!this.Va)return!0;var b=this.Va.get(a.type)||[],c=this.Va.get("All");c&&(b=b.concat(c));b=u(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.re;a.currentTarget=this.re;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented}; kb.prototype.release=function(){this.Va=null};function lb(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function mb(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function pb(a,b){a=u(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function qb(a,b){var c=[];a=u(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/* @license Copyright 2008 The Closure Library Authors SPDX-License-Identifier: Apache-2.0 */ var rb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/* @license Copyright 2006 The Closure Library Authors SPDX-License-Identifier: Apache-2.0 */ function sb(a){var b;a instanceof sb?(tb(this,a.$b),this.bd=a.bd,vb(this,a.Kb),wb(this,a.yd),this.rb=a.rb,xb(this,a.g.clone()),this.Kc=a.Kc):a&&(b=String(a).match(rb))?(tb(this,b[1]||"",!0),this.bd=yb(b[2]||""),vb(this,b[3]||"",!0),wb(this,b[4]),this.rb=yb(b[5]||"",!0),xb(this,b[6]||"",!0),this.Kc=yb(b[7]||"")):this.g=new zb(null)}p=sb.prototype;p.$b="";p.bd="";p.Kb="";p.yd=null;p.rb="";p.Kc=""; p.toString=function(){var a=[],b=this.$b;b&&a.push(Ab(b,Bb,!0),":");if(b=this.Kb){a.push("//");var c=this.bd;c&&a.push(Ab(c,Bb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.yd;null!=b&&a.push(":",String(b))}if(b=this.rb)this.Kb&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ab(b,"/"==b.charAt(0)?Cb:Db,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Kc)&&a.push("#",Ab(b,Fb));return a.join("")}; p.resolve=function(a){var b=this.clone();"data"===b.$b&&(b=new sb);var c=!!a.$b;c?tb(b,a.$b):c=!!a.bd;c?b.bd=a.bd:c=!!a.Kb;c?vb(b,a.Kb):c=null!=a.yd;var d=a.rb;if(c)wb(b,a.yd);else if(c=!!a.rb){if("/"!=d.charAt(0))if(this.Kb&&!this.rb)d="/"+d;else{var e=b.rb.lastIndexOf("/");-1!=e&&(d=b.rb.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;gb)throw Error("Bad port number "+b);a.yd=b}else a.yd=null} function xb(a,b,c){b instanceof zb?a.g=b:(c||(b=Ab(b,Gb)),a.g=new zb(b))}function yb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ab(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Hb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Hb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Bb=/[#\/\?@]/g,Db=/[#\?:]/g,Cb=/[#\?]/g,Gb=/[#\?@]/g,Fb=/#/g;function zb(a){this.g=a||null} function Ib(a){if(!a.hb&&(a.hb={},a.Md=0,a.g))for(var b=a.g.split("&"),c=0;c=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128== (a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b} function Cc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new U(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Qb(a);for(var e=0;e=c[d]}if(!a)return"";var c=Mb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Bc(c);if(254==c[0]&&255==c[1])return Cc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Cc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Cc(a,!1);if(0==c[1]&&0==c[3])return Cc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(a);throw new U(2,2,2003);} function Fc(a){if(window.TextEncoder&&!oc()){var b=new TextEncoder;return Nb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c",""":'"',"'":"'"," ":"\u00a0","‎":"\u200e","‏":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",Ac);Ac.resetFromCharCode=function(){Hc.g=void 0}; Ac.toUTF16=Gc;Ac.toUTF8=Fc;Ac.fromBytesAutoDetect=Ec;Ac.fromUTF16=Cc;Ac.fromUTF8=Bc;var Hc=new Sb(function(){function a(c){try{var d=new Uint8Array(c);return 0",e);g=a.substring(g,e);var k=g.indexOf(f);if(-1==k){var l=f.indexOf(".");0",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var q=a.charCodeAt(e);if(64q||96q){q=d();for(var r=a.charCodeAt(e);r&&39!==r&&34!==r&&!(64r||96 r)&&62!==r;)e++,r=a.charCodeAt(e);var t=e+1;e=a.indexOf(a[e],t);t=a.slice(t,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")} function ke(a){return"string"===typeof a}function le(a){var b=[];if(!a.children)return[];a=u(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function me(a,b){var c=[];if(!a.children)return[];a=u(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function ne(a){if("string"===typeof a)return Ic(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:Ic(a)} function oe(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=ne(a))&&(a=a.trim());return a}function pe(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=u(a.children);for(var d=a.next();!d.done;d=a.next())pe(d.value,b,c)}return c}function qe(a,b){a=me(a,b);return 1!=a.length?null:a[0]}function se(a,b,c){a=te(a,b,c);return 1!=a.length?null:a[0]} function we(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function xe(a,b,c){b=he(b);return a.attributes[b+":"+c]||null}function te(a,b,c){var d=he(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=u(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function ye(a,b,c){b=u(b);for(var d=b.next();!d.done;d=b.next())if(d=xe(a,d.value,c))return d;return null} function ze(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function Ae(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null} function Be(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function Ce(a){a=Number(a);return 0===a%1?a:null}function De(a){a=Number(a);return 0===a%1&&0"===d[f]&&0",'
'),d+="
";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h",h);if(-1===k){c=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&& (l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0","<"+g+">"),c=c.replace("",""),d||(c+="")}c=ef(c);a.payload="";try{var m=fe(""+c+"","span")}catch(n){}if(m)if(m=m.children,1!= m.length||m[0].tagName)for(m=u(m),c=m.next();!c.done;c=m.next())ff(c.value,a,b);else a.payload=Ic(c);else a.payload=Ic(c)}else a.payload=Ic(c)}function cf(a){for(var b=u(Object.entries(gf)),c=b.next();!c.done;c=b.next()){var d=u(c.value);c=d.next().value;d=d.next().value;var e=new Pe(0,0,"");e.color=d;a.set("."+c,e)}b=u(Object.entries(hf));for(c=b.next();!c.done;c=b.next())d=u(c.value),c=d.next().value,d=d.next().value,e=new Pe(0,0,""),e.backgroundColor=d,a.set("."+c,e)} function ef(a){var b={"< ":""," >":" >"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""} function ff(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Nd;d.position=null;d.size=0;d.textAlign=Re;if(a.tagName)for(var e=u(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=jf(g.backgroundColor,h.backgroundColor),h.color=jf(g.color,h.color),h.fontFamily=jf(g.fontFamily,h.fontFamily), h.fontSize=jf(g.fontSize,h.fontSize),h.textShadow=jf(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=$e(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=kf;break;case "i":d.fontStyle=lf;break;case "u":d.textDecoration.push(mf);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break; if(f=ae(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(ke(a)||1==e.length&&ke(e[0]))for(c=ne(a).split("\n"),a=!0,c=u(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=$e(d.startTime,d.endTime),b.nestedCues.push(a)),0=a.l&&r.startTime=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&bc.g&&b>=c.h&&(c.h=a));H(d)})};function Rf(a,b,c){a.l=b;a.m=c}function Sf(a,b,c){a.G=b;if(b=a.s.get(b))for(var d=u(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)} function Tf(a,b,c){b.startTime+=c;b.endTime+=c;b=u(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Tf(a,d.value,c)} function Uf(a,b,c,d,e){var f=c+" "+d,g=new Map;b=u(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Tf(a,k,e);k.startTime>=a.l&&k.startTimew?(w=y,z=[A.Ff]):y==w&&z.push(A.Ff);k.push.apply(k,x(z))});f=k}c=new Set;b=new Set;f=u(f);for(e=f.next();!e.done;e=f.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);f=Array.from(c).sort(function(w,v){return w.bandwidth-v.bandwidth});var l=[];c=new Map;f=u(f);for(e=f.next();!e.done;e=f.next()){e=e.value;g=e.language+(e.channelsCount|| 0)+(e.audioSamplingRate||0)+e.roles.join(",")+e.label+e.groupId+e.fastSwitching;h=c.get(g)||[];if(h.length){var m=h[h.length-1],n=Hf(m.codecs),q=Hf(e.codecs);n!=q||e.bandwidth&&m.bandwidth&&!(e.bandwidth>m.bandwidth)||(h.push(e),l.push(e.id))}else h.push(e),l.push(e.id);c.set(g,h)}var r={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};f=Array.from(b).sort(function(w,v){if(!w.bandwidth||!v.bandwidth||w.bandwidth==v.bandwidth){if(w.codecs&& v.codecs&&w.codecs!=v.codecs&&w.width==v.width){var z=Hf(w.codecs),y=Hf(v.codecs);if(z!=y)return(r[z]||1)-(r[y]||1)}return w.width-v.width}return w.bandwidth-v.bandwidth});b=Bd();var t=[];c=new Map;f=u(f);for(e=f.next();!e.done;e=f.next()){e=e.value;g=Math.round(e.frameRate||0)+(e.hdr||"")+e.fastSwitching;h=c.get(g)||[];if(h.length){m=h[h.length-1];if(!b&&(n=Hf(m.codecs),q=Hf(e.codecs),n!==q))continue;e.width>m.width||e.height>m.height?(h.push(e),t.push(e.id)):e.width==m.width&&e.height==m.height&& (n=Hf(m.codecs),q=Hf(e.codecs),n!=q||e.bandwidth&&m.bandwidth&&!(e.bandwidth>m.bandwidth)||(h.push(e),t.push(e.id)))}else h.push(e),t.push(e.id);c.set(g,h)}a.variants=a.variants.filter(function(w){var v=w.audio;w=w.video;return v&&!l.includes(v.id)||w&&!t.includes(w.id)?!1:!0})} function ag(a,b,c){b=u(b);for(var d=b.next(),e={};!d.done;e={Yi:void 0},d=b.next())if(e.Yi=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Yi)}}(e)),d.length){a=d;break}c=u(c);b=c.next();for(d={};!b.done;d={Eh:void 0},b=c.next())if(d.Eh=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Eh)}}(d)),b.length){a=b;break}return a}function bg(a,b,c){a.variants=a.variants.filter(function(d){return eg(d,b,c)})} function eg(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=u([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)|| !d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function fg(a,b,c,d){c=void 0===c?[]:c;d=void 0===d?{}:d;return P(function(e){if(1==e.g)return G(e,gg(a,b,0=a&&e.width>=b){a=e.height;b=e.width;break}c=Pg(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&& !c.length&&(c=Pg(this,null,d,Infinity,Infinity),c=[c[0]]);b=c[0]||null;for(d=0;d=g&&a<=f&&(b.bandwidth!=e.bandwidth||b.bandwidth==e.bandwidth&&b.video&&e.video&&(b.video.width=b.i))return;a.K=!0;a.u-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.u<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.I(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))} function Pg(a,b,c,d,e){if(a.G){var f=a.G.Wh();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return eg(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function Qg(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",Og);Og.prototype.configure=Og.prototype.configure; Og.prototype.setCmsdManager=Og.prototype.setCmsdManager;Og.prototype.setMediaElement=Og.prototype.setMediaElement;Og.prototype.playbackRateChanged=Og.prototype.playbackRateChanged;Og.prototype.setVariants=Og.prototype.setVariants;Og.prototype.getBandwidthEstimate=Og.prototype.getBandwidthEstimate;Og.prototype.trySuggestStreams=Og.prototype.trySuggestStreams;Og.prototype.segmentDownloaded=Og.prototype.segmentDownloaded;Og.prototype.disable=Og.prototype.disable;Og.prototype.enable=Og.prototype.enable; Og.prototype.chooseVariant=Og.prototype.chooseVariant;Og.prototype.init=Og.prototype.init;Og.prototype.release=Og.prototype.release;Og.prototype.stop=Og.prototype.stop;var Sg=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Tg(a,b){var c=Ug();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1} function Vg(a){var b,c;return P(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new U(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return G(d,new Promise(function(e){(new ac(e)).Y(c/1E3)}),2)}a.h*=a.m;H(d)})}function Ug(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Wg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Wg.prototype.resolve=function(){};Wg.prototype.reject=function(){};function Xg(a,b){this.promise=a;this.i=b;this.g=null}function Yg(a){return new Xg(Promise.reject(a),function(){return Promise.resolve()})}function Zg(){var a=Promise.reject(new U(2,7,7001));a.catch(function(){});return new Xg(a,function(){return Promise.resolve()})}function $g(a){return new Xg(Promise.resolve(a),function(){return Promise.resolve()})}function ah(a){return new Xg(a,function(){return a.catch(function(){})})}Xg.prototype.abort=function(){this.g||(this.g=this.i());return this.g}; function bh(a){return new Xg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Xg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this}; Xg.prototype.Wa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=ch(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Wg;f.catch(function(){});var g=new U(2,7,7001);this.promise.then(c(!0),c(!1));return new Xg(f,function(){return d()})}; function ch(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}ea.Object.defineProperties(Xg.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});S("shaka.util.AbortableOperation",Xg);Xg.prototype.chain=Xg.prototype.Wa;Xg.prototype["finally"]=Xg.prototype.finally; Xg.all=bh;Xg.prototype.abort=Xg.prototype.abort;Xg.notAbortable=ah;Xg.completed=$g;Xg.aborted=Zg;Xg.failed=Yg;function dh(){this.g=[]}function eh(a,b){a.g.push(b.finally(function(){Rd(a.g,b)}))}dh.prototype.destroy=function(){for(var a=[],b=u(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function fh(a,b,c,d,e,f,g){kb.call(this);this.i=!1;this.u=new dh;this.g=new Set;this.h=new Set;this.m=a||null;this.l=b||null;this.G=c||null;this.H=d||null;this.I=e||null;this.K=f||null;this.J=g||null;this.B=this.C=!1;this.s=16E3;this.j=new Map}pa(fh,kb);p=fh.prototype;p.ih=function(a){this.C=a};p.jh=function(a){this.B=a};function gh(a,b,c,d){c=c||hh;var e=ih[a];if(!e||c>=e.priority)ih[a]={priority:c,hf:b,Fk:void 0===d?!1:d}} function jh(a,b){for(var c=u(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=u(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}p.Ik=function(a){this.g.add(a)};p.kl=function(a){this.g.delete(a)};p.lj=function(){this.g.clear()};p.Jk=function(a){this.h.add(a)};p.ll=function(a){this.h.delete(a)};p.mj=function(){this.h.clear()};p.Lh=function(){this.j.clear()}; function kh(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}p.destroy=function(){this.i=!0;this.g.clear();this.h.clear();this.j.clear();kb.prototype.release.call(this);return this.u.destroy()}; p.request=function(a,b,c){var d=this,e=new lh;if(this.i){var f=Promise.reject(new U(2,7,7001));f.catch(function(){});return new mh(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?be(b.retryParameters):Ug();b.uris=be(b.uris);f=nh(this,a,b,c);var g=f.Wa(function(){return oh(d,a,b,c,new Tg(b.retryParameters,!1),0,null,e)}),h=g.Wa(function(q){return ph(d,a,q,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){}); var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Wa(function(q){var r=Date.now()-m,t=q.response;t.timeMs+=l;t.timeMs+=r;q.fk||!d.m||t.fromCache||"HEAD"==b.method||a!=qh||d.m(t.timeMs,t.data.byteLength,rh(c));d.J&&d.J(a,t,c);return t},function(q){q&&(q.severity=2);throw q;});f=new mh(n.promise,function(){return n.abort()},e);eh(this.u,f);return f}; function nh(a,b,c,d){function e(h){f=f.Wa(function(){c.body&&(c.body=Nb(c.body));return h(b,c,d)})}var f=$g(void 0);a.I&&e(a.I);a=u(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Wa(void 0,function(h){if(h instanceof U&&7001==h.code)throw h;throw new U(2,1,1006,h);})} function oh(a,b,c,d,e,f,g,h){a.C&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.B&&(c.uris[f]=c.uris[f].replace("http://","https://"));0this.h.byteLength)throw yh();var b=Mb(this.h,this.g,a);this.g+=a;return b}; p.skip=function(a){if(this.g+a>this.h.byteLength)throw yh();this.g+=a};p.Ci=function(a){if(this.ga||a>this.h.byteLength)throw yh();this.g=a};p.Xc=function(){for(var a=this.g;this.Ha()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Mb(this.h,a,this.g-a);this.g+=1;return Bc(a)};function yh(){return new U(2,3,3E3)}S("shaka.util.DataViewReader",wh);wh.prototype.readTerminatedString=wh.prototype.Xc;wh.prototype.seek=wh.prototype.seek;wh.prototype.rewind=wh.prototype.Ci; wh.prototype.skip=wh.prototype.skip;wh.prototype.readBytes=wh.prototype.Ub;wh.prototype.readUint64=wh.prototype.zd;wh.prototype.readInt32=wh.prototype.xi;wh.prototype.readUint32=wh.prototype.V;wh.prototype.readUint16=wh.prototype.Ba;wh.prototype.readUint8=wh.prototype.$;wh.prototype.getLength=wh.prototype.getLength;wh.prototype.getPosition=wh.prototype.Pa;wh.prototype.hasMoreData=wh.prototype.Ha;var xh=1;wh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:xh};function zh(){this.i=[];this.h=[];this.g=!1}p=zh.prototype;p.box=function(a,b){a=Ah(a);this.i[a]=Bh;this.h[a]=b;return this};p.X=function(a,b){a=Ah(a);this.i[a]=Ch;this.h[a]=b;return this};p.stop=function(){this.g=!0};p.parse=function(a,b,c){a=new wh(a,0);for(this.g=!1;a.Ha()&&!this.g;)this.wd(0,a,b,c)}; p.wd=function(a,b,c,d){var e=b.Pa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.V(),g=b.V(),h=Dh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Pa()+8>b.getLength()){this.g=!0;return}f=b.zd();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Ch){if(d&&b.Pa()+4>b.getLength()){this.g=!0;return}n=b.V();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Pa(),b=0>24&255,a>>16&255,a>>8&255,a&255)} function Fh(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",zh);zh.headerSize=Fh;zh.typeToString=Dh;zh.allData=Jh;zh.audioSampleEntry=Ih;zh.visualSampleEntry=Hh;zh.sampleDescription=Gh;zh.children=Eh;zh.prototype.parseNext=zh.prototype.wd;zh.prototype.parse=zh.prototype.parse;zh.prototype.stop=zh.prototype.stop;zh.prototype.fullBox=zh.prototype.X;zh.prototype.box=zh.prototype.box;var Bh=0,Ch=1;function Kh(a){var b=this;this.g=[];this.h=[];this.data=[];(new zh).box("moov",Eh).box("moof",Eh).X("pssh",function(c){if(!(1d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.u(new U(2,6,6006,f.message,f,h))}})}function vi(a){return P(function(b){return 1==b.g?a.L?G(b,a.m,3):b.A(0):G(b,Promise.all(a.U.map(function(c){return c.promise})),0)})} function fi(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w;P(function(v){switch(v.g){case 1:c=b.target;a.g.logLicenseExchange&&Lc(b.message);d=a.i.get(c);e=a.h.licenseServerUri;f=a.g.advanced[a.h.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=kh([e],a.g.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.h;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]= f.headers[h];if("org.w3.clearkey"===a.h.keySystem){var z=g,y=a.h;try{var A=Ec(z.body);if(A){var E=JSON.parse(A);E.type||(E.type=y.sessionType,z.body=Fc(JSON.stringify(E)))}}catch(C){}}if(Vb(a.h.keySystem))if(z=Cc(g.body,!0,!0),z.includes("PlayReadyKeyMessage")){z=fe(z,"PlayReadyKeyMessage");y=pe(z,"HttpHeader");y=u(y);for(A=y.next();!A.done;A=y.next())E=A.value,A=pe(E,"name")[0],E=pe(E,"value")[0],g.headers[ne(A)]=ne(E);z=pe(z,"Challenge")[0];g.body=Mc(ne(z))}else g.headers["Content-Type"]="text/xml; charset=utf-8"; k=Date.now();ta(v,2);m=a.G.nc.request(2,g,{isPreload:a.R()});a.U.push(m);return G(v,m.promise,4);case 4:l=v.h;Rd(a.U,m);wa(v,3);break;case 2:n=ya(v);if(a.j.g)return v.return();q=new U(2,6,6007,n);1==a.i.size?(a.u(q),d&&d.Hb&&d.Hb.reject(q)):(d&&d.Hb&&d.Hb.reject(q),a.i.delete(c),li(a)&&(a.m.resolve(),a.M.Y(.1)));return v.return();case 3:if(a.j.g)return v.return();a.J+=(Date.now()-k)/1E3;a.g.logLicenseExchange&&Lc(l.data);ta(v,5);return G(v,c.update(l.data),7);case 7:wa(v,6);break;case 5:return r= ya(v),t=new U(2,6,6008,r.message),a.u(t),d&&d.Hb&&d.Hb.reject(t),v.return();case 6:if(a.j.g)return v.return();w=new T("drmsessionupdate");a.G.onEvent(w);d&&(d.Hb&&d.Hb.resolve(),si(a,d));H(v)}})} function ui(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Vb(a.h.keySystem)&&16==g.byteLength&&(ec()||oc())){h=Qb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Oc(g).slice(0,32);a.Z.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Hb&&(a.i.delete(b),wi(b));li(a)&&(a.m.resolve(), a.M.Y(xi))}function Nh(a){var b=a.Z,c=a.ka;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.u(new U(2,6,6014));a.G.ef(vh(c))} function yi(){var a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N,R,Q;return P(function(V){if(1==V.g){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b= {};c=u(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return V.return(b)}f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" ");g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];h=["150","2000","3000"];k={"com.widevine.alpha":g,"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":h};l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}]; n={videoCapabilities:l,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]};q=[null,"cenc","cbcs","cbcs-1-9"];r=new Map;t=function(ba,ia){var xa,Ea,va,Ba,La,za,Ua,Qa,Aa,hb,$b,ub,nb;return P(function(ob){switch(ob.g){case 1:return ta(ob,2),G(ob,ia.createMediaKeys(),4);case 4:xa=ob.h;wa(ob,3);break;case 2:return ya(ob),ob.return();case 3:va=(Ea=ia.getConfiguration().sessionTypes)?Ea.includes("persistent-license"):!1;ic()&&(va=!1);Ba=ia.getConfiguration().videoCapabilities;La=ia.getConfiguration().audioCapabilities; za={persistentState:va,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.has(ba)&&r.get(ba)?za=r.get(ba):r.set(ba,za);(Ua=Ba[0].encryptionScheme)&&!za.encryptionSchemes.includes(Ua)&&za.encryptionSchemes.push(Ua);(Qa=Ba[0].robustness)&&!za.videoRobustnessLevels.includes(Qa)&&za.videoRobustnessLevels.push(Qa);(Aa=La[0].robustness)&&!za.audioRobustnessLevels.includes(Aa)&&za.audioRobustnessLevels.push(Aa);if("getStatusForPolicy"in xa){hb=[];$b=u(f);ub=$b.next(); for(nb={};!ub.done;nb={Ud:void 0},ub=$b.next())nb.Ud=ub.value,za.minHdcpVersions.includes(nb.Ud)||hb.push(xa.getStatusForPolicy({minHdcpVersion:nb.Ud}).then(function(Eb){return function(Me){"usable"!=Me||za.minHdcpVersions.includes(Eb.Ud)||za.minHdcpVersions.push(Eb.Ud)}}(nb)));return G(ob,Promise.all(hb),0)}ob.A(0)}})};w=function(ba,ia,xa,Ea){var va,Ba,La,za,Ua,Qa,Aa,hb,$b,ub;return P(function(nb){switch(nb.g){case 1:ta(nb,2);va=be(n);Ba=u(va.videoCapabilities);for(La=Ba.next();!La.done;La=Ba.next())za= La.value,za.encryptionScheme=ia,za.robustness=xa;Ua=u(va.audioCapabilities);for(Qa=Ua.next();!Qa.done;Qa=Ua.next())Aa=Qa.value,Aa.encryptionScheme=ia,Aa.robustness=Ea;hb=be(va);hb.persistentState="required";hb.sessionTypes=["persistent-license"];$b=[hb,va];return G(nb,Yf(1,navigator.requestMediaKeySystemAccess(ba,$b)),4);case 4:return ub=nb.h,G(nb,t(ba,ub),5);case 5:wa(nb,0);break;case 2:ya(nb),H(nb)}})};v=function(ba,ia,xa,Ea){var va,Ba,La;return P(function(za){switch(za.g){case 1:return ta(za,2), va={type:"media-source",video:{contentType:l[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:m[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:ba,video:{encryptionScheme:ia,robustness:xa},audio:{encryptionScheme:ia,robustness:Ea}}},G(za,Yf(1,navigator.mediaCapabilities.decodingInfo(va)),4);case 4:return Ba=za.h,La=Ba.keySystemAccess,G(za,t(ba,La),5);case 5:wa(za,0);break;case 2:ya(za),H(za)}})};z=u(a);for(y=z.next();!y.done;y=z.next())A= y.value,r.set(A,null);E=function(ba){return"org.w3.clearkey"===ba&&rc()||ba&&ba.match(/^com\.apple\.fps/)&&tc()||Vb(ba)&&(sc()||mc())||Vb(ba)&&gc("Firefox")||"com.huawei.wiseplay"===ba&&(tc()||sc())?!1:!0};C=[];B=u(q);for(D=B.next();!D.done;D=B.next())for(I=D.value,F=u(a),L=F.next();!L.done;L=F.next())J=L.value,E(J)&&(C.push(w(J,I,"","")),C.push(v(J,I,"","")));K=u(a);for(O=K.next();!O.done;O=K.next())for(M=O.value,N=u(k[M]||[]),R=N.next();!R.done;R=N.next())Q=R.value,E(M)&&(C.push(w(M,null,Q,"")), C.push(w(M,null,"",Q)),C.push(v(M,null,Q,"")),C.push(v(M,null,"",Q)));return G(V,Promise.all(C),2)}return V.return(vh(r))})}function wi(a){return P(function(b){if(1==b.g)return ta(b,2),G(b,Yf(zi,Promise.all([a.close().catch(function(){}),a.closed])),4);if(2!=b.g)return wa(b,0);ya(b);H(b)})} function Qh(a){var b;return P(function(c){b=Array.from(a.i.entries());a.i.clear();return G(c,Promise.all(b.map(function(d){d=u(d);var e=d.next().value,f=d.next().value;return P(function(g){if(1==g.g)return ta(g,2),a.na||a.C.has(e.sessionId)||"persistent-license"!==f.type||a.g.persistentSessionOnlinePlayback?G(g,wi(e),5):G(g,e.remove(),5);if(2!=g.g)return wa(g,0);ya(g);H(g)})})),0)})}function Yh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])} function Oh(a){a.i.forEach(function(b,c){var d=b.Qg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Qg=e)})}function li(a){a=a.i.values();return mb(a,function(b){return b.loaded})}function ki(a){for(var b=u(a.h&&a.h.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.Z.get(c.value))return!1;return!0} function Xh(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=u(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)} function qi(a,b,c,d,e,f,g,h){var k=[];a=u(a);for(var l=a.next(),m={};!l.done;m={Ma:void 0},l=a.next()){m.Ma=l.value;b.includes(m.Ma.encryptionScheme)||b.push(m.Ma.encryptionScheme);"org.w3.clearkey"==m.Ma.keySystem&&m.Ma.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Ma.licenseServerUri)||k.push(m.Ma.licenseServerUri):c.includes(m.Ma.licenseServerUri)||c.push(m.Ma.licenseServerUri);e.includes(m.Ma.serverCertificateUri)||e.push(m.Ma.serverCertificateUri);m.Ma.serverCertificate&& (d.some(function(r){return function(t){return Lb(t,r.Ma.serverCertificate)}}(m))||d.push(m.Ma.serverCertificate));if(m.Ma.initData){l=u(m.Ma.initData);for(var n=l.next(),q={};!n.done;q={Gg:void 0},n=l.next())q.Gg=n.value,f.some(function(r){return function(t){var w=r.Gg;return t.keyId&&t.keyId==w.keyId?!0:t.initDataType==w.initDataType&&Lb(t.initData,w.initData)}}(q))||f.push(q.Gg)}if(m.Ma.keyIds)for(l=u(m.Ma.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Ma.keySystemUris&&h)for(m=u(m.Ma.keySystemUris), l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Vi=new Sb(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 Xi(a,b,c,d,e,f,g){this.S=a;this.eb=b;this.Na=c;this.ud=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Xi.prototype.Nb=function(){return this.eb};Xi.prototype.Lb=function(){return this.Na};Xi.prototype.hc=function(){return this.g};function Yi(a,b){return a===b?!0:a&&b?a.Nb()==b.Nb()&&a.Lb()==b.Lb()&&Td(a.S().sort(),b.S().sort())&&Lb(a.hc(),b.hc()):a==b}S("shaka.media.InitSegmentReference",Xi); Xi.prototype.getEndByte=Xi.prototype.Lb;Xi.prototype.getStartByte=Xi.prototype.Nb; function Zi(a,b,c,d,e,f,g,h,k,l,m,n,q,r,t,w){l=void 0===l?[]:l;r=void 0===r?$i:r;this.startTime=a;this.j=this.endTime=b;this.G=c;this.eb=d;this.Na=e;this.qa=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===q?null:q;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===t?null:t;this.thumbnailSprite=null;this.i=-1;this.u=void 0===w?!1:w;this.H=this.s=!1;a=u(this.g);for(b=a.next();!b.done;b= a.next())b.value.li();this.u&&this.g.length&&this.g[this.g.length-1].ki();this.C=this.bandwidth=this.mimeType=this.codecs=null}p=Zi.prototype;p.S=function(){return this.G()};p.getStartTime=function(){return this.startTime};p.Dj=function(){return this.endTime};p.Nb=function(){return this.eb};p.Lb=function(){return this.Na};p.Yj=function(){return this.tilesLayout};p.Xj=function(){return this.B};p.xc=function(){return this.status};p.yk=function(){this.status=aj};p.Ng=function(){this.preload=!0}; p.isPreload=function(){return this.preload};p.td=function(){this.l=!1};p.kk=function(){return this.l};p.li=function(){this.s=!0};p.nk=function(){return this.s};p.ki=function(){this.H=!0};p.lk=function(){return this.H};p.ji=function(){this.m=!0};p.gk=function(){return this.m};p.vf=function(a){this.thumbnailSprite=a};p.Wj=function(){return this.thumbnailSprite}; p.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=u(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};p.ph=function(a){null==this.h?bb("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};p.cl=function(a){this.C=a};p.hc=function(){return this.C};function bj(a,b){a.qa=b;a=u(a.g);for(var c=a.next();!c.done;c=a.next())bj(c.value,b)}S("shaka.media.SegmentReference",Zi); Zi.prototype.getSegmentData=Zi.prototype.hc;Zi.prototype.setSegmentData=Zi.prototype.cl;Zi.prototype.syncAgainst=Zi.prototype.ph;Zi.prototype.offset=Zi.prototype.offset;Zi.prototype.getThumbnailSprite=Zi.prototype.Wj;Zi.prototype.setThumbnailSprite=Zi.prototype.vf;Zi.prototype.hasByterangeOptimization=Zi.prototype.gk;Zi.prototype.markAsByterangeOptimization=Zi.prototype.ji;Zi.prototype.isLastPartial=Zi.prototype.lk;Zi.prototype.markAsLastPartial=Zi.prototype.ki;Zi.prototype.isPartial=Zi.prototype.nk; Zi.prototype.markAsPartial=Zi.prototype.li;Zi.prototype.isIndependent=Zi.prototype.kk;Zi.prototype.markAsNonIndependent=Zi.prototype.td;Zi.prototype.isPreload=Zi.prototype.isPreload;Zi.prototype.markAsPreload=Zi.prototype.Ng;Zi.prototype.markAsUnavailable=Zi.prototype.yk;Zi.prototype.getStatus=Zi.prototype.xc;Zi.prototype.getTileDuration=Zi.prototype.Xj;Zi.prototype.getTilesLayout=Zi.prototype.Yj;Zi.prototype.getEndByte=Zi.prototype.Lb;Zi.prototype.getStartByte=Zi.prototype.Nb; Zi.prototype.getEndTime=Zi.prototype.Dj;Zi.prototype.getStartTime=Zi.prototype.getStartTime;Zi.prototype.getUris=Zi.prototype.S;var $i=0,aj=1;Zi.Status={vl:$i,rm:aj,Sl:2};function cj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function dj(a){return!a||cj(a)?null:a.length?a.end(a.length-1):null}function ej(a,b){return!a||!a.length||cj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function fj(a,b){if(!a||!a.length||cj(a))return 0;var c=0;a=u(gj(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c} function hj(a,b,c){if(!a||!a.length||cj(a))return null;a=gj(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function gj(a){if(!a)return[];for(var b=[],c=0;ca[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function oj(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function pj(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127} function qj(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Bc(Mb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=Bc(Mb(a.data,3+c,f)),h;"--\x3e"===d?h=Bc(Mb(a.data,4+c+f)):h=Nb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null; d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Bc(Mb(a.data,1,d));a=Bc(Mb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Bc(Mb(a.data,1,d));a=Bc(Mb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Bc(Mb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"== c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Nb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Bc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Bc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Nb(a.data),b):null} function rj(a){for(var b=0,c=[];nj(a,b);){var d=pj(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10>6&1&&(d+=10),d+=10,d+=pj(a,b+6),oj(a,b+10)&&(d+=10),b+=d;return 0>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}} function wj(a,b,c){var d=a.V(),e=[],f=null;c&1&&(f=a.V());c&4&&a.skip(4);for(var g=0;ga?"0":"")+a};/* Copyright Brightcove, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ function Cj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d>>32-c;a.g-=c;0>>b))return a.h<<=b,a.g-=b,b;Dj(a);return b+Gj(a)}function Hj(a){Ej(a,1+Gj(a))}function X(a){var b=Gj(a);return Fj(a,b+1)-1}function Ij(a){a=X(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Jj(a){return 1===Fj(a,1)}function Kj(a){return Fj(a,8)} function Lj(a,b){for(var c=8,d=8,e=0;ea.length)return this;for(var b=Math.max(0,Oj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Qe:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h< k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.u&&(a.u=e);c.pts=Qj(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.s&&(a.s=d),c.dts=Qj(d, a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}p.Ek=function(a){Dd("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Tg(a,{ae:null,state:null})}; p.Tg=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;-1==f&&(l=0,m="hvc"==this.m?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}0<=l&&0<=f&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.ae&&(c=k.length?k[k.length-1]:b.ae)&&(c.data=Pc(c.data,a),c.fullData=Pc(c.fullData,a));b.state=f;return k}; p.getMetadata=function(){for(var a=[],b=u(this.l),c=b.next();!c.done;c=b.next())c=Pc.apply(Jc,x(c.value)),(c=Pj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:rj(c.data),dts:c.dts,pts:c.pts});return a}; p.wb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=u(this.i),c=b.next();!c.done;c=b.next()){var d=Pc.apply(Jc,x(c.value)),e=Pj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Pc(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h}; p.Nc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=u(this.j),d=c.next();!d.done;d=c.next()){var e=Pc.apply(Jc,x(d.value)),f=Pj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Pc(d.data,e),this.g.push(d))}if(a){c={ae:null,state:null};d=[];e=u(this.g);for(f=e.next();!f.done;f=e.next())f=f.value, f.nalus=this.Tg(f,c),f.nalus.length&&(d.push(f),c.ae=f.nalus[f.nalus.length-1]);this.g=d}b&&(this.g=this.g.sort(function(g,h){var k=(g.pts||0)-(h.pts||0);return(g.dts||0)-(h.dts||0)||k}))}return a?this.g:(a=this.g,this.g=[],a)};p.getStartTime=function(a){if("audio"==a){a=null;var b=this.wb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Nc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};p.Od=function(){return{audio:this.B,video:this.m}}; p.Pe=function(){for(var a=[],b=u(this.Nc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};p.dk=function(){Dd("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Bg();return{height:a.height,width:a.width}};p.Bg=function(){return"hvc"==this.m?Rj(this):Sj(this)};function Tj(a){var b=a.Nc();return 1h?Lj(c,16):Lj(c,64))}}Hj(c);g=X(c);if(0===g)X(c);else if(1===g)for(Ej(c,1),Hj(c),Hj(c),g=X(c),h=0;hz;z++)Fj(d,2);for(z=0;zD;D++)B|=(C>>D&1)<<31-D;return B>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+t;r&&(f+="."+r.toString(16).toUpperCase());q&&(f+="."+q.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase()); c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=Tj(a);return b}function Qj(a,b){var c=1;for(a>b&&(c=-1);4294967296Oj(a)?!1:!0}function Oj(a){for(var b=Math.min(1E3,a.length-564),c=0;ca.start(0)?0:a.length?a.start(0):null):a=null;return a}function ok(a,b){return Object.keys(a.i).length?b==Wc?a.h.h:dj(nk(a,b)):null}function pk(a,b,c){if(b==Wc)return a=a.h,null==a.h||a.hMath.abs(e-c))return f.return();sk(a,b,function(){return tk(a,b)},null);a.m&&sk(a,d.ba,function(){return tk(a,d.ba)},null);return G(f,sk(a,b,function(){return uk(a,b,c)},null),2)}return a.m?G(f,sk(a,d.ba,function(){return uk(a,d.ba,c)},null),0):f.A(0)})} p.endOfStream=function(a){var b=this;return P(function(c){return G(c,Dk(b,function(){fk(b)||gk(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};p.sb=function(a){var b=this;return P(function(c){return G(c,Dk(b,function(){if(ac&&(c+=.001);a.i[b].timestampOffset=c;kk(a,b)}function kk(a,b){if(!a.K){var c=a.s[b][0];c&&(c.p.resolve(),Gk(a,b))}}function sk(a,b,c,d){th(a.O);c={start:c,p:new Wg,uri:d};a.s[b].push(c);1==a.s[b].length&&Hk(a,b);return c.p} function Dk(a,b){var c,d,e,f,g,h,k,l,m,n,q,r;return P(function(t){switch(t.g){case 1:th(a.O);c=[];d=Object.keys(a.i);e=u(d);f=e.next();for(g={};!f.done;g={ready:void 0},f=e.next())h=f.value,g.ready=new Wg,k={start:function(w){return function(){return w.ready.resolve()}}(g),p:g.ready,uri:null},a.s[h].push(k),c.push(g.ready),1==a.s[h].length&&k.start();ta(t,2);return G(t,Promise.all(c),4);case 4:wa(t,3);break;case 2:throw l=ya(t),l;case 3:return ta(t,5,6),G(t,b(),6);case 6:Ca(t);m=u(d);for(n=m.next();!n.done;n= m.next())q=n.value,Gk(a,q);Da(t,0);break;case 5:throw r=ya(t),new U(2,3,3015,r,a.g.error||"No error in the media element",null);}})}function Gk(a,b){a.s[b].shift();Hk(a,b)}function Hk(a,b){var c=a.s[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new U(2,3,3017,b)):c.p.reject(new U(2,3,3015,d,a.g.error||"No error in the media element",c.uri)),Gk(a,b)}} function vk(a,b,c,d,e){var f=null==c,g=a.La[d];c=a.J.Hj();if(f=a.B.insertFakeEncryptionInInit&&f&&g)c=Vb(c),f=hc()||fc()||nc()||ec()&&tc()&&c;f&&"mp4"==Gf(a.H[d])&&(b=Ti(b,e));return b}function Ik(a,b,c,d){return sk(a,b,function(){b!==Wc&&(Bd()&&(a.j[b]&&(a.j[b].destroy(),delete a.j[b]),d&&(a.j[b]=d),a.i[b].changeType(c+a.B.addExtraFeaturesToSourceBuffer(c)),a.H[b]=c),kk(a,b))},null)} function Jk(a,b){var c,d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A;return P(function(E){switch(E.g){case 1:c=Yc;a.K=!0;a.m=!1;d=a.g.currentTime;e=a.g.autoplay;f=a.g.paused;a.Za&&(a.g.autoplay=!1);ua(E,2);a.u.Ua();for(g in a.j)a.j[g].destroy();for(h in a.i){k=a.i[h];try{a.l.removeSourceBuffer(k)}catch(C){}}a.j={};a.i={};l=a.l.duration;a.I=new Wg;a.l=ak(a,a.I);return G(E,a.I,4);case 4:!isNaN(l)&&l?a.l.duration=l:!isNaN(a.sa)&&a.sa&&(a.l.duration=a.sa),m=new Wg,n=a.l.sourceBuffers,q=b.size,r=0,t=function(){r++; r===q&&(m.resolve(),a.u.Ja(n,"addsourcebuffer",t))},a.u.o(n,"addsourcebuffer",t),w=u(b.keys()),v=w.next();case 5:if(v.done)return(A=b.get(c.ba))&&A.isAudioMuxedInVideo&&(a.m=!0),a.m&&!a.s[c.ba]&&(a.s[c.ba]=[]),a.g.currentTime=d,G(E,m,2);z=v.value;y=b.get(z);return G(E,hk(a,z,y,y.codecs),6);case 6:v=w.next();E.A(5);break;case 2:Ca(E),a.K=!1,th(a.O),a.u.oa(a.g,"canplaythrough",function(){a.O.g||(a.g.autoplay=e,f||a.g.play())}),Da(E,0)}})}function Kk(a,b){return Dk(a,function(){return Jk(a,b)})} function Lk(a,b,c,d){var e=!1,f=Uc("audio",(d||"").split(",")),g=Uc("video",(d||"").split(",")),h=g;"audio"==b&&(h=f);h||(h=d);d=Af(c,h);var k=a.B.forceTransmux;if(!zd(d)||!a.G&&Bf.includes(d))k=!0;if(k&&(a=Cf(c,h),c=uf(a))){var l=c();f&&g&&(e=!0);d=l.convertCodecs(b,a)}b=Hf(Lf(d));return{uh:l,il:e,Gh:Kf(d),codec:b,mimeType:d}} function Bk(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,w,v,z,y;return P(function(A){if(1==A.g){f=Yc;if(b==f.Oa)return A.return(!1);g=Hf(Lf(a.H[b]));h=Kf(a.H[b]);k=Lk(a,b,c,d);l=k.uh;m=k.il;n=k.Gh;q=k.codec;r=k.mimeType;t=!0;m&&(w=Lk(a,f.ba,c,d),v=Hf(Lf(a.H[f.ba])),z=Kf(a.H[f.ba]),t=v==w.codec&&z==w.Gh,w.uh&&w.uh.destroy());if(g===q&&h===n&&t)return a.j[b]&&!l?(a.j[b].destroy(),delete a.j[b]):!a.j[b]&&l?a.j[b]=l:l&&(a.j[b]&&a.j[b].transmux!=l.transmux?(a.j[b].destroy(),delete a.j[b],a.j[b]=l):l.destroy()), A.return(!1);y=!0;if(a.m||m&&l&&!a.j[b])y=!1;if(y&&"smooth"===a.B.codecSwitchingStrategy&&Bd())return G(A,Ik(a,b,r,l),3);l&&l.destroy();return G(A,Kk(a,e),3)}return A.return(!0)})}function Mk(a,b,c,d){if(b==Wc)var e=!1;else{e=Hf(Lf(a.H[b]));var f=Kf(a.H[b]),g=Af(c,d),h=a.B.forceTransmux;if(!zd(g)||!a.G&&Bf.includes(g))h=!0;c=Cf(c,d);h&&(h=uf(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Hf(Lf(g));g=Kf(g);e=e!==b||f!==g}return e?"smooth"!==a.B.codecSwitchingStrategy||!Bd()||a.m:!1} var ck=window.URL.createObjectURL,jk="sequence";function Vk(a,b,c){this.i=a;this.G=b;this.s=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.K=!1;this.J=0;this.H=void 0===c?!0:c;this.I=0;this.u=!1;this.m=a}p=Vk.prototype;p.getDuration=function(){return this.l};p.Mj=function(){return this.h};p.Ki=function(a){this.i=a};p.sb=function(a){this.l=a};p.Qj=function(){return this.i};p.Gi=function(a){this.B=a};p.$c=function(a){a&&!this.C&&(this.K=!0);this.C=a};p.rf=function(a){this.s=a};p.Oe=function(){return this.s}; p.gh=function(a){this.G=a};p.Cj=function(){return this.G};p.ri=function(a,b){if(0!=a.length){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+bc.end-.5)){b=!0;break a}b=!1}return b};function $k(a,b,c,d,e){var f=this;this.B=e;this.g=a;this.G=b;this.s=c;this.m=new td;this.l=this.C=!1;this.I=a.readyState;this.H=this.i=0;this.h=d;this.u=!1;this.m.o(a,"waiting",function(){return al(f)});this.j=new ac(function(){al(f)})}$k.prototype.release=function(){this.m&&(this.m.release(),this.m=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.G=this.B=null};$k.prototype.Rg=function(){this.u=!0;al(this)}; function al(a){if(0!=a.g.readyState&&a.C){if(a.g.seeking){if(!a.l)return}else a.l=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.I&&(a.I=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=Xk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.u!=d)b.m=f,b.g=e,b.u=d,b.h=!1;e=f-b.m;if(d=e>=b.B&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.s++,b.j(new T("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=hj(c,b,a.s.gapDetectionThreshold), null!=d&&(0!=d||a.u))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||fc()||hc())e=Math.ceil(100*(e+a.s.gapPadding))/100;e>=a.G.Mb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.H++,a.B(new T("gapjumped")))}}}};function bl(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=cl.value().get(b),c.oa(a,b,d))}var cl=new Sb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function dl(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new td;this.i=new el(a);bl(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){fl(e,e.j())})}dl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function gl(a){return a.s?a.g.currentTime:a.j()} function hl(a,b){0Math.abs(a.g.currentTime-b)?jl(a):(a.h.oa(a.g,"seeking",function(){jl(a)}),il(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function jl(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)} function el(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new ac(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}el.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function il(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.xa(.1)};function kl(a){this.h=a;this.j=!1;this.g=null;this.i=new td}p=kl.prototype;p.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.oa(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;bl(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};p.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};p.Of=function(a){this.g=this.j?this.g:a}; p.xe=function(){return(this.j?this.h.currentTime:this.g)||0};p.Ah=function(){return 0};p.yh=function(){return 0};p.oi=function(){}; function ll(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.l=c;this.B=e;this.u=null;this.s=ml(a,c,f);this.j=new $k(a,b.presentationTimeline,c,this.s,f);this.h=new dl(a,function(){a:{var h=g.j;h.l=!0;h.u=!1;al(h);var k=gl(g.h);h=nl(g,k);if(.001g.g.getDuration()?g.g.fc():g.g.Mb():0>h&&(h=g.g.Mb()+h);return ol(g,pl(g,h))});this.m=new ac(function(){if(0!=g.i.readyState&&!g.i.paused){var h=gl(g.h),k=g.g.fc(),l=g.g.Mb();3>l-k&&(k=l-3);h=c?c-a.l.durationBackoff:b} function nl(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.fc(),f=a.g.Mb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Rd(c),k=a.g.Rd(d);c=a.g.Rd(c+d);return b>=g?ol(a,b):b>f?f-a.l.safeSeekEndOffset:b=h||ej(a.i.buffered,b)?b:c}function pl(a,b){var c=a.g.fc();if(ba?a:b} function ml(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Wk(new Zk(a),b.stallThreshold,c);Yk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function ql(a){this.g=a;this.m=null;this.i=0;this.s=!1}p=ql.prototype;p.getNumReferences=function(){return this.g.length};p.getNumEvicted=function(){return this.i};p.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};p.zk=function(){this.s=!0};p.Xb=function(a){for(var b=u(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function Dg(a){return a.g[0]||null} p.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c=d.startTime&&aa||a>=this.g.length?null:this.g[a]};p.offset=function(a){if(!this.s)for(var b=u(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)}; p.Ze=function(a){if(!this.s&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Ze(a);this.bb(b)};p.bb=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}}; p.ld=function(a,b,c){c=void 0===c?!1:c;if(!this.s){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Zi(a.startTime,b,a.G,a.eb,a.Na,a.qa,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}}; p.zf=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new ac(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.xa(a))};ql.prototype[Symbol.iterator]=function(){return this.ec(0)}; ql.prototype.ec=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0=h.startTime&&a=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0=this.g);)this.g--,b=a.g[this.g]}; S("shaka.media.SegmentIterator",rl);rl.prototype.resetToLastIndependent=rl.prototype.Zg;rl.prototype.next=rl.prototype.next;rl.prototype.current=rl.prototype.current;rl.prototype.currentPosition=rl.prototype.pj;rl.prototype.setReverse=rl.prototype.Ed;function tl(){ql.call(this,[]);this.h=[]}pa(tl,ql);p=tl.prototype;p.clone=function(){var a=new tl;a.h=this.h.slice();a.i=this.i;return a};p.release=function(){for(var a=u(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]}; p.Xb=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.Xb(a)};p.find=function(a){for(var b=this.i,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};p.get=function(a){for(var b=this.i,c=u(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};p.offset=function(){};p.Ze=function(){}; p.bb=function(a){for(var b=u(this.h),c=b.next();!c.done;c=b.next())c.value.bb(a);for(;1=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)} yl.prototype.j=function(a){for(var b=u(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.dg;a:{var e=c.ge;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.ud;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width); g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Td(d.roles,e.roles);(g||h||d)&&Cl(this,a,e.contentType)&&(c.dg=e,d=new T("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Cl(this,a,e.contentType)&&(c.dg=e,JSON.stringify(e),c=new T("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}}; function Cl(a,b,c){return(a=a.h()[c])&&0=a[0].start&&b=d?!1:!0})}else b.ge=[]} function Dl(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language= a.language);return b};function El(a){kb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new ac(function(){for(var c=b.i(),d=u(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTimed.endTime&&Nl(this,d);b&&Ll(this)}; Fl.prototype.Ed=function(a){this.s=a;this.g&&this.g.Ed(a)};function Ll(a){for(var b=Array.from(a.h.keys()),c=u(a.j.keys()),d=c.next(),e={};!d.done;e={Hg:void 0},d=c.next())e.Hg=d.value,b.some(function(f){return function(g){return Yi(g.qa,f.Hg)}}(e))||Nl(a,e.Hg)}function Pl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&Nl(a,d)}Ll(a)}function Ql(a,b){b&&b!==a.i&&(Ol(a),a.i=b)}function Nl(a,b){var c=a.h;b instanceof Xi&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()} function Jl(a){this.g=a;this.ce=this.oh=null}function Kl(a,b,c){var d=new Uint8Array(0);a.ce=a.g(b,c,function(e){return P(function(f){if(1==f.g)return 0>3,31===L&&D.Ha()&&(L=32+((F&7)<<3)+((D.$()&224)>>5)),I+="."+L));g.push(I);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("avc1",d).box("avc3",d).box("hev1",d).box("hvc1",d).box("dva1",d).box("dvav",d).box("dvh1",d).box("dvhe",d).box("vp09", d).box("av01",d).box("avcC",function(D){var I=z||"";switch(z){case "dvav":I="avc3";break;case "dva1":I="avc1"}D=D.reader;D.skip(1);D=I+"."+Aj(D.$())+Aj(D.$())+Aj(D.$());h.push(D);l=!0}).box("hvcC",function(D){var I=z||"";switch(z){case "dvh1":I="hvc1";break;case "dvhe":I="hev1"}var F=D.reader;F.skip(1);D=F.$();var L=["","A","B","C"][D>>6],J=D&31,K=F.V(),O=(D&32)>>5?"H":"L";D=[F.$(),F.$(),F.$(),F.$(),F.$(),F.$()];F=F.$();for(var M=0,N=0;32>N;N++){M|=K&1;if(31==N)break;M<<=1;K>>=1}I=I+("."+L+J)+("."+ Aj(M,!0));I+="."+O+F;L="";for(J=D.length;J--;)if((O=D[J])||L)L="."+O.toString(16).toUpperCase()+L;I+=L;h.push(I);l=!0}).box("dvcC",function(D){var I=z||"";switch(z){case "hvc1":I="dvh1";break;case "hev1":I="dvhe";break;case "avc1":I="dva1";break;case "avc3":I="dvav";break;case "av01":I="dav1"}var F=D.reader;F.skip(2);D=F.$();F=F.$();h.push(I+"."+Bj(D>>1&127)+"."+Bj(D<<5&32|F>>3&31));l=!0}).box("dvvC",function(D){var I=z||"";switch(z){case "hvc1":I="dvh1";break;case "hev1":I="dvhe";break;case "avc1":I= "dva1";break;case "avc3":I="dvav";break;case "av01":I="dav1"}var F=D.reader;F.skip(2);D=F.$();F=F.$();h.push(I+"."+Bj(D>>1&127)+"."+Bj(D<<5&32|F>>3&31));l=!0}).X("vpcC",function(D){var I=z||"",F=D.reader;D=F.$();var L=F.$();F=F.$()>>4&15;h.push(I+"."+Bj(D)+"."+Bj(L)+"."+Bj(F));l=!0}).box("av1C",function(D){var I=z||"";switch(z){case "dav1":I="av01"}var F=D.reader;F.skip(1);D=F.$();F=F.$();var L=D>>>5,J=(F&64)>>6;h.push(I+"."+L+"."+Bj(D&31)+(F>>>7?"H":"M")+"."+Bj(2===L&&J?(F&32)>>5?12:10:J?10:8)+"."+ ((F&16)>>4)+"."+((F&8)>>3)+((F&4)>>2)+(F&3)+"."+Bj(1)+"."+Bj(1)+"."+Bj(1)+".0");l=!0}).box("enca",Ih).box("encv",Hh).box("sinf",Eh).box("frma",function(D){D=yj(D.reader).codec;f(D)}).box("colr",function(D){h=h.map(function(L){if(L.startsWith("av01.")){var J=D.reader,K=J.Pa(),O=J.Ub(4);var M=String.fromCharCode(O[0]);M+=String.fromCharCode(O[1]);M+=String.fromCharCode(O[2]);M+=String.fromCharCode(O[3]);if("nclx"===M){O=J.Ba();M=J.Ba();var N=J.Ba(),R=J.$()>>7,Q=L.split(".");10==Q.length&&(Q[6]=Bj(O), Q[7]=Bj(M),Q[8]=Bj(N),Q[9]=String(R),L=Q.join("."))}J.seek(K)}return L});var I=zj(D.reader),F=I.colorGamut;w=I.oe;v=F}).parse(a||b,!0);if(!g.length&&!h.length)return null;var y=k&&!l,A=new Map;if(l&&!c){c=new Kd("video/mp4");a&&c.init(a);try{c.i(b);for(var E=u(c.j()),C=E.next();!C.done;C=E.next()){var B=C.value;A.set(B,B)}}catch(D){}c.g()}return{type:y?"audio":"video",mimeType:y?"audio/mp4":"video/mp4",codecs:Tl(g.concat(h)).join(", "),language:m,height:n,width:q,channelCount:r,sampleRate:t,closedCaptions:A, oe:w,colorGamut:v,frameRate:null}}function Tl(a){var b=new Set,c=[];a=u(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Jf(d);b.has(e)||(c.push(d),b.add(e))}b=Xc("audio",c);d=Xc("video",c);a=Xc(Wc,c);d=Ul(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b} function Ul(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?zd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a} function Vl(a){var b=null;(new zh).box("moov",Eh).box("trak",Eh).box("mdia",Eh).box("minf",Eh).box("stbl",Eh).X("stsd",Gh).box("encv",Hh).box("enca",Ih).box("sinf",Eh).box("schi",Eh).X("tenc",function(c){c=c.reader;c.$();c.$();c.$();c.$();b=Oc(c.Ub(16))}).parse(a,!0);return b} function Wl(a,b,c){var d,e,f,g,h;return P(function(k){if(1==k.g)return d=b,d.cryptoKey?k.A(2):G(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Mb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function Xl(a,b,c,d,e){a=kh(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Yl(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.J=new Map;this.G=1;this.u=this.j=null;this.L=0;this.i=new Map;this.I=!1;this.M=null;this.C=!1;this.m=new sh(function(){return Zl(c)});this.O=Date.now()/1E3;this.s=new Map;this.K={projection:null,hfov:null};this.R=0;this.P=Infinity;this.H=null;this.B=new ac(function(){if(c.l&&c.g)if(c.l.presentationTimeline.T()){var d=c.l.presentationTimeline.fc(),e=c.l.presentationTimeline.Mb();1a.g.Xa(),d=u(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.wa&&e.wa.Ed(c),e.ha&&e.ha.Ed(c);d=u(a.s.values());for(e=d.next();!e.done;e=d.next())e.value.Ed(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Bc&&(km(a,b,!1,0,!1),c.Bc=d);else if(b=c.Bc)c.Bc=null,km(a,b,!0,0,!1)} function lm(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.I&&(b.video&&km(a,b.video,c,d,e,f),b.audio&&km(a,b.audio,c,d,e,f))}function mm(a,b){P(function(c){if(1==c.g)return a.H=null,a.u=b,a.I?b.segmentIndex?c.A(2):G(c,b.createSegmentIndex(),2):c.return();km(a,b,!0,0,!1);H(c)})}function nm(a,b){for(var c=u(a.J.entries()),d=c.next();!d.done;d=c.next()){var e=u(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.J.delete(d))}} function km(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Wc?g&&(g.Bc&&(b.trickModeVideo?(g.Bc=b,b=b.trickModeVideo):g.Bc=null),g.stream!=b||e)&&(a.s.has(b)?g.ha=a.s.get(b):g.ha&&Ql(g.ha,b),b.type==Wc&&(e=Af(b.mimeType,b.codecs),ik(a.g.ma,e,a.l.sequenceMode,b.external)),!a.s.has(g.stream)&&g.stream.closeSegmentIndex&&(g.$a?(e="("+g.type+":"+g.stream.id+")",a.J.has(e)||a.J.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,g.stream= b,g.wa=null,g.Ch=!!f,e?om(a,!0,!1):(c?g.Kd?g.Gf=!0:g.$a?(g.Hc=!0,g.Ee=d,g.Gf=!0):($l(g),pm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.$a||g.Ab||hm(a,g,0),qm(a,g).catch(function(h){if(a.g)a.g.onError(h)}))):fm(a,b)} function qm(a,b){var c,d;return P(function(e){if(1==e.g){if(!b.Gb)return e.return();c=b.stream;d=b.Gb;return c.segmentIndex?e.A(2):G(e,c.createSegmentIndex(),2)}if(b.Gb!=d||b.stream!=c)return e.return();var f=a.g.Qd();var g=ok(a.g.ma,b.type),h=b.stream.segmentIndex.find(b.pb?b.pb.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Na?k.Na-k.eb:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.qa)&&(h+=(k.Na?k.Na-k.eb:null)||0),k=a.g.getBandwidthEstimate(), f=8*h/k<(g||0)-f-a.h.rebufferingGoal||b.Gb.h.g>h?!0:!1):f=!1;f&&b.Gb.abort();H(e)})} p.Cd=function(){if(this.g)for(var a=this.g.Qd(),b=u(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.ma;d==Wc?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&aa.g.Xa()):null} function cm(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=u(a.l.variants),e=d.next(),f={};!e.done;f={Jb:void 0},e=d.next())if(f.Jb=e.value,f.Jb.audio)if(a.s.has(f.Jb.audio)){if(e=a.s.get(f.Jb.audio),Pl(e,b),!(0=b||!c.some(function(h){return function(k){return bd(h.Jb.audio.language,k)}}(f))||!(e=bm(a,f.Jb.audio))|| (f.Jb.audio.segmentIndex||f.Jb.audio.createSegmentIndex(),a.s.set(f.Jb.audio,e))}p.updateDuration=function(){var a=(a=window.ManagedMediaSource||window.MediaSource)&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1;var b=this.l.presentationTimeline.getDuration();Infinity>b?(a&&(this.B&&this.B.stop(),Fk(this.g.ma)),this.g.ma.sb(b)):a?(this.B&&this.B.xa(.5),this.g.ma.sb(Infinity)):this.g.ma.sb(Math.pow(2,32))}; function tm(a,b){var c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:th(a.m);if(b.$a||null==b.Ab||b.Kd)return k.return();b.Ab=null;if(!b.Hc){k.A(2);break}return G(k,pm(a,b,b.Gf,b.Ee),3);case 3:return k.return();case 2:nm(a,b);if(b.stream.segmentIndex){k.A(4);break}c=b.stream;ta(k,5);return G(k,b.stream.createSegmentIndex(),7);case 7:wa(k,6);break;case 5:return d=ya(k),G(k,um(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.$a||b.Ab|| hm(a,b,0),k.return();case 4:ta(k,9);e=vm(a,b);null!=e&&(hm(a,b,e),b.Td=!1);wa(k,10);break;case 9:return f=ya(k),G(k,um(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.I||!g.every(function(l){return l.endOfStream})){k.A(0);break}return G(k,a.g.ma.endOfStream(),13);case 13:th(a.m),h=a.g.ma.getDuration(),0!=h&&hh&&e)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(Wc))&&wm(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.wa;e=xm(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.Ch&&(f=!0,b.Ch=!1);g=Infinity;h=Array.from(a.i.values());h=u(h);for(var k=h.next();!k.done;k=h.next())k=k.value,wm(k)||k.wa&&!k.wa.current()||(g=Math.min(g,k.pb?k.pb.endTime:c));if(d>=g+a.l.presentationTimeline.h)return a.h.updateIntervalSeconds;b.ha&&b.wa&&!a.s.has(b.stream)&& (b.ha.bb(e.startTime),Hl(b.ha,e.startTime));ym(a,b,c,e,f).catch(function(){});return null} function xm(a,b,c,d){if(b.wa)return b.wa.current();if(b.pb||d)return c=b.pb?b.pb.endTime:d,a=0>a.g.Xa(),b.stream.segmentIndex&&(b.wa=b.stream.segmentIndex.ec(c,!1,a)),b.wa&&b.wa.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Xa();var f=null;d&&(b.stream.segmentIndex&&(b.wa=b.stream.segmentIndex.ec(e,!1,a)),f=b.wa&&b.wa.next().value);f||(b.stream.segmentIndex&&(b.wa=b.stream.segmentIndex.ec(c,!1,a)),f=b.wa&&b.wa.next().value);return f} function ym(a,b,c,d,e){var f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C;return P(function(B){switch(B.g){case 1:f=Yc;g=b.stream;h=b.wa;b.$a=!0;ta(B,2);if(2==d.xc())throw new U(1,1,1011);return G(B,zm(a,b,d,e),4);case 4:th(a.m);if(a.C)return B.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.l.isLowLatency)&&l&&k&&("HLS"!=a.l.type||d.m))return r=new Uint8Array(0),w=t=!1,z=function(D){var I,F,L,J;return P(function(K){switch(K.g){case 1:if(t)return K.return(); w=!0;th(a.m);if(a.C)return K.return();ta(K,2);r=Am(r,D);I=!1;F=0;(new zh).box("mdat",function(O){F=O.size+O.start;I=!0}).parse(r,!1,!0);if(!I){K.A(4);break}L=r.subarray(0,F);r=r.subarray(F);return G(K,Bm(a,b,c,g,d,L,!0,e),5);case 5:b.ha&&b.wa&&Hl(b.ha,d.startTime,!0);case 4:wa(K,0);break;case 2:v=J=ya(K),H(K)}})},G(B,Cm(a,b,d,z),9);n=Cm(a,b,d);return G(B,n,7);case 7:q=B.h;th(a.m);if(a.C)return B.return();th(a.m);return b.Hc?(b.$a=!1,hm(a,b,0),B.return()):G(B,Bm(a,b,c,g,d,q,!1,e),6);case 9:y=B.h;if(v)throw v; if(w){B.A(10);break}t=!0;th(a.m);return a.C?B.return():b.Hc?(b.$a=!1,hm(a,b,0),B.return()):G(B,Bm(a,b,c,g,d,y,!1,e),10);case 10:b.ha&&b.wa&&Hl(b.ha,d.startTime,!0);case 6:th(a.m);if(a.C)return B.return();b.pb=d;h.next();b.$a=!1;b.Xg=!1;A=a.g.ma.Yb();E=A[b.type];gb(JSON.stringify(E));b.Hc||a.g.Rg(d,b.stream);hm(a,b,0);wa(B,0);break;case 2:C=ya(B);th(a.m,C);if(a.C)return B.return();b.$a=!1;if(7001==C.code)b.$a=!1,$l(b),hm(a,b,0),B.A(0);else if(b.type==f.Oa&&a.h.ignoreTextStreamFailures)a.i.delete(f.Oa), B.A(0);else{if(3017==C.code)return G(B,Dm(a,b,C),0);b.Td=!0;1==C.category&&b.ha&&Nl(b.ha,d);C.severity=2;return G(B,um(a,b,C),0)}}})}function Am(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c} function Dm(a,b,c){var d,e,f,g,h,k;return P(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.Xg}))return l.A(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();h=Math.round(100*a.G);if(20e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Km(a,b){return a&&b} function Lm(a,b){function c(g){for(var h=u(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&(c(g[k]),0===Object.keys(g[k]).length&&delete g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0"===c.substr(0,5)&&""===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Nb(Mc(c)))}};Wm.expressplayFairPlayRequest=function(a,b){$m(a,b)}; Wm.conaxFairPlayRequest=function(a,b){$m(a,b)};Wm.ezdrmFairPlayRequest=function(a,b){$m(a,b)};Wm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Mb(b.body),a=Lc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Fc("spc="+a))};Wm.expressplayInitDataTransform=function(a,b,c){return Zm(a,b,c)}; Wm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Pb(d);for(var e=0,f=c.length;e=h.height});g.length&&(g.sort(function(h,k){return k.height-h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=u(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Wc&&"image"!=c.type||b.push(c);return b}function cn(a){return Km([a],a)}function dn(a){return Km([a],a)}S("shaka.util.PlayerConfiguration",an);an.mergeConfigObjects=gn;an.createDefaultForLL=fn; an.createDefault=bn;function hn(){this.g=null;this.h=[]}function jn(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=u(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function kn(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=u(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function ln(){this.i=this.h=null;this.g=[]}function mn(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function nn(){this.Ic=this.ii=this.u=this.B=this.K=this.C=this.s=this.j=this.J=this.G=this.i=this.R=this.U=this.M=this.O=this.P=this.l=this.m=NaN;this.L=0;this.H=this.I=NaN;this.g=new hn;this.h=new ln};function on(a,b,c,d){kb.call(this);this.O=a;this.U=b;this.Ea=d.networkingEngine;this.C=c;this.s=null;this.Aa=0;this.Sa=d.hd;this.H=d.wk;this.Za=d.xk;this.g=d.config;this.j=this.I=this.h=null;this.ka=!1;this.J=d.Hk;this.ra=!1;this.l=null;this.aa=!1;this.i=this.G=null;this.Z=!1;this.M=new Map;this.sa=!1;this.Ga=d.Gk;this.W=new nn;this.ea=new Wg;this.m=new Wg;this.P=null;this.u=!1;this.La=d.jj;this.na=null;this.Ka=d.ij;this.R=!1;this.L=[];this.K=[];this.B=!0}pa(on,kb); function pn(a,b,c){(a=b?a.K:a.L)?a.push(c):c()}function qn(a){if(a.K)for(var b=u(a.K),c=b.next();!c.done;c=b.next())c=c.value,c();a.K=null}function rn(a,b){a.P=b;a.R=!0;if(a.L){b=u(a.L);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.L=null}p=on.prototype;p.getStartTime=function(){return this.C};p.nd=function(){return this.O};p.yg=function(){return this.h};function sn(a){a.Z=!0;return a.i}function tn(a){a.ra=!0;return a.J}p.getStats=function(){return this.W}; function un(a){a.aa=!0;return a.l}function vn(a){a.sa=!0;return a.M}p.start=function(){var a=this;(function(){var b;return P(function(c){switch(c.g){case 1:return G(c,Promise.resolve(),2);case 2:return ta(c,3),G(c,wn(a),5);case 5:return xn(a),G(c,yn(a),6);case 6:return xn(a),G(c,zn(a),7);case 7:return xn(a),G(c,vi(a.l),8);case 8:xn(a);a.m.resolve();wa(c,0);break;case 3:b=ya(c),b instanceof U&&(7001==b.code||7003==b.code)||a.m.reject(b),H(c)}})})()}; p.dispatchEvent=function(a){return this.P?this.P.dispatchEvent(a):kb.prototype.dispatchEvent.call(this,a)};p.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function xn(a){if(a.u)throw new U(2,7,7003);}function An(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))} function wn(a){var b,c,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:An(a,"manifest-parser");a.j||(a.I=Ri(a.O,a.U),a.j=a.I(),a.j.configure(a.g.manifest,function(){return a.B}));b=Date.now()/1E3;An(a,"manifest");if(a.h){m.A(2);break}return G(m,a.j.start(a.O,a.Za),3);case 3:a.h=m.h;if(1!=a.h.variants.length){m.A(2);break}c=[];d=a.h.variants[0];e=u([d.video,d.audio]);for(f=e.next();!f.done;f=e.next())(g=f.value)&&!g.segmentIndex&&c.push(g.createSegmentIndex());if(!(0d.endTime?Hn:En;this.g.set(d,f);for(var g=u(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.dd==e&&h.cd==f&&h.Pc(d,b)}}}; function Fn(a,b,c,d){b=new T(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Gn=1,En=2,Hn=3;function In(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:var n=(new sb(a)).rb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Jn[d])return m.return(e);f=0;g=kh([a],c);ta(m,2);g.method="HEAD";return G(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];wa(m,3);break;case 2:k=ya(m);if(!k||1002!=k.code&&1001!=k.code){m.A(3);break}g.method="GET";return G(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e? e.toLowerCase().split(";").shift():"")}})} var Jn={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",mov:"video/quicktime",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc", ssa:"text/x-ssa",ass:"text/x-ssa",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif",html:"text/html",htm:"text/html"};function Kn(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Kn(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=kf,e=a.fontStyle==lf,f=a.textDecoration.includes(mf);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Ln(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Ln(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=u(h);h=k.next().value; k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+""},a.payload)} function Ln(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&& (c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c} function Pn(a){if(Infinity===a.endTime||a.endTimea});return!0}; p.append=function(a){if(this.g){var b=Mn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=u(b);for(var d=b.next(),e={};!d.done;e={qd:void 0},d=b.next())e.qd=d.value,!a.some(function(f){return function(g){return g.startTime==f.qd.startTime&&g.endTime==f.qd.endTime&&g.text==f.qd.payload?!0:!1}}(e))&&e.qd.payload&&(d=On(e.qd))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)- c.indexOf(f):c.indexOf(f)-c.indexOf(g)});a=u(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)}};p.destroy=function(){this.g&&(Rn(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};p.isTextVisible=function(){return this.g?"showing"==this.g.mode:!1};p.setTextVisibility=function(a){a&&!this.g&&Sn(this);this.g&&(this.g.mode=a?"showing":"hidden")};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){Sn(this)}; function Sn(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}function Rn(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=u(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",Qn);Qn.prototype.enableTextDisplayer=Qn.prototype.enableTextDisplayer;Qn.prototype.setTextLanguage=Qn.prototype.setTextLanguage;Qn.prototype.setTextVisibility=Qn.prototype.setTextVisibility; Qn.prototype.isTextVisible=Qn.prototype.isTextVisible;Qn.prototype.destroy=Qn.prototype.destroy;Qn.prototype.append=Qn.prototype.append;Qn.prototype.remove=Qn.prototype.remove;Qn.prototype.configure=Qn.prototype.configure;function Tn(){}p=Tn.prototype;p.configure=function(){};p.remove=function(){};p.append=function(){};p.destroy=function(){};p.isTextVisible=function(){return!1};p.setTextVisibility=function(){};p.setTextLanguage=function(){};p.enableTextDisplayer=function(){};S("shaka.text.StubTextDisplayer",Tn);Tn.prototype.enableTextDisplayer=Tn.prototype.enableTextDisplayer;Tn.prototype.setTextLanguage=Tn.prototype.setTextLanguage;Tn.prototype.setTextVisibility=Tn.prototype.setTextVisibility; Tn.prototype.isTextVisible=Tn.prototype.isTextVisible;Tn.prototype.destroy=Tn.prototype.destroy;Tn.prototype.append=Tn.prototype.append;Tn.prototype.remove=Tn.prototype.remove;Tn.prototype.configure=Tn.prototype.configure;function Un(a,b){var c=this;document.fullscreenEnabled||cb("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen");this.m=!1;this.h=[];this.B=a;this.u=b;this.l=null;this.g=W("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.u.appendChild(this.g);this.G=(new ac(function(){c.B.paused|| Vn(c)})).xa(.25);this.i=new Map;this.j=new td;this.j.o(document,"fullscreenchange",function(){Vn(c,!0)});this.j.o(this.B,"seeking",function(){Vn(c,!0)});this.j.o(this.B,"resize",function(){var d=c.B,e=d.videoWidth;d=d.videoHeight;e&&d?c.l=e/d:c.l=null});this.s=null;"ResizeObserver"in window&&(this.s=new ResizeObserver(function(){Vn(c,!0)}),this.s.observe(this.g));this.C=new Map}p=Un.prototype;p.configure=function(a){this.G&&this.G.xa(a.captionsUpdatePeriod)}; p.append=function(a){var b=[].concat(x(this.h));a=u(Nn(a));for(var c=a.next(),d={};!c.done;d={ag:void 0},c=a.next())d.ag=c.value,b.some(function(e){return function(f){return af(f,e.ag)}}(d))||this.h.push(d.ag);Vn(this)};p.destroy=function(){if(!this.g)return Promise.resolve();this.u.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.G&&this.G.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.s&&(this.s.disconnect(),this.s=null);return Promise.resolve()}; p.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime=b});Vn(this,c>this.h.length);return!0};p.isTextVisible=function(){return this.m};p.setTextVisibility=function(a){this.m=a;Vn(this,!0)};p.setTextLanguage=function(a){a&&"und"!=a?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};p.enableTextDisplayer=function(){};function Wn(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1} function Xn(a,b,c,d,e){var f=!1,g=[],h=[];b=u(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.aj:null;l&&(g.push(l.cg),l.Zc&&g.push(l.Zc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?Wn(a,n)||(f=!0):(Yn(a,k,e),l=a.i.get(k),n=l.aj,f=!0));0a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Te?(f.width="100%",c.lineAlign==Ve?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Ve?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Ve?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;a=$n(c);"line-left"==a?(f.cssFloat= "left",null!==c.position&&(f.position="absolute",c.writingMode==Te?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Te?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Te?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode= c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Te?f.width=c.size+"%":f.height=c.size+"%")}function ao(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}} function bo(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",Un);Un.prototype.enableTextDisplayer=Un.prototype.enableTextDisplayer;Un.prototype.setTextLanguage=Un.prototype.setTextLanguage;Un.prototype.setTextVisibility=Un.prototype.setTextVisibility;Un.prototype.isTextVisible=Un.prototype.isTextVisible;Un.prototype.remove=Un.prototype.remove;Un.prototype.destroy=Un.prototype.destroy;Un.prototype.append=Un.prototype.append; Un.prototype.configure=Un.prototype.configure;function co(a,b){function c(f){for(var g=f,h=u(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.startf?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Mn(a);a="WEBVTT\n\n";d=u(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left"); break;case "right":g.push("align:right");break;case Re:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function eo(a,b){this.h=a;this.g=b;this.i=void 0;this.u=!1;this.H=!0;this.l=this.C=!1;this.s=this.m=void 0;this.B=0;this.I=!1;this.G=new td;this.j=null}eo.prototype.setMediaElement=function(a){this.j=a;fo(this)};eo.prototype.configure=function(a){this.g=a};function go(a){a.u=!1;a.H=!0;a.C=!1;a.l=!1;a.m=0;a.s=0;a.B=0;a.I=!1;a.j=null;a.G.Ua()}function ho(a,b){a.l=b;a.l?a.i==io?a.i=jo:a.i==ko&&(a.i=lo):a.i==jo?a.i=io:a.i==lo&&(a.i=ko)} function mo(a,b){if(a.j){var c=a.j.play();c&&c.then(function(){a.B=b}).catch(function(){a.B=0})}} function no(a,b,c){try{if(!a.g.enabled)return b;var d=oo(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=po;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=qo;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=ro;break a}e=void 0}d.ot=e;d.su= !0;var f=so(d);return to(b,f)}catch(g){return db("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function fo(a){a.G.oa(a.j,"play",function(){a.m||(a.m=Date.now())});a.G.oa(a.j,"playing",function(){a.s||(a.s=Date.now())})}function oo(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}} function uo(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,oo(a));c.pr=a.h.Xa();var e=c.ot===vo||c.ot===qo;a.C&&e&&(c.bs=!0,c.su=!0,a.C=!1);null==c.su&&(c.su=a.H);c.v===wo&&(a.h.T()&&(c.ltc=a.h.Le()),e=!a.I&&a.s&&a.m?a.s-(a.B||a.m):void 0,void 0!=e&&(c.msd=e,a.I=!0));a=xo(a,c);if(d)d=yo(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=so(a);f&&(b.uris=b.uris.map(function(g){return to(g,f)}))}}} function xo(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}function zo(a){if(0===a.type)return Ao;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?qo:vo;if("audio"==b)return po;if("text"==b)return"application/mp4"===a.mimeType?Bo:Co}} function Do(a,b){b=a.h.Yb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}function Eo(a,b){b=a.h.Yb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0} function Fo(a,b){var c=a.h.Ob();if(!c.length)return NaN;a=c[0];c=u(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case vo:return a.videoBandwidth||NaN;case po:return a.audioBandwidth||NaN;default:return a.bandwidth}} function so(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=u(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"=== l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function yo(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};b=u(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a=c?a*(1-c)+b*c:a};function Lo(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Go);Go.prototype.getBandwidthEstimate=Go.prototype.getBandwidthEstimate;Go.prototype.getRoundTripTime=Go.prototype.Sj;Go.prototype.getResponseDelay=Go.prototype.Rj;Go.prototype.getEstimatedThroughput=Go.prototype.Vh; Go.prototype.getMaxBitrate=Go.prototype.Wh;var Io="etp",Ho="mb",Jo="rd",Ko="rtt";function Mo(){this.g=null;this.h=[]}function No(a,b){return P(function(c){if(1==c.g)return a.g?G(c,new Promise(function(d){return a.h.push(d)}),2):c.A(2);a.g=b;H(c)})}Mo.prototype.release=function(){0a?!1:bc()?!0:cc("application/x-mpegurl")}function np(a,b){a.dispatchEvent(Xo("onstatechange",(new Map).set("state",b)))} p.ac=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return P(function(g){switch(g.g){case 1:if(c.m==lp)throw new U(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.A(2);break}return G(g,c.detach(),2);case 2:return G(g,op(c,"attach"),4);case 4:if(g.h)return g.return();ta(g,5,6);d||(np(c,"attach"),e=function(){var h=pp(c,!1);h&&qp(c,h)},c.ie.o(a,"error",e),c.h=a,c.M&&c.M.setMediaElement(a));if(!b||!bc()||c.K){g.A(6);break}return G(g,rp(c),6);case 6:Ca(g);c.Z.release();Da(g,0);break;case 5:return f=ya(g), G(g,c.detach(),10);case 10:throw f;}})};p.Dh=function(a){this.Bh=a};p.detach=function(a){a=void 0===a?!1:a;var b=this;return P(function(c){if(1==c.g){if(b.m==lp)throw new U(2,7,7E3);return G(c,b.sc(!1,a),2)}if(3!=c.g)return G(c,op(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.ie.Ua(),b.h=null),np(b,"detach"),b.u&&!a&&b.u.release()}finally{b.Z.release()}H(c)})}; function op(a,b){var c;return P(function(d){return 1==d.g?(c=++a.ve,G(d,No(a.Z,b),2)):c!=a.ve?(a.Z.release(),d.return(!0)):d.return(!1)})} p.sc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,q;return P(function(r){switch(r.g){case 1:return c.m!=lp&&(c.m=Oo),G(r,op(c,"unload"),2);case 2:if(r.h)return r.return();ua(r,3);c.Aa=!1;np(c,"unload");a&&!bc()&&(a=!1);Vo(c);d=c.je.map(function(t){return t()});c.je=[];return G(r,Promise.all(d),5);case 5:c.dispatchEvent(Xo("unloading"));c.fe&&(c.fe.release(),c.fe=null);c.h&&(c.l.Ua(),c.La.Ua());c.Jf.stop();c.jc&&(c.jc.release(),c.jc=null);c.sa&&(c.sa.stop(),c.sa=null); if(!c.J){r.A(6);break}return G(r,c.J.stop(),7);case 7:c.J=null,c.Za=null;case 6:if(!c.s){r.A(8);break}return G(r,c.s.stop(),8);case 8:if(!c.j){r.A(10);break}return G(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.L&&(c.L.release(),c.L=null);c.I&&(c.I.release(),c.I=null);if(!yc("webkit")||!c.G){r.A(12);break}return G(r,c.G.destroy(),13);case 13:c.G=null;case 12:if(!c.K){r.A(14);break}return G(r,c.K.destroy(),15);case 15:c.K=null;case 14:if(c.u&&!b)c.u.onAssetUnload();c.aa&&!b&&(c.aa.destroy(),c.aa= null);b||c.Pf.stop();c.M&&go(c.M);c.ea&&(c.ea.g=null);if(!c.C){r.A(16);break}return G(r,c.C.destroy(),17);case 17:c.C=null;case 16:c.h&&(lj(c.h),c.h.src&&(c.h.removeAttribute("src"),c.h.load()));if(!c.G){r.A(18);break}return G(r,c.G.destroy(),19);case 19:c.G=null;case 18:c.Ea&&c.U!=c.Ea.nd()&&(c.Ea.u||c.Ea.destroy(),c.Ea=null);c.U=null;c.Sa=null;c.P=null;if(c.i){e=u(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=u([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&& l.segmentIndex.release();m=u(c.i.textStreams);for(n=m.next();!n.done;n=m.next())q=n.value,q.segmentIndex&&q.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(sg={},Yb.clear());c.i=null;c.B=new nn;c.ue=null;c.Ka=null;c.R=null;c.we=-1;c.pe=[];c.Kf=-1;c.H&&c.H.Lh();sp(c);case 3:Ca(r);c.Z.release();Da(r,4);break;case 4:if(a&&bc()&&!c.K&&c.h)return G(r,rp(c),0);r.A(0)}})};p.ql=function(a){this.na=a}; p.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,q,r,t,w,v;return P(function(z){switch(z.g){case 1:if(d.m==lp)throw new U(2,7,7E3);e=null;f="";a instanceof on?(e=a,f=e.nd()||""):f=a||"";return G(z,No(d.Z,"load"),2);case 2:d.Z.release();if(!d.h)throw new U(2,7,7002);if(!d.U){z.A(3);break}d.U=f;return G(z,d.sc(!1),3);case 3:g=++d.ve;h=function(){return P(function(y){if(1==y.g)return d.ve==g?y.A(0):e?G(y,e.destroy(),3):y.A(3);throw new U(2,7,7E3);})};k=function(y,A){return P(function(E){switch(E.g){case 1:return ua(E, 2),G(E,No(d.Z,A),4);case 4:return G(E,h(),5);case 5:return G(E,y(),6);case 6:return G(E,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Ca(E),d.Z.release(),Da(E,0)}})};ta(z,5,6);null==b&&e&&(b=e.getStartTime());d.na=b;d.Aa=!1;d.dispatchEvent(Xo("loading"));if(e){c=e.U;z.A(8);break}if(c){z.A(8);break}return G(z,k(function(){return P(function(y){if(1==y.g)return G(y,tp(d,f),2);c=y.h;H(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){rn(e,d);d.B=e.getStats();z.A(11);break}return G(z,up(d,f,b,c,!0),12);case 12:(e= z.h)?(e.B=!1,rn(e,d),d.B=e.getStats(),e.start(),e.m.catch(function(){})):d.B=new nn;case 11:return m=!e,n=Date.now()/1E3,d.B=e?e.getStats():new nn,d.U=f,d.Sa=c||null,m?G(z,k(function(){return P(function(y){return G(y,vp(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):G(z,k(function(){return P(function(y){if(1==y.g)return G(y,Promise.race([e.ea,e.m]),2);d.Za=e.I;var A=e;A.ka=!0;d.J=A.j;d.i=e.yg();H(y)})},"waitForFinish"),15);case 15:if(d.K){z.A(16);break}return G(z,k(function(){return P(function(y){return G(y, rp(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&&(d.C.enableTextDisplayer?d.C.enableTextDisplayer():Dd("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),G(z,k(function(){return P(function(y){return G(y,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.Hf=e.H;d.J&&d.J.setMediaElement&&d.h&&d.J.setMediaElement(d.h);d.fe=tn(e);d.Ac=e.Ga;if(q=e.s)d.W=q;l&&d.h&&"AUDIO"===d.h.nodeName&&(wp(d), d.configure("manifest.disableVideo",!0));d.G=un(e);return G(z,k(function(){return P(function(y){return G(y,d.G.ac(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.G)||d.Ga&&d.Ga==r||(d.s=sn(e),d.Ga=e.G,"function"!=typeof d.s.setMediaElement&&(Dd("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(Dd("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."), d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(Dd("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.s.trySuggestStreams=function(){})),t=vn(e),w=e.na,G(z,k(function(){return P(function(y){return G(y,xp(d,n,w,t),0)})},"loadInner_"),20);case 20:qn(e);d.Sa&&rc()&&Mf(d.Sa)&&dk(d.K,d.U,d.Sa);z.A(14);break;case 21:return G(z,k(function(){return P(function(y){return G(y,yp(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(Xo("loaded")); case 6:Ca(z);if(!e){z.A(23);break}return G(z,e.destroy(),23);case 23:d.Ea=null;Da(z,0);break;case 5:v=ya(z);if(!v||7E3==v.code){z.A(25);break}return G(z,d.sc(!1),25);case 25:throw v;}})};function wp(a){for(var b=u(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})} p.jl=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return P(function(e){return 1==e.g?G(e,zp(c),2):3!=e.g?(d=e.h,G(e,c.sc(a,b),3)):e.return(d)})};p.Ph=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return P(function(e){return 1==e.g?G(e,zp(c,b),2):3!=e.g?(d=e.h,G(e,c.detach(a),3)):e.return(d)})}; function zp(a,b){b=void 0===b?!1:b;var c,d;return P(function(e){if(1==e.g){c=null;if(!(a.i&&a.J&&a.Za&&a.U))return e.A(2);d=a.h.currentTime;a.T()&&!b&&(d=null);return G(e,Ap(a,a.U,d,a.Sa,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.qe.push(c);a.J&&a.J.setMediaElement&&a.J.setMediaElement(null);var f=c,g=a.J,h=a.Za;f.h=a.i;f.j=g;f.I=h;f=c;g=a.Ga;f.i=a.s;f.G=g;c.s=a.W;c.start();a.i=null;a.J=null;a.Za=null;a.s=null;a.Ga=null}return e.return(c)})} p.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return P(function(f){if(1==f.g)return G(f,up(d,a,b,c),2);(e=f.h)?e.start():qp(d,new U(2,7,7005));return f.return(e)})};p.eg=function(){var a=this,b,c,d,e;return P(function(f){b=[];c=u(a.qe);for(d=c.next();!d.done;d=c.next())e=d.value,e.u||b.push(e.destroy());a.qe=[];return G(f,Promise.all(b),0)})}; function up(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return P(function(l){if(1==l.g)return d?l.A(2):G(l,tp(a,b),3);2!=l.g&&(d=l.h);if(f=Bp(a,d))return l.return(null);g=!1;h=!0;e&&(a.s&&a.Ga==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=Ap(a,b,c,d||null,!e,g,h);k=e?k.then(function(m){m.B=!1;return m}):k.then(function(m){a.qe.push(m);return m});return l.return(k)})} function Ap(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,q,r,t,w,v,z,y,A,E;return P(function(C){if(1==C.g)return h=null,k=be(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.R&&h.u?null:h},m=function(){return l()?l().getConfiguration():a.g},Infinity!=a.ka.width||Infinity!=a.ka.height||a.g.ignoreHardwareResolution?C.A(2):G(C,zc(),3);2!=C.g&&(n=C.h,a.ka.width=n.width,a.ka.height=n.height);q=new Ji(k,a.ka,null);r={networkingEngine:a.H,filter:function(B){var D, I;return P(function(F){if(1==F.g)return G(F,Ki(q,B),2);if(4!=F.g){D=F.h;if(!D)return F.A(0);I=Xo("trackschanged");return G(F,Promise.resolve(),4)}h.dispatchEvent(I);H(F)})},makeTextStreamsForClosedCaptions:function(B){return Cp(a,B)},onTimelineRegionAdded:function(B){var D=h.J;a:{var I=u(D.g);for(var F=I.next();!F.done;F=I.next())if(F=F.value,F.schemeIdUri==B.schemeIdUri&&F.id==B.id&&F.startTime==B.startTime&&F.endTime==B.endTime){I=F;break a}I=null}null==I&&(D.g.add(B),B=new T("regionadd",new Map([["region", B]])),D.dispatchEvent(B))},onEvent:function(B){return h.dispatchEvent(B)},onError:function(B){return h.onError(B)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.j&&h.R&&a.j.updateDuration()},newDrmInfo:function(B){var D=h.l,I=D?D.h:null;I&&D.B&&Ni(q,I.keySystem,B)},onManifestUpdated:function(){var B=(new Map).set("isLive",a.T());h.dispatchEvent(Xo("manifestupdated",B));pn(h,!1,function(){if(a.u)a.u.onManifestUpdated(a.T())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()}, onMetadata:function(B,D,I,F){var L=B;if("com.apple.hls.interstitial"==B&&(L="com.apple.quicktime.HLS",B={startTime:D,endTime:I,values:F},a.u))a.u.onHLSInterstitialMetadata(a,a.h,B);F=u(F);B=F.next();for(var J={};!B.done;J={Vg:void 0},B=F.next())J.Vg=B.value,"ID"!=J.Vg.name&&pn(h,!1,function(K){return function(){Dp(a,D,I,L,K.Vg)}}(J))},disableStream:function(B){return a.disableStream(B,a.g.streaming.maxDisabledTime)},addFont:function(B,D){return a.addFont(B,D)}};t=new El(function(){return a.za()}); t.addEventListener("regionadd",function(B){var D=B.region;Ep(a,"timelineregionadded",D,h);pn(h,!1,function(){a.u&&(a.u.onDashTimedMetadata(D),a.u.onDASHInterstitialMetadata(a,a.h,D))})});w=null;k.streaming.observeQualityChanges&&(w=new yl(function(){return a.Yb()}),w.addEventListener("qualitychange",function(B){Fp(a,B.quality,B.position)}),w.addEventListener("audiotrackchange",function(B){Fp(a,B.quality,B.position,!0)}));v=!0;z={nc:a.H,onError:function(B){return h.onError(B)},ef:function(B){pn(h, !0,function(){a:{var D=B,I=Xo("keystatuschanged");a.dispatchEvent(I);var F=Object.keys(D);1==F.length&&""==F[0]&&(F=["00"],D={"00":D[""]});I=1==F.length&&"00"==F[0];var L=!1;if(F.length){F=u(a.i.variants);for(var J=F.next();!J.done;J=F.next()){J=J.value;var K=[];J.audio&&K.push(J.audio);J.video&&K.push(J.video);K=u(K);for(var O=K.next();!O.done;O=K.next()){var M=O.value;O=J.allowedByKeySystem;if(M.keyIds.size){J.allowedByKeySystem=!0;M=u(M.keyIds);for(var N=M.next();!N.done;N=M.next())if(N=N.value, (N=D[I?"00":N])||a.G.H)J.allowedByKeySystem=J.allowedByKeySystem&&!!N&&!Pi.includes(N)}O!=J.allowedByKeySystem&&(L=!0)}}}if(L&&(Gp(a),!Hp(a)))break a;(D=a.j.j)&&!D.allowedByKeySystem&&Uo(a)}})},onExpirationUpdated:function(B,D){var I=Xo("expirationupdated");h.dispatchEvent(I);if((I=h.j)&&I.onExpirationUpdated)I.onExpirationUpdated(B,D)},onEvent:function(B){h.dispatchEvent(B);"drmsessionupdate"==B.type&&v&&(v=!1,B=Date.now()/1E3-h.Aa,(a.B||h.getStats()).j=B,a.O&&Xj(a.O))}};y=Ro(a,l);jh(a.H,y);A=function(){return a.hd(z)}; E={config:k,xk:r,Hk:t,Gk:w,hd:A,wk:q,networkingEngine:y,jj:e,ij:g};h=new on(b,d,c,E);return C.return(h)})}function tp(a,b){var c,d;return P(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,G(e,In(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&mc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})} function Bp(a,b){if(!bc())return!0;if(b){if(""==(a.h||dc()).canPlayType(b))return!1;if(!(bc()&&b in Si))return!0;if(Mf(b))return mc()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if("application/dash+xml"===b||"video/vnd.mpeg.dash.mpd"===b)return a.g.streaming.preferNativeDash}return!1} function Ip(a){var b=a.g.textDisplayFactory;b!==a.ue&&(a.C=b(),a.C.configure?a.C.configure(a.g.textDisplayer):Dd("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.ue=b,a.C.setTextVisibility(a.ra))} function rp(a){var b,c,d;return P(function(e){if(1==e.g)return np(a,"media-source"),a.h.removeAttribute("src"),lj(a.h),Ip(a),b=Jp(a.h,a.C,{Hj:function(){return a.keySystem()},onMetadata:function(f,g,h){f=u(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&"number"==typeof k.cueTime&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=u(k.frames),q=n.next();!q.done;q=n.next())Dp(a,l,m,"org.id3",q.value);if(a.u)a.u.onHlsTimedMetadata(k,l)}},onEvent:function(f){return a.dispatchEvent(f)}, Dk:function(){a.J&&a.J.update&&a.J.update()}},a.O),b.configure(a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Va=d,G(e,b.I,2);a.K=b;H(e)})} function Kp(a,b,c){function d(){return Lp(a)}a.l.o(b,"playing",d);a.l.o(b,"pause",d);a.l.o(b,"ended",d);a.l.o(b,"ratechange",function(){var e=a.h.playbackRate;0!=e&&(a.L&&a.L.set(e),e=Xo("ratechange"),a.dispatchEvent(e))});b.remote&&(a.l.o(b.remote,"connect",function(){return Gp(a)}),a.l.o(b.remote,"connecting",function(){return Gp(a)}),a.l.o(b.remote,"disconnect",function(){return P(function(e){if(1==e.g)return a.j&&"disconnected"==b.remote.state?G(e,om(a.j),2):e.A(2);Gp(a);H(e)})}));b.audioTracks&& (a.l.o(b.audioTracks,"addtrack",function(){return Gp(a)}),a.l.o(b.audioTracks,"removetrack",function(){return Gp(a)}),a.l.o(b.audioTracks,"change",function(){return Gp(a)}));b.textTracks&&(a.l.o(b.textTracks,"addtrack",function(e){if(e.track)switch(e=e.track,e.kind){case "metadata":Mp(a,e);break;case "chapters":Np(a,e);break;default:Gp(a)}}),a.l.o(b.textTracks,"removetrack",function(){return Gp(a)}),a.l.o(b.textTracks,"change",function(){return Gp(a)}));"none"!=b.preload&&a.l.oa(b,"loadedmetadata", function(){a.B.G=Date.now()/1E3-c})} function xp(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I;return P(function(F){switch(F.g){case 1:np(a,"load"),e=a.h,a.L=new ul({Ne:function(){return e.playbackRate},Mc:function(){return e.defaultPlaybackRate},kh:function(L){e.playbackRate=L},ni:function(L){e.currentTime+=L}}),Kp(a,e,b),Wo(a,a.g),a.Qb=a.g.preferredTextLanguage,a.me=a.g.preferredTextRole,a.le=a.g.preferForcedSubs,Op(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.s.init(function(L,J,K){a.i&&a.j&&L!=a.j.j&& Pp(a,L,!0,void 0===J?!1:J,void 0===K?0:K)}),a.s.setMediaElement(e),a.s.setCmsdManager(a.ea),a.j=Qp(a),a.j.configure(a.g.streaming),a.m=Rp,a.dispatchEvent(Xo("streaming")),f=c;case 2:(h=a.j.j)||f||(f=Hp(a)?a.s.chooseVariant():null);k=[];g=h||f;l=u([g.video,g.audio]);for(m=l.next();!m.done;m=l.next())(n=m.value)&&!n.segmentIndex&&k.push(n.createSegmentIndex());if(!(0z&&(w=z);return G(F,Vp(f,w),9);case 9:y=F.h,q(y);case 8:Pp(a,f,!0,!1,0);case 7:return a.I.ready(),A=a.ic().find(function(L){return L.active}),A||((E=Lg(a.i.textStreams,a.Qb,a.me,a.le)[0]||null)&&mn(a.B.h,E,!0), f&&(E?(Wp(a,f.audio,E)&&(a.ra=!0),a.ra&&a.C.setTextVisibility(!0),Xp(a)):a.ra=!1),E&&(a.g.streaming.alwaysStreamText||a.Tc())&&(mm(a.j,E),Yp(a))),G(F,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),Zp(a));Gp(a);Hp(a);a.i.variants.some(function(L){return L.primary});if((C=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)B=function(){return $p(a)},a.l.o(e,"timeupdate",B);C||(D=function(){return aq(a)}, a.l.o(e,"timeupdate",D),aq(a),a.i.nextUrl&&(0, 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.'), m.resolve()),a.l.oa(d,"error",function(){m.reject(pp(a))}),G(w,Yf(a.g.streaming.loadTimeout,m),4);case 4:if((n=a.T())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)q=function(){return $p(a)},a.l.o(d,"timeupdate",q);n||(r=function(){return aq(a)},a.l.o(d,"timeupdate",r),aq(a));a.u&&(a.u.onManifestUpdated(n),n&&(t=a.za().end,a.l.o(d,"progress",function(){var v=a.za().end;t!=v&&(a.u.onManifestUpdated(a.T()),t=v)}))); a.Aa=!0;H(w)}})}function dq(a){var b=a.g.preferredAudioLanguage;""!=b&&a.bh(b,a.g.preferredVariantRole)}function fq(a){var b=a.g.preferredTextLanguage;""!=b&&a.dh(b,a.g.preferredTextRole,a.g.preferForcedSubs)} function Mp(a,b){if("metadata"==b.kind){b.mode="hidden";a.l.o(b,"cuechange",function(){if(b.activeCues)for(var d=u(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Dp(a,e.startTime,e.endTime,e.type,e.value),a.u)a.u.onCueMetadataChange(e.value);if(b.cues){d=[];e=u(b.cues);for(var f=e.next(),g={};!f.done;g={uc:void 0},f=e.next())g.uc=f.value,"com.apple.quicktime.HLS"==g.uc.type&&null!=g.uc.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.uc.startTime&&k.endTime==h.uc.endTime}}(g)), f||(f={startTime:g.uc.startTime,endTime:g.uc.endTime,values:[]},d.push(f)),f.values.push(g.uc.value));d=u(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.u&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.T()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.u.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new ac(function(){var d=gq(a);d=u(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ia().Y(.5); a.je.push(function(){c.stop()})}}function Dp(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Xo("metadata",b))}function Np(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new ac(function(){b.mode="hidden"})).Ia().Y(.5);a.je.push(function(){c.stop()})}}p.Lk=function(){for(var a=this.Z;a.g;)a.release()};p.hd=function(a){return new Mh(a)}; function Ro(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?pn(b(),!0,e):e()}b||(b=function(){return null});return new fh(function(e,f,g,h){var k=b()?b().i:a.s;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Xo("downloadheadersreceived",f));d(function(){if(a.ea){var h=a.ea;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;kt);if(v){var z=v.next().value;if(z&&z!=m){if(!Td(m.S(),z.S())){var y=z.S()[0],A=f.uris[0],E=new URL(y),C=new URL(A);if(E.origin!==C.origin)var B=y;else{for(var D=E.pathname.split("/").slice(1),I=C.pathname.split("/").slice(1,-1);D[0]===I[0];)D.shift(),I.shift();for(;I.length;)I.shift(),D.unshift("..");B=D.join("/")}n.nor=B}if((z.eb||z.Na)&& (m.eb!=z.eb||m.Na!=z.Na)){var F=z.eb+"-";z.Na&&(F+=z.Na);n.nrr=F}}}var L=h.h.Xa()||1,J=Eo(h,r.type)||500,K=r.bandwidth;var O=K?K*(m.endTime-m.startTime)/1E3/(J/L/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(O)||(n.rtp=O)}}q&&n.ot!==Bo&&(n.tb=Fo(h,n.ot)/1E3);uo(h,f,n)}}catch(M){db("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:uo(h,f,{ot:"k"});break;case 4:uo(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f= f.data.byteLength;var g=b()?b().getStats():a.B;g&&(g.Ic=isNaN(g.Ic)?f:g.Ic+f,0===e&&(g.ii=f))}})}function Sp(a,b){return new ll(a.h,a.i,a.g.streaming,b,function(){a.jc&&xl(a.jc,!0);a.j&&a.j.Cd();a.P&&hq(a)},function(c){return a.dispatchEvent(c)})} function Tp(a,b){b=new Dn(a.fe,a.T()||0=a.h.duration-1}break;case Rp:a:if(a.isEnded()||fk(a.K))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.wc();var d=dj(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=fj(a.h.buffered,a.h.currentTime);c=a.P;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f&&0=b)return 1;if(!(a<=this.h.currentTime)&&a=Math.floor(e.end)&&c.fd():Math.floor(d)<=Math.floor(e.start+f)&&c.fd()}))}; p.fd=function(){var a=this.L.Mc();this.m==cq&&this.L.set(a);this.m==Rp&&(this.L.set(a),this.s.playbackRateChanged(a),jm(this.j,!1));this.La.Ua()}; p.Ob=function(){if(this.i&&!this.cb()){for(var a=this.j?this.j.j:null,b=[],c=0,d=u(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Jg(e)){var f=Ag(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return Ig(g)}):[]}; p.ic=function(){if(this.i&&!this.cb()){for(var a=this.j?this.j.u:null,b=[],c=u(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Bg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?bq(this).map(function(f){return Gg(f)}):[]};p.Je=function(){var a=this.pe;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Cg(b)})}; p.rj=function(a){var b=this,c,d,e,f;return P(function(g){if(1==g.g){if(b.m!=Rp&&b.m!=cq)return g.return(null);c=b.pe;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.A(2):G(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Xb(function(h){var k=jq(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.Jc;for(var l=h.j-h.startTime,m=0;mk(q,l))&&(n=q);n!=l&&(n?(l=Ag(n),h.qf(l,!0,d||0)):Uo(h))}var h=this;c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;f=void 0===f?!1:f;if(this.i&&this.I&&(g(),!this.cb()))return;(function(){if(h.h&&h.h.audioTracks){var k=Lg(h.Ob(),a,b||"",!1)[0];k&&h.qf(k)}})()}; p.dh=function(a,b,c){function d(){e.Qb=a;e.me=b||"";e.le=c||!1;var f=Lg(e.i.textStreams,e.Qb,e.me,e.le)[0]||null;f&&f!=e.j.u&&(mn(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.Tc())&&(mm(e.j,f),kq(e),Yp(e))}var e=this;c=void 0===c?!1:c;if(this.i&&this.I&&(d(),!this.cb()))return;(function(){var f=Lg(e.ic(),a,b||"",c||!1)[0];f&&e.eh(f)})()}; p.Vk=function(a,b,c){function d(){for(var f=null,g=u(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}null!=f&&(e.W=e.g.adaptationSetCriteriaFactory(),e.W.configure({language:f.language,role:"",channelCount:0,pd:"",spatialAudio:!1,videoLayout:"",label:a,Hd:"",ed:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),Uo(e,b,c))}var e=this;b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.I&&(d(),!this.cb()))return;(function(){if(e.h&&e.h.audioTracks){var f= Array.from(e.h.audioTracks),g=null;f=u(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&lq(e,g)}})()};p.Tc=function(){var a=this.ra;return this.C?this.C.isTextVisible():a};p.Uh=function(){return this.h&&this.h.currentSrc&&this.h.textTracks?oq(this).map(function(a){return Gg(a)}):[]}; p.wg=function(a){if(!this.h||!this.h.currentSrc||!this.h.textTracks)return[];var b=cd(a),c=oq(this).filter(function(h){return cd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=u(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=u(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a}; function bq(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function gq(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function oq(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})} p.tf=function(a){a=!!a;this.ra!=a&&(this.ra=a,this.m==Rp?(this.C.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.u||(a=Lg(this.i.textStreams,this.Qb,this.me,this.le),01E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency, a.R=Math.max(a.R-(g-f)/2,f+d),a.Ka=Date.now());e&&null!==a.R&&(h=a.R+d,k=a.R-d);g=c.end-a.h.currentTime;d=0;a.m==cq&&(e=a.h.buffered,0h?(b!=l&&a.Gc(l,!1),a.Ka=null):void 0!=k&&m&&g-de)&&a.Kfb&&(b+=Math.pow(2,32)),b=b.toString(16);return new U(2,3,3016,c,b,a.h.error.message)}function Op(a,b,c){0=this.za().end};S("shaka.Player",Y);Y.prototype.isEnded=Y.prototype.isEnded;Y.prototype.isRemotePlayback=Y.prototype.cb;Y.prototype.addFont=Y.prototype.addFont;Y.prototype.setVideoContainer=Y.prototype.mh;Y.prototype.getFetchedPlaybackInfo=Y.prototype.Ej; Y.prototype.getManifestParserFactory=Y.prototype.Lj;Y.prototype.getManifest=Y.prototype.yg;Y.prototype.retryStreaming=Y.prototype.$g;Y.prototype.setMaxHardwareResolution=Y.prototype.al;Y.prototype.addChaptersTrack=Y.prototype.dj;Y.prototype.addThumbnailsTrack=Y.prototype.fj;Y.prototype.addTextTrackAsync=Y.prototype.ej;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getBufferedInfo=Y.prototype.Yb;Y.prototype.getSegmentAvailabilityDuration=Y.prototype.Oe; Y.prototype.getPresentationStartTimeAsDate=Y.prototype.Yh;Y.prototype.getPlayheadTimeAsDate=Y.prototype.Pj;Y.prototype.setTextTrackVisibility=Y.prototype.tf;Y.prototype.getChapters=Y.prototype.wg;Y.prototype.getChaptersTracks=Y.prototype.Uh;Y.prototype.isTextTrackVisible=Y.prototype.Tc;Y.prototype.selectVariantsByLabel=Y.prototype.Vk;Y.prototype.selectTextLanguage=Y.prototype.dh;Y.prototype.selectAudioLanguage=Y.prototype.bh;Y.prototype.getTextLanguages=Y.prototype.Uj; Y.prototype.getAudioLanguages=Y.prototype.sj;Y.prototype.getTextLanguagesAndRoles=Y.prototype.Vj;Y.prototype.getAudioLanguagesAndRoles=Y.prototype.tj;Y.prototype.selectVariantTrack=Y.prototype.qf;Y.prototype.selectTextTrack=Y.prototype.eh;Y.prototype.getThumbnails=Y.prototype.Ag;Y.prototype.getAllThumbnails=Y.prototype.rj;Y.prototype.getImageTracks=Y.prototype.Je;Y.prototype.getTextTracks=Y.prototype.ic;Y.prototype.getVariantTracks=Y.prototype.Ob;Y.prototype.cancelTrickPlay=Y.prototype.fd; Y.prototype.trickPlay=Y.prototype.Gc;Y.prototype.getPlaybackRate=Y.prototype.Xa;Y.prototype.isBuffering=Y.prototype.Se;Y.prototype.getKeyStatuses=Y.prototype.Ke;Y.prototype.getActiveSessionsMetadata=Y.prototype.vg;Y.prototype.getExpiration=Y.prototype.Pd;Y.prototype.drmInfo=Y.prototype.drmInfo;Y.prototype.keySystem=Y.prototype.keySystem;Y.prototype.isFullyLoaded=Y.prototype.ci;Y.prototype.goToLive=Y.prototype.ek;Y.prototype.seekRange=Y.prototype.za;Y.prototype.isAudioOnly=Y.prototype.Qc; Y.prototype.isInProgress=Y.prototype.Rc;Y.prototype.isLive=Y.prototype.T;Y.prototype.getAdManager=Y.prototype.Ie;Y.prototype.getAssetUri=Y.prototype.nd;Y.prototype.getNetworkingEngine=Y.prototype.Db;Y.prototype.getMediaElement=Y.prototype.Oj;Y.prototype.getManifestType=Y.prototype.Me;Y.prototype.getLoadMode=Y.prototype.od;Y.prototype.resetConfiguration=Y.prototype.Pk;Y.prototype.getBufferFullness=Y.prototype.Th;Y.prototype.getNonDefaultConfiguration=Y.prototype.Xh; Y.prototype.getConfigurationForLowLatency=Y.prototype.yj;Y.prototype.getConfiguration=Y.prototype.getConfiguration;Y.prototype.configurationForLowLatency=Y.prototype.oj;Y.prototype.configure=Y.prototype.configure;Y.prototype.releaseAllMutexes=Y.prototype.Lk;Y.prototype.destroyAllPreloads=Y.prototype.eg;Y.prototype.preload=Y.prototype.preload;Y.prototype.detachAndSavePreload=Y.prototype.Ph;Y.prototype.unloadAndSavePreload=Y.prototype.jl;Y.prototype.load=Y.prototype.load; Y.prototype.updateStartTime=Y.prototype.ql;Y.prototype.unload=Y.prototype.sc;Y.prototype.detach=Y.prototype.detach;Y.prototype.attachCanvas=Y.prototype.Dh;Y.prototype.attach=Y.prototype.ac; Y.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:b={};if(!a){k.A(2);break}return G(k,yi(),3);case 3:b=k.h;case 2:var l={};if(bc())for(var m in Si)l[m]=!0;m=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=bc()?!!Si[n]:cc(n);c=l;m='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(x(Bf)); l={};m=u(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=Of(n)?!0:bc()?zd(n)||(uf(n)?!0:!1):cc(n);var q=n.split(";")[0];l[q]=l[q]||l[n]}d=l;return G(k,zc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=vq;for(h in g)f[h]=g[h]();return k.return(f)}})};Y.isBrowserSupported=mp;Y.setAdManagerFactory=function(a){So=a};Y.registerSupportPlugin=function(a,b){vq[a]=b};Y.prototype.destroy=Y.prototype.destroy;var lp=0,Oo=1,Rp=2,cq=3; Y.LoadMode={DESTROYED:lp,NOT_LOADED:Oo,MEDIA_SOURCE:Rp,SRC_EQUALS:cq};Y.version="v4.13.0";var wq=["4","13"];Ed=new function(a){this.g=a;this.i=Fd;this.h=Gd}(new Cd(Number(wq[0]),Number(wq[1])));var vq={},So=null;function xq(){this.g=[];this.i=this.l=this.j=this.h=0}function yq(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function zq(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new td;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}p=zq.prototype;p.needsSkipUI=function(){return!1};p.isClientRendering=function(){return!0};p.isUsingAnotherMediaElement=function(){return!0};p.getDuration=function(){return this.g.getDuration()};p.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()}; p.getRemainingTime=function(){return this.h.getRemainingTime()};p.isPaused=function(){return this.i};p.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return this.h.getAdSkippableState()};p.skip=function(){return this.h.skip()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.resume()};p.getVolume=function(){return this.h.getVolume()}; p.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};p.isMuted=function(){return 0==this.h.getVolume()};p.isLinear=function(){return this.g.isLinear()};p.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};p.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)}; p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()}; p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return this.g.getMediaUrl()};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",zq);zq.prototype.release=zq.prototype.release; zq.prototype.getPodIndex=zq.prototype.getPodIndex;zq.prototype.getTimeOffset=zq.prototype.getTimeOffset;zq.prototype.getMediaUrl=zq.prototype.getMediaUrl;zq.prototype.getAdvertiserName=zq.prototype.getAdvertiserName;zq.prototype.getCreativeAdId=zq.prototype.getCreativeAdId;zq.prototype.getAdId=zq.prototype.getAdId;zq.prototype.getVastMediaWidth=zq.prototype.getVastMediaWidth;zq.prototype.getVastMediaHeight=zq.prototype.getVastMediaHeight;zq.prototype.getVastMediaBitrate=zq.prototype.getVastMediaBitrate; zq.prototype.getDescription=zq.prototype.getDescription;zq.prototype.getTitle=zq.prototype.getTitle;zq.prototype.getPositionInSequence=zq.prototype.getPositionInSequence;zq.prototype.getSequenceLength=zq.prototype.getSequenceLength;zq.prototype.setMuted=zq.prototype.setMuted;zq.prototype.resize=zq.prototype.resize;zq.prototype.isLinear=zq.prototype.isLinear;zq.prototype.isMuted=zq.prototype.isMuted;zq.prototype.setVolume=zq.prototype.setVolume;zq.prototype.getVolume=zq.prototype.getVolume; zq.prototype.play=zq.prototype.play;zq.prototype.pause=zq.prototype.pause;zq.prototype.skip=zq.prototype.skip;zq.prototype.canSkipNow=zq.prototype.canSkipNow;zq.prototype.getTimeUntilSkippable=zq.prototype.getTimeUntilSkippable;zq.prototype.isSkippable=zq.prototype.isSkippable;zq.prototype.isPaused=zq.prototype.isPaused;zq.prototype.getRemainingTime=zq.prototype.getRemainingTime;zq.prototype.getMinSuggestedDuration=zq.prototype.getMinSuggestedDuration;zq.prototype.getDuration=zq.prototype.getDuration; zq.prototype.isUsingAnotherMediaElement=zq.prototype.isUsingAnotherMediaElement;zq.prototype.isClientRendering=zq.prototype.isClientRendering;zq.prototype.needsSkipUI=zq.prototype.needsSkipUI;function Aq(){} function Bq(a,b){var c=[];a=u(me(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=qe(d.value,"InLine"))if(d=qe(d,"Creatives")){d=u(me(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=qe(e,"Linear");f&&Cq(c,b,f);if(e=qe(e,"NonLinearAds")){e=me(e,"NonLinear");e=u(e);for(var g=e.next();!g.done;g=e.next())a:{f=c;var h=b,k=g.value,l=qe(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=qe(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=oe(l)){"text/html"===g&&(l="data:text/html;charset=UTF-8,"+ encodeURIComponent(l));var m=we(k,"width",Ce)||we(k,"expandedWidth",Ce),n=we(k,"height",Ce)||we(k,"expandedHeight",Ce);if(m||n){var q=null;(k=k.attributes.minSuggestedDuration)&&(q=ae(k));k=0;null!=h&&(k=h);f.push({id:null,groupId:null,startTime:k,endTime:null,uri:l,mimeType:g,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:q,once:!0,pre:null==h,post:Infinity==h,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:m||0,y:n||0}}})}}}}}}return c} function Cq(a,b,c){var d=0;null!=b&&(d=b);var e=null;c.attributes.skipoffset&&(e=ae(c.attributes.skipoffset),isNaN(e)&&(e=null));if(c=qe(c,"MediaFiles")){var f=me(c,"MediaFile");c=f;f=f.filter(function(h){return"streaming"==h.attributes.delivery});f.length&&(c=f);c=c.sort(function(h,k){return(parseInt(k.attributes.height,10)||0)-(parseInt(h.attributes.height,10)||0)});c=u(c);for(f=c.next();!f.done;f=c.next())if(f=f.value,!f.attributes.apiFramework){var g=oe(f);if(g){a.push({id:null,groupId:null,startTime:d, endTime:null,uri:g,mimeType:f.attributes.type||null,isSkippable:null!=e,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1,loop:!1,overlay:null});break}}}}S("shaka.ads.Utils",Aq);Aq.ADS_LOADED="ads-loaded";Aq.AD_STARTED="ad-started";Aq.AD_FIRST_QUARTILE="ad-first-quartile";Aq.AD_MIDPOINT="ad-midpoint";Aq.AD_THIRD_QUARTILE="ad-third-quartile";Aq.AD_COMPLETE="ad-complete";Aq.AD_STOPPED="ad-stopped";Aq.AD_SKIPPED="ad-skipped"; Aq.AD_VOLUME_CHANGED="ad-volume-changed";Aq.AD_MUTED="ad-muted";Aq.AD_PAUSED="ad-paused";Aq.AD_RESUMED="ad-resumed";Aq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Aq.CUEPOINTS_CHANGED="ad-cue-points-changed";Aq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Aq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Aq.AD_CLICKED="ad-clicked";Aq.AD_PROGRESS="ad-progress";Aq.AD_BUFFERING="ad-buffering";Aq.AD_IMPRESSION="ad-impression";Aq.AD_DURATION_CHANGED="ad-duration-changed";Aq.AD_CLOSED="ad-closed"; Aq.AD_LOADED="ad-loaded";Aq.ALL_ADS_COMPLETED="all-ads-completed";Aq.AD_LINEAR_CHANGED="ad-linear-changed";Aq.AD_METADATA="ad-metadata";Aq.AD_RECOVERABLE_ERROR="ad-recoverable-error";Aq.AD_ERROR="ad-error";Aq.AD_BREAK_READY="ad-break-ready";Aq.AD_INTERACTION="ad-interaction";Aq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Aq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Aq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Dq(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.H=!1;this.B=this.s=null;this.I=NaN;this.l=e;this.j=null;this.h=new td;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.u,this.i);this.G.initialize();this.m=new google.ima.AdsLoader(this.G);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.13.0");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m, google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Eq(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Fq(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.oa(this.i,"play",function(){f.H=!0})}Dq.prototype.configure=function(a){this.s=a};Dq.prototype.stop=function(){this.g&&this.g.stop();this.u&&lj(this.u)}; Dq.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.G.destroy()};function Fq(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new T("ad-error",b));Gq(a,null);a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))} function Eq(a,b){a.l(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.C);a.l(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager", a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=u(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Hq(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Iq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Iq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth, a.i.offsetHeight,Iq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Iq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.H||a.s.skipPlayDetection?a.g.start():a.h.oa(a.i,"play",function(){a.H=!0;a.g.start()})}catch(f){Gq(a,null)}} function Iq(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1} function Hq(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new T(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Fq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Jq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Jq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE, function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Gq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Gq(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")}); a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")}); a.h.o(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g, google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})} function Jq(a,b){var c=b.getAd();c?(a.j=new zq(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.s.supportsMultipleMediaElements||a.l(new T("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new T("ad-started",b)),a.j.isLinear()&&(a.u.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):cb("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")} function Gq(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.s.supportsMultipleMediaElements&&a.l(new T("ad-content-resume-requested"));a.l(new T("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.u.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function Kq(a,b,c,d,e,f){this.g=a;this.i=b;this.j=(this.h=b.isSkippable)?b.skipOffset||0:b.skipOffset;this.l=b.skipFor;this.B=c;this.s=d;this.m=e;this.u=f;this.C=b.overlay}p=Kq.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!0};p.isUsingAnotherMediaElement=function(){return this.u};p.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};p.getMinSuggestedDuration=function(){return this.getDuration()}; p.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};p.isPaused=function(){return this.g.paused};p.isSkippable=function(){return this.h&&null!=this.l?this.getDuration()-this.getRemainingTime()=v&&!f.G.has(t)&&Qq(t)&&f.G.set(t,f.j.preload(t.uri,null,t.mimeType||void 0));A.A(4);break}if(!f.G.has(t)){A.A(7);break}return G(A,f.G.get(t),8);case 8:(z=A.h)&&z.destroy(),f.G.delete(t);case 7:y=JSON.stringify(t),f.L.has(y)&&f.L.delete(y),f.H.delete(t),t.overlay||(l=!0);case 4:r=q.next();A.A(3);break;case 5:l&&Rq(f),H(A)}})})).xa(1)}p=Mq.prototype;p.configure=function(a){this.P=a;Sq(this)}; function Sq(a){if(a.I&&a.P&&!a.K){var b=a.P.supportsMultipleMediaElements,c=a.h;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.B==b&&(a.B=!b,a.B?(a.g=a.h,a.J&&(a.J.parentElement&&a.I.removeChild(a.J),a.J=null)):(a.J||(b=document.createElement(a.h.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.backgroundColor="rgb(0, 0, 0)",b.style.display="none",b.setAttribute("playsinline",""),a.J=b),a.g=a.J))}} p.stop=function(){this.l&&this.l.Ua();this.L.clear();this.H.clear();this.j.eg();this.G.clear();this.j.detach();this.K=!1;this.u=this.m=null;this.B=!0;this.g=this.h;this.J=null;this.I&&lj(this.I);this.s&&(this.s.stop(),this.s=null)};p.release=function(){this.stop();this.M&&this.M.release();this.l&&this.l.release();this.O&&(this.O.stop(),this.O=null);this.R&&(this.R.stop(),this.R=null);this.j.destroy()};p.vc=function(){return this.j}; function Tq(a,b){var c;P(function(d){if(1==d.g)return Pq(a),G(d,Uq(a,b),2);c=d.h;c.length?Vq(a,c):cb("Unsupported HLS interstitial",b);H(d)})} function Wq(a,b){var c=qe(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f="true"==c.attributes.loop;if(d&&e){var g={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920,y:1080}},h=qe(c,"Viewport"),k=qe(c,"TopLeft");c=qe(c,"Size");if(h&&k&&c){g=we(h,"x",Ce);if(null==g)return;h=we(h,"y",Ce);if(null==h)return;var l=we(k,"x",Ce);if(null==l)return;k=we(k,"y",Ce);if(null==k)return;var m=we(c,"x",Ce);if(null==m)return;c=we(c,"y",Ce);if(null==c)return;g={viewport:{x:g,y:h},topLeft:{x:l, y:k},size:{x:m,y:c}}}Vq(a,[{id:b.id,groupId:null,startTime:b.startTime,endTime:b.endTime,uri:d,mimeType:e,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:f,overlay:g}])}} p.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:return c={type:12},G(n,Xq(b,a,c),2);case 2:d=n.h;e=ee(d,"VAST,vmap:VMAP");if(!e)throw new U(2,10,10007);f=[];if("VAST"==e.tagName){f=Bq(e,b.m);n.A(3);break}if("vmap:VMAP"!=e.tagName){n.A(3);break}for(var q=[],r=u(me(e,"vmap:AdBreak")),t=r.next();!t.done;t=r.next()){var w=t.value,v=w.attributes.timeOffset;v&&(t=null,"start"==v?t=0:"end"==v?t=Infinity:t=ae(v),(w=qe(w,"vmap:AdSource"))&&(w=qe(w,"vmap:AdTagURI"))&& (w=ne(w))&&q.push({time:t,uri:w}))}g=u(q);h=g.next();case 5:if(h.done){n.A(3);break}k=h.value;return G(n,Xq(b,k.uri,c),8);case 8:l=n.h;m=ee(l,"VAST");if(!m)throw new U(2,10,10007);f.push.apply(f,x(Bq(m,k.time)));h=g.next();n.A(5);break;case 3:Vq(b,f),H(n)}})}; function Vq(a,b){var c,d,e,f,g,h,k,l;P(function(m){switch(m.g){case 1:c=!1,d=u(b),e=d.next();case 2:if(e.done){m.A(4);break}f=e.value;if(!f.uri){cb("Missing URL in interstitial",f);m.A(3);break}if(f.mimeType){m.A(5);break}ta(m,6);g=a.j.Db();return G(m,In(f.uri,g,a.C.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;wa(m,5);break;case 6:ya(m);case 5:h=f.id||JSON.stringify(f);if(a.L.has(h)){m.A(3);break}f.loop&&!f.overlay&&cb("Loop is only supported in overlay interstitials",f); f.overlay||(c=!0);a.L.add(h);a.H.add(f);k=!1;f.pre&&null==a.m?k=!0:0!=f.startTime||f.canJump?null!=a.m&&(l=f.startTime-a.m,0=l&&(k=!0)):k=!0;k&&!a.G.has(f)&&Qq(f)&&a.G.set(f,a.j.preload(f.uri,null,f.mimeType||void 0));case 3:e=d.next();m.A(2);break;case 4:c&&Rq(a),H(m)}})} function Nq(a,b,c){b=void 0===b?!1:b;c=void 0===c?null:c;var d=0,e=null;if(a.H.size&&null!=a.m){var f=a.h.ended,g=Array.from(a.H).sort(function(m,n){return n.startTime-m.startTime}),h=g;h=b?g.filter(function(m){return m.pre}):f?g.filter(function(m){return m.post}):g.filter(function(m){return!m.pre&&!m.post});g=u(h);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(b)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=a.m-Math.round(1E3*h.startTime)/1E3;0=l||!h.canJump)&&(k=null== c&&a.u&&!a.u.pre&&!a.u.post&&a.u.startTime>=h.startTime?!1:!0)}k&&(!a.u||h.startTime>=a.u.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&.001Math.abs(g.startTime-b.startTime)}).length);b.once&&(f++,a.H.delete(b),b.overlay||Rq(a));b.mimeType&&(b.mimeType.startsWith("image/")||"text/html"===b.mimeType)?b.overlay?Yq(a,b,c,d,f):cb("Unsupported interstitial",b):a.B&&b.overlay?cb("Unsupported interstitial",b):Zq(a,b,c,d,e,f)} function Yq(a,b,c,d,e){function f(){a.s&&(a.s.stop(),a.s=null);a.I.removeChild(k);a.i(new T("ad-stopped"));var q=Nq(a,b.pre,d-e);q?(a.l.Ua(),Oq(a,q,c,++d,Date.now(),e)):a.K=!1}var g=b.overlay,h="text/html"==b.mimeType?"iframe":"img",k=document.createElement(h);k.style.objectFit="contain";k.style.position="absolute";k.style.border="none";a.i(new T("ad-started",(new Map).set("ad",new Lq(b,c,d))));"iframe"==h?k.src=b.uri:(k.src=b.uri,k.onerror=function(q){a.i(new T("ad-error",(new Map).set("originalEvent", q)));f()});var l=g.viewport,m=g.topLeft;g=g.size;0==l.x&&0==l.y?(k.width=b.overlay.size.x,k.height=b.overlay.size.y,k.style.bottom="10%",k.style.left="0",k.style.right="0",k.style.width="100%",b.overlay.size.y||"iframe"!=h||(k.style.height="auto")):(k.style.height=g.y/l.y*100+"%",k.style.left=m.x/l.x*100+"%",k.style.top=m.y/l.y*100+"%",k.style.width=g.x/l.x*100+"%");a.I.appendChild(k);var n=Date.now();a.s&&a.s.stop();a.s=new ac(function(){b.playoutLimit&&(Date.now()-n)/1E3>b.playoutLimit?(a.i(new T("ad-complete")), f()):b.endTime&&a.h.currentTime>b.endTime?(a.i(new T("ad-complete")),f()):a.h.currentTime=I.playRangeEnd?v():a.i(new T("ad-paused"))}),a.l.o(a.g,"volumechange",function(){a.g.muted?a.i(new T("ad-muted")):a.i(new T("ad-volume-changed"))}), ta(D,4),Pq(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(A=b.endTime-b.startTime,0d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.O.includes(d.adId)&&(a.B=b,a.h.currentTime=c.startTimeInSeconds)}} function hr(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.G,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.u.includes("firstQuartile")?(a.u.push("firstQuartile"),jr(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),jr(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),jr(a,"thirdQuartile"));d=a.g.getRemainingTime(); e=a.g.getDuration();a.g.canSkipNow()&&0=d||d>e)&&br(a)}if(!a.g||!a.g.isLinear()){a:for(d=u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;fb){if(a.O.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}br(a);a.M=e;a.g=new $q(g,f+1,e.ads.length,!0,a.h);a.G=g;0===f&&jr(a,"breakStart");kr(a);break}}}if(!a.g)for(d= u(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;fb&&(a.h.currentTime=a.B),a.B=null)}}} function br(a){if(a.g){for(;a.C.lastChild;)a.C.removeChild(a.C.firstChild);a.K||a.O.push(a.G.adId);var b=a.g.m;(void 0===b?0:b)?jr(a,"skip"):jr(a,"complete");b=u(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.s.Ja(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&jr(a,"breakEnd");a.g=null;a.G=null;a.M=null}} function kr(a){var b=!1;a.h.paused?b=!0:(jr(a,"impression"),jr(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&jr(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||jr(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(jr(a,"impression"),jr(a,"start"),b=!1):jr(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){jr(a,"pause")}});for(var c=u(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.s.o(d.target, d.type,d.listener)} function jr(a,b){var c=a.G.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.M.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=u(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&""!=e&&(e=kh([e],Ug()),e.method="POST",a.L.request(7,e,d))}switch(b){case "impression":a.i(new T("ad-impression"));break;case "start":a.i(new T("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new T("ad-muted"));break;case "unmute":a.i(new T("ad-volume-changed"));break; case "resume":a.i(new T("ad-resumed"));break;case "pause":a.i(new T("ad-paused"));break;case "firstQuartile":a.i(new T("ad-first-quartile"));break;case "midpoint":a.i(new T("ad-midpoint"));break;case "thirdQuartile":a.i(new T("ad-third-quartile"));break;case "complete":a.i(new T("ad-complete"));a.i(new T("ad-stopped"));break;case "skip":a.i(new T("ad-skipped"));a.i(new T("ad-stopped"));break;case "breakStart":a.C.setAttribute("ad-active","true");break;case "breakEnd":a.C.removeAttribute("ad-active"); break;case "skipStateChanged":a.i(new T("ad-skip-state-changed"))}};function lr(a,b){this.g=a;this.i=null;this.h=b}p=lr.prototype;p.needsSkipUI=function(){return!0};p.isClientRendering=function(){return!1};p.isUsingAnotherMediaElement=function(){return!1};p.getDuration=function(){return this.i?this.i.duration:-1};p.getMinSuggestedDuration=function(){return this.getDuration()};p.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};p.isPaused=function(){return this.h.paused};p.isSkippable=function(){return this.g.isSkippable()}; p.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};p.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};p.skip=function(){this.h.currentTime+=this.getRemainingTime()};p.pause=function(){return this.h.pause()};p.play=function(){return this.h.play()};p.getVolume=function(){return this.h.volume};p.setVolume=function(a){this.h.volume=a};p.isMuted=function(){return this.h.muted};p.isLinear=function(){return!0};p.resize=function(){}; p.setMuted=function(a){this.h.muted=a};p.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};p.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};p.getTitle=function(){return this.g.getTitle()};p.getDescription=function(){return this.g.getDescription()};p.getVastMediaBitrate=function(){return 0};p.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};p.getVastMediaWidth=function(){return this.g.getVastMediaWidth()}; p.getAdId=function(){return this.g.getAdId()};p.getCreativeAdId=function(){return this.g.getCreativeAdId()};p.getAdvertiserName=function(){return this.g.getAdvertiserName()};p.getMediaUrl=function(){return null};p.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};p.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};p.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",lr);lr.prototype.release=lr.prototype.release; lr.prototype.getPodIndex=lr.prototype.getPodIndex;lr.prototype.getTimeOffset=lr.prototype.getTimeOffset;lr.prototype.getMediaUrl=lr.prototype.getMediaUrl;lr.prototype.getAdvertiserName=lr.prototype.getAdvertiserName;lr.prototype.getCreativeAdId=lr.prototype.getCreativeAdId;lr.prototype.getAdId=lr.prototype.getAdId;lr.prototype.getVastMediaWidth=lr.prototype.getVastMediaWidth;lr.prototype.getVastMediaHeight=lr.prototype.getVastMediaHeight;lr.prototype.getVastMediaBitrate=lr.prototype.getVastMediaBitrate; lr.prototype.getDescription=lr.prototype.getDescription;lr.prototype.getTitle=lr.prototype.getTitle;lr.prototype.getPositionInSequence=lr.prototype.getPositionInSequence;lr.prototype.getSequenceLength=lr.prototype.getSequenceLength;lr.prototype.setMuted=lr.prototype.setMuted;lr.prototype.resize=lr.prototype.resize;lr.prototype.isLinear=lr.prototype.isLinear;lr.prototype.isMuted=lr.prototype.isMuted;lr.prototype.setVolume=lr.prototype.setVolume;lr.prototype.getVolume=lr.prototype.getVolume; lr.prototype.play=lr.prototype.play;lr.prototype.pause=lr.prototype.pause;lr.prototype.skip=lr.prototype.skip;lr.prototype.canSkipNow=lr.prototype.canSkipNow;lr.prototype.getTimeUntilSkippable=lr.prototype.getTimeUntilSkippable;lr.prototype.isSkippable=lr.prototype.isSkippable;lr.prototype.isPaused=lr.prototype.isPaused;lr.prototype.getRemainingTime=lr.prototype.getRemainingTime;lr.prototype.getMinSuggestedDuration=lr.prototype.getMinSuggestedDuration;lr.prototype.getDuration=lr.prototype.getDuration; lr.prototype.isUsingAnotherMediaElement=lr.prototype.isUsingAnotherMediaElement;lr.prototype.isClientRendering=lr.prototype.isClientRendering;lr.prototype.needsSkipUI=lr.prototype.needsSkipUI;function mr(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.H=NaN;this.i=d;this.I=!1;this.B=this.m=this.s=null;this.C="";this.G=[];this.h=new td;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.u,a);this.i(new T("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){nr(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length? e.j.resolve(e.C):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new lr(f,e.l);e.B&&(e.m.i=e.B);e.i(new T("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active"); var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.B=f.getStreamData().adProgressData;e.m&&(e.m.i=e.B)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new T("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new T("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new T("ad-third-quartile"))}); this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new T("ad-complete"));e.i(new T("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new T("ad-skipped"));e.i(new T("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=u(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G= f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}p=mr.prototype;p.configure=function(){};p.stop=function(){this.C="";this.s=null;this.G=[]};p.release=function(){this.stop();this.h&&this.h.release()};p.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};p.getCuePoints=function(){return this.G}; function nr(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.I||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function or(){kb.call(this);this.h=this.i=this.j=this.g=null;this.m=new xq;this.s=navigator.language;this.l=null}pa(or,kb);p=or.prototype;p.setLocale=function(a){this.s=a};p.configure=function(a){this.l=a;this.g&&this.g.configure(this.l);this.j&&this.j.configure(this.l);this.h&&this.h.configure(this.l)};p.initInterstitial=function(a,b,c){var d=this;this.g&&this.g.release();this.g=new Mq(a,b,c,function(e){return pr(d,e)});this.g.configure(this.l)}; p.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new U(2,10,1E4);this.j&&this.j.release();this.j=new Dq(a,b,this.s,c,function(e){return pr(d,e)});this.j.configure(this.l)};p.release=function(){this.g&&(this.g.release(),this.g=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);kb.prototype.release.call(this)}; p.onAssetUnload=function(){this.g&&this.g.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.dispatchEvent(new T("ad-stopped"));this.dispatchEvent(new T("ad-content-attach-requested"));this.m=new xq};p.requestClientSideAds=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.I=Date.now()/1E3;b.m.requestAds(a)}; p.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new U(1,10,10001);var b=this.j;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};p.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new ar(a,b,c,function(e){return pr(d,e)})};p.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new U(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new U(1,10,10004)):(d.l=new Wg,dr(d,a,b),d.J=c||"",d.R=Date.now()/1E3,a=d.l);return a}; p.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new U(1,10,10005);var b=this.i;b.I=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};p.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new U(2,10,10002);this.h&&this.h.release();this.h=new mr(a,b,this.s,function(d){return pr(c,d)});this.h.configure(this.l)}; p.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.h)throw new U(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&cb('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.13.0";c=this.h;c.j?a=Promise.reject(new U(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&& (c.I=!0),c.j=new Wg,c.g.requestStream(a),c.C=b||"",c.H=Date.now()/1E3,a=c.j);return a};p.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new U(1,10,10003);(a.mpt||a.mpv)&&cb('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.');a.mpt="Shaka Player";a.mpv="v4.13.0";this.h.g.replaceAdTagParameters(a)}; p.getServerSideCuePoints=function(){Dd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};p.getCuePoints=function(){var a=[];this.h&&(a=a.concat(this.h.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};p.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:yq(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};p.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)}; p.onDashTimedMetadata=function(a){this.h&&"urn:google:dai:2018"==a.schemeIdUri&&this.h.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};p.onHlsTimedMetadata=function(a,b){this.h&&this.h.g.processMetadata("ID3",a.data,b)};p.onCueMetadataChange=function(a){if(this.h)this.h.onCueMetadataChange(a)};p.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,a,b),this.g&&Tq(this.g,c))}; p.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==d||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==d){if(this.g||this.initInterstitial(null,a,b),this.g){a=this.g;b=u(c.eventNode.children);for(d=b.next();!d.done;d=b.next())if(d=d.value,"AlternativeMPD"==d.tagName&&(d=d.attributes.uri)){var e=d;break}e?(b="urn:mpeg:dash:event:alternativeMPD:replace:2025"==c.schemeIdUri,d="urn:mpeg:dash:event:alternativeMPD:insert:2025"== c.schemeIdUri,(b||d)&&Vq(a,[{id:c.id,groupId:null,startTime:c.startTime,endTime:c.endTime,uri:e,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:d?0:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:b&&!d,loop:!1,overlay:null}])):cb("Unsupported MPD alternate",c)}}else"urn:mpeg:dash:event:2012"==d&&c.eventNode&&qe(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&Wq(this.g,c))}}; p.addCustomInterstitial=function(a){if(!this.g)throw new U(1,10,10006);Vq(this.g,[a])};p.addAdUrlInterstitial=function(a){if(!this.g)throw new U(1,10,10006);return this.g.addAdUrlInterstitial(a)};p.getInterstitialPlayer=function(){if(!this.g)throw new U(1,10,10006);return this.g.vc()}; function pr(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;break;case "ad-complete":a.m.j++;break;case "ad-skipped":a.m.l++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",or);or.prototype.getInterstitialPlayer=or.prototype.getInterstitialPlayer;or.prototype.addAdUrlInterstitial=or.prototype.addAdUrlInterstitial;or.prototype.addCustomInterstitial=or.prototype.addCustomInterstitial; or.prototype.onDASHInterstitialMetadata=or.prototype.onDASHInterstitialMetadata;or.prototype.onHLSInterstitialMetadata=or.prototype.onHLSInterstitialMetadata;or.prototype.onCueMetadataChange=or.prototype.onCueMetadataChange;or.prototype.onHlsTimedMetadata=or.prototype.onHlsTimedMetadata;or.prototype.onDashTimedMetadata=or.prototype.onDashTimedMetadata;or.prototype.onManifestUpdated=or.prototype.onManifestUpdated;or.prototype.getStats=or.prototype.getStats;or.prototype.getCuePoints=or.prototype.getCuePoints; or.prototype.getServerSideCuePoints=or.prototype.getServerSideCuePoints;or.prototype.replaceServerSideAdTagParameters=or.prototype.replaceServerSideAdTagParameters;or.prototype.requestServerSideStream=or.prototype.requestServerSideStream;or.prototype.initServerSide=or.prototype.initServerSide;or.prototype.addMediaTailorTrackingUrl=or.prototype.addMediaTailorTrackingUrl;or.prototype.requestMediaTailorStream=or.prototype.requestMediaTailorStream;or.prototype.initMediaTailor=or.prototype.initMediaTailor; or.prototype.updateClientSideAdsRenderingSettings=or.prototype.updateClientSideAdsRenderingSettings;or.prototype.requestClientSideAds=or.prototype.requestClientSideAds;or.prototype.onAssetUnload=or.prototype.onAssetUnload;or.prototype.release=or.prototype.release;or.prototype.initClientSide=or.prototype.initClientSide;or.prototype.initInterstitial=or.prototype.initInterstitial;or.prototype.configure=or.prototype.configure;or.prototype.setLocale=or.prototype.setLocale;or.ADS_LOADED="ads-loaded"; or.AD_STARTED="ad-started";or.AD_FIRST_QUARTILE="ad-first-quartile";or.AD_MIDPOINT="ad-midpoint";or.AD_THIRD_QUARTILE="ad-third-quartile";or.AD_COMPLETE="ad-complete";or.AD_STOPPED="ad-stopped";or.AD_SKIPPED="ad-skipped";or.AD_VOLUME_CHANGED="ad-volume-changed";or.AD_MUTED="ad-muted";or.AD_PAUSED="ad-paused";or.AD_RESUMED="ad-resumed";or.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";or.CUEPOINTS_CHANGED="ad-cue-points-changed";or.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded"; or.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";or.AD_CLICKED="ad-clicked";or.AD_PROGRESS="ad-progress";or.AD_BUFFERING="ad-buffering";or.AD_IMPRESSION="ad-impression";or.AD_DURATION_CHANGED="ad-duration-changed";or.AD_CLOSED="ad-closed";or.AD_LOADED="ad-loaded";or.ALL_ADS_COMPLETED="all-ads-completed";or.AD_LINEAR_CHANGED="ad-linear-changed";or.AD_METADATA="ad-metadata";or.AD_RECOVERABLE_ERROR="ad-recoverable-error";or.AD_ERROR="ad-error";or.AD_BREAK_READY="ad-break-ready"; or.AD_INTERACTION="ad-interaction";or.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";or.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";or.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";So=function(){return new or};function qr(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof T){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=u(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=u(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=u(gj(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=ArrayBuffer.isView(c)&&1===c.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})} function rr(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=sr(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})} function sr(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}} var tr="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ur="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),vr=["loop","playbackRate"],wr=["pause","play"],xr={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2, isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1,isEnded:1},yr={getConfiguration:4,getConfigurationForLowLatency:4,getStats:5,getTextTracks:2,getVariantTracks:2},zr={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Ar=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Br=[["isTextTrackVisible","setTextTrackVisibility"]], Cr="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure configurationForLowLatency getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),Dr=["attach","attachCanvas","detach","load","unload"];function Er(a,b,c,d,e,f,g){var h=this;this.I=a;this.L=g;this.l=new ac(b);this.M=c;this.u=!1;this.B=d;this.H=e;this.O=f;this.h=this.m=!1;this.K="";this.s=null;this.C=function(){return Fr(h)};this.G=function(k,l){k=rr(l);switch(k.type){case "event":var m=k.targetName,n=Za(k.event);h.B(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var q in m[n])k[q]=m[n][q]}h.u&&(h.M(),h.u=!1);break;case "asyncComplete":if(n=k.id,q=k.error,k=h.i[n],delete h.i[n],k)if(q){n=new U(q.severity,q.category, q.code);for(m in q)n[m]=q[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.j=null;Gr.add(this)}p=Er.prototype;p.destroy=function(){Gr.delete(this);Hr(this);Ir&&Jr(this);this.l&&(this.l.stop(),this.l=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.C=this.j=this.i=this.g=this.s=null;return Promise.resolve()};p.Ta=function(){return this.h};p.jf=function(){return this.K}; p.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Ia();var a=new chrome.cast.SessionRequest(this.I,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=u(Gr),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Wg;d.u=!0;Kr(d,e)}},function(b){for(var c=u(Gr),d=c.next();!d.done;d=c.next())d=d.value,Lr="available"==b,d.l.Ia()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Lr&&this.l.Y(Mr);(a=Ir)&& a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Wg,this.u=!0,Kr(this,a)):Ir=null}else window.__onGCastApiAvailable!==Nr&&(Or=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Nr)};p.fh=function(a){this.s=a;this.h&&Pr(this,{type:"appData",appData:this.s})}; p.cast=function(){var a=this;return P(function(b){if(!a.m)throw new U(1,8,8E3);if(!Lr)throw new U(1,8,8001);if(a.h)throw new U(1,8,8002);a.j=new Wg;chrome.cast.requestSession(function(c){return Kr(a,c)},function(c){return Qr(a,c)});return G(b,a.j,0)})};function Rr(a){a.h&&chrome.cast.requestSession(function(b){return Kr(a,b)},function(b){return Qr(a,b)})}p.md=function(){if(this.h){Hr(this);if(Ir){Jr(this);try{Ir.stop(function(){},function(){})}catch(a){}Ir=null}Fr(this)}}; p.get=function(a,b){var c=this;if("video"==a){if(wr.includes(b))return function(){return c.Ai.apply(c,[a,b].concat(x(Ma.apply(0,arguments))))}}else if("player"==a){if(zr[b]&&!this.get("player","isLive")())return function(){};if(Cr.includes(b))return function(){return c.Ai.apply(c,[a,b].concat(x(Ma.apply(0,arguments))))};if(Dr.includes(b))return function(){return c.Mk.apply(c,[a,b].concat(x(Ma.apply(0,arguments))))};if(xr[b]||yr[b])return function(){return c.g[a][b]}}return this.g[a][b]}; p.set=function(a,b,c){this.g[a][b]=c;Pr(this,{type:"set",targetName:a,property:b,value:c})};function Kr(a,b){var c=a.O();Ir=b;b.addUpdateListener(a.C);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);Fr(a);Pr(a,{type:"init",initState:c,appData:a.s});a.j.resolve()}function Qr(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new U(2,8,c,b))} p.Ai=function(a,b){Pr(this,{type:"call",targetName:a,methodName:b,args:Ma.apply(2,arguments)})};p.Mk=function(a,b){var c=Ma.apply(2,arguments),d=new Wg,e=this.J.toString();this.J++;this.i[e]=d;try{Pr(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Jr(a){var b=Ir;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)} function Fr(a){var b=Ir?"connected"==Ir.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Hr(a)}a.h=b;a.K=b?Ir.receiver.friendlyName:"";a.l.Ia()}function Hr(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new U(1,7,7E3))}}function Pr(a,b){b=qr(b);var c=Ir;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},fb)}catch(d){throw b=new U(2,8,8005,d),c=new T("error",(new Map).set("detail",b)),a.B("player",c),a.md(),b;}}var Mr=.02,Lr=!1,Ir=null,Or=null,Gr=new Set; function Nr(a){Or?window.__onGCastApiAvailable=Or:delete window.__onGCastApiAvailable;Or=null;if(a)for(var b=u(Gr),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Sr(a,b,c,d){d=void 0===d?!1:d;kb.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.j=this.u=this.l=null;this.G=c;this.C=d;this.B=new Map;this.g=new Er(c,function(){return Tr(e)},function(){return Ur(e)},function(f,g){return Vr(e,f,g)},function(){return Wr(e)},function(){return Xr(e)},d);Yr(this)}pa(Sr,kb);p=Sr.prototype; p.destroy=function(a){a&&this.g.md();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.l=this.i=null;kb.prototype.release.call(this);return Promise.all(a)};p.yc=function(){return this.l};p.vc=function(){return this.u};p.Uf=function(){return this.g.m&&Lr};p.Ta=function(){return this.g.Ta()};p.jf=function(){return this.g.jf()}; p.cast=function(){var a=this;return P(function(b){return 1==b.g?G(b,a.g.cast(),2):a.h?G(b,a.h.sc(),0):b.return()})};p.fh=function(a){this.g.fh(a)};p.Ri=function(){Rr(this.g)};p.md=function(){this.g.md()}; p.Kh=function(a,b){b=void 0===b?!1:b;var c=this;return P(function(d){if(1==d.g){if(a==c.G&&b==c.C)return d.return();c.G=a;c.C=b;c.g.md();return G(d,c.g.destroy(),2)}c.g=null;c.g=new Er(a,function(){return Tr(c)},function(){return Ur(c)},function(e,f){return Vr(c,e,f)},function(){return Wr(c)},function(){return Xr(c)},b);c.g.init();H(d)})}; function Yr(a){a.g.init();a.m=new td;for(var b=u(tr),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Ta()||(f=Za(f),a.j.dispatchEvent(f))});for(var d in $a)a.m.o(a.h,$a[d],function(f){a.g.Ta()||a.s.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={Yd:b.Yd},b.Yd=e,Object.defineProperty(a.l,b.Yd,{configurable:!1,enumerable:!0,get:function(f){return function(){return Zr(a,f.Yd)}}(b),set:function(f){return function(g){var h=f.Yd;a.g.Ta()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.u={};$r(a, function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return as(a,f)}})});bs(a);a.j=new kb;a.j.re=a.l;a.s=new kb;a.s.re=a.u}function bs(a){var b=new Map;$r(a,function(c,d){b.has(d)?(d=b.get(d),c.length=e)return null;for(var f=-1,g=-1,h=0;hc||127c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;eb;b++)a.i.push(Ts())}function Ts(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Us(a,b){Vs(a)&&(a.i[a.h][a.g]=new zs(b,a.G,a.B,a.u,a.C),a.g++)}function Vs(a){var b=a.gc;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=Ts()} function Xs(a,b,c){var d=new Pe(a.j,b,"");d.textAlign=0===a.H?"left":1===a.H?"right":Re;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.O;e.height=a.s;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.J;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.L?Od:2;switch(a.I){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX= 50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=ws(d,"svc"+c,a.i,a.j,b))a.j=b;return c}Rs.prototype.display=function(){this.l=!0};function Ys(){this.i=[];this.h=null;this.g=0}function Zs(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0this.h.length)throw new U(2,2,3E3);this.g+=a}; $s.prototype.Ci=function(a){if(0>this.g-a)throw new U(2,2,3E3);this.g-=a};function bt(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null} function ct(a,b,c,d){if(!a.g)return[];if(24==c)return c=at(b).value,d=at(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),Us(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!Vs(b)||0>=b.g&&0>=b.h||(0>=b.g?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=Xs(b,d,a.i));b.h+1>=b.s?Ws(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=Xs(b,d,a.i));b.i[b.h]=Ts();b.g=0;break;case 12:b.isVisible()&& (e=Xs(b,d,a.i)),Ss(b),b.h=0,b.g=0}return e?[e]:[]} function dt(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=at(b).value;b=[];c=u(et(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=Xs(e,d,a.i);f&&b.push(f)}Ss(e)}return b}if(137===c)for(b=at(b).value,b=u(et(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(138===c){c=at(b).value;b=null;c=u(et(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Xs(e,d,a.i)),e.l=!1;return b? [b]:[]}if(139===c){c=at(b).value;b=null;c=u(et(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Xs(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(140===c)return b=at(b).value,ft(a,b,d);if(143===c)return d=ft(a,255,d),gt(a),d;if(144===c)b.skip(1),d=at(b).value,a.g&&(a.g.B=0<(d&128),a.g.G=0<(d&64));else if(145===c)d=at(b).value,c=at(b).value,b.skip(1),a.g&&(b=ht((c&48)>>4,(c&12)>>2,c&3),a.g.C=ht((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=at(b).value,b=at(b).value,a.g&&(a= a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),b.skip(1),d=at(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];e||(f=new Rs(c,a.i),f.j=d,a.h[c]=f);d=at(b).value;f=at(b).value;var g=at(b).value,h=at(b).value,k=at(b).value;b=at(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.G=!1,b.B=!1,b.C="white",b.u="black");b=a.h[c];b.l=0<(d&32);b.M=f&127;b.J=g;b.I=(h&240)>>4;b.L=0<(f&128);b.s=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]} function et(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function ft(a,b,c){var d=[];b=u(et(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=Xs(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function gt(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ht(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return it[a<<2|b<<1|c]} var jt=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),it="black blue green cyan red magenta yellow white".split(" ");function kt(){this.h=[];this.g=[];this.i=new Ys;this.l=0;this.m=new Map([["CC1",new Ls(0,0)],["CC2",new Ls(0,1)],["CC3",new Ls(1,0)],["CC4",new Ls(1,1)]]);this.u=this.s=0;this.j=new Map;this.C=!0;this.B=new Set;lt(this)}kt.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;lt(this);a=u(this.j.values());for(var b=a.next();!b.done;b=a.next())gt(b.value)}; function lt(a){a.s=0;a.u=0;for(var b=u(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,Bs(c.i),Bs(c.j),Bs(c.s);a.C=!0} kt.prototype.extract=function(a,b){if(this.C){for(var c=u(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.C=!1}a=new wh(a,0);if(!(8>a.getLength())&&181===a.$()&&49===a.Ba()&&1195456820===a.V()&&3===a.$()&&(c=a.$(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d>2,g=a.$(),h=a.$();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Cb:g,bc:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}}; kt.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=u(this.h),d=c.next();!d.done;d=c.next())(d=mt(this,d.value))&&b.push(d);c=u(this.g);for(d=c.next();!d.done;d=c.next())Zs(this.i,d.value);c=u(this.i.i);for(d=c.next();!d.done;d=c.next())d=nt(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b}; function mt(a,b){var c=b.type;if(16===(b.Cb&112)){var d=b.Cb>>3&1;0===c?a.s=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.s))+1);c=a.m.get(d);if(255===b.Cb&&255===b.bc||!b.Cb&&!b.bc||!ot(b.Cb)||!ot(b.bc))return 45<=++a.l&<(a),null;a.l=0;b.Cb&=127;b.bc&=127;var e=b.Cb;if(1<=e&&15>=e||!b.Cb&&!b.bc)return null;e=null;if(16===(b.Cb&112))a:{a.B.add(d),d=b.Cb;a=b.bc;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f= null;var g=95=g?d=Qs[Math.floor(g/2)]:15>=g?e=!0:f=Math.floor((g-16)/2);a=1===(a&1);4!==c.h&&(g=c.g,3===c.h&&b!==g.g&&(c=1+b-g.h,Ks(g,c,1+g.g-g.h,g.h),Es(g,0,c-1),Es(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.u=f,g.s="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Fs(c.g,0,32),d=!1,b=Qs[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Ps[(a& 14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))Fs(c.g,1,a);else if(18===(d&246)&&32===(a&224))Fs(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.bc){case 32:Ns(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Ms(c,2,a);break;case 38:d=Ms(c,3,a);break;case 39:d=Ms(c,4,a);break;case 40:Fs(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Bs(c.s);Os(c);break;case 43:Os(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=Cs(b,c.l,a));Es(b,0,15);break;case 45:b= c.g;3!==c.h?d=null:(d=Cs(b,c.l,a),e=b.g-b.h+1,Ks(b,e-1,e,b.h),Es(b,0,e-1),Es(b,b.g,15-b.g),c.l=a);break;case 46:Es(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=Cs(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Ns(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.B=a-32)}e=null}else a=b.bc,Fs(c.g,0,b.Cb),Fs(c.g,0,a);return e} function nt(a,b){var c=[];try{for(;b.Ha();){var d=at(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=at(b).value&63);if(0!=e){a.B.add("svc"+e);a.j.has(e)||a.j.set(e,new bt(e));for(var g=a.j.get(e),h=b.Pa();b.Pa()-h=m)var r=ct(e,k,m,n);else if(128<=m&&159>=m)r=dt(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m& 255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&(127===k?Us(e.g,"\u266a"):Us(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&Us(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(jt.has(k)){var t=jt.get(k);Us(e.g,t)}else Us(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?Us(e.g,"_"):Us(e.g,"[CC]"));r=[]}c.push.apply(c,x(r))}}}}catch(w){if(w instanceof U&&3E3===w.code)db("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data."); else throw w;}return c}function ot(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}kt.prototype.getStreams=function(){return Array.from(this.B)};S("shaka.cea.CeaDecoder",kt);Md=function(){return new kt};function pt(a){for(var b=[],c=a,d=a=0;d>1&63;r=39==r||40==r;break;case wt:h=2;b.skip(1);r=q>>1&63;r=23==r||24==r;break;default:return}if(r)for(q=0,lc.byteLength){c=[];break a}var f=Mb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function zt(a){a=Mc(ne(a));a=yt(a).filter(function(b){return b.type===At})[0];if(!a)return null;a=Cc(a.value,!0);return(a=fe(a,"WRMHEADER"))?a:null} function Bt(a){try{var b=zt(a);if(b)a:{for(var c=u(pe(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=u(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if("LA_URL"==h.tagName){var k=ne(h);break a}}}k=""}else k="";return k}catch(l){return""}}var At=1;function Ct(a,b,c){var d=Dt(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1"+a+"");return Bt(a)}return""} function Ft(a,b,c,d,e){var f=[];c=u(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Bd];if(h){var k;if((k=se(g.node,"urn:microsoft:playready","pro"))&&ne(k)){k=ne(k);k=Mc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Lh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Bd){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2, 172,227,60,30,82,226,251,75]),q=new Uint8Array([]);l=[{initData:Lh(q,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Rc(h,b,g.init||a||k||l);if(h=It.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Dt(a){var b=[];a=u(a);for(var c=a.next();!c.done;c=a.next())(c=Jt(c.value))&&b.push(c);return b} function Jt(a){var b=a.attributes.schemeIdUri,c=xe(a,"urn:mpeg:cenc:2013","default_KID"),d=te(a,"urn:mpeg:cenc:2013","pssh").map(oe),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new U(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Mc(g),keyId:null}})}catch(g){throw new U(2,4,4007);}return{node:a,Bd:b,keyId:c,init:0v)if(r){r=we(r,"t",Ee);if(null== r)break;else if(t>=r)break;v=Math.ceil((r-t)/w)-1}else{if(Infinity==a)break;else if(t/f>=a)break;v=Math.ceil((a*f-t)/w)-1}0>>31;q&=2147483647;var t=g.reader.V();g.reader.skip(4);if(1==r)throw new U(2,3,3006);h.push(new Zi(l/k+c,(l+t)/k+c,function(){return f},a,a+q-1,b,c,d,e));l+=t;a+=q}g.parser.stop();return h};function Tt(a){this.h=Qb(a);this.g=new wh(this.h,0)}Tt.prototype.Ha=function(){return this.g.Ha()}; function Ut(a){var b=Vt(a);if(7Number.MAX_SAFE_INTEGER&&(R=BigInt(O)*BigInt(N));M+=q;O=M+w;N=Math.min(O,m());var Q=[],V=b.Bk;if(V)for(var ba=(N-M)/V,ia={},xa=0;xam()&&!M.length?null:M})}return Promise.resolve(L)} function pu(a,b){var c=a.N.Re;c||(c=Mt(a,ou,"initialization"));if(!c)return null;c=Ic(c);var d=a.N.id,e=a.bandwidth||null,f=a.N.gb,g=a.Ib;b=new Xi(function(){var h=Kt(c,d,null,null,e,null);return Qc(f(),[h],g())},0,null,bu(a),null,null,b);b.codecs=a.N.codecs;b.mimeType=a.N.mimeType;return b}function uu(a,b,c,d,e,f,g,h,k,l){ql.call(this,[]);this.h=a;this.H=b;this.C=c;this.G=d;this.J=e;this.j=f;this.l=g;this.u=h;this.B=k;this.I=l;vu(this)}pa(uu,ql);p=uu.prototype; p.getNumReferences=function(){return this.h?this.h.timeline.length:0};p.release=function(){ql.prototype.release.call(this);this.h=null};p.bb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}}; function tu(a,b,c,d,e){wu(a,e);if(a.h){c=a.h.timeline;a.h.zc!==b.zc&&(a.h.zc=b.zc);if(c.length){var f=c[c.length-1];b=b.timeline.filter(function(g){return g.end>f.end})}else b=b.timeline.slice();0=a.l||0>=d.end||b.push(d);a.h.timeline=b;a.bb(a.j)}} p.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a=this.l)return null;for(var c=b.length-1,d=0;d=f&&aa||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Uk,f=d.xh+this.h.wh;c=this.j-this.h.Cc;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],q=(d.end-d.start)/d.Zb,r={},t=0;th&&a.j.delete(f);d=d.filter(function(k){for(var l=u(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new sb(k.location)).Kb))return!1;return!0});d.length&&(a.C=d[0].Ug);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=u(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.C=a.h,d.push(g);if(!d.length)for(b=u(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Qc(a.i,d)};function Eu(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.s=!1;this.m=new Set}p=Eu.prototype;p.release=function(){for(var a=u(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.u=this.s=!1;this.m.clear()};p.bk=function(){return this.l};p.zg=function(){return this.j.slice()};p.Fj=function(){return this.i}; p.Oh=function(a,b){if(a){if("audio"==a.type)for(var c=u(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=u(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==Wc)for(c=u(this.j),d=c.next();!d.done;d=c.next())d= d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=u(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}}; function Fu(a,b){var c=[],d=[],e=[],f=[];a=u(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Gu(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Hu(n),n]})),l=new Map(h.textStreams.map(function(n){return[Iu(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Ju(n),n]}));if(b){var m=Ku(Wc);l.set(Iu(m),m);m=Ku("image");h.set(Ju(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Fh:c,Zi:d,Ti:e,ai:f}} p.Yf=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N,R,Q;return P(function(V){if(1==V.g){e=Yc;if(!b&&1==a.length)return f=Fu(a,!1),g=f.Fh,h=f.Zi,k=f.Ti,l=f.ai,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),V.A(2);m=c?d.m.size:0;n=-1;for(q=0;q=d?h.push(new Set(c[k].values())):h.push(new Set);l=u(b);m=l.next();case 2:if(m.done){J.A(4);break}n=m.value;return G(J,Su(a,n,c,d,f,h,g),5);case 5:q=J.h;if(!q)throw new U(2,4,4037);m=l.next();J.A(2);break;case 4:r=u(h);for(t=r.next();!t.done;t=r.next())for(w=t.value,v=u(w),z=v.next();!z.done;z=v.next())y=z.value,(A=Tu(a,y,c,e,f,h))&&b.push(A);E=u(h);for(C=E.next();!C.done;C= E.next())for(B=C.value,D=u(B),I=D.next(),F={};!I.done;F={nh:void 0},I=D.next())if(F.nh=I.value,!Uu(F.nh)&&(L=b.some(function(K){return function(O){return Vu(a,K.nh,O)}}(F))))throw new U(2,4,4037);return J.return(b)}})}function Su(a,b,c,d,e,f,g){return P(function(h){if(1==h.g)return Wu(a,c,b,0d)return!0;if(ed.length)return!0;if(e.lengthd)return!0;if(ed.length)return!0;if(e.lengtha){if(c<=a||c-ab-a)return jv}else{if(c>a)return jv;if(a-ca-b)return jv}return lv}function kv(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return av&&w>t&&a.M++;null==w&&(w=t);if(!(null!==a.O&&null!==r&&null!==q&&q< a.O)||a.G.includes(r)||l+1==d.length){null!==q&&(null===a.O||q>a.O)&&(a.O=q);k=Kv(a,b,c,{start:q,duration:w,node:m,di:null==w||!n});h.push(k);b.Da.id&&w&&(a.na[b.Da.id]=w);if(null==w){k=null;break}k=q+w}}if(e)for(b=u(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.G.includes(c)||a.G.push(c);else a.G=h.map(function(z){return z.id});return null!=f?{periods:h,duration:f+g,Qh:!1}:{periods:h,duration:k,Qh:!0}} function Ev(a){var b=Object.keys(a.C).filter(function(h){return!a.G.includes(h)});b=u(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=u(a.C[c]),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.s[f];g&&(g.segmentIndex&&0!=g.segmentIndex.getNumReferences()?d=!1:(a.m&&a.m.Oh(a.s[f],c),delete a.s[f]))}d&&delete a.C[c]}} function Kv(a,b,c,d){b.Da=Lv(a,d.node,null,c);b.ya=d;b.Da.ub=b.ub;b.Da.id||(b.Da.id="__shaka_period_"+d.start);var e=me(d.node,"EventStream");c=b.presentationTimeline.Eb();e=u(e);for(var f=e.next();!f.done;f=e.next())Mv(a,d.start,d.duration,f.value,c);c=me(d.node,"SupplementalProperty");c=u(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=Nv(a,e)))b.Ib=e;c=me(d.node,"AdaptationSet").map(function(l,m){return Ov(a,b,m,l)}).filter(Xf);if(b.dc){d= [];e=u(c);for(f=e.next();!f.done;f=e.next()){f=u(f.value.Ok);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new U(2,4,4018);}d=c.filter(function(l){return!l.vh});c=c.filter(function(l){return l.vh});if(!a.g.disableIFrames)for(c=u(c),e=c.next();!e.done;e=c.next()){e=e.value;f=e.vh.split(" ");g=u(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=u(h.streams);for(var k=h.next();!k.done;k=h.next())Ng(k.value,e.streams)}}c=Pv(a.g.disableAudio, d,"audio");e=Pv(a.g.disableVideo,d,"video");f=Pv(a.g.disableText,d,Wc);d=Pv(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new U(2,4,4004);return{id:b.Da.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function Pv(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])} function Ov(a,b,c,d){function e(J){var K=J.attributes["dvb:fontFamily"];J=J.attributes["dvb:url"];K&&J&&(J=Qc(b.va.gb(),[J],b.Ib()),a.j.addFont(K,J[0]))}function f(J){switch(J){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(J){switch(J){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.va=Lv(a,d,b.Da,null);b.va.position=c;var h=!1;c=me(d,"Role");var k=c.map(function(J){return J.attributes.value}).filter(Xf), l=void 0,m=b.va.contentType==Wc;m&&(l="subtitle");c=u(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var q=n.attributes.schemeIdUri;if(null==q||"urn:mpeg:dash:role:2011"==q)switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=me(d,"EssentialProperty");c=null;var t=!1;n=null;q=!1;r=u(r);for(var w=r.next();!w.done;w=r.next()){w=w.value;var v=w.attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==v)c=w.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"== v)var z=g(parseInt(w.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==v)var y=f(parseInt(w.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=v&&("urn:mpeg:dash:ssr:2023"==v&&a.g.dash.enableFastSwitching?t=!0:"urn:dvb:dash:fontdownload:2014"==v?e(w):"urn:mpeg:dash:urlparam:2014"==v?(n=Nv(a,w))||(q=!0):q=!0)}if(q)return null;var A=null;q=me(d,"SupplementalProperty");q=u(q);for(r=q.next();!r.done;r=q.next())r=r.value,w=r.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"== w?A=parseInt(r.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==w?z=g(parseInt(r.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==w?y=f(parseInt(r.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==w?e(r):"urn:mpeg:dash:urlparam:2014"==w&&(n=Nv(a,r));n&&(b.Ib=n);n=me(d,"Accessibility");var E=new Map,C;n=u(n);for(q=n.next();!q.done;q=n.next())if(r=q.value,q=r.attributes.schemeIdUri,r=r.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=q||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!= q||a.g.disableText)"urn:mpeg:dash:role:2011"==q?null!=r&&(k.push(r),"captions"==r&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==q&&("1"==r?C="visually impaired":"2"==r&&(C="hard of hearing"));else if(q=1,null!=r)for(r=u(r.split(";")),w=r.next();!w.done;w=r.next()){v=w.value;var B=w=void 0;v.includes("=")?(v=v.split("="),w="svc"+v[0],B=v[1].split(",")[0].split(":").pop()):(w="svc"+q,q++,B=v);E.set(w,cd(B))}else E.set("svc1","und");else if(q=1,null!=r)for(r=r.split(";"),w=u(r),v=w.next();!v.done;v= w.next()){B=v.value;var D=v=void 0;B.includes("=")?(B=B.split("="),v=B[0].startsWith("CC")?B[0]:"CC"+B[0],D=B[1]||"und"):(v="CC"+q,2==r.length?q+=2:q++,D=B);E.set(v,cd(D))}else E.set("CC1","und");n=me(d,"ContentProtection");var I=Ct(n,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),F=cd(b.va.language||"und"),L=b.va.label;d=me(d,"Representation");if(!a.g.dash.ignoreSupplementalCodecs){n=[];q=u(d);for(r=q.next();!r.done;r=q.next())if(w=r.value,r=xe(w,"urn:scte:dash:scte214-extensions","supplementalCodecs"))w= be(w),w.attributes.codecs=r.split(" ").join(","),n.push(w);d.push.apply(d,x(n))}n=d.map(function(J){if(J=Qv(a,b,I,l,F,L,h,k,E,J,C,A))J.hdr=J.hdr||z,J.colorGamut=J.colorGamut||y,J.fastSwitching=t;return J}).filter(function(J){return!!J});if(0==n.length){c="image"==b.va.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new U(2,4,4003);}if(!b.va.contentType||"application"==b.va.contentType)for(b.va.contentType=Rv(n[0].mimeType,n[0].codecs),m=u(n),q=m.next();!q.done;q=m.next())q.value.type= b.va.contentType;m=b.va.id||"__fake__"+a.sa++;q=u(n);for(r=q.next();!r.done;r=q.next()){r=r.value;w=u(I.drmInfos);for(v=w.next();!v.done;v=w.next())v=v.value,v.keyIds=v.keyIds&&r.keyIds?new Set([].concat(x(v.keyIds),x(r.keyIds))):v.keyIds||r.keyIds;r.groupId=m}d=d.map(function(J){return J.attributes.id}).filter(Xf);return{id:m,contentType:b.va.contentType,language:F,xm:h,streams:n,drmInfos:I.drmInfos,vh:c,Ok:d}} function Nv(a,b){if((b=se(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&we(b,"useMPDUrlQuery",Ge,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return"$querypart$"==c?a.Z:c.split("&").map(function(d){if("$querypart$"==d)return a.Z;var e=/\$query:(.*?)\$/g.exec(d);if(e&&2==e.length){e=e[1];var f=(new zb(a.Z)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null} function Qv(a,b,c,d,e,f,g,h,k,l,m,n){b.N=Lv(a,l,b.va,null);var q=b.N.id;a.aa=Math.min(a.aa,b.N.ub);a.R=0a.K)){var c=a.K;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.L.Y(Math.max(c-b,rd(a.ra)))}} function Lv(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,df:null,audioSamplingRate:null,ub:0,pf:0};d=d||c.gb;var e=b.attributes.id,f=me(b,"BaseURL"),g,h=!1;if(a.h)for(var k=u(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=oe(m);l&&m&&(Cu(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(oe));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=Tl([b.attributes.codecs||c.codecs]).join(","); var n=we(b,"frameRate",He)||c.frameRate,q=b.attributes.sar||c.pixelAspectRatio,r=Uv(me(b,"InbandEventStream"),c.emsgSchemeIdUris),t=me(b,"AudioChannelConfiguration");t=Vv(t)||c.df;var w=we(b,"audioSamplingRate",Ee)||c.audioSamplingRate;k||(k=Rv(l,m));var v=qe(b,"SegmentBase"),z=qe(b,"SegmentTemplate"),y=v?we(v,"availabilityTimeOffset",Fe)||0:0,A=z?we(z,"availabilityTimeOffset",Fe)||0:0,E=f&&f.length?we(f[0],"availabilityTimeOffset",Fe)||0:0;y=c.ub+E+y+A;A=null;(E=qe(b,"SegmentSequenceProperties"))&& (E=qe(E,"SAP"))&&(A=we(E,"cadence",Ce));E=b.attributes.label;var C=me(b,"Label");C&&C.length&&(C=C[0],ne(C)&&(E=ne(C)));return{gb:function(){return Qc(d(),f.length?a.h&&h?Du(a.h,e):g?g:[]:[])},Dd:v||c.Dd,qc:qe(b,"SegmentList")||c.qc,Dc:z||c.Dc,width:we(b,"width",Ee)||c.width,height:we(b,"height",Ee)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:q,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,df:t,audioSamplingRate:w,ub:y,Re:null,pf:A||c.pf,label:E||null}} function Uv(a,b){b=b.slice();a=u(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b} function Vv(a){a=u(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b, 16);if(!b)continue;for(var d=0,e=0;ec}).map(oe).filter(Xf);return d.length?Qc(a.B,d):[]}S("shaka.dash.DashParser",qv);Si["application/dash+xml"]=function(){return new qv};Si["video/vnd.mpeg.dash.mpd"]=function(){return new qv};function Xv(){}S("shaka.dependencies",Xv);Xv.has=function(a){return Yv.has(a)};Xv.add=function(a,b){if(!Zv[a])throw Error(a+" is not supported");a==$v?Dd("mux.js","mux.js is no longer used in Shaka Player."):Yv.set(a,function(){return b})};var $v="muxjs",Zv={ym:$v,ISOBoxer:"ISOBoxer"};Xv.Allowed=Zv;var Yv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function aw(a,b,c){this.type=a;this.ia=b;this.segments=c||null}function bw(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}bw.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0b.length||"data"!=b[0])throw new U(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new U(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1a.K))for(b=u(b),d=b.next();!d.done;d=b.next())if(d=d.value,Qw(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.K-d.fg,0d-2&&(e=Math.max(1,d-2));for(e=d-e;ea.u&&(c=Math.min(-a.u,c),a.u+=c);a.l.Ki(0);a.l.gh(c);a.l.$c(!1)} function Fx(a,b,c,d,e){var f=kw(c,"EXT-X-MAP");if(!f)return null;var g=fw(f,"URI"),h=mw(d(),g,e);g=[h.toString(),ew(f,"BYTERANGE","")].join("-");if(!a.Aa.has(g)){var k=void 0,l=null;c=u(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?tx(fw(m,"METHOD"))&&m.idK?1:0}),c=0;cn))continue}if(null==n){var t=ew(g,"DURATION")|| ew(g,"PLANNED-DURATION");if(t){var w=parseFloat(t);isNaN(w)||(n=m+w);if(0>l-f+w)continue}}var v=ew(g,"CLASS")||"com.apple.quicktime.HLS",z="YES"==ew(g,"END-ON-NEXT");if(null==n&&z){for(var y=c+1;yl){n=Math.max(0,C-f);break}}}if(null==n)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var B=[],D=u(g.attributes),I=D.next();!I.done;I=D.next()){var F= I.value;if(!y.includes(F.name)){var L=ow(F.value,d);if("X-ASSET-URI"==F.name||"X-ASSET-LIST"==F.name)L=mw(e(),F.value,d)[0];B.push({key:F.name,description:"",data:L,mimeType:null,pictureType:null})}}if(1",Lc(a),""].join("\n")))c.licenseServerUri=Bt(a);return c},"urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":function(a){var b=fw(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc"; "SAMPLE-AES"==b&&(c="cbcs");b=fw(a,"URI");b=ww(b.split("?")[0]);b=Mb(b.data);c=Rc("com.huawei.wiseplay",c,[{initDataType:"cenc",initData:b}]);if(a=ew(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c}},zw="VOD",Hx="EVENT",jx="LIVE",Fw={cj:zw,Fl:Hx,Nl:jx};Si["application/x-mpegurl"]=function(){return new xw};Si["application/vnd.apple.mpegurl"]=function(){return new xw};function Nx(a){return Bt(a)}var Ox=(new Map).set("com.microsoft.playready",Nx).set("com.microsoft.playready.recommendation",Nx).set("com.microsoft.playready.software",Nx).set("com.microsoft.playready.hardware",Nx);function Px(a){if(!Qx){Qx=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Rx=Sx("ftyp",b,d,b,c);b=Sx("dref",Tx);Ux=Sx("dinf",b)}this.g=a} function Vx(a){for(var b=[],c=u(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Sx;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Wx+1));m=Math.floor(m%(Wx+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Xx(h,4)),[0,0,0,0],x(Xx(n,4)),x(Xx(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],x(Xx(k,2)),[0,0],x(Xx(l, 2)),[0,0]));h=Sx("tkhd",h);k=Sx;n=g.duration*g.timescale;l=Math.floor(n/(Wx+1));n=Math.floor(n%(Wx+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Xx(g.timescale,4)),x(Xx(l,4)),x(Xx(n,4)),x(Xx(m,2)),[0,0]));l=Sx("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Yx;break;case "audio":m=oy}n=Sx("hdlr",m);a:{switch(g.type){case "video":g=Sx("minf",Sx("vmhd",py),Ux,qy(g));break a; case "audio":g=Sx("minf",Sx("smhd",ry),Ux,qy(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Pc.apply(Jc,x(b));f=a.g[0];c=Sx;d=f.duration*f.timescale;e=Math.floor(d/(Wx+1));d=Math.floor(d%(Wx+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Xx(f.timescale,4)),x(Xx(e,4)),x(Xx(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255, 255]));e=Sx("mvhd",e);d=[];a=u(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(x(Xx(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=Sx("trex",k),h.call(g,k);a=Pc.apply(Jc,x(d));a=Sx("mvex",a);d=[];if(f.encrypted){f=u(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=u(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Pc.apply(Jc,x(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(Rx.byteLength+ a.byteLength);b.set(Rx);b.set(a,Rx.byteLength);return b} function qy(a){var b=Sx,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(x(Xx(c,2)),x(Xx(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=ty(a);g=new Uint8Array([]); a.encrypted&&(g=uy(a),d="encv");c=Sx(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=uy(a),d="enca"); a=Sx(d,vy(a),c,e)}c=a}a=Sx("stsd",wy,c);return b("stbl",a,Sx("stts",xy),Sx("stsc",yy),Sx("stsz",zy),Sx("stco",Ay))}function ty(a){if(!a.Ya&&!a.ab)return new Uint8Array([]);var b=a.ab;a=new Uint8Array([].concat(x(Xx(a.Ya,4)),x(Xx(b,4))));return Sx("pasp",a)}function vy(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(x(Xx(a.stream.audioSamplingRate||44100,2)),[0,0]))} function uy(a){var b=Sx;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e>8*b&255);return c}function sy(a){for(var b=new Uint8Array(a.length/2),c=0;c>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;cD)if(I){I=we(I,"t",Ee);if(null==I)break;else if(F>=I)break;D=Math.ceil((I-F)/L)-1}else{if(Infinity==y)break;else if(F/v>=y)break;D=Math.ceil((y*v-F)/L)-1}for(I=0;I<=D;++I)C=F+L,E.push({start:F/v,end:C/v,xh:F}),F=C}v=E;z=u(z);for(y=z.next();!y.done;y=z.next())(y=Hy(a,w,y.value,v,t,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Wc||a.g.disableText||m.push(y):n.push(y):r.push(y))}q=[];r=u(0>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3; b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Ly(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function My(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""} function Ny(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=u(e);for(var g=e.next(),h={};!g.done;h={wf:void 0},g=e.next())h.wf=g.value,d.push(new Zi(h.wf.start,h.wf.end,function(k){return function(){return Qc(a.l,[f.replace("{start time}",String(k.wf.xh))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",Ey);var Jy="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Iy={CAPT:"main",SUBT:"alternate",DESC:"main"}; Si["application/vnd.ms-sstr+xml"]=function(){return new Ey};function Oy(a,b,c,d,e,f,g){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=Ec(b)}catch(h){}throw new U(401==c||403==c?2:1,1,1001,d,c,f,a,g,e||d);};function Py(){} function Qy(a,b,c,d,e,f){var g=new Ry;uh(b.headers).forEach(function(m,n){g.append(n,m)});var h=new Sy,k={Ih:!1,Vi:!1};a=Ty(a,b,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new Xg(a,function(){k.Ih=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new ac(function(){k.Vi=!0;h.abort()});l.Y(b/1E3);a.finally(function(){l.stop()})}return a} function Ty(a,b,c,d,e,f,g,h,k){var l,m,n,q,r,t,w,v,z,y,A,E,C;return P(function(B){switch(B.g){case 1:return l=Uy,m=Vy,q=new ArrayBuffer(0),t=r=0,w=Date.now(),ta(B,2),G(B,l(a,d),4);case 4:n=B.h;g(Wy(n.headers));if("HEAD"==d.method){B.A(5);break}v=n.clone().body.getReader();y=(z=n.headers.get("Content-Length"))?parseInt(z,10):0;A=function(D){function I(){var F,L,J,K;return P(function(O){switch(O.g){case 1:return ta(O,2),G(O,v.read(),4);case 4:F=O.h;wa(O,3);break;case 2:return ya(O),O.return();case 3:if(F.done){O.A(5); break}r+=F.value.byteLength;if(!h){O.A(5);break}return G(O,h(F.value),5);case 5:L=Date.now();J=r-t;if(100=k||F.done)K=F.done?0:y-r,f(L-w,J,K),t=r,w=L;F.done?D.close():(D.enqueue(F.value),I());H(O)}})}I()};new m({start:A});return G(B,n.arrayBuffer(),6);case 6:q=B.h;case 5:wa(B,3);break;case 2:E=ya(B);if(e.Ih)throw new U(1,1,7001,a,c);if(e.Vi)throw new U(1,1,1003,a,c);throw new U(1,1,1002,a,E,c);case 3:return C=Wy(n.headers),B.return(Oy(C,q,n.status,a,n.url,b,c))}})} function Wy(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Xy(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",Py);Py.isSupported=Xy;Py.parse=Qy;var Uy=window.fetch,Sy=window.AbortController,Vy=window.ReadableStream,Ry=window.Headers; Xy()&&(gh("http",Qy,2,!0),gh("https",Qy,2,!0),gh("blob",Qy,2,!0));function Yy(){} function Zy(a,b,c,d,e,f){var g=new $y,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;g.onabort=function(){n(new U(1,1,7001,a,c))};var q=!1;g.onreadystatechange=function(){if(2==g.readyState&&!q){var t=az(g);e(t);q=!0}};g.onload=function(t){var w=az(g),v=g.response;try{d(Date.now()-h,t.loaded-k,0);var z=Oy(w,v,g.status,a,g.responseURL,b,c);m(z)}catch(y){n(y)}};g.onerror= function(t){n(new U(1,1,1002,a,t,c))};g.ontimeout=function(){n(new U(1,1,1003,a,c))};g.onprogress=function(t){var w=Date.now(),v=f.minBytesForProgressEvents||0,z=t.loaded-k;if(100=v||t.lengthComputable&&t.loaded==t.total)d(w-h,z,4==g.readyState?0:t.total-t.loaded),k=t.loaded,h=w};for(var r in b.headers)g.setRequestHeader(r.toLowerCase(),b.headers[r]);g.send(b.body)});return new Xg(l,function(){g.abort();return Promise.resolve()})} function az(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=u(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",Yy);Yy.parse=Zy;var $y=window.XMLHttpRequest;gh("http",Zy,1,!0);gh("https",Zy,1,!0);gh("blob",Zy,1,!0);function bz(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function cz(a){var b=a.hc();return b?Lc(b):a.S().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.eb+":"+a.Na}function dz(a,b){return Xl(a.g.S(),a.g.eb,a.g.Na,b.streaming.retryParameters)};function ez(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function fz(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}ez.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function gz(a){return 0==a.i?0:a.j/a.i};function hz(a){var b=this;this.u=a;this.i=new Map;this.h=new sh(function(){return iz(b).catch(function(){})});this.j=[];this.s=function(){};this.m=function(){};this.g=new ez;this.l=!1}hz.prototype.destroy=function(){return this.h.destroy()};function jz(a,b,c){a.s=b;a.m=c}function iz(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)} function kz(a,b,c,d,e,f){th(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,q,r;return P(function(t){if(1==t.g)return G(t,lz(a,c),2);h=t.h;if(a.h.g)throw new U(2,9,7001);if(e)for(m in k=Mb(h),l=new Kh(k),l.data)n=Number(m),q=l.data[n],r=l.g[n],a.m(q,r);a.g.close(d,h.byteLength);a.s(gz(a.g),a.g.g);return t.return(f(h))})});a.i.set(b,g)} function mz(a,b,c,d,e,f){th(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new U(2,9,7001);if(e){var h=Mb(c);h=new Kh(h);for(var k in h.data){var l=Number(k);a.m(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.s(gz(a.g),a.g.g);return f(c)});a.i.set(b,g)}function nz(a){return P(function(b){return 1==b.g?G(b,Promise.all(a.i.values()),2):b.return(a.g.g)})} function lz(a,b){var c,d,e,f;return P(function(g){if(1==g.g)return c=qh,d=a.u.request(c,b),e=function(){return d.abort()},a.j.push(e),G(g,d.promise,2);f=g.h;Rd(a.j,e);return g.return(f.data)})};function oz(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Wg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}oz.prototype.abort=function(){var a=this;return P(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return G(b,a.g,4)}if(2!=b.g)return wa(b,0);ya(b);H(b)})}; function pz(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return P(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return G(g,b(f.key,f.value,f),2)}f.continue();H(g)})}})}oz.prototype.store=function(){return this.h};oz.prototype.promise=function(){return this.g};function qz(a){this.h=a;this.g=[]}qz.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function rz(a,b){return sz(a,b,"readwrite")}function sz(a,b,c){c=a.h.transaction([b],c);var d=new oz(c,b);a.g.push(d);d.promise().then(function(){Rd(a.g,d)},function(){Rd(a.g,d)});return d};function tz(a,b,c){this.h=new qz(a);this.i=b;this.g=c}p=tz.prototype;p.destroy=function(){return this.h.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return uz(this.i)};p.removeSegments=function(a,b){return vz(this,this.i,a,b)};p.getSegments=function(a){var b=this,c;return P(function(d){if(1==d.g)return G(d,wz(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Mh(e)}))})};p.addManifests=function(){return uz(this.g)}; p.updateManifest=function(){return Promise.reject(new U(2,9,9016,"Cannot modify values in "+this.g))};function xz(a,b,c){a=rz(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}p.updateManifestExpiration=function(a,b){var c=rz(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};p.removeManifests=function(a,b){return vz(this,this.g,a,b)}; p.getManifests=function(a){var b=this,c;return P(function(d){if(1==d.g)return G(d,wz(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Ld(e)})))})};p.getAllManifests=function(){var a=this,b,c;return P(function(d){return 1==d.g?(b=sz(a.h,a.g,"readonly"),c=new Map,G(d,pz(b,function(e,f){var g;return P(function(h){if(1==h.g)return G(h,a.Ld(f),2);g=h.h;c.set(e,g);H(h)})}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};p.Mh=function(a){return a};p.Ld=function(a){return Promise.resolve(a)}; function uz(a){return Promise.reject(new U(2,9,9011,"Cannot add new value to "+a))}p.add=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){if(1==m.g){d=rz(c.h,a);e=d.store();f=[];g=u(b);h=g.next();for(k={};!h.done;k={Yg:void 0},h=g.next())l=h.value,k.Yg=e.add(l),k.Yg.onsuccess=function(n){return function(){f.push(n.Yg.result)}}(k);return G(m,d.promise(),2)}return m.return(f)})}; function vz(a,b,c,d){a=rz(a.h,b);b=a.store();c=u(c);for(var e=c.next(),f={};!e.done;f={Jg:void 0},e=c.next())f.Jg=e.value,b.delete(f.Jg).onsuccess=function(g){return function(){return d(g.Jg)}}(f);return a.promise()} function wz(a,b,c){var d,e,f,g,h,k,l;return P(function(m){if(1==m.g){d=sz(a.h,b,"readonly");e=d.store();f={};g=[];h=u(c);k=h.next();for(l={};!k.done;l={lf:void 0,Ve:void 0},k=h.next())l.Ve=k.value,l.lf=e.get(l.Ve),l.lf.onsuccess=function(n){return function(){void 0==n.lf.result&&g.push(n.Ve);f[n.Ve]=n.lf.result}}(l);return G(m,d.promise(),2)}if(g.length)throw new U(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function yz(a){this.g=new qz(a)}yz.prototype.destroy=function(){return this.g.destroy()};yz.prototype.getAll=function(){var a=this,b,c;return P(function(d){return 1==d.g?(b=sz(a.g,"session-ids","readonly"),c=[],G(d,pz(b,function(e,f){c.push(f)}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};yz.prototype.add=function(a){var b=rz(this.g,"session-ids"),c=b.store();a=u(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()}; yz.prototype.remove=function(a){var b=this,c;return P(function(d){return 1==d.g?(c=rz(b.g,"session-ids"),G(d,pz(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):G(d,c.promise(),0)})};function zz(){this.g=new Map}zz.prototype.destroy=function(){for(var a=[],b=u(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};zz.prototype.init=function(){var a=this;Az.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=u(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)}; function Bz(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Rb:d,fb:f},fb:e})})});if(b)return b;throw new U(2,9,9013,"Could not find a cell that supports add-operations");}function Cz(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Rb:d,fb:f},e)})})} function Dz(a,b,c){a=a.g.get(b);if(!a)throw new U(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new U(2,9,9013,"Could not find cell with name "+c);return b}function Ez(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Fz(a){var b=Array.from(a.g.keys());if(!b.length)throw new U(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()} function Gz(a){var b,c,d;return P(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0b;if(!k||!l){m.A(3);break}return G(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ca(m),G(m,e.destroy(),10);case 10:Da(m,0);break;case 2:ya(m),m.A(3)}})}; p.onInitialVariantChosen=function(){};p.banLocation=function(){};p.setMediaElement=function(){};Si["application/x-offline-manifest"]=function(){return new $z};function aA(){}function bA(a,b){var c=Tz(a);c&&"manifest"==c.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=$g(a)):a=c&&"segment"==c.g?cA(c.key(),c,b):Yg(new U(2,1,9004,a));return a} function cA(a,b,c){var d=new zz;return $g(void 0).Wa(function(){return d.init()}).Wa(function(){return Dz(d,b.Rb(),b.fb())}).Wa(function(e){return e.getSegments([b.key()])}).Wa(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}S("shaka.offline.OfflineScheme",aA);aA.plugin=bA;gh("offline",bA);function dA(a,b,c){var d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:d=[];for(var m=[],n=u(c),q=n.next();!q.done;q=n.next()){q=q.value;for(var r=!1,t=u(m),w=t.next();!w.done;w=t.next())if(w=w.value,eA(w.info,q)){w.sessionIds.push(q.sessionId);r=!0;break}r||m.push({info:q,sessionIds:[q.sessionId]})}e=u(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=fA(a,b,g);return G(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l.return(d)}})} function fA(a,b,c){var d,e;return P(function(f){switch(f.g){case 1:return d=new Mh({nc:b,onError:function(){},ef:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),G(f,Uh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return ya(f),G(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],G(f,Promise.all(c.sessionIds.map(function(g){return P(function(h){if(1== h.g)return ta(h,2),G(h,ii(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);ya(h);H(h)})})),6);case 6:return G(f,d.destroy(),7);case 7:return f.return(e)}})}function eA(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Sd(a.audioCapabilities,b.audioCapabilities,c)&&Sd(a.videoCapabilities,b.videoCapabilities,c)};function gA(a,b,c){var d=b.presentationTimeline.getDuration();b=hA(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function iA(a,b){var c=Vz(new Uz(a.Rb(),a.fb()),b),d=b.appMetadata||{};c=hA(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}} function hA(a){var b=[],c=Kg(a.variants);c=u(c);for(var d=c.next();!d.done;d=c.next())b.push(Ag(d.value));a=u(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Bg(c.value));return b};function jA(){this.g={}}function kA(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function lA(a,b){a.g[b.id]=b.bandwidth||2048}function mA(a,b){a=a.g[b];null==a&&(a=0);return a};function nA(a){var b=this;if(a&&a.constructor!=Y)throw new U(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Db()):(this.h=bn(),this.g=new fh);this.i=[];this.l=[];var c=!a;this.j=new sh(function(){var d,e,f,g,h;return P(function(k){switch(k.g){case 1:return G(k,Promise.all(b.l.map(function(l){return iz(l)})),2);case 2:d=function(){};e=[];f=u(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return G(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return G(k,b.g.destroy(),4); case 4:b.h=null,b.g=null,H(k)}})});this.m=1E9}function oA(){if(bc())a:{var a=u(Az.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}p=nA.prototype;p.destroy=function(){return this.j.destroy()};p.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Jm(a,b));return gn(this.h,a)};p.getConfiguration=function(){var a=bn();gn(a,this.h,bn());return a};p.Db=function(){return this.g}; p.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new hz(this.g);this.l.push(h);b=pA(this,a,b||{},d||[],e||[],function(){var k;return P(function(l){if(1==l.g)return c?l.A(2):G(l,In(a,f.g,g.manifest.retryParameters),3);2!=l.g&&(c=l.h);k=Ri(a,c||null);return l.return(k())})},g,h);b=new Xg(b,function(){return iz(h)});b.finally(function(){Rd(f.l,h)});return qA(this,b)}; function pA(a,b,c,d,e,f,g,h){var k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N;return P(function(R){switch(R.g){case 1:return rA(),l=k=null,m=new zz,r=q=n=null,ta(R,2,3),G(R,f(),5);case 5:return k=R.h,G(R,sA(a,b,k,g),6);case 6:t=R.h;tA(a);w=!t.presentationTimeline.T()&&!t.presentationTimeline.Rc();if(!w)throw new U(2,9,9005,b);v=u(d);z=v.next();case 7:if(z.done){R.A(9);break}y=z.value;return G(R,uA(a,y,t),10);case 10:A=R.h;t.imageStreams.push(A);tA(a);z=v.next();R.A(7);break;case 9:E=u(e),C=E.next(); case 11:if(C.done)return Wh(g.drm.clearKeys,t.variants),I=t.variants.some(function(Q){if(Q.audio)for(var V=u(Q.audio.drmInfos),ba=V.next();!ba.done;ba=V.next())if(ba.value.licenseServerUri.startsWith("data:"))return!0;if(Q.video)for(Q=u(Q.video.drmInfos),V=Q.next();!V.done;V=Q.next())if(V.value.licenseServerUri.startsWith("data:"))return!0;return!1}),F=g.offline.usePersistentLicense,I&&(F=!1),G(R,a.hd(t,function(Q){r=r||Q},g,F),15);B=C.value;return G(R,vA(a,t,B.uri,B.language,B.kind,B.mime,B.codecs), 14);case 14:D=R.h;t.textStreams.push(D);tA(a);C=E.next();R.A(11);break;case 15:l=R.h;tA(a);if(r)throw r;return G(R,wA(t,l,g,F),16);case 16:return G(R,m.init(),17);case 17:return tA(a),G(R,Bz(m),18);case 18:return n=R.h,tA(a),L=xA(l,t,b,c,g,h,F),J=L.vk,K=L.sh,G(R,n.fb.addManifests([J]),19);case 19:O=R.h;tA(a);q=O[0];tA(a);if(r)throw r;return G(R,yA(a,K,q,J,h,g,n.fb,t,l,F),20);case 20:return tA(a),zA(t,J,l,F),G(R,n.fb.updateManifest(q,J),21);case 21:return tA(a),M=new Sz("manifest",n.path.Rb,n.path.fb, q),R.return(iA(M,J));case 3:return Ca(R),G(R,m.destroy(),22);case 22:if(!k){R.A(23);break}return G(R,k.stop(),23);case 23:if(!l){R.A(25);break}return G(R,l.destroy(),25);case 25:Da(R,0);break;case 2:N=ya(R);if(null==q){R.A(27);break}return G(R,AA(q),27);case 27:throw r||N;}})} function yA(a,b,c,d,e,f,g,h,k,l){var m,n,q,r,t,w,v,z,y,A,E;return P(function(C){switch(C.g){case 1:m={};n=0;q=function(){if(a.j.g||e.l)throw new U(2,9,7001);};r=function(B,D){var I,F,L,J,K,O,M,N,R;return P(function(Q){if(1==Q.g){I=u(B);F=I.next();for(L={};!F.done;L={cc:void 0},F=I.next())L.cc=F.value,q(),J=dz(L.cc,f),K=L.cc.i,O=L.cc.h,M=function(V){return function(ba){var ia,xa,Ea;return P(function(va){switch(va.g){case 1:ia=V.cc.g;xa=cz(ia);if(!ia.aesKey){va.A(2);break}return G(va,Wl(ba,ia.aesKey, V.cc.j),3);case 3:ba=va.h;case 2:return G(va,g.addSegments([{data:ba}]),4);case 4:Ea=va.h,q(),m[xa]=Ea[0],n+=ba.byteLength,H(va)}})}}(L),N=L.cc.g,(R=N.hc())?mz(e,L.cc.groupId,R,K,O,M):kz(e,L.cc.groupId,J,K,O,M);return G(Q,nz(e),2)}q();if(!D||e.l)return Q.A(0);zA(h,d,k,l);return G(Q,g.updateManifest(c,d),0)})};t=!1;ta(C,2);if(!BA(h)||!t||CA(h)){C.A(4);break}return G(C,r(b.filter(function(B){return B.h}),!0),5);case 5:return q(),b=b.filter(function(B){return!B.h}),w=m,v=n,m={},n=0,G(C,DA(g,c,d,w,v, function(){return tA(a)}),6);case 6:q();case 4:if(t){C.A(7);break}return G(C,r(b,!1),8);case 8:return q(),z=m,y=n,m={},n=0,G(C,DA(g,c,d,z,y,function(){return q()}),9);case 9:q();case 7:wa(C,0);break;case 2:return A=ya(C),E=Object.values(m),G(C,g.removeSegments(E,function(){}),10);case 10:throw A;}})} function AA(a){var b,c,d,e;return P(function(f){switch(f.g){case 1:return b=new zz,G(f,b.init(),2);case 2:return G(f,Bz(b),3);case 3:return c=f.h,d=new Sz("manifest",c.path.Rb,c.path.fb,a),G(f,b.destroy(),4);case 4:return e=new nA,G(f,e.remove(d.toString()),0)}})} function DA(a,b,c,d,e,f){var g,h,k,l,m,n,q,r,t,w,v;return P(function(z){switch(z.g){case 1:g=!1;ta(z,2);h=!0;k=u(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=u(m.segments),q=n.next();!q.done;q=n.next())r=q.value,t=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=t&&(r.dataKey=t,r.pendingSegmentRefId=void 0),t=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=t&&(r.initSegmentKey=t,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&& (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return G(z,a.updateManifest(b,c),4);case 4:g=!0;f();wa(z,0);break;case 2:return w=ya(z),G(z,AA(b),5);case 5:if(g){z.A(6);break}v=Object.values(d);return G(z,a.removeSegments(v,function(){}),6);case 6:throw w;}})} function wA(a,b,c,d){var e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E,C,B,D,I,F,L,J,K,O,M,N,R,Q;return P(function(V){switch(V.g){case 1:return e={width:Infinity,height:Infinity},bg(a,c.restrictions,e),G(V,gg(b,a,d,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:f=[];g=c.preferredDecodingAttributes;h=c.preferredVideoCodecs;k=c.preferredAudioCodecs;l=c.preferredTextFormats;$f(a,h,k,g,l);m=u(a.variants);for(n=m.next();!n.done;n=m.next())q=n.value,f.push(Ag(q));r=u(a.textStreams);for(t=r.next();!t.done;t= r.next())w=t.value,f.push(Bg(w));v=u(a.imageStreams);for(z=v.next();!z.done;z=v.next())y=z.value,f.push(Cg(y));return G(V,c.offline.trackSelectionCallback(f),3);case 3:A=V.h;E=a.presentationTimeline.getDuration();C=0;B=u(A);for(D=B.next();!D.done;D=B.next())I=D.value,F=I.bandwidth*E/8,C+=F;ta(V,4);return G(V,c.offline.downloadSizeCallback(C),6);case 6:L=V.h;if(!L)throw new U(2,9,9014);wa(V,5);break;case 4:J=ya(V);if(J instanceof U)throw J;throw new U(2,9,9015);case 5:K=new Set;O=new Set;M=new Set; N=u(A);for(R=N.next();!R.done;R=N.next())Q=R.value,"variant"==Q.type&&K.add(Q.id),"text"==Q.type&&O.add(Q.id),"image"==Q.type&&M.add(Q.id);a.variants=a.variants.filter(function(ba){return K.has(ba.id)});a.textStreams=a.textStreams.filter(function(ba){return O.has(ba.id)});a.imageStreams=a.imageStreams.filter(function(ba){return M.has(ba.id)});EA(a);H(V)}})} function xA(a,b,c,d,e,f,g){var h=gA(c,b,d),k=e.offline.progressCallback;jz(f,function(t,w){h.size=w;k(h,t)},function(t,w){l&&g&&m==w&&ei(a,"cenc",t)});var l=BA(b)&&!CA(b),m=null;l&&(m=FA.get(a.h.keySystem));for(var n=new jA,q=u(b.textStreams),r=q.next();!r.done;r=q.next())n.g[r.value.id]=52;q=u(b.imageStreams);for(r=q.next();!r.done;r=q.next())lA(n,r.value);q=u(b.variants);for(r=q.next();!r.done;r=q.next())kA(n,r.value);f=GA(f,n,b,e);e=f.streams;f=f.sh;(n=a.h)&&g&&(n.initData=[]);return{vk:{creationTime:Date.now(), originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Pd(),streams:e,sessionIds:g?ni(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},sh:f}}function BA(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})} function CA(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function zA(a,b,c,d){b.expiration=c.Pd();c=ni(c);b.sessionIds=d?c:[];if(BA(a)&&d&&!c.length)throw new U(2,9,9007);}p.remove=function(a){return HA(this,IA(this,a))}; function IA(a,b){var c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:rA();c=Tz(b);if(null==c||"manifest"!=c.g)throw new U(2,9,9004,b);d=c;e=new zz;ua(k,2);return G(k,e.init(),4);case 4:return G(k,Dz(e,d.Rb(),d.fb()),5);case 5:return f=k.h,G(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],G(k,Promise.all([JA(a,h,e),KA(f,d,h)]),2);case 2:return Ca(k),G(k,e.destroy(),8);case 8:Da(k,0)}})} function LA(a,b){for(var c=[],d=u(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Af(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Af(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function JA(a,b,c){return P(function(d){return G(d,MA(a.g,a.h.drm,c,b),0)})} function KA(a,b,c){function d(){}var e=NA(c);iA(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}p.Nk=function(){return HA(this,OA(this))}; function OA(a){var b,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:return rA(),b=a.g,c=a.h.drm,d=new zz,e=!1,ua(n,2),G(n,d.init(),4);case 4:f=[],Ez(d,function(q){return f.push(q)}),g=u(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return G(n,k.getAll(),8);case 8:return l=n.h,G(n,dA(c,b,l),9);case 9:return m=n.h,G(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return Ca(n),G(n,d.destroy(),11);case 11:Da(n,3);break;case 3:return n.return(!e)}})} p.list=function(){return HA(this,PA())};function PA(){var a,b,c;return P(function(d){switch(d.g){case 1:return rA(),a=[],b=new zz,ua(d,2),G(d,b.init(),4);case 4:return c=Promise.resolve(),Cz(b,function(e,f){c=c.then(function(){var g;return P(function(h){if(1==h.g)return G(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=iA(new Sz("manifest",e.Rb,e.fb,l),k);a.push(k)});H(h)})})}),G(d,c,2);case 2:return Ca(d),G(d,b.destroy(),6);case 6:Da(d,3);break;case 3:return d.return(a)}})} function sA(a,b,c,d){var e,f,g,h,k;return P(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){}, addFont:function(){}},c.configure(d.manifest),tA(a),G(l,c.start(b,g),2);if(3!=l.g)return h=l.h,tA(a),k=QA(h),G(l,Promise.all(lb(k,function(m){return m.createSegmentIndex()})),3);tA(a);if(e)throw e;return l.return(h)})} function uA(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,z;return P(function(y){switch(y.g){case 1:return G(y,RA(a,b),2);case 2:d=y.h;if("text/vtt"!=d)throw new U(1,2,2017,b);return G(y,SA(b,a.g,a.h.streaming.retryParameters),3);case 3:e=y.h;f=Pf[d];if(!f)throw new U(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Mb(e);l=g.parseMedia(k,h,b,[]);m=[];n=u(l);q=n.next();for(r={};!q.done;r={Df:void 0,kd:void 0},q=n.next())r.kd=q.value,r.Df=null, t=function(A){return function(){null==A.Df&&(A.Df=Qc([b],[A.kd.payload]));return A.Df||[]}}(r),w=new Zi(r.kd.startTime,r.kd.endTime,t,0,null,null,0,0,Infinity),r.kd.payload.includes("#xywh")&&(v=r.kd.payload.split("#xywh=")[1].split(","),4===v.length&&w.vf({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),m.push(w);z=d;if(!m.length){y.A(4);break}return G(y,In(m[0].S()[0],a.g,a.h.manifest.retryParameters),5);case 5:z=y.h;case 4:return y.return({id:a.m++, originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ql(m),mimeType:z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Af(z||"","")]), isAudioMuxedInVideo:!1})}})} function vA(a,b,c,d,e,f,g){var h,k,l;return P(function(m){if(1==m.g)return f?m.A(2):G(m,RA(a,c),3);2!=m.g&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:sl(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:Wc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null, spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Af(f||"",g||"")]),isAudioMuxedInVideo:!1};k=Af(h.mimeType,h.codecs);l=Of(k);if(!l)throw new U(2,2,2014,f);return m.return(h)})}function RA(a,b){var c;return P(function(d){switch(d.g){case 1:return ta(d,2),G(d,In(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;wa(d,3);break;case 2:ya(d);case 3:if(c)return d.return(c);throw new U(1,2,2011,b);}})} function SA(a,b,c){var d,e,f;return P(function(g){if(1==g.g)return d=qh,e=kh([a],c),e.method="GET",G(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})}p.hd=function(a,b,c,d){var e=this,f;return P(function(g){return 1==g.g?(f=new Mh({nc:e.g,onError:b,ef:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),G(g,Rh(f,a.variants,d),2)):3!=g.g?G(g,gi(f),3):g.return(f)})}; function GA(a,b,c,d){var e=new Map,f=QA(c),g=new Map;f=u(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=TA(a,b,c,h,d,e);g.set(h.id,k)}a=u(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),sh:Array.from(e.values())}} function TA(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount, audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching,isAudioMuxedInVideo:d.isAudioMuxedInVideo},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;UA(d,c.presentationTimeline.Eb(),function(l,m){var n=cz(l),q=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=mA(b,d.id)*r;r=fz(a.g,r);f.set(n,new bz(l,r,k,!1,m))}l.qa&&(q=cz(l.qa),f.has(q)||(r=.5* mA(b,d.id),r=fz(a.g,r),f.set(q,new bz(l.qa,r,k,!0,m))));g.segments.push({pendingInitSegmentRefId:q,initSegmentKey:q?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:n,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite});0!==h&&(k=(k+1)%h)});return g} function UA(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d,b),d=a.segmentIndex.get(++b)}function tA(a){if(a.j.g)throw new U(2,9,7001);}function rA(){if(!oA())throw new U(2,9,9E3);}function HA(a,b){return P(function(c){if(1==c.g)return a.i.push(b),ua(c,2),G(c,b,4);if(2!=c.g)return c.return(c.h);Ca(c);Rd(a.i,b);return Da(c,0)})}function qA(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Rd(a.i,c)})} function NA(a){var b=new Set;a=u(a.streams);for(var c=a.next();!c.done;c=a.next()){c=u(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)} function MA(a,b,c,d){var e,f,g;return P(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Fz(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:LA(d,!1),videoCapabilities:LA(d,!0)}});return G(h,dA(b,a,f),2)}return 3!=h.g?(g=h.h,G(h,e.remove(g),3)):G(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})} function QA(a){for(var b=new Set,c=u(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=u(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=u(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b} function EA(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=u(b),d=c.next();!d.done;d=c.next()){d=u(b);for(var e=d.next();!e.done;e=d.next());}b=u(a);for(c=b.next();!c.done;c=b.next())for(c=u(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",nA);nA.deleteAll=function(){var a;return P(function(b){return 1==b.g?(a=new zz,ua(b,2),G(b,Gz(a),2)):5!=b.g?(Ca(b),G(b,a.destroy(),5)):Da(b,0)})}; nA.prototype.list=nA.prototype.list;nA.prototype.removeEmeSessions=nA.prototype.Nk;nA.prototype.remove=nA.prototype.remove;nA.prototype.store=nA.prototype.store;nA.prototype.getNetworkingEngine=nA.prototype.Db;nA.prototype.getConfiguration=nA.prototype.getConfiguration;nA.prototype.configure=nA.prototype.configure;nA.prototype.destroy=nA.prototype.destroy;nA.support=oA; var FA=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c"); vq.offline=oA;function VA(){}function WA(){for(var a=u(XA),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){cb("Error installing polyfill!",c)}}}function YA(a,b){a={priority:b||0,callback:a};for(b=0;b=a?window.MediaSource=null:12>=a?(rB(),sB()):15>=a&&rB():gc("DT_STB_BCM")?(rB(),sB()):gc("Tizen 2")||ic()||gc("Tizen 4")?tB():gc("WPE")&&(rB(),sB());(window.MediaSource||window.ManagedMediaSource)&&uB();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&vB()} function rB(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ma.apply(0,arguments));b.abort=function(){};return b}}function sB(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}} function uB(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Gf(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Gf(c)&&b(c)}}} function tB(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Jf(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Jf(c)&&b(c)}}} function vB(){var a=MediaSource.isTypeSupported;jc()||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}VA.MediaSource=pB;pB.install=qB;YA(qB);function wB(){}function xB(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?yB():void 0!=window.orientation&&zB())}function yB(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})} function zB(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new AB;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new T("change");b.dispatchEvent(c)})}VA.Orientation=wB;wB.install=xB;function AB(){kb.call(this);this.type="";this.angle=0}pa(AB,kb); AB.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)}; AB.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};YA(xB);function BB(){}var CB,DB,EB,FB,GB,HB;function IB(a,b){try{var c=new JB(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function KB(a){var b=this.mediaKeys;b&&b!=a&&LB(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?LB(a,this):Promise.resolve()} function MB(a){a=Mb(a.initData);if(Qb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Fc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Nb(a);this.dispatchEvent(b)}VA.PatchedMediaKeysApple=BB; BB.uninstall=function(){CB&&(CB=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",DB),HTMLMediaElement.prototype.setMediaKeys=EB,window.MediaKeys=FB,window.MediaKeySystemAccess=GB,navigator.requestMediaKeySystemAccess=HB,DB=HB=EB=GB=FB=null,window.shakaMediaKeysPolyfill="")}; BB.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)CB=!0,DB=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),EB=HTMLMediaElement.prototype.setMediaKeys,FB=window.MediaKeys,GB=window.MediaKeySystemAccess,HB=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=KB;window.MediaKeys=NB;window.MediaKeySystemAccess=JB;navigator.requestMediaKeySystemAccess= IB;window.shakaMediaKeysPolyfill=OB}}; function JB(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=u(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=u(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem, g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=u(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;} JB.prototype.createMediaKeys=function(){var a=new NB(this.keySystem);return Promise.resolve(a)};JB.prototype.getConfiguration=function(){return this.g};function NB(a){this.h=new WebKitMediaKeys(a);this.g=new td}NB.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new PB(this.h,a)};NB.prototype.setServerCertificate=function(){return Promise.resolve(!1)}; function LB(a,b){a.g.Ua();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",MB);try{return bl(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}NB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function PB(a){kb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new td;this.sessionId="";this.expiration=NaN;this.closed=new Wg;this.keyStatuses=new QB}pa(PB,kb);p=PB.prototype; p.generateRequest=function(a,b){var c=this;this.h=new Wg;try{var d=this.l.createSession("video/mp4",Mb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.xc()?"license-request":"license-renewal").set("message",Nb(e.message));e=new T("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(RB(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror", function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:RB(c,"output-not-allowed");break;default:RB(c,"internal-error")}});RB(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))}; p.update=function(a){this.g=new Wg;try{this.i.update(Mb(a))}catch(b){this.g.reject(b)}return this.g};p.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ua()}catch(a){this.closed.reject(a)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function RB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)} function QB(){this.size=0;this.g=void 0}p=QB.prototype;p.xc=function(){return this.g};p.forEach=function(a){this.g&&a(this.g,Xb.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Xb.value();return this.g&&Lb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var OB="apple";function SB(){}function TB(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||ic()||gc("Tizen 4")||gc("Tizen 5.0")||jc()&&38===lc())&&(MediaKeys.prototype.setServerCertificate=UB)}function UB(){return Promise.resolve(!1)}VA.PatchedMediaKeysCert=SB;SB.install=TB;YA(TB);function VB(){} function WB(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)XB="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=YB;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=ZB;window.MediaKeys=$B;window.MediaKeySystemAccess=aC;window.shakaMediaKeysPolyfill=bC}} function cC(a){var b=XB;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function YB(a,b){try{var c=new aC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ZB(a){var b=this.mediaKeys;b&&b!=a&&dC(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&dC(a,this);return Promise.resolve()}VA.PatchedMediaKeysWebkit=VB;VB.install=WB; function aC(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=u(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=u(f.audioCapabilities), l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=u(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]): d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}aC.prototype.createMediaKeys=function(){var a=new $B(this.g);return Promise.resolve(a)};aC.prototype.getConfiguration=function(){return this.h};function $B(a){this.l=a;this.h=null;this.g=new td;this.i=[];this.j=new Map} function dC(a,b){a.h=b;a.g.Ua();var c=XB;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Nb(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=eC(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.xc()?"licenserequest":"licenserenewal").set("message",d.message),d=new T("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){(d=eC(a,d.sessionId))&&d.ready()}), a.g.o(b,c+"keyerror",function(d){var e=eC(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?fC(e,"output-restricted"):1==f?fC(e,"expired"):fC(e,"internal-error"))}}))} $B.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new gC(b,this.l,a);this.i.push(a);return a};$B.prototype.setServerCertificate=function(){return Promise.resolve(!1)};$B.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")}; function eC(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function gC(a,b,c){kb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Wg;this.keyStatuses=new hC}pa(gC,kb);p=gC.prototype;p.ready=function(){fC(this,"usable");this.g&&this.g.resolve();this.g=null}; function iC(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Mb(Fc("LOAD_SESSION|"+c));else{var e=Fc("PERSISTENT|");d=Pc(e,b)}else d=Mb(b)}catch(g){return Promise.reject(g)}a.h=new Wg;var f=cC("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new ac(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).Y(.01)}return a.h} function jC(a,b,c){if(a.g)a.g.then(function(){return jC(a,b,c)}).catch(function(){return jC(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Bc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Mc(e.keys[0].k);e=Mc(e.keys[0].kid)}else d=Mb(c),e=null;var f=cC("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}} function fC(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}p.generateRequest=function(a,b){return iC(this,b,null)};p.load=function(a){return"persistent-license"==this.l?iC(this,null,a):Promise.reject(Error("Not a persistent session."))};p.update=function(a){var b=new Wg;jC(this,b,a);return b}; p.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=cC("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function hC(){this.size=0;this.g=void 0}p=hC.prototype;p.xc=function(){return this.g}; p.forEach=function(a){this.g&&a(this.g,Xb.value())};p.get=function(a){if(this.has(a))return this.g};p.has=function(a){var b=Xb.value();return this.g&&Lb(a,b)?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};var XB="",bC="webkit";YA(WB);function kC(){}function lC(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=mC,Object.defineProperty(a,"disablePictureInPicture",{get:nC,set:oC,enumerable:!0,configurable:!0}),document.exitPictureInPicture=pC,document.addEventListener("webkitpresentationmodechanged",qC,!0))}} function qC(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)} function mC(){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 pC(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))} function nC(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function oC(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}VA.PiPWebkit=kC;kC.install=lC;YA(lC);function rC(){}function sC(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=tC))}function tC(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}VA.RandomUUID=rC;rC.install=sC;YA(sC);function uC(){}function vC(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:wC})}function wC(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}VA.Symbol=uC;uC.install=vC;YA(vC);function xC(){}function yC(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}VA.VideoPlayPromise=xC;xC.install=yC;YA(yC);function zC(){}function AC(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||jc()&&38===lc())&&(a.getVideoPlaybackQuality=BC)}}function BC(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}VA.VideoPlaybackQuality=zC;zC.install=AC;YA(AC);function CC(){}function DC(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=EC;else if(6==b)a=FC;else{try{var c=!!EC(1,2,"")}catch(d){c=!1}c&&(a=EC)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function EC(a,b,c){return new window.TextTrackCue(a,b,c)}function FC(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}VA.VTTCue=CC;CC.install=DC;YA(DC);function GC(){}GC.prototype.parseInit=function(){};GC.prototype.setSequenceMode=function(){};GC.prototype.setManifestType=function(){};GC.prototype.parseMedia=function(a,b){var c=null,d=[];a=Bc(a).split(/\r?\n/);a=u(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=HC.exec(e))){var f=IC.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Pe(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d}; S("shaka.text.LrcTextParser",GC);GC.prototype.parseMedia=GC.prototype.parseMedia;GC.prototype.setManifestType=GC.prototype.setManifestType;GC.prototype.setSequenceMode=GC.prototype.setSequenceMode;GC.prototype.parseInit=GC.prototype.parseInit;var HC=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,IC=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Pf["application/x-subtitle-lrc"]=function(){return new GC};function JC(){}JC.prototype.parseInit=function(){};JC.prototype.setSequenceMode=function(){};JC.prototype.setManifestType=function(){}; JC.prototype.parseMedia=function(a,b,c,d){var e=Bc(a);a=[];if(""==e)return a;var f=fe(e,"tt",!0);if(!f)throw new U(2,2,2005,"Failed to parse TTML.");e=pe(f,"body")[0];if(!e)return[];var g=ye(f,KC,"frameRate"),h=ye(f,KC,"subFrameRate"),k=ye(f,KC,"frameRateMultiplier"),l=ye(f,KC,"tickRate"),m=ye(f,KC,"cellResolution"),n=f.attributes["xml:space"]||"default",q=ye(f,LC,"extent");if("default"!=n&&"preserve"!=n)throw new U(2,2,2005,"Invalid xml:space value: "+n);n="default"==n;g=new MC(g,h,k,l);m=NC(m); h=pe(f,"metadata")[0];h=(h?h.children:[]).filter(function(w){return"\n"!=w});k=pe(f,"style");f=pe(f,"region");l=[];for(var r=u(f),t=r.next();!t.done;t=r.next())(t=OC(t.value,k,q))&&l.push(t);if(me(e,"p").length)throw new U(2,2,2001,"

can only be inside

in TTML");q=u(me(e,"div"));for(r=q.next();!r.done;r=q.next())if(me(r.value,"span").length)throw new U(2,2,2001," can only be inside

in TTML");if(b=PC(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"), a.push(b);return a}; function PC(a,b,c,d,e,f,g,h,k,l,m,n,q){var r=l;if(ke(a)){if(!m)return null;var t={tagName:"span",children:[ne(a)],attributes:{},parent:null}}else t=a;for(var w=null,v=u(QC),z=v.next();!z.done&&!(w=RC(t,"backgroundImage",d,"#",z.value)[0]);z=v.next());v=null;z=ye(t,QC,"backgroundImage");var y=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(z&&y.test(z)){v=parseInt(z.split(":").pop(),10)-1;if(v>=q.length)return null;v=q[v]}else n&&z&&!z.startsWith("#")&&(y=new sb(n),z=new sb(z),(z=y.resolve(z).toString())&& (v=z));if("p"==a.tagName||w||v)m=!0;a=m;z="default"==(t.attributes["xml:space"]||(h?"default":"preserve"));y=t.children.every(ke);h=[];if(!y)for(var A=u(t.children),E=A.next();!E.done;E=A.next())(E=PC(E.value,b,c,d,e,f,g,z,k,t,m,n,q))&&h.push(E);d=null!=l;n=ne(t);n=t.children.length&&n&&/\S/.test(n);A=t.attributes.begin||t.attributes.end||t.attributes.dur;if(!(A||n||"br"==t.tagName||0!=h.length||d&&!z))return null;q=SC(t,c);n=q.start;for(q=q.end;r&&r.tagName&&"tt"!=r.tagName;)q=TC(r,c,n,q),n=q.start, q=q.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;q=null==q?Infinity:q+b.periodStart;n=Math.max(n,b.segmentStart);q=Math.min(q,b.segmentEnd);if(!A&&0c.length)return f;var g=a;for(a=null;!a&&!(a=e?xe(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=u(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=u(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f} function TC(a,b,c,d){a=SC(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}function SC(a,b){var c=gD(a.attributes.begin,b),d=gD(a.attributes.end,b);a=gD(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}} function gD(a,b){var c=null;if(hD.test(a)){a=hD.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(iD.test(a))c=jD(iD,a);else if(kD.test(a))c=jD(kD,a);else if(lD.test(a))a=lD.exec(a),c=Number(a[1])/b.frameRate;else if(mD.test(a))a=mD.exec(a),c=Number(a[1])/b.g;else if(nD.test(a))c=jD(nD,a);else if(a)throw new U(2,2,2001,"Could not parse cue time range in TTML");return c} function jD(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function NC(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Jc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",JC);JC.prototype.parseMedia=JC.prototype.parseMedia;JC.prototype.setManifestType=JC.prototype.setManifestType;JC.prototype.setSequenceMode=JC.prototype.setSequenceMode;JC.prototype.parseInit=JC.prototype.parseInit; function MC(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))} var VC=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,cD=/^(\d{1,4}(?:\.\d+)?|100)%$/,bD=/^(\d+px|\d+em|\d*\.?\d+c)$/,WC=/^(\d+)px (\d+)px$/,hD=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,iD=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,kD=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,lD=/^(\d*(?:\.\d*)?)f$/,mD=/^(\d*(?:\.\d*)?)t$/,nD=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),aD={left:Ve,center:"center",right:"end",start:Ve, end:"end"},$C={left:"line-left",center:"center",right:"line-right"},KC=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],LC=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],QC=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Pf["application/ttml+xml"]=function(){return new JC};function oD(){this.g=new JC}oD.prototype.parseInit=function(a){var b=!1;(new zh).box("moov",Eh).box("trak",Eh).box("mdia",Eh).box("minf",Eh).box("stbl",Eh).X("stsd",Gh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new U(2,2,2007);};oD.prototype.setSequenceMode=function(){};oD.prototype.setManifestType=function(){}; oD.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[],g=[];(new zh).box("moof",Eh).box("traf",Eh).X("subs",function(h){g=[];for(var k=h.reader,l=k.V(),m=0;m").replace(/{\/b}/g,"").replace(/{i}/g,"").replace(/{\/i}/g,"").replace(/{u}/g,"").replace(/{\/u}/g,"")+"\n\n";return b}S("shaka.text.SrtTextParser",wD);wD.srt2webvtt=xD;wD.prototype.parseMedia=wD.prototype.parseMedia; wD.prototype.setManifestType=wD.prototype.setManifestType;wD.prototype.setSequenceMode=wD.prototype.setSequenceMode;wD.prototype.parseInit=wD.prototype.parseInit;Pf["text/srt"]=function(){return new wD};function yD(){}yD.prototype.parseInit=function(){};yD.prototype.setSequenceMode=function(){};yD.prototype.setManifestType=function(){}; yD.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=Bc(a).split(/\r?\n\s*\r?\n/);a=u(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=zD.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=u(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=AD.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(BD);else if("Style"==a){a=f.split(BD);f={};for(var g=0;g>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null} function CD(a){a=FD.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",yD);yD.prototype.parseMedia=yD.prototype.parseMedia;yD.prototype.setManifestType=yD.prototype.setManifestType;yD.prototype.setSequenceMode=yD.prototype.setSequenceMode;yD.prototype.parseInit=yD.prototype.parseInit;var zD=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,AD=/^\s*([^:]+):\s*(.*)/,BD=/\s*,\s*/,FD=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/; Pf["text/x-ssa"]=function(){return new yD};function GD(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}} function ID(a,b){if(b+1=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344, 1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,Fa:a,ua:e}} function MD(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0>>24+h<>h;c=c?c<c)return!0}return!1};function ND(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=ND.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?zd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};p.getOriginalMimeType=function(){return this.j}; p.transmux=function(a,b,c,d){a=Mb(a);for(var e=sj(a),f=e.length;fa.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Cj(a.subarray(b+2));Ej(c,2);Ej(c,3);var d=Fj(c,11)+1<<1,e=Fj(c,2);if(3==e){e=Fj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Fj(c,2);var g=Fj(c,3),h=Fj(c,1);c=Fj(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,Fa:a,ua:d}};function PD(a){this.j=a;this.h=0;this.g=new Map;this.i=null}p=PD.prototype;p.destroy=function(){this.g.clear()};p.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?zd(this.convertCodecs("audio",a)):!1};p.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};p.getOriginalMimeType=function(){return this.j}; p.transmux=function(a,b,c,d){a=Mb(a);for(var e=sj(a),f=e.length;fe?Lj(c,16):Lj(c,64))}Hj(c);d=X(c);if(0===d)X(c);else if(1===d)for(Ej(c,1),Hj(c),Hj(c),d=X(c),e=0;e=q?(d=r[q-1],e=t[q-1]):255===q&&(d=Fj(c,16),e=Fj(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4], k[5],255,225].concat(k,[1],b));return{height:c,width:f,Ra:a,Ya:d,ab:e}} function SD(a){function b(t){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:t.pts,dts:t.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var t=[],w=u(e.nalus),v=w.next();!v.done;v=w.next()){v=v.value;var z=v.fullData.byteLength,y=new Uint8Array(4);y[0]=z>>24&255;y[1]=z>>16&255;y[2]=z>>8&255;y[3]=z&255;t.push(y);t.push(v.fullData)}e.data=Pc.apply(Jc,x(t));d.push(e)}}for(var d=[],e=null,f=!1,g=0;gB;B++)Fj(a,2);for(B=0;BL;L++)for(var J=0;J<(3===L?2:6);J++)if(Jj(a)){var K=Math.min(64,1<<4+(L<<1));1=K?(F=O[K-1],L=M[K-1]):255===K&&(F=Fj(a,16),L=Fj(a,16)));Jj(a)&&Jj(a);Jj(a)&&(Fj(a,3),Jj(a),Jj(a)&&(Kj(a),Kj(a),Kj(a)));Jj(a)&&(X(a),X(a));Jj(a);Jj(a);Jj(a);if(K=Jj(a))X(a),X(a),X(a),X(a);if(Jj(a)&&(Fj(a,32),Fj(a,32),Jj(a)&&X(a),Jj(a))){M=!1;K=Jj(a);O=Jj(a);if(K||O){if(M=Jj(a))Kj(a),Fj(a,5),Jj(a),Fj(a,5);Fj(a,4);Fj(a,4);M&& Fj(a,4);Fj(a,5);Fj(a,5);Fj(a,5)}for(N=0;N<=f;N++){var Q=!0;R=1;Jj(a)||(Q=Jj(a));var V=!1;Q?X(a):V=Jj(a);V||(R=X(a)+1);if(K){for(Q=0;Q>8;e[14]=d.$e&255;e[15]=252|d.Sg&3;e[16]=252|d.Xf&3;e[17]=248|d.Tf&7;e[18]=248|d.Sf&7;e[19]=0;e[20]=0;e[21]=(d.Zf&3)<<6|(d.Pg&7)<<3|(d.qh?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength& 255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function YD(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*ZD[14*(3===c?3-d:3===d?3:4)+e-1];f=$D[3*(3===c?0:2===c?1:2)+f];c=aE[c][d];var h=bE[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,ua:k,Rk:8*c*h}}return null} function cE(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function dE(a,b){if(b+1d;d++)this.usertype[d]!==iE[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}p=gE.prototype;p.destroy=function(){}; p.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return zd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return zd(b)||zd(a)};p.convertCodecs=function(a,b){return b.replace("mss/","")};p.getOriginalMimeType=function(){return this.h}; p.transmux=function(a,b,c){if(!c)return Promise.resolve(Mb(a));if(!b.mssPrivateData)return Promise.reject(new U(2,3,3020,c?c.S()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf"); m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var q=e.fetch("saio");if(null===q){q=this.g.createFullBox("saio",h);q.version=0;q.flags=0;q.entry_count=1;q.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d>24&255;Ea[1]=xa>>16&255;Ea[2]=xa>>8&255;Ea[3]=xa&255;N.push(Ea);N.push(ba.fullData)}}var va=N.length?{data:Pc.apply(Jc,x(N)),isKeyframe:M}:null;if(va){null==I&&null!=K.dts&&(I=K.dts);var Ba=void 0; Ba=J+1>>24&255,vd.sampleRate>>>17&255,vd.sampleRate>>>8&255,vd.sampleRate>>>0&255,0,0].concat(x(Wb)));for(var jy=vd.sampleRate,ky=u(k.wb()),hp=ky.next();!hp.done;hp=ky.next()){var ip=hp.value,og=ip.data;null==Tk&&null!==ip.pts&&(Tk=ip.pts);for(var bi=0;bia&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function VE(a,b){OE.call(this,a,b);var c=this;this.i=W("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new ac(function(){if(c.ad.isLinear()){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0Date.now()&&(c.j.stop(),c.m=Date.now(),c.h.textContent=(c.l?parseInt(c.h.textContent,10)-d:parseInt(c.h.textContent,10)+d).toString()+"s",c.g.style.opacity="1",c.j.Y(1)):(c.s=!0,c.m=Date.now(),c.j.Y(1))))});this.h=W("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);this.l=!1}pa(fF,OE);S("shaka.ui.HiddenSeekButton",fF);function gF(a,b){fF.call(this,a,b);this.g.classList.add("shaka-fast-forward-container");this.i.textContent="fast_forward";this.l=!1}pa(gF,fF);S("shaka.ui.HiddenFastForwardButton",gF);function hF(a,b){fF.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.l=!0}pa(hF,fF);S("shaka.ui.HiddenRewindButton",hF);function iF(a,b,c,d){OE.call(this,a,b);var e=this;this.container=W("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,x(c));this.h=!1;this.bar=document.createElement("input");this.I=new ac(function(){e.onChangeEnd();e.h=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,x(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar); this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(f){e.controls.Sc()&&(e.h=!0,e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Sc()&&(e.h=!0,jF(e,f),e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.h&&(jF(e,f),e.onChange());f.stopPropagation()});this.eventManager.o(this.bar,"touchend",function(f){e.h&& (e.h=!1,jF(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"touchcancel",function(f){e.h&&(e.h=!1,jF(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"mouseup",function(f){e.h&&(e.h=!1,e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"blur",function(){e.h&&(e.h=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}pa(iF,OE);p=iF.prototype; p.release=function(){this.I&&(this.I.stop(),this.I=null);OE.prototype.release.call(this)};p.setRange=function(a,b){this.bar.min=a;this.bar.max=b};p.onChangeStart=function(){};p.onChange=function(){};p.onChangeEnd=function(){};p.changeTo=function(a){this.h||(this.h=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:ae&&(c=e);a.bar.value=c}S("shaka.ui.RangeElement",iF);iF.prototype.setValue=iF.prototype.setValue;iF.prototype.getValue=iF.prototype.getValue;iF.prototype.changeTo=iF.prototype.changeTo;iF.prototype.onChangeEnd=iF.prototype.onChangeEnd; iF.prototype.onChange=iF.prototype.onChange;iF.prototype.onChangeStart=iF.prototype.onChangeStart;iF.prototype.setRange=iF.prototype.setRange;function kF(a,b){iF.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.H=W("div");this.H.classList.add("shaka-ad-markers");this.container.insertBefore(this.H,this.container.childNodes[0]);this.J=this.controls.g;this.u=new ac(function(){var d=c.getValue();c.player.T()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.C=new ac(function(){lF(c)});this.L=!1;this.i=W("div");this.i.id="shaka-player-ui-thumbnail-container"; this.g=W("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.B=W("div");this.B.id="shaka-player-ui-thumbnail-time";this.i.appendChild(this.g);this.i.appendChild(this.B);this.container.appendChild(this.i);this.j=W("div");this.j.id="shaka-player-ui-time-container";this.container.appendChild(this.j);this.l=this.m=null;this.K=!1;this.s=new ac(function(){mF(c)});this.G=[];this.eventManager.o(this.localization,"locale-updated",function(){return nF(c)});this.eventManager.o(this.localization, "locale-changed",function(){return nF(c)});this.eventManager.o(this.adManager,"ad-started",function(){oF(c)||TE(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){oF(c)&&TE(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.G=d.cuepoints;pF(c)});this.eventManager.o(this.player,"unloading",function(){c.G=[];pF(c);c.l&&(c.l.abort(),c.l=null);c.m=null;mF(c);qF(c)});this.eventManager.o(this.bar,"mousemove",function(d){var e=c.bar.getBoundingClientRect(), f=parseFloat(c.bar.min);d=d.clientX-e.left;e=Math.round(f+(parseFloat(c.bar.max)-f)/e.width*d);c.player.Je().length?(qF(c),rF(c,d,e)):(mF(c),f=c.j.clientWidth,c.j.style.width="auto",c.j.style.height="20px",c.j.style.top="-30px",c.j.style.left=Math.min(c.bar.offsetWidth-f,Math.max(0,d-f/2))+"px",c.j.style.right="",c.j.style.visibility="visible",d=c.player.za(),c.player.T()?(d=d.end-e,1>d?(c.j.textContent=c.localization.resolve("LIVE"),c.j.style.left="",c.j.style.right="0px"):c.j.textContent="-"+sF(d)): c.j.textContent=sF(e-d.start))});this.eventManager.o(this.container,"mouseleave",function(){qF(c);c.s.stop();c.s.Y(.25)});this.setValue(this.video.currentTime);this.update();nF(this);this.ad&&TE(this.container,!1)}pa(kF,iF);p=kF.prototype;p.release=function(){this.u&&(this.u.stop(),this.u=null,this.C.stop(),this.C=null);iF.prototype.release.call(this)};p.onChangeStart=function(){this.L=!this.video.paused;this.controls.lh(!0);this.video.pause();this.s.stop();this.K=!0}; p.onChange=function(){if(this.video.duration)if(this.update(),this.u.Y(.125),this.player.Je().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());rF(this,(d-a)/((b-a)/c.width),d)}else mF(this)};p.onChangeEnd=function(){this.u.Ia();this.controls.lh(!1);this.L&&this.video.play();this.K&&(this.K=!1,this.s.stop(),this.s.Y(.25))};p.isShowing=function(){return!this.container.classList.contains("shaka-hidden")}; p.update=function(){var a=this.J.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.za(),g=f.end-f.start;this.setRange(f.start,f.end);oF(this)?(TE(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.J.showUnbufferedStart? a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):TE(this.container,!1)}; function lF(a){if(a.G.length){for(var b=a.player.za(),c=b.end-b.start,d=["to right"],e=[],f=a.J.seekBarColors.adBreaks,g=!1,h=u(a.G),k=h.next();!k.done;k=h.next())if(k=k.value,-1==k.start&&!k.end)g=!0;else if(!k.end&&k.start>=b.start||"number"==typeof k.end&&k.end>b.start){var l=(Math.max(k.start,b.start)-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}e=e.sort(function(n,q){return n.start-q.start});b=u(e);for(c=b.next();!c.done;c=b.next())c=c.value,d.push("transparent "+ 100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.H.style.background="linear-gradient("+d.join(",")+")"}else a.H.style.background="transparent",a.C.stop()}function pF(a){function b(){lF(a);var c=a.player.za();c=c.end-c.start;a.player.T()&&5b||!isFinite(b))?!1:null==a.ad||!a.ad.isLinear()}function nF(a){a.bar.ariaLabel=a.localization.resolve("SEEK")} function rF(a,b,c){var d,e,f,g,h,k,l,m,n,q,r,t,w,v,z,y,A,E;P(function(C){switch(C.g){case 1:d=tF(a);if(!d)return mF(a),C.return();0>c&&(c=0);e=a.player.za();f=Math.max(Math.ceil(e.start),Math.min(Math.floor(e.end),c));return G(C,a.player.Ag(d.id,f),2);case 2:g=C.h;if(!g||!g.uris.length)return mF(a),C.return();a.player.T()?(h=e.end-c,a.B.textContent=1>h?a.localization.resolve("LIVE"):"-"+sF(h)):a.B.textContent=sF(c);k=-10;l=a.i.clientWidth;m=Math.floor(9*l/16);a.i.style.height=m+"px";a.i.style.top= -(m-k)+"px";n=Math.min(a.bar.offsetWidth-l,Math.max(0,b-l/2));a.i.style.left=n+"px";a.i.style.visibility="visible";q=g.uris[0].split("#xywh=")[0];if(a.m&&q===a.m.uris[0].split("#xywh=")[0]&&g.segment.Nb()==a.m.segment.Nb()&&g.segment.Lb()==a.m.segment.Lb()){C.A(3);break}a.m=g;a.l&&(a.l.abort(),a.l=null);if("mjpg"!=d.codecs&&!q.startsWith("offline:")){C.A(4);break}a.g.src='data:image/svg+xml,';ta(C,5);r=qh;t=Xl(g.segment.S(),g.segment.Nb(),g.segment.Lb(),a.player.getConfiguration().streaming.retryParameters); a.l=a.player.Db().request(r,t,{type:1});return G(C,a.l.promise,7);case 7:w=C.h;a.l=null;"mjpg"==d.codecs?(v=(new zh).box("mdat",Jh(function(B){q=URL.createObjectURL(new Blob([B],{type:"image/jpeg"}))})),v.parse(w.data,!1)):(z=d.mimeType||"image/jpeg",y=new Blob([w.data],{type:z}),q=URL.createObjectURL(y));wa(C,4);break;case 5:A=ya(C);if(7001==A.code)return C.return();throw A;case 4:try{a.i.removeChild(a.g)}catch(B){}a.g=W("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=q; a.g.onload=function(){q.startsWith("blob:")&&URL.revokeObjectURL(q)};a.i.insertBefore(a.g,a.i.firstChild);case 3:E=l/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+E*g.positionX+"px",a.g.style.top="-"+E*g.positionY+"px",a.g.style.transform="scale("+E+")",a.g.style.transformOrigin="left top",m=Math.floor(l*g.height/ g.width),a.i.style.height=m+"px",a.i.style.top=-(m-k)+"px",H(C)}})} function tF(a){var b=a.player.Je();if(!b.length)return null;for(var c=u(["image/avif","image/webp","image/jpeg","image/png","image/svg+xml"]),d=c.next(),e={};!d.done;e={mi:void 0,estimatedBandwidth:void 0},d=c.next())if(e.mi=d.value,e.estimatedBandwidth=a.player.getStats().estimatedBandwidth,(d=b.filter(function(f){return function(g){return g.mimeType.toLowerCase()===f.mi&&g.bandwidth<.01*f.estimatedBandwidth}}(e)).sort(function(f,g){return g.bandwidth-f.bandwidth}))&&d.length)return d[0];return b.find(function(f){return"application/mp4"== f.mimeType&&"mjpg"==f.codecs})||b[0]}function mF(a){a.i.style.visibility="hidden";a.B.textContent=""}function qF(a){a.j.style.visibility="hidden"}function sF(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}S("shaka.ui.SeekBar",kF);function uF(){}uF.prototype.create=function(a,b){return new kF(a,b)};kF.Factory=uF;function vF(a,b){OE.call(this,a,b);var c=this;this.j=W("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=W("div");this.h.classList.add("shaka-skip-ad-counter");TE(this.h,!1);this.j.appendChild(this.h);this.g=jj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;TE(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);wF(this);this.i=new ac(function(){if(c.ad.isSkippable()){var d=Math.round(c.ad.getTimeUntilSkippable()); 0h&&g>b?(b=2*Math.sqrt(1+g-h-b),a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=2*Math.sqrt(1+h-g-b),a[3]=(k- d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function DF(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function EF(){var a=new Float32Array(4);a[3]=1;return a}function FF(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0Math.abs(f-m)&&1E-6>Math.abs(g-e)&&1E-6>Math.abs(c-n))for(f=0;16>f;f++)b[f]=0==f%5?1:0;else{d=f-m;e=g-e;m=c-n;var q=1/Math.sqrt(d*d+e*e+m*m);d*=q;e*=q;m*=q;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(q=Math.sqrt(n*n+l*l+h*h))?(q=1/q,n*=q,l*=q,h*=q):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var t=d*l-e*n;(q=Math.sqrt(k*k+r*r+t*t))?(q=1/q,k*=q,r*=q,t*=q):t=r=k=0;b[0]=n;b[1]=k;b[2]= d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=t;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+t*c);b[14]=-(d*f+e*g+m*c);b[15]=1}CF(a.L,a.G);a=b=a.W;c=[4,4,4];f=c[0];g=c[1];c=c[2];b[0]=a[0]*f;b[1]=a[1]*f;b[2]=a[2]*f;b[3]=a[3]*f;b[4]=a[4]*g;b[5]=a[5]*g;b[6]=a[6]*g;b[7]=a[7]*g;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]} function KF(a){OF(a);a.g.viewport(0,0,a.g.drawingBufferWidth,a.g.drawingBufferHeight);a.g.clearColor(0,0,0,1);a.g.enable(a.g.CULL_FACE);a.g.cullFace(a.g.FRONT);a.g.clear(a.g.COLOR_BUFFER_BIT)} function LF(a){var b=PF(a,a.g.VERTEX_SHADER),c=PF(a,a.g.FRAGMENT_SHADER);a.j=a.g.createProgram();a.g.attachShader(a.j,b);a.g.attachShader(a.j,c);a.g.linkProgram(a.j);"cubemap"==a.C?(a.R=a.g.getAttribLocation(a.j,"aVertexPosition"),a.P=a.g.getAttribLocation(a.j,"aTextureCoord")):(a.R=a.g.getAttribLocation(a.j,"a_vPosition"),a.g.enableVertexAttribArray(a.R),a.P=a.g.getAttribLocation(a.j,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.P))} function PF(a,b){switch(b){case a.g.VERTEX_SHADER:var c="cubemap"==a.C?"attribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vLighting;\nvoid main(void) {\n gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;\n vTextureCoord = aTextureCoord;\n}":"attribute vec4 a_vPosition;\n// Per-vertex texture coordinate info\nattribute vec2 a_TexCoordinate;\nuniform mat4 u_VPMatrix;\n// Passed into the fragment shader.\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nvoid main()\n{\n gl_Position = u_VPMatrix * a_vPosition;\n // Pass through texture coord\n v_TexCoordinate = a_TexCoordinate;\n pass_position = a_vPosition.xyz;\n}"; break;case a.g.FRAGMENT_SHADER:c="cubemap"==a.C?"varying highp vec2 vTextureCoord;\nuniform sampler2D uSampler;\nvoid main(void) {\n highp vec4 texelColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = vec4(texelColor.rgb , texelColor.a);\n}":"precision highp float;\n#define PI 3.141592653589793238462643383279\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nuniform sampler2D uSampler;\nvoid main(void) {\nhighp float xValue =\n (PI + atan(pass_position.z, pass_position.x)) / (2.0 * PI);\n vec2 tc = vec2(xValue, v_TexCoordinate.t);\n tc = vec2(tc.x , tc.y);\nhighp vec4 texelColor =\n texture2D(uSampler, tc);\n gl_FragColor = vec4(texelColor.rgb, texelColor.a);\n}"; break;default:return null}b=a.g.createShader(b);a.g.shaderSource(b,c);a.g.compileShader(b);return b} function MF(a){if("cubemap"==a.C)var b={Xi:[-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1],Ui:[2/3,.5,1/3,.5,1/3,0,2/3,0,2/3,.5,2/3,0,1,0,1,.5,1,1,2/3,1,2/3,.5,1,.5,0,.5,0,0,1/3,0,1/3,.5,0,.5,1/3,.5,1/3,1,0,1,1/3,1,1/3,.5,2/3,.5,2/3,1],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]};else{b=[];for(var c=[],d=[], e=0;100>=e;e++){var f=e/100,g=f*Math.PI,h=Math.sin(g);g=Math.cos(g);for(var k=0;100>=k;k++){var l=k/100,m=l*Math.PI*2;b.push(-1*Math.cos(m)*h,g,Math.sin(m)*h);c.push(l);c.push(f)}}for(e=0;100>e;e++)for(f=0;100>f;f++)h=101*e+f,g=h+1,k=101*(e+1)+f,l=k+1,d.push(h,k,g),d.push(g,k,l);b={Xi:b,Ui:c,indices:d}}a.K=b;a.aa=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Xi),a.g.STATIC_DRAW);a.ka=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER, a.ka);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.K.Ui),a.g.STATIC_DRAW);a.ea=a.g.createBuffer();a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ea);a.g.bufferData(a.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(a.K.indices),a.g.STATIC_DRAW)} function NF(a){a.Z=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.Z);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_S,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_T,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MIN_FILTER,a.g.NEAREST);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MAG_FILTER,a.g.NEAREST)} function IF(a,b){b=void 0===b?!0:b;var c=a.na.od()==Rp;!a.m||2>a.m.readyState||!c&&0==a.m.playbackRate||(AF(a.I,a.i*Math.PI/180,1.5625),"cubemap"==a.C?AF(a.I,a.i*Math.PI/180,2.5):AF(a.I,a.i*Math.PI/180,1.5625),a.g.useProgram(a.j),a.g.clear(a.g.COLOR_BUFFER_BIT),OF(a),b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.Z),a.g.pixelStorei(a.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),a.g.texImage2D(a.g.TEXTURE_2D,0,a.g.RGBA,a.g.RGBA,a.g.UNSIGNED_BYTE,a.m)),"equirectangular"==a.C&&(BF(a.M,a.G, a.W),BF(a.M,a.I,a.M)),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.aa),a.g.vertexAttribPointer(a.R,3,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.R),a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ka),a.g.vertexAttribPointer(a.P,2,a.g.FLOAT,!1,0,0),a.g.enableVertexAttribArray(a.P),a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.ea),"cubemap"==a.C?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uProjectionMatrix"),!1,a.I),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j,"uModelViewMatrix"),!1,a.M)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.j, "u_VPMatrix"),!1,a.M),a.g.uniform1i(a.g.getUniformLocation(a.j,"uSampler"),0),a.O&&a.g.viewport(0,0,a.l.width/2,a.l.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0),a.O&&(a.g.viewport(a.l.width/2,0,a.l.width/2,a.l.height),a.g.drawElements(a.g.TRIANGLES,a.K.indices.length,a.g.UNSIGNED_SHORT,0)))} function OF(a){var b=a.m.videoWidth;b||(b=a.l.scrollWidth);var c=a.m.videoHeight;c||(c=a.l.scrollHeight);if(a.sa!==b||a.ra!==c){a.l.width=b;a.l.height=c;a.sa=b;a.ra=c;var d=b/c,e=a.I,f=-d,g=1/(d-f);e[0]=0*g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=0;e[6]=0;e[7]=0;e[8]=(d+f)*g;e[9]=0;e[10]=-1;e[11]=-1;e[12]=0;e[13]=0;e[14]=-0;e[15]=0;a.I=e;a.g.viewport(0,0,b,c)}} function QF(a,b,c,d){var e=90*Math.PI/180;var f="cubemap"==a.C?a.M:a.G;var g=Math.sin(b);b=Math.cos(b);var h=f[0],k=f[1],l=f[2],m=f[3],n=f[8],q=f[9],r=f[10],t=f[11];f!==f&&(f[4]=f[4],f[5]=f[5],f[6]=f[6],f[7]=f[7],f[12]=f[12],f[13]=f[13],f[14]=f[14],f[15]=f[15]);f[0]=h*b-n*g;f[1]=k*b-q*g;f[2]=l*b-r*g;f[3]=m*b-t*g;f[8]=h*g+n*b;f[9]=k*g+q*b;f[10]=l*g+r*b;f[11]=m*g+t*b;a.H+=c;a.H-e?(e=zF(),g=zF(),b=-1*c,c=Math.sin(b),b=Math.cos(b),h=g[4],k=g[5],l=g[6],m=g[7],n=g[8],q=g[9],r=g[10],t=g[11],g!== e&&(e[0]=g[0],e[1]=g[1],e[2]=g[2],e[3]=g[3],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e[4]=h*b+n*c,e[5]=k*b+q*c,e[6]=l*b+r*c,e[7]=m*b+t*c,e[8]=n*b-h*c,e[9]=q*b-k*c,e[10]=r*b-l*c,e[11]=t*b-m*c,BF(f,e,f)):a.H-=c;c=zF();e=zF();g=Math.sin(d);d=Math.cos(d);b=e[0];h=e[1];k=e[2];l=e[3];m=e[4];n=e[5];q=e[6];r=e[7];e!==c&&(c[8]=e[8],c[9]=e[9],c[10]=e[10],c[11]=e[11],c[12]=e[12],c[13]=e[13],c[14]=e[14],c[15]=e[15]);c[0]=b*d+m*g;c[1]=h*d+n*g;c[2]=k*d+q*g;c[3]=l*d+r*g;c[4]=m*d-b*g;c[5]=n*d-h*g;c[6]=q* d-k*g;c[7]=r*d-l*g;BF(f,c,f);IF(a,!1)}function RF(a,b){if(void 0===b||b)CF(a.h,a.G),a.U=0,a.B=EF(),a.B[0]=(a.h[0]-a.L[0])/20,a.B[1]=(a.h[1]-a.L[1])/20,a.B[2]=(a.h[2]-a.L[2])/20,a.B[3]=(a.h[3]-a.L[3])/20;a.h[0]-=a.B[0];a.h[1]-=a.B[1];a.h[2]-=a.B[2];a.h[3]-=a.B[3];b=zF();FF(a.h,a.h);DF(b,a.h);a.G=b;a.J&&(a.J.stop(),a.J=null);20>a.U?a.J=(new ac(function(){RF(a,!1);a.H=0;a.U++;IF(a,!1)})).Y(.025):(DF(b,a.L),a.G=b)};function SF(a,b,c,d,e){kb.call(this);var f=this;this.i=a;this.m=b;this.L=c;this.K=d;this.u=e;this.s=new td;this.h=new td;this.G=TF(this);this.g=null;this.j=!1;this.J=this.I=this.H=this.C=this.B=0;this.l=null;this.s.o(d,"loading",function(){f.g&&RF(f.g);UF(f)});this.s.o(d,"spatialvideoinfo",function(g){switch(g.detail.projection){case "hequ":f.l="equirectangular";break;case "fish":f.l="equirectangular";break;default:f.l=null}UF(f)});this.s.o(d,"nospatialvideoinfo",function(){f.l=null;UF(f)});this.s.o(d, "unloading",function(){f.l=null;UF(f)});UF(this)}pa(SF,kb);p=SF.prototype;p.release=function(){this.s&&(this.s.release(),this.s=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);kb.prototype.release.call(this)};p.configure=function(a){this.u=a;UF(this)};p.Vf=function(){return!!this.G};p.Pb=function(){return!!this.g};p.Gd=function(){this.g?this.g.Gd():cb("Not playing VR content")};p.Eg=function(a){this.g?QF(this.g,a*VF,0,0):cb("Not playing VR content")}; p.Cg=function(a){this.g?QF(this.g,0,a*VF,0):cb("Not playing VR content")};p.Dg=function(a){this.g?QF(this.g,0,0,a*VF):cb("Not playing VR content")}; function UF(a){if(a.m)if(a.u.displayInVrMode||a.l){var b=a.l||a.u.defaultVrProjectionMode;a.g?a.g.C!=b&&(a.h.Ua(),a.g.release(),WF(a,b)):(a.m.style.display="",WF(a,b),a.dispatchEvent(new T("vrstatuschanged",(new Map).set("newStatus",a.Pb()))))}else a.u.displayInVrMode||a.l||!a.g||(a.m.style.display="none",a.h.Ua(),a.g.release(),a.g=null,a.dispatchEvent(new T("vrstatuschanged",(new Map).set("newStatus",a.Pb()))))}function WF(a,b){a.G&&a.m&&(a.g=new GF(a.L,a.K,a.m,a.G,b),XF(a))} function TF(a){if(!a.m||vc())return null;for(var b=u(["webgl2","webgl"]),c=b.next();!c.done;c=b.next())if(c=a.m.getContext(c.value))return c;return null} function XF(a){a.h.o(a.i,"mousedown",function(d){if(!a.j){var e=d.clientX;d=d.clientY;a.j=!0;a.B=e;a.C=d}});0=e.i&&(e.i+=f);20>e.i?e.i=20:100Math.abs(e-d)&&(e=Infinity);try{a.h&&a.h.isLinear()?navigator.mediaSession.setPositionState(): navigator.mediaSession.setPositionState({duration:Math.max(0,e),playbackRate:a.u.playbackRate,position:Math.max(0,d)})}catch(f){}});a.j.o(a.C,"metadata",function(d){if(d=d.payload){var e;"TIT2"==d.key&&d.data&&(e=d.data);var f;"APIC"==d.key&&"--\x3e"==d.mimeType&&(f=d.data);e&&(d={title:e,artwork:[]},navigator.mediaSession.metadata&&(d=navigator.mediaSession.metadata,d.title=e),navigator.mediaSession.metadata=new MediaMetadata(d));f&&(e=a.m,f!=e.poster&&(e.poster=f),e={title:"",artwork:[{src:f}]}, navigator.mediaSession.metadata&&(e=navigator.mediaSession.metadata,e.artwork=[{src:f}]),navigator.mediaSession.metadata=new MediaMetadata(e))}})}}function gG(a){if(a.g.setupMediaSession&&navigator.mediaSession){try{navigator.mediaSession.setPositionState()}catch(b){}a=function(b){try{navigator.mediaSession.setActionHandler(b,null)}catch(c){}};a("pause");a("play");a("seekbackward");a("seekforward");a("seekto");a("stop");a("enterpictureinpicture")}} function FG(a){return P(function(b){return a.u&&0!=a.u.readyState&&!a.G.Ta()&&a.g.enableFullscreenOnRotation&&a.Xd()?screen.orientation.type.includes("landscape")&&!a.rd()?G(b,tG(a),0):screen.orientation.type.includes("portrait")&&a.rd()?G(b,uG(a),0):b.A(0):b.return()})} function xG(a,b){"mousemove"==b.type&&(a.i.classList.remove("shaka-keyboard-navigation"),$F(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3.499995*g?(g=Math.PI/2,a=2*Math.atan2(c,a)):h<-.499995*g?(g=-Math.PI/2,a=2*Math.atan2(c,a)):(g=Math.asin(2*(a*d-b*c)),a=Math.atan2(2*(a*b+c*d),1-2*(e+f)));a=180*Math.acos(Math.cos(a)*Math.cos(g))/Math.PI}else cb("Not playing VR content"),a=null;return a};p.Zj=function(){var a=this.B;a.g?a=a.g.i:(cb("Not playing VR content"),a=null);return a}; p.fl=function(a){var b=this.B;b.g?(0>a?(cb("Field of view should be greater than 0"),a=0):100=b.alpha&&(h="display");break;case "display":0>=--k&&(h="fadeOut");break;case "fadeOut":g=Math.max(0,g-l),0>=g&&(h="transition",f=d(),k=Math.round(60*b.displayDuration),h="fadeIn")}016/9&&(f=Math.round(9*e/16));d=f+"p";2160==f&&(d="4K");f=new Set;e=u(c);for(var g=e.next();!g.done;g=e.next())g=g.value,g.frameRate&&f.add(Math.round(g.frameRate));1=f)&&(d+=Math.round(b.frameRate));if("PQ"==b.hdr||"HLG"==b.hdr)d+=" (HDR)";"CH-STEREO"==b.videoLayout&&(d+=" (3D)");c.some(function(h){return h!=b&&h.height==b.height})&&(c.some(function(h){return h!=b&&h.height==b.height&&(h.videoBandwidth|| h.bandwidth)==(b.videoBandwidth||b.bandwidth)})||(d+=" ("+Math.round((b.videoBandwidth||b.bandwidth)/1E3)+" kbits/s)"),a.controls.g.showVideoCodec&&(d+=function(h){var k="";h&&(h=Hf(h),k=h.startsWith("dovi-")?"Dolby Vision":h.toUpperCase());return k?" "+k:k}(b.videoCodec)));return d} function AI(a){var b=a.player.Qc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}S("shaka.ui.ResolutionSelection",zI);function DI(){} DI.prototype.create=function(a,b){return new zI(a,b)};MG("quality",new DI);hG("quality",new DI);function EI(a,b){OE.call(this,a,b);var c=this;this.g=jj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);FI(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){FI(c)});this.eventManager.o(this.localization,"locale-changed",function(){FI(c)}); this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.Xa())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.Gc(d);c.g.setAttribute("shaka-status",d+"x")}})}pa(EI,OE);function FI(a){a.g.ariaLabel=a.localization.resolve("REWIND")}S("shaka.ui.RewindButton",EI);function GI(){}GI.prototype.create=function(a,b){return new EI(a,b)};hG("rewind",new GI);function HI(a,b){OE.call(this,a,b);var c=this;this.g=jj();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="download";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");this.i.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.i);this.j=W("span");this.j.classList.add("shaka-current-selection-span"); a.appendChild(this.j);this.g.appendChild(a);II(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){II(c)});this.eventManager.o(this.localization,"locale-changed",function(){II(c)});this.eventManager.o(this.g,"click",function(){var d=document.createElement("canvas"),e=d.getContext("2d"),f=c.controls.m;d.width=f.videoWidth;d.height=f.videoHeight;e.drawImage(f,0,0,d.width,d.height);d=d.toDataURL("image/png");e=document.createElement("a");e.href=d;e.download= "videoframe_"+f.currentTime.toFixed(3)+".png";e.click()});this.eventManager.o(this.controls.B,"vrstatuschanged",function(){JI(c)});this.eventManager.o(this.adManager,"ad-started",function(){JI(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){JI(c)});this.eventManager.o(this.player,"unloading",function(){JI(c)});this.eventManager.o(this.player,"loaded",function(){JI(c)});this.eventManager.o(this.player,"loaded",function(){JI(c)});this.eventManager.o(this.video,"play",function(){JI(c)}); this.eventManager.o(this.video,"pause",function(){JI(c)});this.eventManager.o(this.video,"seeking",function(){JI(c)});JI(this)}pa(HI,OE);function JI(a){var b=!0;a.controls.Pb()&&(b=!1);if(a.player.drmInfo()||a.player.Qc())b=!1;a.ad&&(b=!1);a.video.remote&&"disconnected"!=a.video.remote.state&&(b=!1);TE(a.g,b)}function II(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.i.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}S("shaka.ui.SaveVideoFrameButton",HI); function KI(){}KI.prototype.create=function(a,b){return new HI(a,b)};MG("save_video_frame",new KI);$E("save_video_frame",new KI);function LI(a,b){bF.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}pa(LI,bF);LI.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"}; LI.prototype.g=function(){if(this.isEnded())this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};S("shaka.ui.SmallPlayButton",LI);function MI(){}MI.prototype.create=function(a,b){return new LI(a,b)};hG("play_pause",new MI);function NI(a,b){OE.call(this,a,b);a=W("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}pa(NI,OE);S("shaka.ui.Spacer",NI);function OI(){}OI.prototype.create=function(a,b){return new NI(a,b)};hG("spacer",new OI);function PI(a,b){function c(m){m=parseInt(l.g[m],10);return 1E6