/* @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 q;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;cf&&(f=Math.max(f+e,0));f=f}}); var Ma="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;cb||1342177279>>=1)c+=c;return d}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(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("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}});var Oa=this||self;function L(a,b){var c=a.split("."),d=Oa;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/* @license Shaka Player Copyright 2016 Google LLC SPDX-License-Identifier: Apache-2.0 */ function N(a,b){if(b)if(b instanceof Map)for(var c=r(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 Pa(a){var b=new N(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}N.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};N.prototype.stopImmediatePropagation=function(){this.g=!0};N.prototype.stopPropagation=function(){};L("shaka.util.FakeEvent",N);function Qa(){}function Ra(){}function Sa(){}function Ta(a){var b=Ga.apply(1,arguments);Wa.has(a)||(Wa.add(a),Sa.apply(Qa,ia(b)))}function Xa(){}function Ya(){}function $a(){}function ab(){}var Wa=new Set;if(window.console&&window.console.log.bind){var bb={},cb=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Sa=cb[2];Ra=cb[1]};function db(){this.g={}}q=db.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.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])};function eb(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function fb(){this.xa=new db;this.jd=this}fb.prototype.addEventListener=function(a,b){this.xa&&this.xa.push(a,b)};fb.prototype.removeEventListener=function(a,b){this.xa&&this.xa.remove(a,b)};fb.prototype.dispatchEvent=function(a){if(!this.xa)return!0;var b=this.xa.get(a.type)||[],c=this.xa.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.jd;a.currentTarget=this.jd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented}; fb.prototype.release=function(){this.xa=null};function gb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function hb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function ib(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function jb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c}function kb(a){for(var b=[],c=0;cb)throw Error("Bad port number "+b);a.mc=b}else a.mc=null}function qb(a,b,c){b instanceof sb?a.g=b:(c||(b=tb(b,yb)),a.g=new sb(b))} function rb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function tb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,zb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function zb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var ub=/[#\/\?@]/g,wb=/[#\?:]/g,vb=/[#\?]/g,yb=/[#\?@]/g,xb=/#/g;function sb(a){this.g=a||null} function Ab(a){if(!a.Ea&&(a.Ea={},a.bd=0,a.g))for(var b=a.g.split("&"),c=0;c=c[d]}if(!a)return"";var c=Mc(a);if(239==c[0]&&187==c[1]&&191==c[2])return Wc(c);if(254==c[0]&&255==c[1])return Xc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Xc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Xc(a,!1);if(0==c[1]&&0==c[3])return Xc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Wc(a);throw new P(2,2,2003);}function $c(a){var b=new TextEncoder;return Nc(b.encode(a))} function ad(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=r(lb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.ra,f.item.charCodeAt(0),b);return c}L("shaka.util.StringUtils",Vc);Vc.resetFromCharCode=function(){Yc.g=void 0};Vc.toUTF16=ad;Vc.toUTF8=$c;Vc.fromBytesAutoDetect=Zc;Vc.fromUTF16=Xc;Vc.fromUTF8=Wc; var Yc=new Uc(function(){function a(c){try{var d=new Uint8Array(c);return 0>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function md(a,b){a.l=!0;a.h=new Tc;a.m=[];a.j=[];a.i=[];var c=Mc(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new P(2,3,3018));return a.h};function nd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function od(a,b,c){a=nd(a,b);return Rc.get("muxjs")()&&kd(a)?ld(c,a):a}function pd(a){a=a.split(".");var b=a[0];a.pop();return b}function qd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function rd(a){this.j=null;this.i=a;this.l=this.C=0;this.m=Infinity;this.h=this.g=null;this.B="";this.A=new Map}function sd(a){return td[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}rd.prototype.destroy=function(){this.i=this.j=null;this.A.clear();return Promise.resolve()}; function ud(a,b,c,d){var e,f,g;return J(function(h){if(1==h.g)return z(h,Promise.resolve(),2);if(!a.j||!a.i)return h["return"]();if(null==c||null==d)return a.j.parseInit(Mc(b)),h["return"]();e={periodStart:a.C,segmentStart:c,segmentEnd:d};f=a.j.parseMedia(Mc(b),e);g=f.filter(function(k){return k.startTime>=a.l&&k.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));B(d)})};function vd(a,b,c){a.l=b;a.m=c}function wd(a,b,c){a.B=b;if(b=a.A.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)} function xd(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new pc(c.startTime,c.endTime,c.text)});return b}function yd(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())yd(a,d.value,c)} function zd(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(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,[]);yd(a,k,e);k.startTime>=a.l&&k.startTimec?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d} function Vd(a){var b="",c=Infinity;eb(a,function(d,e){for(var f=0,g=0,h=r(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0} function Yd(a,b){return J(function(c){if(1==c.g)return z(c,Zd(b,0=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c}; q.enable=function(){this.i=!0};q.disable=function(){this.i=!1};q.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.i)a:{if(!this.B){var c=this.h;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(Ae(this));c&&this.l(c)}};q.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate)};q.setVariants=function(a){this.j=a}; q.playbackRateChanged=function(a){this.A=a};q.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function Ae(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function ze(a,b){a&&(b=b.filter(function(c){return Xd(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}L("shaka.abr.SimpleAbrManager",ye); ye.prototype.configure=ye.prototype.configure;ye.prototype.playbackRateChanged=ye.prototype.playbackRateChanged;ye.prototype.setVariants=ye.prototype.setVariants;ye.prototype.getBandwidthEstimate=ye.prototype.getBandwidthEstimate;ye.prototype.segmentDownloaded=ye.prototype.segmentDownloaded;ye.prototype.disable=ye.prototype.disable;ye.prototype.enable=ye.prototype.enable;ye.prototype.chooseVariant=ye.prototype.chooseVariant;ye.prototype.init=ye.prototype.init;ye.prototype.stop=ye.prototype.stop;function Be(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}Be.prototype.add=function(a){return Ce(this.h,a)?(this.g.add(a),!0):!1}; function Ce(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return z(d,new Promise(function(e){(new Q(e)).R(c/1E3)}),2)}a.h*=a.m;B(d)})}function Pe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Re(a,b){this.promise=a;this.i=b;this.g=!1}function Se(a){return new Re(Promise.reject(a),function(){return Promise.resolve()})}function Te(){var a=Promise.reject(new P(2,7,7001));a["catch"](function(){});return new Re(a,function(){return Promise.resolve()})}function Ue(a){return new Re(Promise.resolve(a),function(){return Promise.resolve()})}function Ve(a){return new Re(a,function(){return a["catch"](function(){})})}Re.prototype.abort=function(){this.g=!0;return this.i()}; function We(a){return new Re(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Re.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this}; Re.prototype.oa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Xe(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Tc,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new Re(f,function(){return d()})}; function Xe(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()}}}L("shaka.util.AbortableOperation",Re);Re.prototype.chain=Re.prototype.oa;Re.prototype["finally"]=Re.prototype["finally"];Re.all=We;Re.prototype.abort=Re.prototype.abort;Re.notAbortable=Ve;Re.completed=Ue;Re.aborted=Te;Re.failed=Se;function Ye(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Ze(a){var b={},c;for(c in a)b[c]=a[c];return b};function $e(){this.g=[]}function af(a,b){a.g.push(b["finally"](function(){lc(a.g,b)}))}$e.prototype.destroy=function(){for(var a=[],b=r(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 bf(a,b,c){fb.call(this);this.i=!1;this.m=new $e;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}u(bf,fb);q=bf.prototype;q.ue=function(a){this.A=a};function cf(a,b,c,d){c=c||df;var e=ef[a];if(!e||c>=e.priority)ef[a]={priority:c,Pg:b,Rg:void 0===d?!1:d}}q.Sg=function(a){this.g.add(a)};q.ih=function(a){this.g["delete"](a)};q.Of=function(){this.g.clear()};q.Tg=function(a){this.h.add(a)};q.jh=function(a){this.h["delete"](a)};q.Pf=function(){this.h.clear()}; function ff(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}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();fb.prototype.release.call(this);return this.m.destroy()}; q.request=function(a,b){var c=this,d=new gf;if(this.i){var e=Promise.reject(new P(2,7,7001));e["catch"](function(){});return new hf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ye(b.retryParameters):Pe();b.uris=Ye(b.uris);e=jf(this,a,b);var f=e.oa(function(){return kf(c,a,b,new Oe(b.retryParameters,!1),0,null,d)}),g=f.oa(function(n){return lf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){}); var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.oa(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.Cg||!c.l||t.fromCache||a!=mf||c.l(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new hf(m.promise,function(){return m.abort()},d);af(this.m,e);return e}; function jf(a,b,c){var d=Ue(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Jd:e.Jd},f=a.next())e.Jd=f.value,d=d.oa(function(g){return function(){c.body&&(c.body=Nc(c.body));return g.Jd(b,c)}}(e));return d.oa(void 0,function(g){if(g instanceof P&&7001==g.code)throw g;throw new P(2,1,1006,g);})} function kf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new nb(c.uris[e]),k=h.Xa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),ob(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=ef[k])?k.Pg:null;if(!m)return Se(new P(2,1,1E3,h));var n=k.Rg,p=null,t=null,v=!1,y=!1,x;return Ve(Qe(d)).oa(function(){if(a.i)return Te();x=Date.now();var w=m(c.uris[e],c,b,function(A,E,G){p&&p.stop();t&&t.R(D/1E3);a.l&&b==mf&&(a.l(A,E),l=!0,g.g=G)},function(A){a.j&&a.j(A,c,b);y=!0}); if(!n)return w;var C=c.retryParameters.connectionTimeout;C&&(p=new Q(function(){v=!0;w.abort()}),p.R(C/1E3));var D=c.retryParameters.stallTimeout;D&&(t=new Q(function(){v=!0;w.abort()}));return w}).oa(function(w){p&&p.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);var C={response:w,Cg:l};!y&&a.j&&a.j(w.headers,c,b);return C},function(w){p&&p.stop();t&&t.stop();if(a.B){var C=null,D=0;w instanceof P&&(C=w,1001==w.code&&(D=w.data[1]));a.B(c,C,D,v)}if(a.i)return Te();v&&(w=new P(1,1,1003, c.uris[e],b));if(w instanceof P){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return C=(new Map).set("error",w),C=new N("retry",C),a.dispatchEvent(C),e=(e+1)%c.uris.length,kf(a,b,c,d,e,w,g)}throw w;})} function lf(a,b,c){var d=Ue(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Kd:e.Kd},f=a.next())e.Kd=f.value,d=d.oa(function(g){return function(){var h=c.response;h.data&&(h.data=Nc(h.data));return g.Kd(b,h)}}(e));return d.oa(function(){return c},function(g){var h=2;if(g instanceof P){if(7001==g.code)throw g;h=g.severity}throw new P(h,1,1007,g);})}L("shaka.net.NetworkingEngine",bf);bf.prototype.request=bf.prototype.request;bf.prototype.destroy=bf.prototype.destroy;bf.makeRequest=ff; bf.defaultRetryParameters=function(){return Pe()};bf.prototype.clearAllResponseFilters=bf.prototype.Pf;bf.prototype.unregisterResponseFilter=bf.prototype.jh;bf.prototype.registerResponseFilter=bf.prototype.Tg;bf.prototype.clearAllRequestFilters=bf.prototype.Of;bf.prototype.unregisterRequestFilter=bf.prototype.ih;bf.prototype.registerRequestFilter=bf.prototype.Sg;bf.unregisterScheme=function(a){delete ef[a]};bf.registerScheme=cf;bf.prototype.setForceHTTPS=bf.prototype.ue;function gf(){this.g=0} bf.NumBytesRemainingClass=gf;function hf(a,b,c){Re.call(this,a,b);this.h=c}u(hf,Re);bf.PendingRequest=hf;var mf=1;bf.RequestType={MANIFEST:0,SEGMENT:mf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var df=3;bf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:df};var ef={};function nf(a){this.g=!1;this.h=new Tc;this.i=a}nf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function of(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function pf(){this.g=new db}q=pf.prototype;q.release=function(){this.Sb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new qf(a,b,c,d),this.g.push(b,a))};q.Ia=function(a,b,c,d){function e(g){f.La(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.La=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.La(),this.g.remove(b,e))}}; q.Sb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.La();this.g.g={}}};L("shaka.util.EventManager",pf);pf.prototype.removeAll=pf.prototype.Sb;pf.prototype.unlisten=pf.prototype.La;pf.prototype.listenOnce=pf.prototype.Ia;pf.prototype.listen=pf.prototype.o;pf.prototype.release=pf.prototype.release;function qf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=rf(a,d);this.target.addEventListener(b,c,this.g)} qf.prototype.La=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function rf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return sf(a)?b:b.capture||!1} function sf(a){var b=tf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}tf=b}return b||!1}var tf=void 0;function uf(){}function vf(a){a=Zc(a);return(new nb(a)).$a}function wf(a,b,c){function d(h){Pc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Mc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=ad(b,!0):e=b;a=Zc(a);a=ad(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}L("shaka.util.FairPlayUtils",uf); uf.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Wc(b.data)}catch(f){return}var d=!1;c=c.trim();""===c.substr(0,5)&&""===c.substr(-6)&&(c=c.slice(5,-6),d=!0);try{var e=JSON.parse(c);e.ckc&&(c=e.ckc,d=!0);e.CkcMessage&&(c=e.CkcMessage,d=!0);e.License&&(c=e.License,d=!0)}catch(f){}d&&(b.data=Nc(ed(c)))}};uf.spcFairPlayRequest=function(a,b){if(2===a){var c=Mc(b.body);c=dd(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=$c("spc="+c)}}; uf.initDataTransform=wf;uf.defaultGetContentId=vf;uf.isFairPlaySupported=function(){var a;return J(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},F(b,2),z(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b["return"](!0);H(b);return b["return"](!1)})};function xf(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function yf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function zf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function Af(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.J=new Set;this.j=this.B=null;this.ea=this.$=!1;this.K=0;this.g=null;this.A=new pf;this.i=new Map;this.F=[];this.C=new Tc;this.h=null;this.m=function(d){c.C.reject(d);a.onError(d)};this.ha=new Map;this.xa=new Map;this.W=new Q(function(){return Bf(c)});this.N=!1;this.M=[];this.S=!1;this.aa=(new Q(function(){Cf(c)})).ka(b);this.C["catch"](function(){});this.l=new nf(function(){return Df(c)});this.X=!1;this.H=null}q=Af.prototype;q.destroy=function(){return this.l.destroy()}; function Df(a){return J(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.C.reject(),a.aa.stop(),a.aa=null,a.W.stop(),a.W=null,z(b,Ef(a),2);case 2:if(!a.j){b.D(3);break}F(b,4);return z(b,a.j.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:H(b);case 5:a.j=null;case 3:a.g=null,a.J.clear(),a.B=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.X=!1,a.H=null,B(b)}})}q.configure=function(a){this.h=a};function Ff(a,b,c){a.ea=!0;a.F=[];a.N=c;return Gf(a,b)} function Hf(a,b,c){a.F=c;a.N=0h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new P(2,6,6006,f.message,f,h))}})}function dg(a,b,c){"skd"==b&&(b=c.serverCertificate,c=vf(a),a=wf(a,c,b));return a} function Rf(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;J(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&dd(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=ff([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType), Xf(a.g.keySystem)&&eg(g),h=Date.now(),F(x,2),l=a.G.Qb.request(2,g),z(x,l.promise,4);case 4:k=x.h;wa(x,3);break;case 2:return m=H(x),n=new P(2,6,6007,m),a.m(n),d&&d.fb&&d.fb.reject(n),x["return"]();case 3:if(a.l.g)return x["return"]();a.K+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&dd(k.data);F(x,5);return z(x,c.update(k.data),7);case 7:wa(x,6);break;case 5:return p=H(x),t=new P(2,6,6008,p.message),a.m(t),d&&d.fb&&d.fb.reject(t),x["return"]();case 6:v=new N("drmsessionupdate"),a.G.onEvent(v),d&&(d.fb&& d.fb.resolve(),y=new Q(function(){d.loaded=!0;cg(a)&&a.C.resolve()}),y.R(ig)),B(x)}})} function eg(a){var b=Xc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=ed(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"} function bg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Xf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Pc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=gd(h);a.ha.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.fb&&(a.i["delete"](c),c.close()["catch"](function(){})); cg(a)&&(a.C.resolve(),a.W.R(jg))}function Bf(a){var b=a.ha,c=a.xa;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.m(new P(2,6,6014));a.G.pd(yf(c))} function kg(){var a,b,c,d,e,f,g,h;return J(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d, c],f=new Map,g=function(l){var m,n,p;return J(function(t){switch(t.g){case 1:F(t,2);if("org.w3.clearkey"===l&&Hd())throw Error("Unsupported keySystem");return z(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Fd("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),z(t,m.createMediaKeys(),5);case 5:wa(t,0);break;case 2:H(t),f.set(l,null),B(t)}})},h=a.map(function(l){return g(l)}),z(k,Promise.all(h),2)):k["return"](yf(f))})} function lg(a){var b;return J(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).R(mg)}),F(c,2),z(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);H(c);B(c)})} function Ef(a){var b;return J(function(c){b=Array.from(a.i.entries());a.i.clear();return z(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return J(function(g){if(1==g.g)return F(g,2),a.ea||a.F.includes(e.sessionId)||"persistent-license"!==f.type?z(g,lg(e),5):z(g,e.remove(),5);if(2!=g.g)return wa(g,0);H(g);B(g)})})),0)})} function ng(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Va:f.Va},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Va=[];f.Va=f.Va.concat(e.initData||[]);f.Va=f.Va.concat(h.initData||[]);f.Va=f.Va.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Va.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))): e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri, initData:f.Va,keyIds:g});break}}return c}function Mf(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Cf(a){a.i.forEach(function(b,c){var d=b.ce,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.ce=e)})}function cg(a){a=a.i.values();return hb(a,function(b){return b.loaded})} function Lf(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)} function ag(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Fa:g.Fa},h=a.next()){g.Fa=h.value;b.includes(g.Fa.licenseServerUri)||b.push(g.Fa.licenseServerUri);d.includes(g.Fa.serverCertificateUri)||d.push(g.Fa.serverCertificateUri);g.Fa.serverCertificate&&(c.some(function(m){return function(n){return Kc(n,m.Fa.serverCertificate)}}(g))||c.push(g.Fa.serverCertificate));if(g.Fa.initData){h={};for(var k=r(g.Fa.initData),l=k.next();!l.done;h={Tc:h.Tc},l=k.next())h.Tc=l.value,e.some(function(m){return function(n){var p= m.Tc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Kc(n.initData,p.initData)}}(h))||e.push(h.Tc)}if(g.Fa.keyIds)for(h=r(g.Fa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}} function Nf(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate|| (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var mg=1,ig=5,jg=.5,og=new Uc(function(){return Nc(new Uint8Array([0]))});function pg(){}function qg(a,b,c,d){var e,f,g,h;return J(function(k){if(1==k.g){if(d&&(e=rg[d.toLowerCase()]))return k["return"](e);if(f=sg(a))if(g=tg[f])return k["return"](g);return d?k.D(2):z(k,ug(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=rg[d]))return k["return"](h);throw new P(2,4,4E3,a);})} function ug(a,b,c){var d,e,f;return J(function(g){if(1==g.g)return d=ff([a],c),d.method="HEAD",z(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function sg(a){a=(new nb(a)).Ka.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}L("shaka.media.ManifestParser",pg);pg.unregisterParserByMime=function(a){delete rg[a]};pg.registerParserByMime=function(a,b){rg[a]=b}; pg.registerParserByExtension=function(a,b){tg[a]=b};var rg={},tg={};function vg(a,b){this.V=Pc(a);this.h=b==wg;this.g=0}q=vg.prototype;q.Da=function(){return this.gthis.V.byteLength)throw xg();var b=Mc(this.V,this.g,a);this.g+=a;return b}; q.skip=function(a){if(this.g+a>this.V.byteLength)throw xg();this.g+=a};q.$g=function(a){if(this.ga||a>this.V.byteLength)throw xg();this.g=a};q.Lc=function(){for(var a=this.g;this.Da()&&0!=this.V.getUint8(this.g);)this.g+=1;a=Mc(this.V,a,this.g-a);this.g+=1;return Wc(a)};function xg(){return new P(2,3,3E3)}L("shaka.util.DataViewReader",vg);vg.prototype.readTerminatedString=vg.prototype.Lc;vg.prototype.seek=vg.prototype.seek;vg.prototype.rewind=vg.prototype.$g; vg.prototype.skip=vg.prototype.skip;vg.prototype.readBytes=vg.prototype.Eb;vg.prototype.readUint64=vg.prototype.nc;vg.prototype.readInt32=vg.prototype.rf;vg.prototype.readUint32=vg.prototype.P;vg.prototype.readUint16=vg.prototype.ie;vg.prototype.readUint8=vg.prototype.ub;vg.prototype.getLength=vg.prototype.gg;vg.prototype.getPosition=vg.prototype.qa;vg.prototype.hasMoreData=vg.prototype.Da;var wg=1;vg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:wg};function yg(){this.i=[];this.h=[];this.g=!1}q=yg.prototype;q.box=function(a,b){var c=zg(a);this.i[c]=Ag;this.h[c]=b;return this};q.Y=function(a,b){var c=zg(a);this.i[c]=Bg;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new vg(a,0);for(this.g=!1;a.Da()&&!this.g;)this.rd(0,a,b,c)}; q.rd=function(a,b,c,d){var e=b.qa();if(d&&e+8>b.V.byteLength)this.g=!0;else{var f=b.P(),g=b.P(),h=!1;switch(f){case 0:f=b.V.byteLength-e;break;case 1:if(d&&b.qa()+8>b.V.byteLength){this.g=!0;return}f=b.nc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Bg){if(d&&b.qa()+4>b.V.byteLength){this.g=!0;return}m=b.P();l=m>>>24;m&=16777215}g=e+f;c&&g>b.V.byteLength&&(g=b.V.byteLength);d&&g>b.V.byteLength?this.g=!0:(d=g-b.qa(),b=0>24&255,a>>16&255,a>>8&255,a&255)}function Dg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}L("shaka.util.Mp4Parser",yg);yg.headerSize=Dg;yg.typeToString=Gg;yg.allData=Fg;yg.sampleDescription=Eg;yg.children=Cg;yg.prototype.parseNext=yg.prototype.rd;yg.prototype.parse=yg.prototype.parse;yg.prototype.stop=yg.prototype.stop; yg.prototype.fullBox=yg.prototype.Y;yg.prototype.box=yg.prototype.box;var Ag=0,Bg=1;function Hg(a){function b(){d=!0}function c(l){f.push(l);Cg(l)}a=Mc(a);var d=!1,e,f=[],g=[];(new yg).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).Y("stsd",function(l){e=l;f.push(l);Eg(l)}).Y("encv",b).Y("enca",b).Y("avc1",function(l){g.push({box:l,Jc:1701733238})}).Y("avc3",function(l){g.push({box:l,Jc:1701733238})}).Y("ac-3",function(l){g.push({box:l,Jc:1701733217})}).Y("ec-3",function(l){g.push({box:l,Jc:1701733217})}).Y("mp4a",function(l){g.push({box:l,Jc:1701733217})}).parse(a); if(d)return a;if(0==g.length||!e)throw ab(gd(a)),new P(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=Ig(a,e,k.box,f,k.Jc);return a} function Ig(a,b,c,d,e){var f=Jg.value(),g=a.subarray(c.start,c.start+c.size),h=Pc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Pc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Kg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Fd("Xbox One")?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,Kg(e,d.start,d.size+k.byteLength);k=Pc(e,b.start);b=Dg(b); a=k.getUint32(b);k.setUint32(b,a+1);return e}function Kg(a,b,c){a=Pc(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Jg=new Uc(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 Lg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;hc||127=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(ph())}function ph(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function qh(a,b){rh(a)&&(a.i[a.h][a.g]=new Og(b,a.C,a.A,a.m,a.B),a.g++)}function rh(a){var b=a.gthis.h.length)throw new P(2,2,3E3);this.g+=a};function zh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null} function Ah(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=yh(b).value;b=null;c=r(Bh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=sh(e,d,a.i)),oh(e);return b}if(137===c)for(b=yh(b).value,b=r(Bh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=yh(b).value;b=null;c=r(Bh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=sh(e,d,a.i)),e.l=!1;return b}if(139===c){c=yh(b).value; b=null;c=r(Bh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=sh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=yh(b).value,Ch(a,b,d);if(143===c)return d=Ch(a,255,d),Dh(a),d;if(144===c)b.skip(1),d=yh(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=yh(b).value,c=yh(b).value,b.skip(1),a.g&&(b=Eh((c&48)>>4,(c&12)>>2,c&3),a.g.B=Eh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=yh(b).value,b=yh(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=yh(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new mh;f.j=d;a.h[c]=f}d=yh(b).value;yh(b);yh(b);f=yh(b).value;var g=yh(b).value;b=yh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.H=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}function Bh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c} function Ch(a,b,c){var d=null;b=r(Bh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=sh(f,c,a.i));a.h[e]=null}return d}function Dh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Eh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Fh[a<<2|b<<1|c]} var Gh=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"]]),Fh="black blue green cyan red magenta yellow white".split(" ");function Hh(){this.h=[];this.g=[];this.i=new vh;this.l=0;this.B=new Map([["CC1",new ch(0,0)],["CC2",new ch(0,1)],["CC3",new ch(1,0)],["CC4",new ch(1,1)]]);this.A=this.m=0;this.j=new Map;Ih(this)}function Ih(a){a.m=0;a.A=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Qg(b.i),Qg(b.l),Qg(b.A)} function Jh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=r(a.h),e=d.next();!e.done;e=d.next())(e=Kh(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())wh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=Lh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c} function Kh(a,b){var c=b.type;if(16===(b.Qa&112)){var d=b.Qa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Qa&&255===b.ob||!b.Qa&&!b.ob||!Mh(b.Qa)||!Mh(b.ob))return 45<=++a.l&&Ih(a),null;a.l=0;b.Qa&=127;b.ob&=127;if(!b.Qa&&!b.ob)return null;d=null;if(16===(b.Qa&112))a:{var e=b.Qa;d=b.ob;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=lh[f]:7===f&&(h=!0); d=1===(d&1);if(c.h!==gh){f=c.g;if(c.h===fh&&e!==f.g){var k=1+e-f.h;bh(f,k,1+f.g-f.h,f.h);Sg(f,0,k-1);Sg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Tg(c.g,Ug,32),g=!1,e=lh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=kh[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))Tg(c.g,Wg,d);else if(18=== (e&246)&&32===(d&224))Tg(c.g,e&1?$g:Yg,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.ob){case 32:hh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=eh(c,2,d);break;case 38:e=eh(c,3,d);break;case 39:e=eh(c,4,d);break;case 40:Tg(c.g,Ug,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Qg(c.A);jh(c);break;case 43:jh(c);break;case 44:e=c.i;g=null;c.h!==gh&&(g=Rg(e,c.j,d));Sg(e,0,15);e=g;break;case 45:e=c.g;c.h!==fh?e=null:(g=Rg(e,c.j,d),h=e.g-e.h+1,bh(e,h-1,h,e.h),Sg(e, 0,h-1),Sg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Sg(c.l,0,15);break;case 47:e=null,c.h!==gh&&(e=Rg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,hh(c),c.j=d}d=e;break a}d=null}else e=b.ob,Tg(c.g,Ug,b.Qa),Tg(c.g,Ug,e);return d} function Lh(a,b){var c=[];try{for(;b.Da();){var d=yh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=yh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new zh(e));for(var g=a.j.get(e),h=b.qa();b.qa()-h=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!rh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=sh(t,p,g.i));if(t.h+1>=t.H){p=t;for(var v=0,y=1;15>y;y++, v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=ph()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=sh(t,p,g.i));t.i[t.h]=ph();t.g=0;break;case 12:t.isVisible()&&(e=sh(t,p,g.i)),oh(t),p=t,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Ah(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?qh(g.g,"\u266a"):qh(g.g, String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&qh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Gh.has(e)){var w=Gh.get(e);qh(g.g,w)}else qh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?qh(g.g,"_"):qh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof P&&3E3===C.code)Ta("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Mh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Nh(a,b){var c=null,d=null,e=a.P();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:e,Xe:c,Rf:d}}function Oh(a,b){return{Ne:1==b?a.nc():a.P()}}function Ph(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.P()}} function Qh(a,b,c){var d=a.P(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=r(kb(d)),g=f.next();!g.done;g=f.next())g={me:null,sampleSize:null,ud:null},c&256&&(g.me=a.P()),c&512&&(g.sampleSize=a.P()),c&1024&&a.skip(4),c&2048&&(g.ud=0==b?a.P():a.rf()),e.push(g);return{Ni:d,uf:e}};function Rh(){this.i=new Map;this.h=this.g=0} Rh.prototype.init=function(a){var b=this,c=[],d=[];(new yg).box("moov",Cg).box("mvex",Cg).Y("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.P();f=f.P();b.g=e;b.h=f}).box("trak",Cg).Y("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.P();c.push(e)}).box("mdia",Cg).Y("mdhd",function(e){e=Ph(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new P(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})}; Rh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new yg).box("moof",Cg).box("traf",Cg).Y("trun",function(k){f=Qh(k.reader,k.version,k.flags).uf}).Y("tfhd",function(k){k=Nh(k.reader,k.flags);d=k.Xe||b.g;e=k.Rf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).Y("tfdt",function(k){g=Oh(k.reader,k.version).Ne}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,y=p;for(t.length&&(y=t[0].sampleSize||p);k.Da();){var x=k.P();if(6== (k.ub()&31)){var w=0;t.length>v&&(w=t[v].ud||0);w=(l+w)/m;for(var C=[],D,A=k.Eb(x-1),E=D=0;Ev?l+(t[v].me||n):l+n,v++,y=t.length> v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function Sh(){this.h=new Rh;this.g=new Hh}Sh.prototype.init=function(a){this.h.init(a)}; function Th(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Mc(e.Og);if(0>2,m=f.ub(),n=f.ub();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Qa:m,ob:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Jh(a.g)} ;function Uh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Vh(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Wh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(Xh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c} function Yh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Xh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Xh(a){if(!a)return[];for(var b=[],c=r(kb(a.length)),d=c.next();!d.done;d=c.next())d=d.value,b.push({start:a.start(d),end:a.end(d)});return b};function Zh(a,b,c,d){var e=this;this.j=a;this.l=c;this.h={};this.J={};this.g=null;this.K=d||function(){};this.i={};this.A=new pf;this.B={};this.C=b;this.G=new Tc;this.m=$h(this,this.G);this.F=new nf(function(){return ai(e)});this.H=""}function $h(a,b){var c=new MediaSource;a.A.Ia(c,"sourceopen",function(){URL.revokeObjectURL(a.H);b.resolve()});a.H=bi(c);a.j.src=a.H;return c}q=Zh.prototype;q.destroy=function(){return this.F.destroy()}; function ai(a){var b,c,d,e,f,g,h,k;return J(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](Hb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.l&&b.push(a.l.destroy());for(k in a.B)b.push(a.B[k].destroy());return z(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.m=null;a.g=null;a.l=null;a.h={};a.B={};a.C=null;a.i= {};B(l)})} q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return J(function(n){if(1==n.g)return e=Qb,z(n,d.G,2);f={};g=r(a.keys());for(h=g.next();!h.done;f={Ha:f.Ha},h=g.next())f.Ha=h.value,k=a.get(f.Ha),l=nd(k.mimeType,k.codecs),f.Ha==e.ma?ci(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!jd(l,f.Ha)||(d.B[f.Ha]=new id,l=ld(f.Ha,l)),m=d.m.addSourceBuffer(l),c&&(m.mode=di),d.A.o(m,"error",function(p){return function(){d.i[p.Ha][0].p.reject(new P(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.A.o(m, "updateend",function(p){return function(){return ei(d,p.Ha)}}(f)),d.h[f.Ha]=m,d.J[f.Ha]=l,d.i[f.Ha]=[]);B(n)})};function ci(a,b,c){a.g||(a.g=new rd(a.l));a=a.g;"application/cea-608"!=b&&"application/cea-708"!=b&&(a.j=Jb(td[b]),a.j.setSequenceMode?a.j.setSequenceMode(c):Sa('Text parsers should have a "setSequenceMode" method!'))}function fi(a){return a.m?"ended"==a.m.readyState:!0} function gi(a,b){if(b==Pb)var c=a.g.g;else c=hi(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function ii(a,b){return b==Pb?a.g.h:Uh(hi(a,b))}function ji(a,b,c){if(b==Pb)return a=a.g,null==a.h||a.hC&&(C+=.001);a.h[b].timestampOffset=C;ei(a,b)}));if(b==k.ma)return z(w,ud(a.g,c,d,e),0);if(a.B[b])return z(w,md(a.B[b],c),10);if(f)return a.g||ci(a,"text/vtt",h||!1),null==d&&null==e?a.C.init(c):(m=Th(a.C,c),m.length&&(n=a.h[k.ib].timestampOffset,zd(a.g,m,d,e,n))),c=mi(a,c,d,b),z(w,li(a,b,function(){a.h[b].appendBuffer(c)}),0);c=mi(a,c,d,b);return z(w,li(a, b,function(){a.h[b].appendBuffer(c)}),0)}p=w.h;a.g||ci(a,"text/vtt",h||!1);p.metadata&&(t=a.h[b].timestampOffset,a.K(p.metadata,t,e));p.captions&&p.captions.length&&(v=a.h[k.ib].timestampOffset,y=xd(p.captions),zd(a.g,y,d,e,v));x=p.data;x=mi(a,x,d,b);return z(w,li(a,b,function(){a.h[b].appendBuffer(x)}),0)})}function ni(a,b){var c=ii(a,"video")||0;wd(a.g,b,c)}function oi(a){a.g&&wd(a.g,"",0)} q.remove=function(a,b,c){var d=this,e;return J(function(f){e=Qb;return a==e.ma?z(f,d.g.remove(b,c),0):z(f,li(d,a,function(){c<=b?ei(d,a):d.h[a].remove(b,c)}),0)})};function pi(a,b){var c;return J(function(d){c=Qb;return b==c.ma?a.g?z(d,a.g.remove(0,Infinity),0):d["return"]():z(d,li(a,b,function(){var e=a.m.duration;0>=e?ei(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return J(function(d){c=Qb;return a==c.ma?d["return"]():z(d,li(b,a,function(){b.j.currentTime-=.001;ei(b,a)}),0)})}; function qi(a,b,c,d,e,f){var g;return J(function(h){g=Qb;return b==g.ma?(f||(a.g.C=c),vd(a.g,d,e),h["return"]()):z(h,Promise.all([li(a,b,function(){var k=a.h[b].appendWindowStart,l=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=k;a.h[b].appendWindowEnd=l;ei(a,b)}),f?Promise.resolve():li(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;ei(a,b)}),li(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;ei(a,b)})]),0)})} q.endOfStream=function(a){var b=this;return J(function(c){return z(c,ri(b,function(){fi(b)||(a?b.m.endOfStream(a):b.m.endOfStream())}),0)})};q.eb=function(a){var b=this;return J(function(c){return z(c,ri(b,function(){b.m.duration=a}),0)})};q.getDuration=function(){return this.m.duration};function ei(a,b){var c=a.i[b][0];c&&(c.p.resolve(),si(a,b))}function li(a,b,c){of(a.F);c={start:c,p:new Tc};a.i[b].push(c);1==a.i[b].length&&ti(a,b);return c.p} function ri(a,b){var c,d,e,f,g,h;return J(function(k){switch(k.g){case 1:of(a.F);c=[];d={};for(e in a.h)d.uc=new Tc,f={start:function(l){return function(){return l.uc.resolve()}}(d),p:d.uc},a.i[e].push(f),c.push(d.uc),1==a.i[e].length&&f.start(),d={uc:d.uc};F(k,2);return z(k,Promise.all(c),4);case 4:wa(k,3);break;case 2:throw g=H(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.h)si(a,h)}B(k)}})}function si(a,b){a.i[b].shift();ti(a,b)} function ti(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d)),si(a,b)}}function mi(a,b,c,d){var e=a.j.mediaKeys;null==c&&e&&(Ed()||Fd("Xbox One"))&&"mp4"==a.J[d].split(";")[0].split("/")[1]&&(b=Hg(b));return b}var bi=window.URL.createObjectURL,di="sequence",ui=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function vi(a,b,c,d){this.Ra=a;this.Ua=b;this.Ca=c;this.Xd=void 0===d?null:d}vi.prototype.Fc=function(){return this.Ua};vi.prototype.Bc=function(){return this.Ca};function wi(a,b){return a&&b?a.Fc()==b.Fc()&&a.Bc()==b.Bc()&&oc(a.Ra(),b.Ra()):a==b}L("shaka.media.InitSegmentReference",vi);vi.prototype.getEndByte=vi.prototype.Bc;vi.prototype.getStartByte=vi.prototype.Fc; function xi(a,b,c,d,e,f,g,h,k,l,m,n){l=void 0===l?[]:l;this.startTime=a;this.l=this.endTime=b;this.j=c;this.Ua=d;this.Ca=e;this.g=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.i=void 0===n?null:n}q=xi.prototype;q.Ra=function(){return this.j()};q.sg=function(){return this.startTime};q.eg=function(){return this.endTime};q.Fc=function(){return this.Ua};q.Bc=function(){return this.Ca};q.zg=function(){return this.tilesLayout}; q.yg=function(){return this.i};L("shaka.media.SegmentReference",xi);xi.prototype.getTileDuration=xi.prototype.yg;xi.prototype.getTilesLayout=xi.prototype.zg;xi.prototype.getEndByte=xi.prototype.Bc;xi.prototype.getStartByte=xi.prototype.Fc;xi.prototype.getEndTime=xi.prototype.eg;xi.prototype.getStartTime=xi.prototype.sg;xi.prototype.getUris=xi.prototype.Ra;function R(a,b,c){this.j=a;this.sd=b;this.m=this.l=Infinity;this.g=1;this.h=this.i=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0}q=R.prototype;q.getDuration=function(){return this.l};q.mg=function(){return this.g};q.eb=function(a){this.l=a};q.qg=function(){return this.j};q.xf=function(a){this.A=a};q.Pc=function(a){this.B=a};q.ye=function(a){this.m=a};q.gh=function(a){this.sd=a};q.dg=function(){return this.sd}; q.kc=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.ae(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.j&&this.F&&(this.j=(Date.now()+this.A)/1E3-this.h-this.g)}};q.ae=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.$d=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.i&&(this.i+=a);null!=this.h&&(this.h+=a)};q.T=function(){return Infinity==this.l&&!this.B}; q.Nb=function(){return Infinity!=this.l&&!this.B};q.qb=function(){return Math.max(this.C,this.Kb()-this.m)};q.Af=function(a){this.C=a};q.Kb=function(){return this.T()||this.Nb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.j)+this.G,this.l):this.h||this.l};q.Ec=function(a){var b=Math.max(this.i,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Kb()-this.m+a,this.pb()))};q.ec=function(){return this.Ec(0)}; q.pb=function(){return Math.max(0,this.Kb()-(this.T()||this.Nb()?this.sd:0))};q.Ef=function(){return null==this.j||null!=this.h&&this.F?!1:!0};q.wf=function(a){this.G=a};L("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.wf;R.prototype.usingPresentationStartTime=R.prototype.Ef;R.prototype.getSeekRangeEnd=R.prototype.pb;R.prototype.getSeekRangeStart=R.prototype.ec;R.prototype.getSafeSeekRangeStart=R.prototype.Ec;R.prototype.getSegmentAvailabilityEnd=R.prototype.Kb; R.prototype.setUserSeekStart=R.prototype.Af;R.prototype.getSegmentAvailabilityStart=R.prototype.qb;R.prototype.isInProgress=R.prototype.Nb;R.prototype.isLive=R.prototype.T;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.$d;R.prototype.notifyMinSegmentStartTime=R.prototype.ae;R.prototype.notifySegments=R.prototype.kc;R.prototype.getDelay=R.prototype.dg;R.prototype.setDelay=R.prototype.gh;R.prototype.setSegmentAvailabilityDuration=R.prototype.ye; R.prototype.setStatic=R.prototype.Pc;R.prototype.setClockOffset=R.prototype.xf;R.prototype.getPresentationStartTime=R.prototype.qg;R.prototype.setDuration=R.prototype.eb;R.prototype.getMaxSegmentDuration=R.prototype.mg;R.prototype.getDuration=R.prototype.getDuration;function yi(a,b){this.j=a;this.m=zi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}yi.prototype.release=function(){this.j=null;this.i=function(){}};function Ai(a,b){a.i=b}function Bi(a){this.g=a}function zi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Xh(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(bc.end-.5)){b=!0;break a}b=!1}return b};function Ci(a,b,c,d,e){var f=this;this.g=a;this.F=b;this.l=c;this.C=e;this.i=new pf;this.B=!1;this.G=a.readyState;this.j=!1;this.h=d;this.A=!1;this.i.o(a,"waiting",function(){return Di(f)});this.m=(new Q(function(){Di(f)})).ka(.25)}Ci.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.F=this.C=null};Ci.prototype.ee=function(){this.A=!0;Di(this)}; function Di(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.B)return}else a.B=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.G&&(a.j=!1,a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=zi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.l.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=Yh(b,g,a.l.gapDetectionThreshold);if(!(null== c||0==c&&!a.A||(d=b.start(c),d>=a.F.pb()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new N("largegap",g),g.cancelable=!0,a.C(g),a.l.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Ei(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Fi.value().get(b),c.Ia(a,b,d))}var Fi=new Uc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Gi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new pf;this.i=new Hi(a);Ei(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ii(d,d.j)})}Gi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Ji(a){return a.m?a.g.currentTime:a.j}function Ki(a,b){0Math.abs(a.g.currentTime-b)?Mi(a):(a.h.Ia(a.g,"seeking",function(){Mi(a)}),Li(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Mi(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function Hi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Hi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null}; function Li(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function Ni(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.Ia(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new pf;Ei(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Ni.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Ni.prototype.A=function(a){this.h=this.j?this.h:a};Ni.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Ni.prototype.G=function(){}; function Oi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.H=b.minBufferTime||0;this.l=c;this.F=e;this.C=null;this.j=new Ci(a,b.presentationTimeline,c,Pi(a,c),f);this.h=new Gi(a,function(){a:{var h=g.j;h.B=!0;h.A=!1;h.j=!1;var k=Ji(g.h);h=Qi(g,k);if(.001l-k&&(k= l-3);ha.g.getDuration()?a.g.ec():a.g.pb():0>b&&(b=a.g.pb()+b);return Ti(a,Si(a,b))}Oi.prototype.G=function(){this.j.ee()};function Ti(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Qi(a,b){var c=Math.max(a.H,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.ec(),f=a.g.pb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Ec(c),k=a.g.Ec(d);c=a.g.Ec(c+d);return b>=g?Ti(a,b):b>f?f:b=h||Vh(a.i.buffered,b)?b:c} function Si(a,b){var c=a.g.ec();if(bc?c:b}function Pi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new yi(new Bi(a),b.stallThreshold);Ai(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Wi(a){this.O=a;this.g=null;this.h=0;this.i=!1}q=Wi.prototype;q.destroy=function(){Cb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.O=[],this.g&&this.g.stop(),this.g=null)};q.Ig=function(){this.i=!0}; q.find=function(a){for(var b=this.O.length-1,c=b;0<=c;--c){var d=this.O[c],e=c=d.startTime&&aa||a>=this.O.length?null:this.O[a]};q.offset=function(a){if(!this.i)for(var b=r(this.O),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a}; q.ic=function(a){!this.i&&a.length&&(this.O=this.O.filter(function(b){return b.startTimeb&&(0==c.O.length||d.endTime>c.O[0].startTime)});this.ic(a);this.Ib(b)};q.Ib=function(a){if(!this.i){var b=this.O.length;this.O=this.O.filter(function(c){return c.endTime>a});this.h+=b-this.O.length}}; q.Ab=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.O.length;)if(this.O[this.O.length-1].startTime>=b)this.O.pop();else break;for(;this.O.length;)if(this.O[0].endTime<=a)this.O.shift(),c||this.h++;else break;0!=this.O.length&&(a=this.O[this.O.length-1],this.O[this.O.length-1]=new xi(a.startTime,b,a.j,a.Ua,a.Ca,a.g,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.i))}}; q.wd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.O.push.apply(c.O,ia(d)):(c.g.stop(),c.g=null)}),this.g.ka(a))};Wi.prototype[Symbol.iterator]=function(){return this.cc(0)};Wi.prototype.cc=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0=f.startTime&&a=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)} dj.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Kc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Xd;break a}}d=null}if(e=d)e=c.Ve,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width); if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0=f[0].start&&e=e?!1:!0})}else b.Kc=[]};function hj(a){fb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTimed.endTime?mj:jj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Xb==e&&h.Wb==f&&h.Mb(d,b)}}; function kj(a,b,c,d){b=new N(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var lj=1,jj=2,mj=3;function nj(a,b,c,d,e){a=ff(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function oj(a,b){var c=this;this.g=b;this.m=a;this.h=null;this.C=1;this.A=this.l=null;this.i=new Map;this.F=!1;this.G=null;this.B=!1;this.j=new nf(function(){return pj(c)})}oj.prototype.destroy=function(){return this.j.destroy()};function pj(a){var b,c,d,e;return J(function(f){if(1==f.g){b=[];c=r(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,qj(e),b.push(rj(e));return z(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.h=null;B(f)})} oj.prototype.configure=function(a){this.h=a;this.G=new Oe({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};oj.prototype.start=function(){var a=this;return J(function(b){if(1==b.g)return z(b,sj(a),2);of(a.j);a.F=!0;B(b)})}; function tj(a,b){var c,d,e,f,g,h;J(function(k){switch(k.g){case 1:return c=Qb,F(k,2),z(k,pi(a.g.U,c.ma),4);case 4:wa(k,3);break;case 2:if(d=H(k),a.g)a.g.onError(d);case 3:e=nd(b.mimeType,b.codecs);ci(a.g.U,e,a.m.sequenceMode);f=a.g.U.l;if(g=f.isTextVisible()||a.h.alwaysStreamText)h=uj(b),a.i.set(c.ma,h),vj(a,h,0);B(k)}})}function wj(a){var b=a.i.get(Pb);b&&(qj(b),rj(b)["catch"](function(){}),a.i["delete"](Pb));a.A=null} function xj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Tb&&(yj(a,e,!1,0,!1),c.Tb=d)}else if(d=c.Tb)c.Tb=null,yj(a,d,!0,0,!1)}}function zj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.F&&(b.video&&yj(a,b.video,c,d,e),b.audio&&yj(a,b.audio,c,d,e))}function Aj(a,b){a.A=b;a.F&&yj(a,b,!0,0,!1)} function yj(a,b,c,d,e){var f=a.i.get(b.type);f||b.type!=Pb?f&&(f.Tb&&(b.trickModeVideo?(f.Tb=b,b=b.trickModeVideo):f.Tb=null),f.stream!=b||e)&&(b.type==Pb&&ci(a.g.U,nd(b.mimeType,b.codecs),a.m.sequenceMode),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.va=null,c&&(f.zc?f.yd=!0:f.cb?(f.Vb=!0,f.$c=d,f.yd=!0):(qj(f),Bj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),Cj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):tj(a,b)} function Cj(a,b){var c,d;return J(function(e){if(1==e.g){if(!b.Ja)return e["return"]();c=b.stream;d=b.Ja;return c.segmentIndex?e.D(2):z(e,c.createSegmentIndex(),2)}if(b.Ja!=d||b.stream!=c)return e["return"]();var f=a.g.gd();var g=ii(a.g.U,b.type),h=b.stream.segmentIndex.find(b.Sa?b.Sa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ca?k.Ca-k.Ua:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.g)&&(h+=(k.Ca?k.Ca-k.Ua:null)||0),k=a.g.getBandwidthEstimate(), f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.h.rebufferingGoal)||b.Ja.h.g>h?!0:!1):f=!1;f&&b.Ja.abort();B(e)})} oj.prototype.Mc=function(){for(var a=this.g.gd(),b=this.h.smallGapLimit,c=r(this.i.keys()),d=c.next();!d.done;d=c.next()){var e=d.value;d=this.i.get(e);d.va=null;var f=this.g.U;e==Pb?(f=f.g,f=null==f.g||null==f.h?!1:a>=f.g&&ap?a.g.U.eb(p):a.g.U.eb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k), a.i.has(k)||(m=uj(l),a.i.set(k,m),vj(a,m,0));B(n)})}function uj(a){return{stream:a,type:a.type,va:null,Sa:null,md:null,Vd:null,Ud:null,Td:null,Tb:null,endOfStream:!1,cb:!1,gb:null,Vb:!1,$c:0,yd:!1,zc:!1,Mc:!0,je:!1,Gc:!1,Ja:null}} function Ej(a,b){var c,d,e,f,g;return J(function(h){switch(h.g){case 1:of(a.j);if(b.cb||null==b.gb||b.zc)return h["return"]();b.gb=null;if(!b.Vb){h.D(2);break}return z(h,Bj(a,b,b.yd,b.$c),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return z(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.gb&&vj(a,b,0),h["return"]();case 4:F(h,6);d=Fj(a,b);null!=d&&(vj(a,b,d),b.Gc=!1);wa(h,7);break;case 6:return e= H(h),z(h,Gj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return z(h,a.g.U.endOfStream(),10);case 10:of(a.j),g=a.g.U.getDuration(),0!=g&&ga.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(Pb))&&Hj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.h.updateIntervalSeconds/2;e=ii(a.g.U,b.type);e=Ij(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=Infinity; var g=Array.from(a.i.values());g=r(g);for(var h=g.next();!h.done;h=g.next())h=h.value,Hj(h)||h.va&&!h.va.current()||(f=Math.min(f,h.Sa?h.Sa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.h.updateIntervalSeconds;Jj(a,b,c,e)["catch"](function(){});return null} function Ij(a,b,c,d){if(b.va)return b.va.current();if(b.Sa||d)return b.va=b.stream.segmentIndex.cc(b.Sa?b.Sa.endTime:d),b.va&&b.va.next().value;a=a.h.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.va=b.stream.segmentIndex.cc(d),e=b.va&&b.va.next().value);e||(b.va=b.stream.segmentIndex.cc(c),e=b.va&&b.va.next().value);return e} function Jj(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y;return J(function(x){switch(x.g){case 1:return e=Qb,f=b.stream,g=b.va,b.cb=!0,F(x,2),z(x,Kj(a,b,d),4);case 4:of(a.j);if(a.B)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.h.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(w){var C,D,A;return J(function(E){of(a.j);if(a.B)return E["return"]();n=Lj(n,w);C=!1;D=0;(new yg).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return E.D(0); A=n.subarray(0,D);n=n.subarray(D);return z(E,Mj(a,b,c,f,d,A),0)})},z(x,Nj(a,b,d,p),6);l=Nj(a,b,d);return z(x,l,7);case 7:return m=x.h,of(a.j),a.B?x["return"]():b.Vb?(b.cb=!1,vj(a,b,0),x["return"]()):z(x,Mj(a,b,c,f,d,m),6);case 6:of(a.j);if(a.B)return x["return"]();b.Sa=d;g.next();b.cb=!1;b.je=!1;t=a.g.U.Bb();v=t[b.type];$a(JSON.stringify(v));b.Vb||a.g.ee();vj(a,b,0);wa(x,0);break;case 2:y=H(x);of(a.j,y);if(a.B)return x["return"]();b.cb=!1;if(7001==y.code)b.cb=!1,b.gb=null,vj(a,b,0),x.D(0);else if(b.type== e.ma&&a.h.ignoreTextStreamFailures)a.i["delete"](e.ma),x.D(0);else if(3017==y.code)Oj(a,b,y),x.D(0);else if(1001==y.code&&y.data&&404==y.data[1])b.cb=!1,b.gb=null,vj(a,b,1),x.D(0);else return b.Gc=!0,y.severity=2,z(x,Gj(a,y),0)}})}function Lj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c} function Oj(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.je})){var d=Math.round(100*a.C);if(20=g?h["return"]():z(h,a.g.U.remove(b.type,e,e+g),2)}of(a.j);B(h)})}function Hj(a){return a&&a.type==Pb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)} function Nj(a,b,c,d){var e,f,g,h,k;return J(function(l){if(1==l.g)return e=mf,f=nj(c.Ra(),c.Ua,c.Ca,a.h.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof vi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Qb.request(e,f),b.Ja=h,z(l,h.promise,2);k=l.h;b.Ja=null;return l["return"](k.data)})} function Bj(a,b,c,d){var e,f;return J(function(g){if(1==g.g)return b.Vb=!1,b.yd=!1,b.$c=0,b.zc=!0,b.Sa=null,b.md=null,b.va=null,d?(e=a.g.gd(),f=a.g.U.getDuration(),z(g,a.g.U.remove(b.type,e+d,f),3)):z(g,pi(a.g.U,b.type),4);if(3!=g.g)return of(a.j),c?z(g,a.g.U.flush(b.type),3):g.D(3);of(a.j);b.zc=!1;b.endOfStream=!1;vj(a,b,0);B(g)})} function vj(a,b,c){var d=b.type;if(d!=Pb||a.i.has(d))b.gb=(new Ad(function(){var e;return J(function(f){if(1==f.g)return F(f,2),z(f,Ej(a,b),4);if(2!=f.g)return wa(f,0);e=H(f);if(a.g)a.g.onError(e);B(f)})})).R(c)}function qj(a){null!=a.gb&&(a.gb.stop(),a.gb=null)}function rj(a){return J(function(b){return a.Ja?z(b,a.Ja.abort(),0):b.D(0)})}function Gj(a,b){return J(function(c){if(1==c.g)return z(c,Qe(a.G),2);of(a.j);a.g.onError(b);b.handled||a.h.failureCallback(b);B(c)})};function Rj(a,b){var c=Sj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Tj(d)});this.B=new nf(function(){return Uj(d)})}Rj.prototype.destroy=function(){return this.B.destroy()};function Uj(a){var b,c,d;return J(function(e){if(1==e.g)return a.h&&a.h.abort(),Vj(a),z(e,a.C,2);a.g&&a.g.bb.Rb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.bb.Rb();a.g=null;a.m=[];a.j=null;B(e)})} function Wj(a,b){var c={lc:function(){},od:function(){},Rb:function(){},onError:function(){},qd:function(){},Mi:function(){}};a.m.push({create:b,bb:c});a.h&&a.h.abort();Vj(a);return c} function Tj(a){return J(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Lb)var c=!1;else{a.g&&(a.g.bb.Rb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.bb.lc(),a.g={node:d.node,payload:d.payload,Lb:d.Lb,bb:c.bb}):c.bb.qd();c=!0}c?c=Promise.resolve():a.g?c=Xj(a):(a.j.Lg(a.i),a.A=new Tc,c=a.A);b=z(b,c,1)}return b})} function Xj(a){var b,c;return J(function(d){switch(d.g){case 1:return a.i=a.j.og(a.i,a.l,a.g.node,a.g.payload),F(d,2),a.h=a.j.Sf(a.i,a.l,a.g.payload),z(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.bb.od(),a.g=null);wa(d,0);break;case 2:b=H(d);if(7001==b.code)a.g.bb.Rb();else a.g.bb.onError(b);a.g=null;a.h=null;c=a;return z(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,B(d)}})}function Vj(a){a.A&&(a.A.resolve(),a.A=null)};function Yj(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Yj.prototype;q.remove=function(a,b){if(!this.g)return!1;Zj(this.g,function(c){return c.startTimea});return!0}; q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+""},"");return g.lineBreak||g.spacer?(g.spacer&&Cb("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h= g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=r(c);for(var f=c.next();!f.done;e={Yb:e.Yb},f=c.next())e.Yb=f.value,a.some(function(g){return function(h){return h.startTime==g.Yb.startTime&&h.endTime==g.Yb.endTime&&h.text==g.Yb.payload?!0:!1}}(e))||(f=ak(e.Yb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)- d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Zj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"}; function ak(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b} function Zj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}L("shaka.text.SimpleTextDisplayer",Yj);Yj.prototype.setTextVisibility=Yj.prototype.setTextVisibility;Yj.prototype.isTextVisible=Yj.prototype.isTextVisible;Yj.prototype.destroy=Yj.prototype.destroy;Yj.prototype.append=Yj.prototype.append;Yj.prototype.remove=Yj.prototype.remove;function bk(){}function S(a){return document.createElement(a)}function ck(){return document.createElement("button")}function dk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}L("shaka.util.Dom",bk);bk.removeAllChildren=dk;function ek(a,b){var c=this;this.j=!1;this.i=[];this.C=a;this.m=b;this.g=S("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.m.appendChild(this.g);this.B=(new Q(function(){fk(c)})).ka(.25);this.h=new Map;this.A=new pf;this.A.o(document,"fullscreenchange",function(){fk(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){fk(c, !0)}),this.l.observe(this.g))}q=ek.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Qc:c.Qc},d=a.next())c.Qc=d.value,b.some(function(e){return function(f){return Ac(f,e.Qc)}}(c))||this.i.push(c.Qc);fk(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.B&&this.B.stop();this.h.clear();this.A&&(this.A.release(),this.A=null);this.l&&(this.l.disconnect(),this.l=null)}; q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime=b});fk(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a}; function gk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Ff:null;l&&(g.push(l.Ue),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(hk(a,k,e),l=a.h.get(k),n=l.Ff,f=!0));0h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,t){return p+"<"+t+">"}, "");k=k.reduceRight(function(p,t){return p+""},"");return h.lineBreak||h.spacer?(h.spacer&&Cb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left"); break;case "right":k.push("align:right");break;case tc:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}L("shaka.text.WebVttGenerator",function(){});function mk(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function nk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.T()?ok:pk};d.ot=qk(c);var e=d.ot===rk||d.ot===sk||d.ot===tk||d.ot===uk;e&&(d.bl=vk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==uk&&(d.tb=wk(a,d.ot)/1E3);xk(a,b,d)}}catch(f){Ta("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}} function yk(a,b,c){try{if(!a.g.enabled)return b;var d=zk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=tk;break a;case "application/x-mpegurl":e=Ak;break a}e=void 0}d.ot=e;d.su=!0;var f=Bk(d);return Ck(b,f)}catch(g){return Ta("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Dk(a,b){try{if(!a.g.enabled)return b;var c=zk(a);c.ot=Ek;c.su=!0;var d=Bk(c);return Ck(b,d)}catch(e){return Ta("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),b}} function zk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}function xk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,zk(a));c.pr=a.h.Cb();var e=c.ot===rk||c.ot===tk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Fk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Bk(c);f&&(b.uris=b.uris.map(function(g){return Ck(g,f)}))}}} function qk(a){var b=a.type;if(a.init)return Gk;if("video"==b)return a.codecs.includes(",")?tk:rk;if("audio"==b)return sk;if("text"==b)return"application/mp4"===a.mimeType?uk:Ek}function vk(a,b){var c=a.h.Bb()[b];if(!c.length)return NaN;var d=a.h.cg();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN} function wk(a,b){var c=a.h.ab();if(!c.length)return NaN;var d=c[0];c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case rk:return d.videoBandwidth||NaN;case sk:return d.audioBandwidth||NaN;default:return d.bandwidth}} function Bk(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=r(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 Fk(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,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(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;ae)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}L("shaka.util.ConfigUtils",Hk);Hk.convertToConfigObject=Jk;Hk.mergeConfigObjects=Ik;function Kk(){} function Lk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Pe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:dg,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Pe(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1, ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"}, manifestPreprocessor:function(g){return g}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},d={retryParameters:Pe(),failureCallback:function(g){return[g]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1, stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||Ed()||Fd("CrKey"))d.gapDetectionThreshold=.5;if(Fd("Web0S")||Ed()||Fd("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return J(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return J(function(k){if(1== k.g)return navigator.storage&&navigator.storage.estimate?z(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new ye},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0, maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0, maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return J(function(h){return h["return"](Mk(g,f.preferredAudioLanguage))})};return f} function Nk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return Ik(a,b,c||Lk(),d,"")} function Mk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=bc(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Ub(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Pb&&"image"!=g.type||c.push(g);return c}L("shaka.util.PlayerConfiguration",Kk);Kk.mergeConfigObjects=Nk;function Ok(){this.g=null;this.h=[]}function Pk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Qk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c} function Rk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(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 Sk(){this.i=this.h=null;this.g=[]}function Tk(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 Uk(){this.A=this.B=this.H=this.F=this.m=this.j=this.G=this.l=this.i=this.J=this.K=this.M=this.C=this.N=NaN;this.g=new Ok;this.h=new Sk};function T(a,b){fb.call(this);var c=this;this.l=Vk;this.Hb=this.g=null;this.ea=!1;this.m=new pf;this.Wd=this.B=this.jb=this.i=this.kd=this.K=this.j=this.ha=this.W=this.ld=this.M=this.cd=this.J=this.Ya=this.G=this.N=this.A=this.H=null;this.Ge=1E9;this.h=Wk(this);this.le={width:Infinity,height:Infinity};this.C=null;this.Ma=new Ge(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Na=this.h.preferredTextLanguage;this.hb=this.h.preferredTextRole;this.kb= this.h.preferForcedSubs;this.Zd=[];this.mb=null;b&&b(this);this.H=Xk(this);this.H.ue(this.h.streaming.forceHTTPS);this.F=null;Yk&&(this.F=Jb(Yk));this.m.o(window,"online",function(){c.ke()});this.S={name:"detach"};this.X={name:"attach"};this.aa={name:"unload"};this.Je={name:"manifest-parser"};this.ge={name:"manifest"};this.Oa={name:"media-source"};this.be={name:"drm-engine"};this.$={name:"load"};this.Le={name:"src-equals-drm-engine"};this.Za={name:"src-equals"};var d=new Map;d.set(this.X,function(e, f){return Ve(Zk(c,e,f))});d.set(this.S,function(e){e.I&&(c.m.La(e.I,"error"),e.I=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Ve(e)});d.set(this.aa,function(e){return Ve($k(c,e))});d.set(this.Oa,function(e){e=al(c,e);return Ve(e)});d.set(this.Je,function(e,f){var g=bl(c,e,f);return Ve(g)});d.set(this.ge,function(e){return cl(c,e)});d.set(this.be,function(e){e=dl(c,e);return Ve(e)});d.set(this.$,function(e,f){return Ve(el(c,e,f))});d.set(this.Le,function(e,f){var g=fl(c,e,f);return Ve(g)}); d.set(this.Za,function(e,f){return gl(c,e,f)});this.wa=new Rj(this.S,{og:function(e,f,g,h){var k=null;e==c.S&&(k=g==c.S?c.S:c.X);e==c.X&&(k=g==c.S||f.I!=h.I?c.S:g==c.X?c.X:g==c.Oa||g==c.$?c.Oa:g==c.Za?c.Le:null);e==c.Oa&&(k=g==c.$&&f.I==h.I?c.Je:c.aa);e==c.Je&&(k=hl(c.$,c.ge,c.aa,g,f,h));e==c.ge&&(k=hl(c.$,c.be,c.aa,g,f,h));e==c.be&&(k=hl(c.$,c.$,c.aa,g,f,h));e==c.Le&&(k=g==c.Za&&f.I==h.I?c.Za:c.aa);if(e==c.$||e==c.Za)k=c.aa;e==c.aa&&(k=h.I&&f.I==h.I?c.X:c.S);return k},Sf:function(e,f,g){c.dispatchEvent(il(jl, (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return J(function(f){return 1==f.g?z(f,$k(c,e),2):f["return"](e.I?c.X:c.S)})},Lg:function(e){c.dispatchEvent(il(kl,(new Map).set("state",e.name)))}});a&&this.yc(a,!0)}u(T,fb);function il(a,b){return new N(a,b)}q=T.prototype; q.destroy=function(){var a=this,b;return J(function(c){switch(c.g){case 1:if(a.l==ll)return c["return"]();a.l=ll;b=Wj(a.wa,function(){return{node:a.S,payload:Sj(),Lb:!1}});return z(c,new Promise(function(d){b.lc=function(){};b.od=function(){d()};b.Rb=function(){d()};b.onError=function(){d()};b.qd=function(){d()}}),2);case 2:return z(c,a.wa.destroy(),3);case 3:a.m&&(a.m.release(),a.m=null);a.Wd=null;a.B=null;a.h=null;a.C=null;a.Hb=null;a.W=null;if(!a.H){c.D(4);break}return z(c,a.H.destroy(),5);case 5:a.H= null;case 4:fb.prototype.release.call(a),B(c)}})}; function ml(){window.Promise||Sa("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Sa("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||Fd("Trident/"))return!1;var a=Hd();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)? !1:Bd()?!0:Cd("application/x-mpegurl")}q.yc=function(a,b){b=void 0===b?!0:b;if(this.l==ll)return Promise.reject(nl());var c=Sj();c.I=a;Bd()||(b=!1);var d=b?this.Oa:this.X,e=Wj(this.wa,function(){return{node:d,payload:c,Lb:!1}});e.lc=function(){};return ol(e)};q.detach=function(){var a=this;if(this.l==ll)return Promise.reject(nl());var b=Wj(this.wa,function(){return{node:a.S,payload:Sj(),Lb:!1}});b.lc=function(){};return ol(b)}; q.He=function(a){var b=this;a=void 0===a?!0:a;if(this.l==ll)return Promise.reject(nl());Bd()||(a=!1);var c=Sj(),d=Wj(this.wa,function(e){var f=e.I&&a?b.Oa:e.I?b.X:b.S;c.I=e.I;return{node:f,payload:c,Lb:!1}});d.lc=function(){};return ol(d)};q.mh=function(a){this.mb=a}; q.load=function(a,b,c){var d=this;this.mb=null;if(this.l==ll)return Promise.reject(nl());this.dispatchEvent(il(pl));var e=Sj();e.uri=a;e.Be=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=ql(this,e)?this.Za:this.$,g=Wj(this.wa,function(h){if(null==h.I)return null;e.I=h.I;return{node:f,payload:e,Lb:!0}});this.C=new Uk;this.W=rl(this);g.lc=function(){};return new Promise(function(h,k){g.qd=function(){return k(new P(2,7,7002))};g.od=function(){h();d.dispatchEvent(il(sl))};g.Rb=function(){return k(nl())}; g.onError=function(l){return k(l)}})};function ql(a,b){if(!Bd())return!0;var c=b.mimeType,d=b.uri||"";c||(c=sg(d),c=tl[c]);if(c){if(""==(b.I||Dd()).canPlayType(c))return!1;if(!Bd()||!(c in rg||sg(d)in tg)||a.h.streaming.preferNativeHls)return!0;if(Gd())return a.h.streaming.useNativeHlsOnSafari}return!1}function Zk(a,b,c){null==b.I&&(b.I=c.I,a.m.o(b.I,"error",function(){var d=ul(a);d&&vl(a,d)}));a.g=b.I;return Promise.resolve()} function $k(a,b){var c,d,e,f,g,h,k,l,m;return J(function(n){switch(n.g){case 1:return a.l!=ll&&(a.l=Vk),c=a.Zd.map(function(p){return p()}),a.Zd=[],z(n,Promise.all(c),2);case 2:a.dispatchEvent(il(wl));b.mimeType=null;b.startTime=null;b.uri=null;b.I&&(a.m.La(b.I,"loadedmetadata"),a.m.La(b.I,"playing"),a.m.La(b.I,"pause"),a.m.La(b.I,"ended"),a.m.La(b.I,"ratechange"));a.Ya&&(a.Ya.release(),a.Ya=null);a.cd&&(a.cd.stop(),a.cd=null);if(!a.K){n.D(3);break}return z(n,a.K.stop(),4);case 4:a.K=null,a.kd=null; case 3:if(!a.B){n.D(5);break}return z(n,a.B.stop(),5);case 5:if(!a.j){n.D(7);break}return z(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.J&&(a.J.release(),a.J=null);a.G&&(a.G.release(),a.G=null);if(!a.N){n.D(9);break}return z(n,a.N.destroy(),10);case 10:a.N=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.I||!b.I.src){n.D(11);break}return z(n,new Promise(function(p){return(new Q(p)).R(.1)}),12);case 12:for(b.I.removeAttribute("src"),b.I.load();b.I.lastChild;)b.I.removeChild(b.I.firstChild);case 11:if(!a.A){n.D(13); break}return z(n,a.A.destroy(),14);case 14:a.A=null;case 13:a.jb=null;a.M=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.C=new Uk;a.fe=null;xl(a);B(n)}})} function al(a,b){var c,d,e,f;return J(function(g){if(1==g.g)return c=new Sh,d=a.h.textDisplayFactory,e=Jb(d),a.fe=d,f=yl(b.I,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())zl(a,n,p,"ID3",v.value);if(a.F)a.F.onHlsTimedMetadata(m,n)}}),z(g,f.G,2);a.N=f;B(g)})} function bl(a,b,c){var d,e,f,g;return J(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.jb=d,f=a,z(h,qg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.kd=h.h;a.K=Jb(a.kd);g=Ye(a.h.manifest);c.I&&"AUDIO"===c.I.nodeName&&(g.disableVideo=!0);a.K.configure(g);B(h)})} function cl(a,b){var c=b.uri,d=a.H;a.ld=new hj(function(){return a.Ga()});a.ld.addEventListener("regionadd",function(g){g=g.region;Al(a,Bl,g);if(a.F)a.F.onDashTimedMetadata(g)});a.ha=null;a.h.streaming.observeQualityChanges&&(a.ha=new dj(function(){return a.Bb()}),a.ha.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height, mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(il(Cl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.A=h.format,xk(k,g,{ot:Ak,su:!k.i}))}catch(l){Ta("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){nk(a.W,g,h)},filter:function(g){return Dl(a,g)},makeTextStreamsForClosedCaptions:function(g){return El(a,g)}, onTimelineRegionAdded:function(g){var h=a.ld;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new N("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return vl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode}, enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Re(function(){var g,h,k,l;return J(function(m){if(1==m.g)return g=a,z(m,a.K.start(c,e),2);g.i=m.h;h=il(Fl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new P(2,4,4036);Gl(a.i);k=Date.now()/1E3;l=k-f;a.C.G=l;B(m)})}(),function(){return a.K.stop()})} function dl(a,b){var c,d;return J(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.A=Hl(a,{Qb:a.H,onError:function(f){vl(a,f)},pd:function(f){Il(a,f)},onExpirationUpdated:function(f,g){Jl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Kl&&d&&(d=!1,a.C.j=Date.now()/1E3-c)}}),a.A.configure(a.h.drm),z(e,Hf(a.A,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?z(e,a.A.yc(b.I),3):z(e,Dl(a,a.i),0)})} function el(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return J(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.mb&&(b.startTime=a.mb,a.mb=null);d=b.I;e=b.uri;a.jb=e;a.J=new $i({hd:function(){return b.I.playbackRate},ed:function(){return b.I.defaultPlaybackRate},we:function(x){b.I.playbackRate=x},pf:function(x){b.I.currentTime+=x}});f=function(){return Ll(a)};g=function(){return Ml(a)};a.m.o(d,"playing",f);a.m.o(d,"pause",f);a.m.o(d,"ended",f);a.m.o(d,"ratechange",g);h=a.h.abrFactory;a.B&& a.Wd==h||(a.Wd=h,a.B=Jb(h),"function"!=typeof a.B.playbackRateChanged&&(Cb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.h.abr));a.Ma=new Ge(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Na=a.h.preferredTextLanguage;a.hb=a.h.preferredTextRole;a.kb=a.h.preferForcedSubs;Nl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.B.init(function(x,w,C){a.j&&x!=a.j.l&&Ol(a, x,!0,void 0===w?!1:w,void 0===C?0:C)});a.G=Pl(a,b.startTime);a.Ya=Ql(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Rl(a,k);Kd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Sl(a);a.j.configure(a.h.streaming);a.l=Tl;a.dispatchEvent(il(Ul));l=null;if(m=a.ab().find(function(x){return x.active})){y.D(2);break}l=Vl(a)?a.B.chooseVariant():null;Ol(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);break}n= a.G.m();return z(y,Wl(l,n),4);case 4:p=y.h,a.G.A(p);case 3:Xl(a,null,le(l));case 2:return t=a.rb().find(function(x){return x.active}),t||((v=ve(a.i.textStreams,a.Na,a.hb,a.kb)[0]||null)&&Tk(a.C.h,v,!0),l&&(v?(l.audio&&Yl(a,l.audio,v)&&(a.ea=!0),a.ea&&a.N.l.setTextVisibility(!0),Zl(a)):a.ea=!1),v&&(a.h.streaming.alwaysStreamText||a.Pb())&&Aj(a.j,v)),z(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.B.enable(),$l(a)),$d(a.j?a.j.l:null,a.i),am(a.i),bm(a),Vl(a),a.i.variants.some(function(x){return x.primary}), a.m.Ia(d,"loadedmetadata",function(){a.C.l=Date.now()/1E3-c.Be}),B(y)}})} function fl(a,b,c){var d,e,f,g,h,k,l;return J(function(m){return 1==m.g?(d=Qb,e=Date.now()/1E3,f=!0,a.A=Hl(a,{Qb:a.H,onError:function(n){vl(a,n)},pd:function(n){Il(a,n)},onExpirationUpdated:function(n,p){Jl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);n.type==Kl&&f&&(f=!1,a.C.j=Date.now()/1E3-e)}}),a.A.configure(a.h.drm),g=c.uri||"",h=sg(g),k=tl[h],"application/x-mpegurl"==k&&Gd()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null, createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?qd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ib,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.A.X=!0,z(m,Hf(a.A,[l],[]),2)):z(m,a.A.yc(b.I), 0)})} function gl(a,b,c){function d(){return Ll(a)}b.uri=c.uri;b.startTime=c.startTime;a.jb=b.uri;a.G=new Ni(b.I);null!=b.startTime&&a.G.A(b.startTime);a.J=new $i({hd:function(){return b.I.playbackRate},ed:function(){return b.I.defaultPlaybackRate},we:function(h){b.I.playbackRate=h},pf:function(h){b.I.currentTime+=h}});Rl(a,a.h.streaming.rebufferingGoal);a.m.o(b.I,"playing",d);a.m.o(b.I,"pause",d);a.m.o(b.I,"ended",d);a.m.o(b.I,"ratechange",function(){return Ml(a)});"none"!=a.g.preload&&a.m.Ia(a.g,"loadedmetadata", function(){a.C.l=Date.now()/1E3-c.Be});a.g.audioTracks&&(a.m.o(a.g.audioTracks,"addtrack",function(){return bm(a)}),a.m.o(a.g.audioTracks,"removetrack",function(){return bm(a)}),a.m.o(a.g.audioTracks,"change",function(){return bm(a)}));a.g.textTracks&&(a.m.o(a.g.textTracks,"addtrack",function(h){if(h.track)switch(h=h.track,h.kind){case "metadata":cm(a,h);break;case "chapters":dm(a,h);break;default:bm(a)}}),a.m.o(a.g.textTracks,"removetrack",function(){return bm(a)}),a.m.o(a.g.textTracks,"change", function(){return bm(a)}));var e=sg(b.uri);b.I.src=yk(a.W,b.uri,tl[e]);(Ed()||Fd("Web0S"))&&b.I.load();a.l=em;a.dispatchEvent(il(Ul));var f=new Tc;Ei(a.g,HTMLMediaElement.HAVE_METADATA,a.m,function(){f.resolve()});var g=!1;a.Zd.push(function(){g=!0});Ei(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.m,function(){var h;return J(function(k){if(1==k.g){if(g)return k["return"]();fm(a);h=gm(a);return h.find(function(l){return"disabled"!=l.mode})?k.D(2):z(k,new Promise(function(l){a.m.Ia(a.g.textTracks,"change", l);(new Q(l)).R(1)}),2)}if(g)return k["return"]();hm(a);B(k)})});a.g.error?f.reject(ul(a)):"none"==a.g.preload&&(Sa('With