diff --git a/build/karma.conf.js b/build/karma.conf.js index e3efc0f7a1..ebc5aa57a8 100644 --- a/build/karma.conf.js +++ b/build/karma.conf.js @@ -4,7 +4,7 @@ const webpackConfig = require('./webpack.karma.config'); // These should be updated to match the Preview version in package.json whenever a file in that third party directory // is updated. Also, update the matching configuration in constants.js, which is needed for main preview functionality const DOC_STATIC_ASSETS_VERSION = '1.60.0'; -const MEDIA_STATIC_ASSETS_VERSION = '1.33.0'; +const MEDIA_STATIC_ASSETS_VERSION = '2.14.0'; const MODEL3D_STATIC_ASSETS_VERSION = '1.12.0'; const SWF_STATIC_ASSETS_VERSION = '0.112.0'; const TEXT_STATIC_ASSETS_VERSION = '0.114.0'; diff --git a/src/lib/constants.js b/src/lib/constants.js index 12a89d7da4..113806b2ff 100644 --- a/src/lib/constants.js +++ b/src/lib/constants.js @@ -106,7 +106,7 @@ export const PDFJS_HEIGHT_PADDING_PX = 5; // Should match VERTICAL_PADDING in pd // These should be updated to match the Preview version in package.json whenever a file in that third party directory // is updated. Also, update the matching configuration in karma.conf.js, which is needed for tests export const DOC_STATIC_ASSETS_VERSION = '1.60.0'; -export const MEDIA_STATIC_ASSETS_VERSION = '1.33.0'; +export const MEDIA_STATIC_ASSETS_VERSION = '2.14.0'; export const MODEL3D_STATIC_ASSETS_VERSION = '1.12.0'; export const SWF_STATIC_ASSETS_VERSION = '0.112.0'; export const TEXT_STATIC_ASSETS_VERSION = '0.114.0'; diff --git a/src/third-party/media/2.14.0/shaka-player.compiled.js b/src/third-party/media/2.14.0/shaka-player.compiled.js new file mode 100644 index 0000000000..e4d595b21d --- /dev/null +++ b/src/third-party/media/2.14.0/shaka-player.compiled.js @@ -0,0 +1,609 @@ +(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global){var p,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ca(){ca=function(){};ba.Symbol||(ba.Symbol=ea)}var ea=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}(); +function fa(){ca();var b=ba.Symbol.iterator;b||(b=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ha(this)}});fa=function(){}}function ha(b){var c=0;return ia(function(){return cg&&(g=Math.max(g+f,0));g=g}});ka("Array.prototype.find",function(b){return b?b:function(b,d){return Qa(this,b,d).je}});var Ua=this;Ua.a=!0; +function z(b,c){var d=b.split("."),e=Ua;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Va(b,c){function d(){}d.prototype=c.prototype;b.eg=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.sg=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/* + + Copyright 2016 Google 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 Wa(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Xa(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Ya(b){return b.a/(1-Math.pow(b.c,b.b))};function Za(){this.b=new Wa(2);this.c=new Wa(5);this.a=0}Za.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Ya(this.b),Ya(this.c))};function $a(){}function ab(){}function bb(){}window.console&&window.console.log.bind&&(ab=console.warn.bind(console),$a=console.error.bind(console));var fb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function gb(b){var c;b instanceof gb?(hb(this,b.va),this.$a=b.$a,this.ra=b.ra,ib(this,b.xb),this.ia=b.ia,jb(this,b.a.clone()),this.Qa=b.Qa):b&&(c=String(b).match(fb))?(hb(this,c[1]||"",!0),this.$a=kb(c[2]||""),this.ra=kb(c[3]||"",!0),ib(this,c[4]),this.ia=kb(c[5]||"",!0),jb(this,c[6]||"",!0),this.Qa=kb(c[7]||"")):this.a=new lb(null)}p=gb.prototype;p.va="";p.$a="";p.ra="";p.xb=null;p.ia="";p.Qa=""; +p.toString=function(){var b=[],c=this.va;c&&b.push(mb(c,nb,!0),":");if(c=this.ra){b.push("//");var d=this.$a;d&&b.push(mb(d,nb,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.xb;null!=c&&b.push(":",String(c))}if(c=this.ia)this.ra&&"/"!=c.charAt(0)&&b.push("/"),b.push(mb(c,"/"==c.charAt(0)?ob:pb,!0));(c=this.a.toString())&&b.push("?",c);(c=this.Qa)&&b.push("#",mb(c,qb));return b.join("")}; +p.resolve=function(b){var c=this.clone();"data"===c.va&&(c=new gb);var d=!!b.va;d?hb(c,b.va):d=!!b.$a;d?c.$a=b.$a:d=!!b.ra;d?c.ra=b.ra:d=null!=b.xb;var e=b.ia;if(d)ib(c,b.xb);else if(d=!!b.ia){if("/"!=e.charAt(0))if(this.ra&&!this.ia)e="/"+e;else{var f=c.ia.lastIndexOf("/");-1!=f&&(e=c.ia.substr(0,f+1)+e)}if(".."==e||"."==e)e="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){f=0==e.lastIndexOf("/",0);e=e.split("/");for(var g=[],h=0;hc)throw Error("Bad port number "+c);b.xb=c}else b.xb=null}function jb(b,c,d){c instanceof lb?b.a=c:(d||(c=mb(c,rb)),b.a=new lb(c))} +function kb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function mb(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,sb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function sb(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var nb=/[#\/\?@]/g,pb=/[#\?:]/g,ob=/[#\?]/g,rb=/[#\?@]/g,qb=/#/g;function lb(b){this.a=b||null}p=lb.prototype;p.ga=null;p.Zb=null; +p.add=function(b,c){if(!this.ga&&(this.ga={},this.Zb=0,this.a))for(var d=this.a.split("&"),e=0;e=b.i)if(b.c)b.a=1,b.b=b.f;else return d["return"](Promise.reject());e=b.a;b.a++;if(0==e)return d["return"]();f=b.b*(1+(2*Math.random()-1)*b.h);return u(d,new Promise(function(b){(new B(b)).O(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function zb(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function D(b,c,d,e){for(var f=[],g=3;g=e.priority)Rb[b]={priority:d,zf:c}}K.registerScheme=Sb;K.unregisterScheme=function(b){delete Rb[b]};K.prototype.Bf=function(b){this.a.add(b)};K.prototype.registerRequestFilter=K.prototype.Bf; +K.prototype.gg=function(b){this.a["delete"](b)};K.prototype.unregisterRequestFilter=K.prototype.gg;K.prototype.we=function(){this.a.clear()};K.prototype.clearAllRequestFilters=K.prototype.we;K.prototype.Cf=function(b){this.b.add(b)};K.prototype.registerResponseFilter=K.prototype.Cf;K.prototype.hg=function(b){this.b["delete"](b)};K.prototype.unregisterResponseFilter=K.prototype.hg;K.prototype.xe=function(){this.b.clear()};K.prototype.clearAllResponseFilters=K.prototype.xe; +function Tb(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}K.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};K.prototype.destroy=K.prototype.destroy; +K.prototype.request=function(b,c){var d=this,e=new Ub;if(this.f){var f=Promise.reject(new D(2,7,7001));f["catch"](function(){});return new Vb(f,function(){return Promise.resolve()},e)}c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?Jb(c.retryParameters):zb();c.uris=Jb(c.uris);f=Wb(this,b,c);var g=f.U(function(){return Xb(d,b,c,new yb(c.retryParameters,!1),0,null,e)}),h=g.U(function(c){return Yb(d,b,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(){});f=h.U(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Ze||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new Vb(f.promise,f.Kd,e);Pb(this.g,f);return f};K.prototype.request=K.prototype.request; +function Wb(b,c,d){var e=Db(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={ed:f.ed},g=b.next())f.ed=g.value,e=e.U(function(b){return function(){return b.ed(c,d)}}(f));return e.U(void 0,function(b){if(b&&7001==b.code)throw b;throw new D(2,1,1006,b);})} +function Xb(b,c,d,e,f,g,h){var k=new gb(d.uris[f]),l=k.va,m=!1;l||(l=location.protocol,l=l.slice(0,-1),hb(k,l),d.uris[f]=k.toString());var n=(l=Rb[l])?l.zf:null;if(!n)return Bb(new D(2,1,1E3,k));var q;return Fb(Ab(e)).U(function(){if(b.f)return Cb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).U(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Ze:m}},function(k){if(k&&7001==k.code)throw k;if(b.f)return Cb();if(k&&1==k.severity)return b.dispatchEvent(new I("retry", +{error:k instanceof D?k:null})),f=(f+1)%d.uris.length,Xb(b,c,d,e,f,k,h);throw k||g;})}function Yb(b,c,d){var e=Db(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.U(f.value.bind(null,c,d.response));return e.U(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof D&&(c=b.severity);throw new D(c,1,1007,b);})}function Ub(){this.a=0}K.NumBytesRemainingClass=Ub;function Vb(b,c,d){H.call(this,b,c);this.b=d}var Zb=Vb;Zb.prototype=na(H.prototype); +Zb.prototype.constructor=Zb;if(sa)sa(Zb,H);else for(var $b in H)if("prototype"!=$b)if(Object.defineProperties){var ac=Object.getOwnPropertyDescriptor(H,$b);ac&&Object.defineProperty(Zb,$b,ac)}else Zb[$b]=H[$b];Zb.eg=H.prototype;K.PendingRequest=Vb;Vb.all=Gb;Vb.notAbortable=Fb;Vb.completed=Db;Vb.aborted=Cb;Vb.failed=Bb;function bc(){}z("shaka.util.IReleasable",bc);bc.prototype.release=function(){};function L(){this.a=new Ib}z("shaka.util.EventManager",L);L.prototype.release=function(){this.Ya();this.a=null};L.prototype.release=L.prototype.release;L.prototype.w=function(b,c,d,e){this.a&&(b=new cc(b,c,d,e),this.a.push(c,b))};L.prototype.listen=L.prototype.w;L.prototype.ha=function(b,c,d,e){function f(e){g.da(b,c,f);d(e)}var g=this;this.w(b,c,f,e)};L.prototype.listenOnce=L.prototype.ha; +L.prototype.da=function(b,c,d){if(this.a){var e=this.a.get(c)||[];e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.target!=b||d!=f.listener&&d||(f.da(),this.a.remove(c,f))}};L.prototype.unlisten=L.prototype.da;L.prototype.Ya=function(){if(this.a){var b=this.a.getAll();b=r(b);for(var c=b.next();!c.done;c=b.next())c.value.da();this.a.a={}}};L.prototype.removeAll=L.prototype.Ya; +function cc(b,c,d,e){this.target=b;this.type=c;this.listener=d;this.a=dc(b,e);this.target.addEventListener(c,d,this.a)}cc.prototype.da=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};cc.prototype.unlisten=cc.prototype.da;function dc(b,c){if(void 0==c)return!1;if("boolean"==typeof c)return c;var d=new Set(["passive","capture"]);Object.keys(c).filter(function(b){return!d.has(b)});return ec(b)?c:c.capture||!1} +function ec(b){var c=fc;if(void 0==c){c=!1;try{var d={},e={get:function(){c=!0;return!1}};Object.defineProperty(d,"passive",e);Object.defineProperty(d,"capture",e);e=function(){};b.addEventListener("test",e,d);b.removeEventListener("test",e,d)}catch(f){c=!1}fc=c}return c||!1}var fc=void 0;function gc(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function hc(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0};function ic(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function jc(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function kc(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function lc(b){var c=[b.mimeType];mc.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function nc(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var mc=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function oc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function pc(b){return""!=qc().canPlayType(b)}function rc(b){return(navigator.userAgent||"").includes(b)}function qc(){if(sc)return sc;tc||(tc=new B(function(){sc=null}));(sc=document.querySelector("video")||document.querySelector("audio"))||(sc=document.createElement("video"));tc.O(1);return sc}var tc=null,sc=null;function wc(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=xc(b);b=escape(b);try{return decodeURIComponent(b)}catch(c){throw new D(2,2,2004);}}z("shaka.util.StringUtils.fromUTF8",wc); +function yc(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw new D(2,2,2004);if(b instanceof ArrayBuffer)var e=b;else d=new Uint8Array(b.byteLength),d.set(new Uint8Array(b)),e=d.buffer;b=Math.floor(b.byteLength/2);d=new Uint16Array(b);e=new DataView(e);for(var f=0;f=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return yc(b,!1);if(0==c[1]&&0==c[3])return yc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return wc(b);throw new D(2,2,2003);}z("shaka.util.StringUtils.fromBytesAutoDetect",zc); +function Ac(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;dd&&(d+=Math.pow(2,32));d="0x"+d.toString(16)}b.g(new D(2,6,6006,c.message,c,d))}})} +p.Sd=function(b){this.f.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.ma?this.G.push(b):Xc(this,b)}; +function Xc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];"individualization-request"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Tb([f],b.f.retryParameters);f.body=c.message;f.method="POST";f.licenseRequestType=c.messageType;"com.microsoft.playready"!=b.a.keySystem&&"com.chromecast.playready"!=b.a.keySystem||hd(f);b.a.keySystem.startsWith("com.apple.fps")&&id(f);b.C.rb.request(2,f).promise.then(function(b){if(this.c)return Promise.reject(); +this.a.keySystem.startsWith("com.apple.fps")&&jd(b);return d.update(b.data).then(function(){var b=this;this.C.onEvent(new I("drmsessionupdate"));e&&(e.xa&&e.xa.resolve(),(new B(function(){e.loaded=!0;gd(b)&&b.l.resolve()})).O(kd))}.bind(this))}.bind(b),function(b){this.c||(b=new D(2,6,6007,b),this.g(b),e&&e.xa&&e.xa.reject(b))}.bind(b))["catch"](function(b){this.c||(b=new D(2,6,6008,b.message),this.g(b),e&&e.xa&&e.xa.reject(b))}.bind(b))} +function hd(b){var c=yc(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){c=(new DOMParser).parseFromString(c,"application/xml");for(var d=c.getElementsByTagName("HttpHeader"),e=0;e"===c.substr(0,5)&&""===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=Ec(c).buffer} +p.Qd=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if("string"==typeof e){var f=e;e=b;b=f}if("com.microsoft.playready"==this.a.keySystem&&16==e.byteLength&&!rc("Tizen")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}"com.microsoft.playready"==this.a.keySystem&&"status-pending"==b&&(b="usable");"status-pending"!=b&&(c.loaded=!0);"expired"==b&&(d=!0);f=Gc(new Uint8Array(e)); +this.na.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.xa&&(this.b["delete"](b),b.close()["catch"](function(){}));gd(this)&&(this.l.resolve(),this.M.O(ld))};function Kc(b){var c=b.na,d=b.T;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return"expired"==b})&&b.g(new D(2,6,6014));b.C.kc(jc(d))} +function md(){function b(b){return t(function h(){var c,f,m;return y(h,function(h){switch(h.j){case 1:return ya(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.s,m=(f=c.getConfiguration().sessionTypes)?f.includes("persistent-license"):!1,rc("Tizen 3")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Ca(h,0);break;case 2:Da(h),e.set(b,null),v(h)}})})}var c=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],d=[{videoCapabilities:c, +persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:c}],e=new Map;c="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map(function(c){return b(c)});return Promise.all(c).then(function(){return jc(e)})} +function nd(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!dd(b,kc(d.mimeType,d.codecs))||e&&e.encrypted&&!dd(b,kc(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})} +function od(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;eb.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function td(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function ud(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d} +function vd(b){if(!b)return[];for(var c=[],d=0;d>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Fd(b,c){b.f=!0;b.b=new G;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new D(2,3,3018));return b.b} +Cd.prototype.i=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};Cd.prototype.h=function(){var b={data:Ic.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Gd(b,c,d){this.startTime=b;this.direction=Hd;this.endTime=c;this.payload=d;this.region=new Id;this.position=null;this.positionAlign=Jd;this.size=100;this.textAlign=Kd;this.writingMode=Ld;this.lineInterpretation=Md;this.line=null;this.lineHeight="";this.lineAlign=Nd;this.displayAlign=Od;this.backgroundColor=this.color="";this.backgroundImage=null;this.fontSize="";this.fontWeight=Pd;this.fontStyle=Qd;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}z("shaka.text.Cue",Gd); +var Jd="auto";Gd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Jd};var Kd="center",Rd={LEFT:"left",RIGHT:"right",CENTER:Kd,START:"start",END:"end"};Gd.textAlign=Rd;var Od="after",Sd={BEFORE:"before",CENTER:"center",AFTER:Od};Gd.displayAlign=Sd;var Hd="ltr";Gd.direction={HORIZONTAL_LEFT_TO_RIGHT:Hd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Ld="horizontal-tb";Gd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Ld,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"}; +var Md=0;Gd.lineInterpretation={LINE_NUMBER:Md,PERCENTAGE:1};var Nd="start",Td={CENTER:"center",START:Nd,END:"end"};Gd.lineAlign=Td;var Pd=400;Gd.fontWeight={NORMAL:Pd,BOLD:700};var Qd="normal",Ud={NORMAL:Qd,ITALIC:"italic",OBLIQUE:"oblique"};Gd.fontStyle=Ud;Gd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"}; +function Id(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Vd;this.scroll=Wd}z("shaka.text.CueRegion",Id);var Vd=1;Id.units={PX:0,PERCENTAGE:Vd,LINES:2};var Wd="";Id.scrollMode={NONE:Wd,UP:"up"};function Xd(b){this.g=null;this.c=b;this.f=this.m=0;this.h=Infinity;this.b=this.a=null;this.l="";this.i=new Map}var Yd={};z("shaka.text.TextEngine.registerParser",function(b,c){Yd[b]=c});z("shaka.text.TextEngine.unregisterParser",function(b){delete Yd[b]});function Zd(b){return Yd[b]||window.muxjs&&"application/cea-608"==b?!0:!1}Xd.prototype.destroy=function(){this.c=this.g=null;this.i.clear();return Promise.resolve()};function $d(b,c){"application/cea-608"!=c&&(b.g=new Yd[c])} +Xd.prototype.Lc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new D(2,2,2009,d);}}; +function ae(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.m,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&cthis.a&&c>=this.b&&(this.b=b))}.bind(this))};Xd.prototype.re=function(b){this.c.append(b)};Xd.prototype.appendCues=Xd.prototype.re; +Xd.prototype.rc=function(b,c){this.l=b;var d=this.i.get(b);if(d)for(var e=r(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};Xd.prototype.setSelectedClosedCaptionId=Xd.prototype.rc; +function be(b,c,d,e,f){var g=d+" "+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTimed.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function ie(b,c){return"text"==c?b.a.b:sd(he(b,c))}function je(b,c,d){if("text"==c)return b=b.a,null==b.b||b.bc&&(c+=.001);this.b[b].timestampOffset=c;this.ub(b)};p.Pf=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.ub(b)}; +p.Xf=function(b){this.c[b][0].p.reject(new D(2,3,3014,this.f.error?this.f.error.code:0))};p.ub=function(b){var c=this.c[b][0];c&&(c.p.resolve(),pe(this,b))};function le(b,c,d){if(b.v)return Promise.reject();d={start:d,p:new G};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){"QuotaExceededError"==e.name?d.p.reject(new D(2,3,3017,c)):d.p.reject(new D(2,3,3015,e)),pe(b,c)}return d.p} +function oe(b,c){if(b.v)return Promise.reject();var d=[],e;for(e in b.b){var f=new G,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new D(2,3,3015,l))}for(var d in this.b)pe(this,d);return b}.bind(b),function(b){throw b;}.bind(b))}function pe(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new D(2,3,3015,e)),pe(b,c)}};function qe(b,c){b=M(b);c=M(c);return b.split("-")[0]==c.split("-")[0]}function re(b,c){b=M(b);c=M(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function M(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=se.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function te(b){return b.language?M(b.language):b.audio&&b.audio.language?M(b.audio.language):b.video&&b.video.language?M(b.video.language):"und"} +function ue(b,c){for(var d=M(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(M(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,re(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=M(h);k=M(k);h=h.split("-");k=k.split("-");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,re(d,f))return f;return null} +var se=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze", +"cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice", +"is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao", +"mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san", +"sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie", +"vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function ve(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}function we(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=ve(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e} +function xe(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.P&&!nd(b,e))return!1;var f=e.audio;e=e.video;return f&&!ee(f)||e&&!ee(e)||f&&c&&!ye(f,c)||e&&d&&!ye(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return Zd(kc(b.mimeType,b.codecs))})}function ye(b,c){return b.mimeType!=c.mimeType||b.codecs.split(".")[0]!=c.codecs.split(".")[0]?!1:!0} +function ze(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:"variant",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(", "), +audioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth|| +null,b.label=c.label,b.audioRoles=c.roles);return b}function Ae(b){return{id:b.id,active:!1,type:"text",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}} +function Be(b){b.__shaka_id||(b.__shaka_id=Ce++);return b.__shaka_id}var Ce=0;function De(b){return{id:Be(b),active:!1,type:"",bandwidth:0,language:M(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}} +function Ee(b){return b.allowedByApplication&&b.allowedByKeySystem}function Fe(b){return b.filter(function(b){return Ee(b)})} +function Ge(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))} +function He(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(b){return b.language==g});if(c){var h=ue(M(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return M(b.language)==h}))}if(d){if(b=Ie(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(xd.yc,[]);return b.length?Ie(e,b[0]):e} +function Ie(b,c){return b.filter(function(b){return b.roles.includes(c)})}function Je(b,c,d){for(var e=0;e=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.g=Date.now();return d};N.prototype.chooseVariant=N.prototype.chooseVariant;N.prototype.enable=function(){this.f=!0}; +N.prototype.enable=N.prototype.enable;N.prototype.disable=function(){this.f=!1};N.prototype.disable=N.prototype.disable;N.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Xa(d.b,f,e);Xa(d.c,f,e)}if(null!=this.g&&this.f)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.g<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(d)}}; +N.prototype.segmentDownloaded=N.prototype.segmentDownloaded;N.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};N.prototype.getBandwidthEstimate=N.prototype.getBandwidthEstimate;N.prototype.setVariants=function(b){this.c=b};N.prototype.setVariants=N.prototype.setVariants;N.prototype.configure=function(b){this.a=b};N.prototype.configure=N.prototype.configure; +function Le(b,c){b&&(c=c.filter(function(c){return ve(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Me(b,c){this.a=b;this.b=c}Me.prototype.toString=function(){return"v"+this.a+"."+this.b};function Ne(b,c){var d=new Me(2,6),e=Oe,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Pe(b,c,d,e){ab([d,"has been deprecated and will be removed in",c,". We are currently at version",b,". Additional information:",e].join(" "))}function Qe(b,c,d,e){$a([d,"has been deprecated and has been removed in",c,". We are now at version",b,". Additional information:",e].join(""))}var Oe=null;var Re="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Se="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Te=["loop","playbackRate"],Ue=["pause","play"],Ve="abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),We={getAssetUri:2, +getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Xe={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Ye=[["getConfiguration","configure"]],Ze=[["isTextTrackVisible","setTextTrackVisibility"]], +$e="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),af=["attach","detach","load","unload"]; +function bf(b){return JSON.stringify(b,function(b,d){if("function"!=typeof d){if(d instanceof Event||d instanceof I){var c={},f;for(f in d){var g=d[f];g&&"object"==typeof g?"detail"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:"TimeRanges",length:d.length,start:[],end:[]},f=0;fd?"-Infinity":"Infinity":d;return c}})}function cf(b){return JSON.parse(b,function(b,d){return"NaN"==d?NaN:"-Infinity"==d?-Infinity:"Infinity"==d?Infinity:d&&"object"==typeof d&&"TimeRanges"==d.__type__?df(d):d&&"object"==typeof d&&"Uint8Array"==d.__type__?new Uint8Array(d.entries):d})}function df(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function ef(b,c,d,e,f,g){this.P=b;this.f=new B(c);this.T=d;this.l=!1;this.G=e;this.M=f;this.C=g;this.b=this.h=!1;this.D="";this.i=null;this.m=this.Od.bind(this);this.o=this.kf.bind(this);this.a={video:{},player:{}};this.v=0;this.c={};this.g=null}var ff=!1,gf=null;p=ef.prototype;p.destroy=function(){hf(this);gf&&jf(this);this.f&&(this.f.stop(),this.f=null);this.M=this.G=null;this.b=this.h=!1;this.o=this.m=this.g=this.c=this.a=this.i=null;return Promise.resolve()};p.fa=function(){return this.b}; +p.bd=function(){return this.D};p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.f.sc();var b=new chrome.cast.SessionRequest(this.P);b=new chrome.cast.ApiConfig(b,this.Pd.bind(this),this.pf.bind(this),"origin_scoped");chrome.cast.initialize(b,function(){},function(){});ff&&this.f.O(.02);(b=gf)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.Pd(b):gf=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)}; +p.hd=function(b){this.i=b;this.b&&kf({type:"appData",appData:this.i})};p.cast=function(b){if(!this.h)return Promise.reject(new D(1,8,8E3));if(!ff)return Promise.reject(new D(1,8,8001));if(this.b)return Promise.reject(new D(1,8,8002));this.g=new G;chrome.cast.requestSession(this.Zc.bind(this,b),this.Nd.bind(this));return this.g};p.ac=function(){this.b&&(hf(this),gf&&(jf(this),gf.stop(function(){},function(){}),gf=null))}; +p.get=function(b,c){if("video"==b){if(Ue.includes(c))return this.Zd.bind(this,b,c)}else if("player"==b){if(Xe[c]&&!this.get("player","isLive")())return function(){};if($e.includes(c))return this.Zd.bind(this,b,c);if(af.includes(c))return this.Ef.bind(this,b,c);if(We[c])return this.Wd.bind(this,b,c)}return this.Wd(b,c)};p.set=function(b,c,d){this.a[b][c]=d;kf({type:"set",targetName:b,property:c,value:d})}; +p.Zc=function(b,c){gf=c;c.addUpdateListener(this.m);c.addMessageListener("urn:x-cast:com.google.shaka.v2",this.o);this.Od();kf({type:"init",initState:b,appData:this.i});this.g.resolve()};p.Nd=function(b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}this.g.reject(new D(2,8,c,b))};p.Wd=function(b,c){return this.a[b][c]}; +p.Zd=function(b,c,d){for(var e=[],f=2;f LA_URL"))?b.textContent:""} +function zf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=wf.get(f.be);if(g){var h=zd(g,f.init||b);if(g=Df.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),h=f.next();!h.done;h=f.next())e.push(h.value)}return e} +var Df=(new Map).set("com.widevine.alpha",function(b){return(b=P.yd(b.node,"urn:microsoft","laurl"))?b.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",function(b){b=P.yd(b.node,"urn:microsoft:playready","pro");if(!b)return"";b=Ec(b.textContent);b=Bf(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return"";b=yc(b.value,!0);return(b=P.Ud(b,"WRMHEADER"))?Cf(b):""});function yf(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=Ef(d.value))&&c.push(d);return c} +function Ef(b){var c=b.getAttribute("schemeIdUri"),d=P.getAttributeNS(b,"urn:mpeg:cenc:2013","default_KID"),e=P.zd(b,"urn:mpeg:cenc:2013","pssh").map(P.cc);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new D(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:"cenc",initData:Ec(b),keyId:null}})}catch(g){throw new D(2,4,4007);}return{node:b,be:c,keyId:d,init:0x)if(q+1=x)break;x=Math.ceil((x-w)/A)-1}else{if(Infinity==l)break;else if(w/f>=l)break;x=Math.ceil((l*f-w)/A)-1}0this.K.byteLength&&Nf();var c=new Uint8Array(this.K.buffer,this.K.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};R.prototype.readBytes=R.prototype.Xa; +R.prototype.L=function(b){this.a+b>this.K.byteLength&&Nf();this.a+=b};R.prototype.skip=R.prototype.L;R.prototype.ae=function(b){this.ab||b>this.K.byteLength)&&Nf();this.a=b};R.prototype.seek=R.prototype.seek;R.prototype.ad=function(){for(var b=this.a;this.sa()&&0!=this.K.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.K.buffer,this.K.byteOffset+b,this.a-b);this.a+=1;return wc(b)}; +R.prototype.readTerminatedString=R.prototype.ad;function Nf(){throw new D(2,3,3E3);};function S(){this.c=[];this.b=[];this.a=!1}z("shaka.util.Mp4Parser",S);S.prototype.H=function(b,c){var d=Of(b);this.c[d]=0;this.b[d]=c;return this};S.prototype.box=S.prototype.H;S.prototype.ea=function(b,c){var d=Of(b);this.c[d]=1;this.b[d]=c;return this};S.prototype.fullBox=S.prototype.ea;S.prototype.stop=function(){this.a=!0};S.prototype.stop=S.prototype.stop; +S.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new R(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.sa()&&!this.a;)this.mc(0,d,c)};S.prototype.parse=S.prototype.parse; +S.prototype.mc=function(b,c,d){var e=c.ba(),f=c.F(),g=c.F();switch(f){case 0:f=c.K.byteLength-e;break;case 1:f=c.yb()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.F(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.K.byteLength&&(g=c.K.byteLength);g-=c.ba();c=0>24&255,b>>16&255,b>>8&255,b&255)}S.typeToString=Sf;function Tf(b,c,d,e){var f,g=(new S).ea("sidx",function(b){f=Uf(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new D(2,3,3004);} +function Uf(b,c,d,e){var f=[];e.reader.L(4);var g=e.reader.F();if(0==g)throw new D(2,3,3005);if(0==e.version){var h=e.reader.F();var k=e.reader.F()}else h=e.reader.yb(),k=e.reader.yb();e.reader.L(2);var l=e.reader.Lb();b=b+e.size+k;for(k=0;k>>31;m&=2147483647;var q=e.reader.F();e.reader.L(4);if(1==n)throw new D(2,3,3006);f.push(new Q(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function T(b){this.a=b}z("shaka.media.SegmentIndex",T);T.prototype.destroy=function(){this.a=null;return Promise.resolve()};T.prototype.destroy=T.prototype.destroy;T.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&bb||b>=this.a.length?null:this.a[b]};T.prototype.get=T.prototype.get;T.prototype.offset=function(b){for(var c=0;cg.startTime?0==d&&c.push(g):(.1b){this.a.splice(0,c);return}this.a=[]};T.prototype.evict=T.prototype.Dc;function Vf(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new Q(d.position,d.startTime,c,d.c,d.b,d.a)}};function Wf(b){this.b=b;this.a=new R(b,0);Xf||(Xf=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Xf;Wf.prototype.sa=function(){return this.a.sa()}; +function Yf(b){var c=Zf(b);if(7=d&&!(c&1<<8-d);d++);if(8b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new Q(b,c,n,function(){var d=Ff(h,l,b+f,k,c*g);return yd(m,[d])},0,null)}}} +function qg(b,c){for(var d=[],e=0;eb.o||b.i.O(Math.max(3,b.o-c,Ya(b.v)))} +function Ag(b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,Wc:null};d=d||c.oa;var e=P.vb,f=P.Ae,g=P.R(b,"BaseURL").map(P.cc),h=b.getAttribute("contentType")||c.contentType,k=b.getAttribute("mimeType")||c.mimeType,l=b.getAttribute("codecs")||c.codecs;f=P.J(b,"frameRate",f)||c.frameRate;var m=P.R(b,"InbandEventStream"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=q.value.getAttribute("schemeIdUri"),n.includes(q)||n.push(q);m=P.R(b, +"AudioChannelConfiguration");m=Fg(m)||c.Wc;h||(h=Dg(k,l));return{oa:yd(d,g),Nb:P.$b(b,"SegmentBase")||c.Nb,Ja:P.$b(b,"SegmentList")||c.Ja,Pb:P.$b(b,"SegmentTemplate")||c.Pb,width:P.J(b,"width",e)||c.width,height:P.J(b,"height",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:n,id:b.getAttribute("id"),Wc:m}} +function Fg(b){for(var c=0;c>=1;return b}}}return null}function Eg(b){var c=b.Nb?1:0;c+=b.Ja?1:0;c+=b.Pb?1:0;if(0==c)return"text"==b.contentType||"application"==b.contentType?!0:!1;1!=c&&(b.Nb&&(b.Ja=null),b.Pb=null);return!0} +function Gg(b,c,d,e){c=yd(c,[d]);c=Tb(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(4,c);Pb(b.g,c);return c.promise.then(function(b){if("HEAD"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=wc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})} +function zg(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute("schemeIdUri"),value:b.getAttribute("value")}});var e=b.b.dash.clockSyncUri;!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return xd.ye(d,function(b){var d=b.scheme;b=b.value;switch(d){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Gg(this,c,b,"HEAD");case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return Gg(this, +c,b,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return ab("NTP UTCTiming scheme is not supported"),Promise.reject();default:return ab("Unrecognized scheme in UTCTiming element",d),Promise.reject()}}.bind(b))["catch"](function(){ab("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"); +return 0})}p.wf=function(b,c,d){var e=P.vb,f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=P.J(d,"timescale",e)||1;P.R(d,"Event").forEach(function(d){var k=P.J(d,"presentationTime",e)||0,m=P.J(d,"duration",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute("id")||"",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))}; +p.Hf=function(b,c,d){b=rg(b,c,d,this.b.retryParameters);b=this.a.networkingEngine.request(1,b);Pb(this.g,b);return b.promise.then(function(b){return b.data})};function Dg(b,c){return Zd(kc(b,c))?"text":b.split("/")[0]}U.dd("mpd",sg);U.Mb("application/dash+xml",sg);function Hg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Ig(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Ig.prototype.toString=function(){function b(b){return b.name+"="+(isNaN(Number(b.value))?'"'+b.value+'"':b.value)}var c="#"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0c.length||"data"!=c[0])throw new D(2,1,1004,b);c=c.slice(1).join(":").split(",");if(2>c.length)throw new D(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(","));d=d.split(";");var e=null;1w.Tc&&(w.stream.presentationTimeOffset=-x,w.Ob.offset(x))}else for(b.b.wa(l),b.b.offset(-h),E=r(b.a.values()),F=E.next();!F.done;F=E.next())A=F.value,A.stream.presentationTimeOffset= +h,A.Ob.offset(-h),Vf(A.Ob,l);b.m={presentationTimeline:b.b,periods:[g],offlineSessionIds:[],minBufferTime:0};v(e)}})})} +function gh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A,C;return y(e,function(e){switch(e.j){case 1:return f=Mg,g=xd,h=c.a,k=f.lb(c.a,"EXT-X-MEDIA"),l=k.filter(function(b){return"SUBTITLES"==ih(b,"TYPE")}.bind(b)),m=l.map(function(b){return jh(this,b)}.bind(b)),n=k.filter(function(b){return"CLOSED-CAPTIONS"==ih(b,"TYPE")}),kh(b,n),u(e,Promise.all(m),2);case 2:return q=e.s,x=f.lb(h,"EXT-X-STREAM-INF"),w=x.map(function(b){return lh(this,b,c)}.bind(b)),u(e,Promise.all(w),3);case 3:return A= +e.s,C=A.reduce(g.yc,[]),C=C.filter(function(b){return null!=b}),e["return"]({startTime:0,variants:C,textStreams:q})}})})} +function lh(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,C,E,F,V,Y,va,Aa,da,ma,wa,ja,Ta,Ba,tb,Ga,cb,db;return y(f,function(f){switch(f.j){case 1:g=Ad;h=Mg;k=Kg(c,"CODECS","avc1.42E01E,mp4a.40.2");l=mh(k.split(/\s*,\s*/));m=c.getAttribute("RESOLUTION");q=n=null;x=Kg(c,"FRAME-RATE");w=Number(ih(c,"BANDWIDTH"));m&&(A=m.value.split("x"),n=A[0],q=A[1]);C=h.lb(d.a,"EXT-X-MEDIA");C=C.filter(function(b){return"CLOSED-CAPTIONS"!=ih(b,"TYPE")});C=C.filter(function(b){var c=Kg(b,"URI")||"";return"SUBTITLES"== +(Kg(b,"TYPE")||"")||""!=c});E=Kg(c,"AUDIO");F=Kg(c,"VIDEO");E?C=h.Gc(C,"AUDIO",E):F&&(C=h.Gc(C,"VIDEO",F));if(V=nh(g.qa,l)){if(Y=Kg(c,"SUBTITLES"))va=h.Gc(C,"SUBTITLES",Y),va.length&&(Aa=b.D.get(va[0].id),Aa.stream.codecs=V);Lb(l,V)}da=C.map(function(b){return oh(this,b,l)}.bind(b));ma=[];wa=[];return u(f,Promise.all(da),2);case 2:Ta=f.s;Ta=Ta.filter(function(b){return null!=b});E?ma=Ta:F&&(wa=Ta);tb=!1;ma.length||wa.length?ma.length?(cb=ih(c,"URI"),db=ma[0].tc,cb==db?(Ba=g.Ab,tb=!0):Ba=g.Na):Ba= +g.Ab:1==l.length?(Ga=nh(g.Na,l),Ba=m||x||Ga?g.Na:g.Ab):(Ba=g.Na,l=[l.join(",")]);if(tb){f.A(3);break}return u(f,ph(b,c,l,Ba),4);case 4:ja=f.s;case 3:if(ja)ja.stream.type==g.Ab?ma=[ja]:wa=[ja];else if(null===ja)return f["return"]([]);wa&&qh(wa);ma&&qh(ma);return f["return"](rh(b,ma,wa,w,n,q,x))}})})}function qh(b){b.forEach(function(b){var c=b.stream.codecs.split(",");c=c.filter(function(b){return"mp4a.40.34"!=b});b.stream.codecs=c.join(",")})} +function rh(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);var k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var q=n.value;n=l?l.stream:null;var x=q?q.stream:null,w=l?l.drmInfos:null,A=q?q.drmInfos:null;q=(q?q.tc:"")+" - "+(l?l.tc:"");var C=void 0;if(n&&x)if(w.length&&A.length?0>4,0!=e&&2!=e||c(),3==e&&(e=b.ka(),b.L(e)),1!=b.F()>>8)b.seek(d+188),e=b.ka(),71!=e&&(b.seek(d+192),e=b.ka()),71!=e&&(b.seek(d+204),e=b.ka()),71!=e&&c(),b.ae(1);else return b.L(3),d=b.ka()>>6,0!=d&&1!=d||c(),0==b.ka()&&c(),d=b.ka(),e=b.Lb(),b=b.Lb(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4} +function Gh(b,c,d){b=kc(b,c);if(!Zd(b))return 0;c=new Xd(null);$d(c,b);return c.Lc(d)}function mh(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=nc(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function nh(b,c){for(var d=Hh[b],e=0;ef-.5)){c=!0;break a}}c=!1}return c};function bi(b,c,d,e,f){var g=this;this.a=b;this.v=c;this.o=d;this.l=f;this.f=new L;this.i=!1;this.m=b.readyState;this.c=!1;this.b=e;this.h=!1;this.f.w(b,"waiting",function(){return ci(g)});this.g=(new B(function(){ci(g)})).La(.25)}bi.prototype.release=function(){this.f&&(this.f.release(),this.f=null);null!=this.g&&(this.g.stop(),this.g=null);this.b&&(this.b.release(),this.b=null);this.a=this.v=this.l=null};bi.prototype.Yc=function(){this.h=!0;ci(this)}; +function ci(b){if(0!=b.a.readyState){if(b.a.seeking){if(!b.i)return}else b.i=!1;if(!b.a.paused){b.a.readyState!=b.m&&(b.c=!1,b.m=b.a.readyState);var c=b.o.smallGapLimit,d=b.a.currentTime,e=b.a.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=rc("Edge/")||rc("Trident/")||rc("Tizen")||rc("CrKey")?.5:.1;for(var g=0;gd&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.b){b=b.b;d=b.f;e=Zh(d);d=d.a.currentTime;f=Date.now()/1E3;if(b.b!= +d||b.g!=e)b.c=f,b.b=d,b.g=e;d=f-b.c;d>=b.h&&e&&b.a(b.b,d)}}else if(0!=f||b.h){g=e.start(f);var h=b.v.za();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.c||(b.c=!0,d=new I("largegap",{currentTime:d,gapSize:h}),d.cancelable=!0,b.l(d),b.o.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.a.currentTime=g)}}}}};function di(b){var c=this;this.c=b;this.a=new Set;this.b=(new B(function(){ei(c,!1)})).La(.25)}di.prototype.release=function(){this.b.stop();for(var b=r(this.a),c=b.next();!c.done;c=b.next())c.value.release();this.a.clear()};function ei(b,c){for(var d=r(b.a),e=d.next();!e.done;e=d.next())e.value.g(b.c.currentTime,c)};function fi(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function gi(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function hi(b){this.c=b;this.a=null;this.b=function(){}}hi.prototype.release=function(){this.a=this.c=null;this.b=function(){}};hi.prototype.g=function(b){var c=this.a,d=this.c.periods;b=gi(d,b)||d[0];c!=b&&this.b(b);this.a=b};function ii(b,c){b.b=c};function ji(b){var c=this;this.a=b;this.f=!1;this.c=this.a.ec();this.b=new B(function(){c.a.Jd(.25*c.c)})}ji.prototype.release=function(){this.b&&(this.b.stop(),this.b=null);this.a=null};ji.prototype.set=function(b){this.c=b;ki(this)};function ki(b){b.b.stop();var c=b.f?0:b.c;if(0<=c)try{b.a.ec()!=c&&b.a.kd(c);return}catch(d){}b.b.La(.25);0!=b.a.ec()&&b.a.kd(0)};function li(b,c,d){this.a=b;this.f=c;this.g=d;this.b=new L;this.c=new mi(b);0Math.abs(b.a.currentTime-c)?qi(b):(b.b.ha(b.a,"seeking",function(){qi(b)}),ri(b.c,0==b.a.currentTime?c:b.a.currentTime))}function qi(b){b.b.w(b.a,"seeking",function(){return b.f()})}function mi(b){var c=this;this.b=b;this.h=10;this.g=this.f=this.c=0;this.a=new B(function(){0>=c.c?c.a.stop():c.b.currentTime!=c.f?c.a.stop():(c.b.currentTime=c.g,c.c--)})}mi.prototype.release=function(){this.a&&(this.a.stop(),this.a=null);this.b=null}; +function ri(b,c){b.f=b.b.currentTime;b.g=c;b.c=b.h;b.b.currentTime=c;b.a.La(.1)};function si(b){function c(){d.f=!0;null!=d.b&&(d.a.currentTime=d.b)}var d=this;this.a=b;this.f=!1;this.b=null;this.c=new L;0==this.a.readyState?this.c.ha(this.a,"loadedmetadata",c):c()}si.prototype.release=function(){this.c&&(this.c.release(),this.c=null);this.a=null};si.prototype.m=function(b){this.b=this.f?this.b:b};si.prototype.h=function(){return(this.f?this.a.currentTime:this.b)||0};si.prototype.o=function(){}; +function ti(b,c,d,e,f,g){var h=this;this.b=b;this.a=c.presentationTimeline;this.C=c.minBufferTime||0;this.g=d;this.v=f;this.l=null;this.f=new bi(b,c.presentationTimeline,d,ui(b,d),g);this.c=new li(b,function(){a:{var b=h.f;b.i=!0;b.h=!1;b.c=!1;var c=pi(h.c);b=vi(h,c);if(.001d-c&&(c=d-3);bb.a.Y()?b.a.mb():b.a.za():0>c&&(c=b.a.za()+c);return yi(b,xi(b,c))}ti.prototype.o=function(){this.f.Yc()};function yi(b,c){var d=b.a.Y();return c>=d?d-b.g.durationBackoff:c}function vi(b,c){var d=td.bind(null,b.b.buffered),e=Math.max(b.C,b.g.rebufferingGoal),f=b.g.safeSeekOffset,g=b.a.mb(),h=b.a.za(),k=b.a.Y();3>h-g&&(g=h-3);var l=b.a.Fb(e),m=b.a.Fb(f);e=b.a.Fb(e+f);return c>=k?yi(b,c):c>h?h:c=l||d(c)?c:e} +function xi(b,c){var d=b.a.mb();if(cd?d:c}function ui(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new Yh(new ai(b),c.stallThreshold);$h(e,function(){b.currentTime+=d});return e};function zi(){this.b=function(){};this.a=new Set}zi.prototype.release=function(){this.b=function(){};this.a.clear()};function Ai(b,c){b.b=c};function Bi(b){var c=this;this.h=b;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.i=[{bb:null,ab:Ci,Ua:function(b,e){return c.a(b,e)}},{bb:Di,ab:Ci,Ua:function(b,e){return c.a(b,e)}},{bb:Ei,ab:Ci,Ua:function(b,e){return c.a(b,e)}},{bb:Ci,ab:Di,Ua:function(b,e){return c.b(b,e)}},{bb:Ci,ab:Ei,Ua:function(b,e){return c.b(b,e)}},{bb:Di,ab:Ei,Ua:function(b,e){return c.c(b,e)}},{bb:Ei,ab:Di,Ua:function(b,e){return c.c(b,e)}}]} +Bi.prototype.release=function(){this.h=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};Bi.prototype.g=function(b,c){for(var d=r(this.h.a),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.f.get(e),g=be.endTime?Ei:Ci;this.f.set(e,g);for(var h=r(this.i),k=h.next();!k.done;k=h.next())k=k.value,k.bb==f&&k.ab==g&&k.Ua(e,c)}};function Fi(b,c,d,e){b.a=c;b.b=d;b.c=e}var Di=1,Ci=2,Ei=3;function Gi(b,c){this.a=c;this.c=b;this.g=null;this.l=1;this.v=Promise.resolve();this.h=[];this.i=new Map;this.b=new Map;this.o=!1;this.G=null;this.D=this.f=this.m=!1;this.C=0}Gi.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Hi(c.value);this.b.clear();this.i.clear();this.g=this.h=this.v=this.c=this.a=null;this.f=!0;return Promise.resolve()}; +Gi.prototype.configure=function(b){this.g=b;this.G=new yb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)}; +Gi.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.j){case 1:return e=b.a.Sa(),f=Ii(b,e),g=b.a.Md(b.c.periods[f]),g.variant||g.text?u(d,Ji(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d["return"](new D(2,5,5005));case 2:if(b.f)return d["return"]();b.a&&b.a.gf&&b.a.gf();v(d)}})})};function Ki(b){return Li(b,"audio")}function Mi(b){return Li(b,"video")} +function Li(b,c){var d=b.b.get(c);return d?d.Ia||d.stream:null} +function Ni(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w;return y(e,function(e){switch(e.j){case 1:return f=Ad,u(e,me(b.a.I,f.qa),2);case 2:return b.C++,b.D=!1,g=b.C,h=b.a.I,k=new Map,l=new Set,k.set(f.qa,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e["return"]():u(e,Oi(b,l),4);case 4:if(b.f)return e["return"]();n=(m=b.a.I.g.isTextVisible())||b.g.alwaysStreamText;b.C!=g||b.b.has(f.qa)||b.D||!n||(q=b.a.Sa(),x=Ii(b,q),w=Pi(c,x,0),b.b.set(f.qa,w),Qi(b,w,0));v(e)}})})} +function Ri(b,c){var d=b.b.get("video");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Ia&&(Si(b,f,!1,0,!1),d.Ia=e)}else if(e=d.Ia)d.Ia=null,Si(b,e,!0,0,!1)}}function Ti(b,c,d,e){c.video&&Si(b,c.video,d,e,!1);c.audio&&Si(b,c.audio,d,e,!1)} +function Si(b,c,d,e,f){var g=b.b.get(c.type);if(!g&&"text"==c.type&&b.g.ignoreTextStreamFailures)Ni(b,c);else if(g){var h=Ui(b,c),k=Array.from(b.b.values()).every(function(b){return b.pa==g.pa});d&&h!=g.pa&&k?b.b.forEach(function(c){Vi(b,c)}):(g.Ia&&(c.trickModeVideo?(g.Ia=c,c=c.trickModeVideo):g.Ia=null),(k=b.h[h])&&k.zb&&(k=b.i.get(c.id))&&k.zb&&(g.stream!=c||f)&&("text"==c.type&&fe(b.a.I,kc(c.mimeType,c.codecs)),g.stream=c,g.hc=!0,Wi(b,g,h)&&g.Jb.abort(),d&&(g.Pa?g.uc=!0:g.Ha?(g.Ma=!0,g.Yb=e,g.uc= +!0):(Hi(g),Xi(b,g,!0,e)["catch"](function(c){if(b.a)b.a.onError(c)})))))}}function Wi(b,c,d){if(!c.Jb)return!1;var e=b.a.Sa(),f=ie(b.a.I,c.type);d=(d=Yi(b,c,e,f,d))?d.a?d.a-d.b:null:null;if(null==d)return!1;var g=c.stream.initSegmentReference;g&&(d+=(g.a?g.a-g.b:null)||0);g=b.a.getBandwidthEstimate();return 8*d/gd?!0:!1} +function Zi(b){function c(c){var f=b.a.I;"text"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&dc?b.a.I.wa(c):b.a.I.wa(Math.pow(2,32))} +function bj(b,c){if(!b.f&&!c.Ha&&null!=c.Da&&!c.Pa)if(c.Da=null,c.Ma)Xi(b,c,c.uc,c.Yb);else{try{var d=cj(b,c);null!=d&&(Qi(b,c,d),c.Hb=!1)}catch(e){dj(b,e);return}d=Array.from(b.b.values());ej(b,c);b.o&&d.every(function(b){return b.endOfStream})&&b.a.I.endOfStream().then(function(){if(!this.f){var b=this.a.I.Y();0!=b&&b=b.c.presentationTimeline.Y())return c.endOfStream=!0,"video"==c.type&&(f=b.b.get("text"))&&"application/cea-608"==f.stream.mimeType&&(f.endOfStream=!0),null;c.endOfStream=!1;c.pa=h;if(h!=g)return null; +if(k>=l)return.5;h=ie(b.a.I,c.type);h=Yi(b,c,e,h,g);if(!h)return 1;var m=Infinity;Array.from(b.b.values()).forEach(function(c){d(c)||(c=fj(b,c,e),m=Math.min(m,c))});if(f>=m+b.c.presentationTimeline.a)return 1;c.$d=0;gj(b,c,e,g,h);return null}function fj(b,c,d){if(!c.pb||!c.Aa)return Math.max(d,c.$d);d=Ui(b,c.pb);return b.c.periods[d].startTime+c.Aa.endTime} +function Yi(b,c,d,e,f){if(c.Aa&&c.stream==c.pb)return hj(b,c,f,c.Aa.position+1);c.Aa?(d=Ui(b,c.pb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.Aa.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=hj(b,c,f,Math.max(0,d-1)));return g||hj(b,c,f,d)} +function hj(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.Gb();e=e.nb();return d.startTime+c.endTimee?null:c} +function gj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.Y(),l=b.c.periods[e+1];e=ij(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.Ha=!0;c.hc=!1;k=jj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.m)return kj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.m||(c.Ha=!1,c.cd=!1,c.Ma||this.a.Yc(),Qi(this,c,0),lj(this,h))}.bind(b))["catch"](function(b){this.f||this.m||(c.Ha=!1,"text"==c.type&&this.g.ignoreTextStreamFailures?this.b["delete"]("text"): +7001==b.code?(c.Ha=!1,c.Da=null,Qi(this,c,0)):3017==b.code?mj(this,c,b):(c.Hb=!0,b.severity=2,dj(this,b)))}.bind(b))}function mj(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.cd})){var e=Math.round(100*b.l);if(20=d?Promise.resolve():b.a.I.remove(c.type,f,f+d).then(function(){}.bind(b))} +function lj(b,c){if(!b.o){var d=Array.from(b.b.values());if(1!=d.length||"text"!=d[0].type)b.o=d.every(function(b){return"text"==b.type?!0:!b.Ma&&!b.Pa&&b.Aa});if(b.o){d=Ui(b,c);b.h[d]||aj(b,d).then(function(){this.f||this.a.Ld()}.bind(b))["catch"](xd.ic);for(d=0;d=d&&202!=d)return{uri:f||e,$c:e,data:c,headers:b,fromCache:!!b["x-shaka-from-cache"]};f=null;try{f=zc(c)}catch(h){}throw new D(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function qj(b,c,d,e){var f=new qj.b;ic(c.headers).forEach(function(b,c){f.append(c,b)});var g=new qj.a,h={ud:!1,he:!1};b=qj.l(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?"include":void 0},h,e);b=new H(b,function(){h.ud=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new B(function(){h.he=!0;g.abort()});k.O(c/1E3);b["finally"](function(){k.stop()})}return b}z("shaka.net.HttpFetchPlugin",qj); +qj.l=function(b,c,d,e,f){return t(function h(){var k,l,m,n,q,x,w,A,C,E,F,V,Y,va;return y(h,function(h){switch(h.j){case 1:return k=qj.g,l=qj.c,x=q=0,w=Date.now(),ya(h,2),u(h,k(b,d),4);case 4:return m=h.s,A=m.clone().body.getReader(),E=(C=m.headers.get("Content-Length"))?parseInt(C,10):0,F=function(b){function c(){return t(function ja(){var d,e;return y(ja,function(h){switch(h.j){case 1:return ya(h,2),u(h,A.read(),4);case 4:d=h.s;Ca(h,3);break;case 2:return Da(h),h["return"]();case 3:d.done||(q+=d.value.byteLength); +e=Date.now();if(100c;if(!n||!q){f.A(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Ea(f),u(f,h.destroy(),10);case 10:Fa(f,0);break;case 2:Da(f), +f.A(3)}})})};U.Mb("application/x-offline-manifest",nk);function ok(b){var c=fk(b);return c&&"manifest"==c.a?ok.h(b):c&&"segment"==c.a?ok.i(c.key(),c):Bb(new D(2,1,9004,b))}z("shaka.offline.OfflineScheme",ok);ok.h=function(b){b={uri:b,$c:b,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Db(b)};ok.i=function(b,c){var d=new Fj;return Db(void 0).U(function(){return d.init()}).U(function(){return Jj(d,c.ua(),c.aa())}).U(function(b){return b.getSegments([c.key()])}).U(function(b){return{uri:c,$c:c,data:b[0].data,headers:{}}})["finally"](function(){return d.destroy()})}; +Sb("offline",ok);function pk(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.j){case 1:g=[];for(var q=[],w=r(d),A=w.next();!A.done;A=w.next()){A=A.value;for(var C=!1,E=r(q),F=E.next();!F.done;F=E.next())if(F=F.value,qk(F.info,A)){F.sessionIds.push(A.sessionId);C=!0;break}C||q.push({info:A,sessionIds:[A.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.A(4);break}l=k.value;m=rk(b,c,l);return u(f,m,5);case 5:n=f.s;g=g.concat(n);k=h.next();f.A(2);break;case 4:return f["return"](g)}})})} +function rk(b,c,d){return t(function f(){var g,h;return y(f,function(f){switch(f.j){case 1:return g=new Jc({rb:c,onError:function(){},kc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ya(f,2),g.configure(b),u(f,Rc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Ca(f,3);break;case 2:return Da(f),u(f,g.destroy(),5);case 5:return f["return"]([]);case 3:return ya(f,6),u(f,Yc(g),8);case 8:Ca(f,7);break;case 6:return Da(f), +u(f,g.destroy(),9);case 9:return f["return"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return y(n,function(c){switch(c.j){case 1:return ya(c,2),u(c,ad(g,b),4);case 4:h.push(b);Ca(c,0);break;case 2:Da(c),v(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f["return"](h)}})})} +function qk(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Nb(b.audioCapabilities,c.audioCapabilities,d)&&Nb(b.videoCapabilities,c.videoCapabilities,d)};function sk(b,c){var d=tk(),e=this;this.g=c;this.c=b;this.i=d;this.h=null;this.f=[];this.b=this.a=null;this.l=!0;this.m=Promise.resolve().then(function(){return uk(e)})}sk.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.j){case 1:return b.l=!1,b.b&&b.b.abort(),vk(b),u(d,b.m,2);case 2:b.a&&b.a.ta.Wa();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.ta.Wa();b.a=null;b.f=[];b.g=null;v(d)}})})}; +function wk(b,c){var d={tb:function(){},jc:function(){},Wa:function(){},onError:function(){},lc:function(){},wg:function(){}};b.f.push({create:c,ta:d});b.b&&b.b.abort();vk(b);return d} +function uk(b){return t(function d(){return y(d,function(d){switch(d.j){case 1:if(b.l){if(0==b.f.length||b.a&&!b.a.Ta)var e=!1;else{b.a&&(b.a.ta.Wa(),b.a=null);e=b.f.shift();var g=e.create(b.i);g?(e.ta.tb(),b.a={node:g.node,payload:g.payload,Ta:g.Ta,ta:e.ta}):e.ta.lc();e=!0}e?e=Promise.resolve():b.a?e=xk(b):(b.g.ff(b.c),b.h=new G,e=b.h);return u(d,e,1)}d.A(0)}})})} +function xk(b){return t(function d(){var e,f;return y(d,function(d){switch(d.j){case 1:return b.c=b.g.Pe(b.c,b.i,b.a.node,b.a.payload),ya(d,2),b.b=b.g.ze(b.c,b.i,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.ta.jc(),b.a=null);Ca(d,0);break;case 2:e=Da(d);if(7001==e.code)b.a.ta.Wa();else b.a.ta.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.i,e),5);case 5:f.c=d.s,v(d)}})})}function vk(b){b.h&&(b.h.resolve(),b.h=null)};function yk(b){this.a=null;for(var c=0;cb});return!0};yk.prototype.remove=yk.prototype.remove; +yk.prototype.append=function(b){for(var c=Ak,d=[],e=0;e=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}"center"==b.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==b.writingMode?c.vertical="lr":"vertical-rl"==b.writingMode&&(c.vertical="rl");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c} +function zk(b,c){var d=b.mode;b.mode="showing"==d?"showing":"hidden";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function Bk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+"."+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=Jb(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=Jb(m)),l=Bk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}z("shaka.util.ConfigUtils.mergeConfigObjects",Bk); +function Ck(b,c){for(var d={},e=d,f=0,g=0;;){f=b.indexOf(".",f);if(0>f)break;if(0==f||"\\"!=b[f-1])g=b.substring(g,f).replace(/\\\./g,"."),e[g]={},e=e[g],g=f+1;f+=1}e[b.substring(g).replace(/\\\./g,".")]=c;return d}z("shaka.util.ConfigUtils.convertToConfigObject",Ck);function Dk(){}z("shaka.util.PlayerConfiguration",Dk); +function Ek(){var b=5E5,c=Infinity;navigator.connection&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:zb(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},e={retryParameters:zb(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},f={retryParameters:zb(),failureCallback:function(){}, +rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};rc("Web0S")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:N,abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8, +bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}}; +g.trackSelectionCallback=function(b){return Fk(b,h.preferredAudioLanguage)};return h}function Gk(b,c,d){var e={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Bk(b,c,d||Ek(),e,"")}Dk.mergeConfigObjects=Gk; +function Fk(b,c){var d=b.filter(function(b){return"variant"==b.type}),e=[],f=ue(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return M(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/ +2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,"text"==h.type&&d.push(h);return d};function Hk(){this.a=null;this.b=[]}function Ik(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Jk(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d} +function Kk(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Lk(){this.b=this.c=null;this.a=[]};function Mk(){this.f=this.l=this.b=this.h=this.i=this.g=this.m=NaN;this.a=new Hk;this.c=new Lk};function X(b,c){var d=this;J.call(this);this.h=Nk;this.a=null;this.eb=!1;this.i=new L;this.vc=this.l=this.Bb=this.c=this.m=this.f=this.Rb=this.P=this.Sb=this.W=this.gb=this.o=this.D=this.g=this.G=null;this.Id=1E9;this.Vb=new Set;this.ib=!0;this.Ea=null;this.Ed=!1;this.Cd=0;this.na=null;this.$=new Jh;this.b=Ok(this);this.Wb={width:Infinity,height:Infinity};this.v=null;this.Tb=new Sh(this.b.preferredAudioLanguage,this.b.preferredVariantRole,this.b.preferredAudioChannelCount);this.ma=this.b.preferredTextLanguage; +this.cb=this.b.preferredTextRole;c&&c(this);this.G=Pk(this);this.i.w(window,"online",function(){d.fd()});this.C={name:"detach"};this.M={name:"attach"};this.Fa={name:"unload"};this.Ec={name:"manifest-parser"};this.Cc={name:"manifest"};this.fb={name:"media-source"};this.wc={name:"drm-engine"};this.T={name:"load"};this.Hc={name:"src-equals-drm-engine"};this.hb={name:"src-equals"};var e=new Map;e.set(this.M,function(b,c){return Fb(Qk(d,b,c))});e.set(this.C,function(b){b.u&&(d.i.da(b.u,"error"),b.u=null); +d.a=null;b=Promise.resolve();return Fb(b)});e.set(this.Fa,function(b){return Fb(Rk(d,b))});e.set(this.fb,function(b){b=Sk(d,b);return Fb(b)});e.set(this.Ec,function(b,c){var e=Tk(d,b,c);return Fb(e)});e.set(this.Cc,function(b){return Uk(d,b)});e.set(this.wc,function(){var b=Vk(d);return Fb(b)});e.set(this.T,function(b,c){return Fb(Wk(d,b,c))});e.set(this.Hc,function(b){b=Xk(d,b);return Fb(b)});e.set(this.hb,function(b,c){return Yk(d,b,c)});this.jb=new sk(this.C,{Pe:function(b,c,e,k){var f=null;b== +d.C&&(f=e==d.C?d.C:d.M);b==d.M&&(f=e==d.C||c.u!=k.u?d.C:e==d.M?d.M:e==d.fb||e==d.T?d.fb:e==d.hb?d.Hc:null);b==d.fb&&(f=e==d.T&&c.u==k.u?d.Ec:d.Fa);b==d.Ec&&(f=Zk(d.T,d.Cc,d.Fa,e,c,k));b==d.Cc&&(f=Zk(d.T,d.wc,d.Fa,e,c,k));b==d.wc&&(f=Zk(d.T,d.T,d.Fa,e,c,k));b==d.Hc&&(f=e==d.hb&&c.u==k.u?d.hb:d.Fa);if(b==d.T||b==d.hb)f=d.Fa;b==d.Fa&&(f=k.u&&c.u==k.u?d.M:d.C);return f},ze:function(b,c,h){d.dispatchEvent(new I("onstatechange",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return y(h, +function(c){switch(c.j){case 1:return u(c,Rk(d,b),2);case 2:return c["return"](b.u?d.M:d.C)}})})},ff:function(b){d.dispatchEvent(new I("onstateidle",{state:b.name}))}});b&&this.Cb(b,!0)}Va(X,J);z("shaka.Player",X); +X.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.j){case 1:if(b.h==$k)return d["return"]();b.h=$k;e=wk(b.jb,function(){return{node:b.C,payload:tk(),Ta:!1}});return u(d,new Promise(function(b){e.tb=function(){};e.jc=function(){b()};e.Wa=function(){b()};e.onError=function(){b()};e.lc=function(){b()}}),2);case 2:return u(d,b.jb.destroy(),3);case 3:b.i&&(b.i.release(),b.i=null);b.vc=null;b.l=null;b.b=null;if(!b.G){d.A(0);break}return u(d,b.G.destroy(), +5);case 5:b.G=null,v(d)}})})};X.prototype.destroy=X.prototype.destroy;X.version="v2.5.3";var al=["2","5"];Oe=new function(b){this.a=b;this.c=Pe;this.b=Qe}(new Me(Number(al[0]),Number(al[1])));var bl=["output-restricted","internal-error"],cl={};X.registerSupportPlugin=function(b,c){cl[b]=c}; +X.isBrowserSupported=function(){return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration?oc()?!0:pc("application/x-mpegurl"):!1}; +X.probeSupport=function(){return md().then(function(b){for(var c=U.Af(),d={},e=r('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",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",")),f= +e.next();!f.done;f=e.next()){f=f.value;d[f]=oc()?Zd(f)?!0:MediaSource.isTypeSupported(f)||Dd(f):pc(f);var g=f.split(";")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in cl)b[h]=cl[h]();return b})};X.prototype.Cb=function(b,c){c=void 0===c?!0:c;if(this.h==$k)return Promise.reject(dl());var d=tk();d.u=b;oc()||(c=!1);var e=c?this.fb:this.M,f=wk(this.jb,function(){return{node:e,payload:d,Ta:!1}});f.tb=function(){};return el(f)};X.prototype.attach=X.prototype.Cb; +X.prototype.detach=function(){var b=this;if(this.h==$k)return Promise.reject(dl());var c=wk(this.jb,function(){return{node:b.C,payload:tk(),Ta:!1}});c.tb=function(){};return el(c)};X.prototype.detach=X.prototype.detach;X.prototype.qd=function(b){var c=this;b=void 0===b?!0:b;if(this.h==$k)return Promise.reject(dl());oc()||(b=!1);var d=tk(),e=wk(this.jb,function(e){var f=e.u&&b?c.fb:e.u?c.M:c.C;d.u=e.u;return{node:f,payload:d,Ta:!1}});e.tb=function(){};return el(e)};X.prototype.unload=X.prototype.qd; +X.prototype.load=function(b,c,d){if(this.h==$k)return Promise.reject(dl());this.dispatchEvent(new I("loading"));var e=tk();e.uri=b;e.nd=Date.now()/1E3;d&&"string"!=typeof d&&(Ne("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),e.ya=function(){return new d});d&&"string"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=fl(e)?this.hb:this.T,g=wk(this.jb,function(b){if(null==b.u)return null;e.u=b.u;return{node:f,payload:e,Ta:!0}});g.tb=function(){}; +return new Promise(function(b,c){g.lc=function(){return c(new D(2,7,7002))};g.jc=function(){return b()};g.Wa=function(){return c(dl())};g.onError=function(b){return c(b)}})};X.prototype.load=X.prototype.load; +function fl(b){if(b.ya)return!1;if(!oc())return!0;var c=b.mimeType;b=b.uri||"";c||(c={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",ts:"video/mp2t",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac"}[U.getExtension(b)]);return c?pc(c)?U.isSupported(b,c)?!!navigator.vendor&&navigator.vendor.includes("Apple"):!0:!1:!1}function Qk(b,c,d){null==c.u&&(c.u=d.u,b.i.w(c.u,"error",function(){var c=gl(b);c&&b.Ka(c)}));b.a=c.u;return Promise.resolve()} +function Rk(b,c){return t(function e(){return y(e,function(e){switch(e.j){case 1:b.h!=$k&&(b.h=Nk);b.dispatchEvent(new I("unloading"));c.ya=null;c.mimeType=null;c.startTime=null;c.uri=null;c.u&&(b.i.da(c.u,"loadeddata"),b.i.da(c.u,"playing"),b.i.da(c.u,"pause"),b.i.da(c.u,"ended"),b.i.da(c.u,"ratechange"));b.gb&&(b.gb.release(),b.gb=null);b.Sb&&(b.Sb.stop(),b.Sb=null);if(!b.m){e.A(2);break}return u(e,b.m.stop(),3);case 3:b.m=null;case 2:if(!b.l){e.A(4);break}return u(e,b.l.stop(),4);case 4:if(!b.f){e.A(6); +break}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.o&&(b.o.release(),b.o=null);if(!b.D){e.A(8);break}return u(e,b.D.destroy(),9);case 9:b.D=null;case 8:c.u&&c.u.src&&(c.u.removeAttribute("src"),c.u.load());if(!b.g){e.A(10);break}return u(e,b.g.destroy(),11);case 11:b.g=null;case 10:b.$.a.clear(),b.Bb=null,b.P=null,b.Vb.clear(),b.c=null,b.v=null,b.xc=null,b.ib=!0,hl(b),v(e)}})})} +function Sk(b,c){return t(function e(){var f,g,h,k;return y(e,function(e){switch(e.j){case 1:return f=window.muxjs?new qd:new rd,g=b.b.textDisplayFactory,h=new g,b.xc=g,k=new ce(c.u,f,h),u(e,k.o,2);case 2:b.D=k,v(e)}})})} +function Tk(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.j){case 1:c.ya=d.ya;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.G;b.Bb=g;if(c.ya){b.m=c.ya();f.A(2);break}k=b;return u(f,U.create(g,h,b.b.manifest.retryParameters,c.mimeType),3);case 3:k.m=f.s;case 2:b.m.configure(b.b.manifest),v(f)}})})} +function Uk(b,c){var d=c.uri,e=b.G;b.Rb=new zi;Ai(b.Rb,function(c){il(b,"timelineregionadded",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.Fc(c)},filterAllPeriods:function(c){return jl(b,c)},onTimelineRegionAdded:function(c){var d=b.Rb;a:{var e=r(d.a);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.a.add(c),d.b(c))},onEvent:function(c){return b.dispatchEvent(c)},onError:function(c){return b.Ka(c)}}; +return new H(Promise.resolve().then(function(){return t(function h(){var c;return y(h,function(e){switch(e.j){case 1:return c=b,u(e,b.m.start(d,f),2);case 2:c.c=e.s;b.dispatchEvent(new I("manifestparsed"));if(0==b.c.periods.length)throw new D(2,4,4014);kl(b.c.periods);v(e)}})})}),function(){return b.m.stop()})} +function Vk(b){return t(function d(){return y(d,function(d){switch(d.j){case 1:return b.g=new Jc({rb:b.G,onError:function(d){b.Ka(d)},kc:function(d){ll(b,d)},onExpirationUpdated:function(d,e){ml(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.g.configure(b.b.drm),u(d,Qc(b.g,fi(b.c.periods),b.c.offlineSessionIds),2);case 2:jl(b,b.c.periods),v(d)}})})} +function Wk(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w;return y(f,function(f){switch(f.j){case 1:return c.startTime=d.startTime,g=c.u,h=c.uri,b.Bb=h,b.v=new Mk,k=function(){return nl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.W.set(c)},b.i.w(g,"playing",k),b.i.w(g,"pause",k),b.i.w(g,"ended",k),b.i.w(g,"ratechange",l),m=b.b.abrFactory,b.l&&b.vc==m||(b.vc=m,b.l=new m,b.l.configure(b.b.abr)),ol(b,b.c.periods),b.Tb=new Sh(b.b.preferredAudioLanguage,b.b.preferredVariantRole,b.b.preferredAudioChannelCount), +b.ma=b.b.preferredTextLanguage,pl(b.c.presentationTimeline,b.b.playRangeStart,b.b.playRangeEnd),u(f,b.g.Cb(g),2);case 2:return b.l.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.c.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}ql(b,g,c,!0);b.f&&(Ti(b.f,c,d,f),rl(b))}),b.o=sl(b,c.startTime),b.gb=tl(b),b.W=new ji({ec:function(){return c.u.playbackRate},kd:function(b){c.u.playbackRate=b},Jd:function(b){c.u.currentTime+=b}}), +n=Math.max(b.c.minBufferTime,b.b.streaming.rebufferingGoal),ul(b,n),b.f=vl(b),b.f.configure(b.b.streaming),wl(b),b.h=xl,b.dispatchEvent(new I("streaming")),u(f,b.f.start(),3);case 3:b.b.streaming.startAtSegmentBoundary&&(q=b.o.h(),x=yl(b,q),b.o.m(x)),b.c.periods.forEach(b.Fc.bind(b)),zl(b),rl(b),w=Al(b),w.variants.some(function(b){return b.primary}),Bl(b,w.variants),b.i.ha(g,"loadeddata",function(){b.v.b=Date.now()/1E3-d.nd}),v(f)}})})} +function Xk(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.j){case 1:return f=Ad,b.g=new Jc({rb:b.G,onError:function(c){b.Ka(c)},kc:function(c){ll(b,c)},onExpirationUpdated:function(c,e){ml(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.g.configure(b.b.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null, +presentationTimeOffset:0,mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:f.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,Qc(b.g,[g],[]),2);case 2:return u(e,b.g.Cb(c.u),0)}})})} +function Yk(b,c,d){function e(){return nl(b)}c.uri=d.uri;c.startTime=d.startTime;b.Bb=c.uri;b.v=new Mk;b.o=new si(c.u);null!=c.startTime&&b.o.m(c.startTime);b.W=new ji({ec:function(){return c.u.playbackRate},kd:function(b){c.u.playbackRate=b},Jd:function(b){c.u.currentTime+=b}});ul(b,b.b.streaming.rebufferingGoal);b.i.w(c.u,"playing",e);b.i.w(c.u,"pause",e);b.i.w(c.u,"ended",e);b.i.ha(c.u,"loadeddata",function(){b.v.b=Date.now()/1E3-d.nd});b.a.audioTracks&&(b.i.w(b.a.audioTracks,"addtrack",function(){return zl(b)}), +b.i.w(b.a.audioTracks,"removetrack",function(){return zl(b)}));if(b.a.textTracks){var f=b.a.textTracks;b.i.w(f,"addtrack",function(){return zl(b)});b.i.w(f,"removetrack",function(){return zl(b)})}c.u.src=c.uri;b.h=Cl;b.dispatchEvent(new I("streaming"));var g=new G;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(gl(b)):(b.i.ha(b.a,"loadeddata",function(){g.resolve()}),b.i.ha(b.a,"error",function(){g.reject(gl(b))}));return new H(g,function(){g.reject(new D(2,7,7001)); +return Promise.resolve()})}function kl(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(",")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})} +function wl(b){function c(b){var c="";b.video&&(c=nc(b.video.codecs)[0]);var d="";b.audio&&(d=nc(b.audio.codecs)[0]);return c+"-"+d}var d=b.c.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=Ge(d,b.b.preferredAudioChannelCount);var e=new Ib;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h=b.a.duration-.1;break;case xl:a:{var e;(e=b.a.ended)||(e=b.D,e=e.h?"ended"==e.h.readyState:!0);if(e)c=!0;else{if(b.c.presentationTimeline.V()&&(e=b.c.presentationTimeline.nb(),sd(b.a.buffered)>=e)){c=!0;break a}c=!1}}break;default:c=!1}var f=ud(b.a.buffered,b.a.currentTime);e=b.P;var g=c,h=e.b.get(e.a);c=e.a;f=g||f>=h?Wh:Xh;e.a=f;c!=f&&hl(b)})).La(.25)} +function vl(b){return new Gi(b.c,{Sa:function(){return b.o.h()},getBandwidthEstimate:function(){return b.l.getBandwidthEstimate()},I:b.D,rb:b.G,Md:b.df.bind(b),Ld:b.ue.bind(b),onError:b.Ka.bind(b),onEvent:function(c){return b.dispatchEvent(c)},hf:b.jf.bind(b),Yc:b.qf.bind(b)})}X.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Ck(b,c));var d=Gk(this.b,b,Ok(this));Dl(this);return d};X.prototype.configure=X.prototype.configure; +function Dl(b){b.m&&b.m.configure(b.b.manifest);b.g&&b.g.configure(b.b.drm);if(b.f){b.f.configure(b.b.streaming);try{b.c.periods.forEach(b.Fc.bind(b))}catch(g){b.Ka(g)}var c=Ki(b.f),d=Mi(b.f),e=Al(b);c=Je(c,d,e.variants);b.l&&c&&c.allowedByApplication&&c.allowedByKeySystem?Bl(b,e.variants):El(b,e)}if(b.D&&(e=b.b.textDisplayFactory,b.xc!=e)){c=new e;d=b.D;var f=d.g;d.g=c;f&&(c.setTextVisibility(f.isTextVisible()),f.destroy());d.a&&(d.a.c=c);b.xc=e;b.f&&(e=b.f,(c=e.b.get("text"))&&Si(e,c.stream,!0, +0,!0))}b.l&&(b.l.configure(b.b.abr),b.b.abr.enabled&&!b.ib?b.l.enable():b.l.disable(),Fl(b))}X.prototype.getConfiguration=function(){var b=Ok(this);Gk(b,this.b,Ok(this));return b};X.prototype.getConfiguration=X.prototype.getConfiguration;X.prototype.If=function(){for(var b in this.b)delete this.b[b];Gk(this.b,Ok(this),Ok(this));Dl(this)};X.prototype.resetConfiguration=X.prototype.If;X.prototype.Je=function(){return this.h};X.prototype.getLoadMode=X.prototype.Je;X.prototype.Ne=function(){return this.a}; +X.prototype.getMediaElement=X.prototype.Ne;X.prototype.Eb=function(){return this.G};X.prototype.getNetworkingEngine=X.prototype.Eb;X.prototype.bc=function(){return this.Bb};X.prototype.getAssetUri=X.prototype.bc;X.prototype.Me=function(){Ne("getManifestUri",'Please use "getAssetUri" instead.');return this.bc()};X.prototype.getManifestUri=X.prototype.Me;X.prototype.V=function(){return this.c?this.c.presentationTimeline.V():this.a&&this.a.src?Infinity==this.a.duration:!1};X.prototype.isLive=X.prototype.V; +X.prototype.Va=function(){return this.c?this.c.presentationTimeline.Va():!1};X.prototype.isInProgress=X.prototype.Va;X.prototype.af=function(){if(this.c){if(!this.c.periods.length)return!1;var b=this.c.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};X.prototype.isAudioOnly=X.prototype.af; +X.prototype.Kf=function(){if(this.c){var b=this.c.presentationTimeline;return{start:b.mb(),end:b.za()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};X.prototype.seekRange=X.prototype.Kf;X.prototype.keySystem=function(){return this.g?this.g.keySystem():""};X.prototype.keySystem=X.prototype.keySystem;X.prototype.drmInfo=function(){return this.g?this.g.a:null};X.prototype.drmInfo=X.prototype.drmInfo; +X.prototype.dc=function(){return this.g?this.g.dc():Infinity};X.prototype.getExpiration=X.prototype.dc;X.prototype.Nc=function(){return this.P?this.P.a==Xh:!1};X.prototype.isBuffering=X.prototype.Nc;X.prototype.Qe=function(){if(this.W){var b=this.W;b=b.f?0:b.c}else b=0;return b};X.prototype.getPlaybackRate=X.prototype.Qe;X.prototype.fg=function(b){0==b?ab("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.W.set(b),this.h==xl&&Ri(this.f,1=h.c.periods.length?h.c.presentationTimeline.Y():h.c.periods[x].startTime;A=w-m.startTime;if(Infinity==A)throw new D(1,4,4033);C=new Q(1,0,A,function(){return[b]},0,null);E={id:h.Id++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise), +findSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?C:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||"",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.Vb.add(E);m.textStreams.push(E);return u(l,Ni(h.f,E),2);case 2:return(F=Li(h.f,"text"))&&Kh(h.$,m,F),h.Vb["delete"](E),El(h,m),zl(h),l["return"](Ae(E))}})})}; +X.prototype.addTextTrack=X.prototype.addTextTrack;X.prototype.jd=function(b,c){this.Wb.width=b;this.Wb.height=c};X.prototype.setMaxHardwareResolution=X.prototype.jd;X.prototype.fd=function(){if(this.h==xl){var b=this.f;if(b.f)b=!1;else if(b.m)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Hb&&(d.Hb=!1,Qi(b,d,.1));b=!0}}else b=!1;return b};X.prototype.retryStreaming=X.prototype.fd;X.prototype.Ke=function(){return this.c};X.prototype.getManifest=X.prototype.Ke; +X.prototype.Le=function(){return this.m?this.m.constructor:null};X.prototype.getManifestParserFactory=X.prototype.Le;function ql(b,c,d,e){Lh(b.$,c).variant=d;b=b.v.c;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"variant",fromAdaptation:e,bandwidth:d.bandwidth}))}function Kl(b,c,d,e){Kh(b.$,c,d);b=b.v.c;b.b!=d&&(b.b=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"text",fromAdaptation:e,bandwidth:null}))} +function Ok(b){var c=Ek();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.V()&&d.includes(c.code)&&(c.severity=1,b.fd())};c.textDisplayFactory=function(){return new yk(b.a)};return c} +function ol(b,c){for(var d=0;dd&&(d+=Math.pow(2,32)),d=d.toString(16));return new D(2,3,3016,c,d,b.a.error.message)} +function ll(b,c){if(b.f){var d=Al(b),e=!1,f=Object.keys(c),g=1==f.length&&"00"==f[0];f.length&&d.variants.forEach(function(b){Ke(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?"00":d.keyId],b.allowedByKeySystem=!!d&&!bl.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Ki(b.f);var h=Mi(b.f);(f=Je(f,h,d.variants))&&!f.allowedByKeySystem&&El(b,d);e&&(zl(b),Bl(b,d.variants))}} +function ml(b,c,d){if(b.m&&b.m.onExpirationUpdated)b.m.onExpirationUpdated(c,d);b.dispatchEvent(new I("expirationupdated"))}function pl(b,c,d){0=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=Dm(f),k=new Map;h=r(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Fm(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&& +k.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}} +function Fm(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Gb();var k=g.id;Gm(g,f,function(f){var l=rg(f.c(),f.b,f.a,b.a.streaming.retryParameters);vj(c,k, +l,Yl(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});if(f=g.initSegmentReference)f=rg(f.c(),f.b,f.a,b.a.streaming.retryParameters),vj(c,k,f,.5*Zl(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h} +function Gm(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function pm(b){if(b.h.a)throw new D(2,9,7001);}function nm(){if(!km())throw new D(2,9,9E3);}function lm(b,c){return t(function e(){return y(e,function(e){switch(e.j){case 1:return b.g.push(c),za(e,2),u(e,c,4);case 4:return e["return"](e.s);case 2:Ea(e),Lb(b.g,c),Fa(e,0)}})})} +function Am(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}Z.deleteAll=function(){return t(function c(){var d;return y(c,function(c){switch(c.j){case 1:return d=new Fj,za(c,2),u(c,d.erase(),2);case 2:return Ea(c),u(c,d.destroy(),5);case 5:Fa(c,0)}})})}; +function zm(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.j){case 1:if(!e.drmInfo)return g["return"]();h=Lj(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:ym(e,!1),videoCapabilities:ym(e,!0)}});return u(g,pk(c,b,k),2);case 2:return l=g.s,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})), +0)}})})}function Dm(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function tm(b){if(0==b.periods.length)throw new D(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Hm(c.value)} +function Hm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}cl.offline=km;z("shaka.polyfill.installAll",function(){for(var b=0;b=c.a.length)return b;for(var d=[],e=0;ed.length)return null;var f=null,g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(b=0;b