webpackJsonpjwplayer([2,11],{12:function(t,e,i){var n,r;n=[i(1),i(13),i(2),i(19),i(18)],r=function(t,e,i,n,r){function s(e){if(this._currentTextTrackIndex=-1,e){if(this._textTracks?(this._textTracks=t.reject(this._textTracks,function(t){if(this.renderNatively&&"nativecaptions"===t._id)return delete this._tracksById[t._id],!0},this),delete this._tracksById.nativemetadata):this._initTextTracks(),e.length){var n=0,s=e.length;for(n;nthis._textTracks.length)return!0;for(var e=0;e59?e(i[1],i[2],0,i[4]):e(0,i[1],i[2],i[4]):null}function n(){this.values=Object.create(null)}function r(t,e,i,n){for(var r=n?t.split(n):[t],s=0;s<=r.length;s+=1)if("string"==typeof r[s]){var a=r[s].split(i);if(2===a.length){var o=a[0],u=a[1];e(o,u)}}}function s(t,e,s){function a(){var e=i(t);if(null===e)throw new Error("Malformed timestamp: "+h);return t=t.replace(c,""),e}function o(t,e){var i=new n;r(t,function(t,e){switch(t){case"region":for(var n=s.length-1;n>=0;n--)if(s[n].id===e){i.set(t,s[n].region);break}break;case"vertical":i.alt(t,e,["rl","lr"]);break;case"line":var r=e.split(","),a=r[0];i.integer(t,a),i.percent(t,a)&&i.set("snapToLines",!1),i.alt(t,a,["auto"]),2===r.length&&i.alt("lineAlign",r[1],["start",y,"end"]);break;case"position":r=e.split(","),i.percent(t,r[0]),2===r.length&&i.alt("positionAlign",r[1],["start",y,"end","line-left","line-right","auto"]);break;case"size":i.percent(t,e);break;case"align":i.alt(t,e,["start",y,"end","left","right"])}},l,d),e.region=i.get("region",null),e.vertical=i.get("vertical","");var a=i.get("line","auto");"auto"===a&&b.line===-1&&(a=-1),e.line=a,e.lineAlign=i.get("lineAlign","start"),e.snapToLines=i.get("snapToLines",!0),e.size=i.get("size",100),e.align=i.get("align",y);var o=i.get("position","auto");"auto"===o&&50===b.position&&(o="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=o}function u(){t=t.replace(f,"")}var h=t;if(u(),e.startTime=a(),u(),"-->"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+h);t=t.substr(3),u(),e.endTime=a(),u(),o(t,e)}var a=/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/,o=/^-?\d+$/,u=/\r\n|\n/,h=/^NOTE($|[ \t])/,c=/^[^\sa-zA-Z-]+/,l=/:/,d=/\s/,f=/^\s+/,p=/-->/,m=/^WEBVTT([ \t].*)?$/,g=window.requestAnimationFrame||function(t){return window.setTimeout(t,17)},v=function(t,i){this.window=t,this.state="INITIAL",this.buffer="",this.decoder=i||new e,this.regionList=[],this.maxCueBatch=1e3};n.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,i){return i?this.has(t)?this.values[t]:e[i]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,i){for(var n=0;n=0&&e<=100&&(this.set(t,e),!0)}};var b=new t(0,0,0),y="middle"===b.align?"middle":"center";return v.prototype={parse:function(e,i){function n(){for(var t=d.buffer,e=0;e=0&&(n.metadata={mpegts:r+i})}(this.state===e.PLAYING||this.seeking)&&this.trigger("time",n)},click:function(t){this.trigger("click",t)},volumechange:function(){var t=this.video;this.trigger("volume",{volume:Math.round(100*t.volume)}),this.trigger("mute",{mute:t.muted})},seeked:function(){this.seeking&&(this.seeking=!1,this.trigger("seeked"))},playing:function(){this.setState(e.PLAYING),this.video.hasAttribute("jw-gesture-required")&&this.video.removeAttribute("jw-gesture-required"),this.trigger("providerFirstFrame")},pause:function(){this.state!==e.COMPLETE&&(this.video.ended||this.video.currentTime!==this.video.duration&&this.setState(e.PAUSED))},progress:function(){var e=this.getDuration();if(!(e<=0||e===1/0)){var i=this.video.buffered;if(i&&0!==i.length){var n=t.between(i.end(i.length-1)/e,0,1);this.trigger("bufferChange",{bufferPercent:100*n,position:this.getCurrentTime(),duration:e})}}},ended:function(){this.stopStallCheck(),this._helperLastVideoHeight=0,this.state!==e.IDLE&&this.state!==e.COMPLETE&&this.trigger("complete")},loadeddata:function(){this.setTextTracks(this.video.textTracks),this.video.setAttribute("jw-loaded","data")},error:function(){var t=this.video.error&&this.video.error.code||-1,e={1:"Unknown operation aborted",2:"Unknown network error",3:"Unknown decode error",4:"Source not supported"}[t]||"Unknown";this.trigger("mediaError",{code:t,message:"Error playing file: "+e})}}}.apply(e,n),!(void 0!==r&&(t.exports=r))},73:function(t,e,i){var n,r;n=[i(1),i(23),i(146),i(2),i(5),i(4),i(3),i(45),i(43),i(44),i(12),i(27),i(181),i(171)],r=function(t,e,i,n,r,s,a,o,u,h,c,l,d,f){function p(d,p){function m(){J.addEventListener("error",w),J.addEventListener("trackschanged",R),t.each(Z,function(t,e){tt.video.addEventListener(e,t,!1)})}function g(t,e){return n.generateLabel(t,p.qualityLabels,e)}function v(t,e,i){for(var n={index:0,track:null},r=e.length;r--;)for(var s=e[r].id,a=i.length;a--;){var o=i[a];if(s===o.id&&o.height===t)return n.index=a+1,n.track=o,n}return n}function b(){J.removeEventListener("error",w),J.removeEventListener("trackschanged",R),t.each(Z,function(t,e){tt.video.removeEventListener(e,t)})}function y(){var t=tt.video;b(),J.destroy(),tt.video=tt.video=t}function T(t,e){var i=t.headers,n=t.customData;if(i)for(var r=0;r0&&(e="audio",V(i.audio),tt.jwTracks=tt.audioTracks,N(tt.currentAudioIndex)),i.video&&i.video.length>0&&(e="video",M(i.video),P(tt.currentQuality)),tt.trigger(s.JWPLAYER_MEDIA_TYPE,{mediaType:e})}function D(){var t,e,i={},n="";if(l.isSupported("clearkey")&&X.clearkey)return e=X.clearkey,e.keyId=e.keyId?e.keyId.replace(/-/g,""):null,i.clearKeys={},i.clearKeys[e.keyId]=e.key,i;if(l.isSupported("widevine"))tt.drmUsed="widevine",t="com.widevine.alpha",n="http://widevine-proxy.appspot.com/proxy";else{if(!l.isSupported("playready"))return i;tt.drmUsed="playready",t="com.microsoft.playready",n="http://microsoft-proxy.appspot.com/proxy"}return(e=X[tt.drmUsed])?(i.servers=i.servers||{},i.servers[t]=e.url||n,J.getNetworkingEngine().registerRequestFilter(function(t,i){t===f.net.NetworkingEngine.RequestType.LICENSE&&e&&T(e,i)}),i):i}function M(e){tt.shakaTracks=e,tt.currentQuality=0,e.sort(function(t,e){return t.height&&e.height?e.height-t.height:e.bandwidth-t.bandwidth});var i=n.hasRedundantLevels(e);tt.jwTracks=t.map(e,function(t){return{shakaId:t.id,label:g(t,i)}}),e.length>1&&tt.jwTracks.unshift({label:"Auto",shakaId:"auto"}),tt.trigger(s.JWPLAYER_MEDIA_LEVELS,{levels:tt.jwTracks,currentQuality:tt.currentQuality})}function L(e){return t.map(e,function(r,s){var a=r.language,o=t.where(e,{language:a}).length>1,u=i.getLabel(a);return"und"===a&&(u="Unknown"),o&&(u+=" ("+n.toKbps(r.bandwidth)+" kbps)"),{autoselect:!1,defaulttrack:r.active,groupid:"default",language:r.language,name:u,shakaIndex:s,shakaId:r.id}})}function O(){var e=0;if(j(tt.currentAudioIndex))e=tt.currentAudioIndex;else{var i=t.find(tt.audioTracks,function(t){return t.defaulttrack});e=i?i.shakaIndex:0}return e}function j(e){return t.isNumber(e)&&!t.isNaN(e)&&e>=0&&e=tt.jwTracks.length||(tt.trigger(s.JWPLAYER_MEDIA_LEVEL_CHANGED,{currentQuality:t,levels:tt.jwTracks}),P(t),N(U()),tt.currentQuality=t,x())}function Y(t){J=t}var J,X,Q,Z={},tt=this,et="VOD",it=p;this.video=u.getVideo.call(tt,d),this.loadedItem=null,this.drmUsed=null,this.position=0,this.levels=[],this.currentQuality=-1,this.abr=!0,t.each(o,function(t,e){"function"==typeof t?Z[e]=t.bind(tt):tt[e]=t}),tt.adaptation=function(t){tt.shakaTracks||R();var e=J.getStats(),i=v(t.size.height,e.switchHistory,tt.shakaTracks),n=tt.jwTracks?tt.jwTracks[i.index]:null,r=n?n.label:g(i.track),s={level:{index:i.index,label:r,bitrate:e.streamBandwidth,width:t.size.width,height:t.size.height},bandwidth:e.estimatedBandwidth,type:"visualQuality"};Q?(s.reason="initial choice",s.mode="auto",Q=!1):0===tt.currentQuality?s.reason=s.mode="auto":(s.reason="api",s.mode="manual"),tt.trigger("visualQuality",s)},t.extend(tt,a,u,h,c,{eventsOn_:function(){J=S(tt.video),m()},eventsOff_:function(){X&&n.isFF()?(tt.remove(),tt.video=tt.getVideo(d,tt.container),tt.setContainer(tt.container)):y()},init:I,load:_,pause:K,getQualityLevels:k,getCurrentQuality:E,getAudioTracks:B,getCurrentAudioTrack:U,play:H,seek:q,setCurrentQuality:$,setAudioTracks:V,setCurrentAudioTrack:F,setVisibility:G,stop:z,getCurrentTime:function(){var t=tt.video.currentTime;return J.isLive()&&"DVR"===et&&(t=-(J.seekRange().end-t)),t},getDuration:function(){var t=tt.loadedItem.minDvrWindow,e=tt.video.duration;if(J.isLive()){var i=J.seekRange();e=-(i.end-i.start),e=n.isDvr(e,t)?e:1/0}return et=n.streamType(e,t),e},setShakaPlayer:Y,supportsFullscreen:t.constant(!0),getName:t.constant({name:"shaka"}),destroy:y,renderNatively:!0})}return f.polyfill.installAll(),f.media.TextEngine.registerParser("text/vtt",d),f.media.TextEngine.registerParser('text/vtt; codecs="vtt"',d),p.getName=t.constant({name:"shaka"}),p}.apply(e,n),!(void 0!==r&&(t.exports=r))},146:function(t,e,i){var n,r;n=[],r=function(){function t(t){return e[t]||t}var e={zh:"Chinese",nl:"Dutch",en:"English",fr:"French",de:"German",it:"Italian",ja:"Japanese",pt:"Portuguese",ru:"Russian",es:"Spanish"};return{getLabel:t}}.apply(e,n),!(void 0!==r&&(t.exports=r))},171:function(t,e,i){var n;!function(){var r={};(function(t){function e(t,e){var i=t.split("."),n=Zr;i[0]in n||!n.execScript||n.execScript("var "+i[0]);for(var r;i.length&&(r=i.shift());)i.length||void 0===e?n=n[r]?n[r]:n[r]={}:n[r]=e}function i(t){function e(){}var i=x;e.prototype=i.prototype,t.sd=i.prototype,t.prototype=new e,t.prototype.constructor=t,t.md=function(t,e,n){return i.prototype[e].apply(t,Array.prototype.slice.call(arguments,2))}}function n(t){this.c=Math.exp(Math.log(.5)/t),this.b=this.a=0}function r(t,e,i){var n=Math.pow(t.c,e);i=i*(1-n)+n*t.a,isNaN(i)||(t.a=i,t.b+=e)}function s(t){return t.a/(1-Math.pow(t.c,t.b))}function a(){this.c=new n(2),this.f=new n(5),this.a=0,this.b=5e5}function o(){}function u(){}function h(){this.g=null,this.f=!1,this.b=new a,this.h={},this.a={},this.i=!1,this.c=null}function c(t){return(t=t.h.audio)?(t=d(t),t[Math.floor(t.length/2)]):null}function l(t){var e=t.h.video;if(!e)return null;var e=d(e),i=t.a.audio,i=i&&i.bandwidth||0;t=t.b.getBandwidthEstimate();for(var n=e[0],r=0;r=(s.bandwidth+i)/.95&&t<=a&&(n=s)}}return n}function d(t){return t.streams.slice(0).filter(function(t){return t.allowedByApplication&&t.allowedByKeySystem}).sort(function(t,e){return t.bandwidth-e.bandwidth})}function f(e,i){var n,r=i||{};for(n in r)this[n]=r[n];this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=t.performance&&t.performance.now?t.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.a=!1}function p(t){return JSON.stringify(t,function(t,e){if("manager"!=t&&"function"!=typeof e){if(e instanceof Event||e instanceof f){var i,n={};for(i in e){var r=e[i];r&&"object"==typeof r||i in Event||(n[i]=r)}return n}if(e instanceof TimeRanges)for(n={__type__:"TimeRanges",length:e.length,start:[],end:[]},i=0;ie?"-Infinity":"Infinity":e;return n}})}function m(t){return JSON.parse(t,function(t,e){return"NaN"==e?NaN:"-Infinity"==e?-(1/0):"Infinity"==e?1/0:e&&"object"==typeof e&&"TimeRanges"==e.__type__?g(e):e})}function g(t){return{length:t.length,start:function(e){return t.start[e]},end:function(e){return t.end[e]}}}function v(t,e,i){this.category=t,this.code=e,this.data=Array.prototype.slice.call(arguments,2)}function b(){var t,e,i=new Promise(function(i,n){t=i,e=n});return i.resolve=t,i.reject=e,i}function y(t,e,i,n,r){this.C=t,this.l=e,this.w=i,this.B=n,this.s=r,this.f=this.j=this.g=!1,this.v="",this.a=this.i=null,this.b={video:{},player:{}},this.m=0,this.c={},this.h=null}function T(t){for(var e in t.c){var i=t.c[e];delete t.c[e],i.reject(new v(7,7e3))}}function w(t,e){var i=p(e);t.a.sendMessage("urn:x-cast:com.google.shaka.v2",i,function(){},o)}function k(){this.a={}}function E(){this.a=new k}function S(t,e,i,n){e=new _(e,i,n),t.a.push(i,e)}function I(t){var e,i=t.a,n=[];for(e in i.a)n.push.apply(n,i.a[e]);for(i=0;ie)throw Error("Bad port number "+e);t.ya=e}else t.ya=null}function mt(t,e,i){e instanceof yt?t.a=e:(i||(e=vt(e,ms)),t.a=new yt(e))}function gt(t,e){return t?e?decodeURI(t):decodeURIComponent(t):""}function vt(t,e,i){return"string"==typeof t?(t=encodeURI(t).replace(e,bt),i&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function bt(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(15&t).toString(16)}function yt(t){this.b=t||null}function Tt(t){var e=new yt;if(e.b=t.b,t.a){var i,n={};for(i in t.a)n[i]=t.a[i].concat();e.a=n,e.c=t.c}return e}function wt(t,e,i){this.a=t,this.L=e,this.D=i}function kt(t,e,i,n,r,s){this.position=t,this.startTime=e,this.endTime=i,this.a=n,this.L=r,this.D=s}function Et(e,i,n,r,s){null!==s&&(s=Math.round(s));var a={RepresentationID:i,Number:n,Bandwidth:r,Time:s};return e.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)d)?\$/g,function(e,i,n){if("$$"==e)return"$";var r=a[i];return null==r?e:("RepresentationID"==i&&n&&(n=void 0),e=r.toString(),n=t.parseInt(n,10)||1,Array(Math.max(0,n-e.length)+1).join("0")+e)})}function St(t,e,i){if(i.length){var n=i[0];n.startTime<=vs&&(i[0]=new kt(n.position,0,n.endTime,n.a,n.L,n.D)),t||(t=i[i.length-1],t.startTime>e||(i[i.length-1]=new kt(t.position,t.startTime,e,t.a,t.L,t.D)))}}function It(t,e){if(!e.length)return t;var i=e.map(function(t){return new dt(t)});return t.map(function(t){return new dt(t)}).map(function(t){return i.map(t.resolve.bind(t))}).reduce(O,[]).map(function(t){return t.toString()})}function _t(t,e){var i=xt(t,e,"timescale"),n=1;i&&(n=rt(i)||1),i=xt(t,e,"duration"),(i=rt(i||""))&&(i/=n);var r=xt(t,e,"startNumber"),s=xt(t,e,"presentationTimeOffset"),a=st(r||"");null!=r&&null!=a||(a=1);var o=At(t,e,"SegmentTimeline"),r=null;if(o){for(var r=n,u=Number(s),h=t.H.duration||1/0,o=X(o,"S"),c=[],l=0,d=0;df)if(d+1=f)break;f=Math.ceil((f-p)/m)-1}else{if(1/0==h)break;if(p/r>=h)break;f=Math.ceil((h*r-p)/m)-1}0=t[e]}.bind(null,e);if(!e[0]&&!e[2])return Pt(t,!1);if(!e[1]&&!e[3])return Pt(t,!0);if(i(0)&&i(1)&&i(2)&&i(3))return Ct(t);throw new v(2,2003)}function Rt(t){t=unescape(encodeURIComponent(t));for(var e=new Uint8Array(t.length),i=0;it.b.byteLength&&Ht();var i=t.b.buffer.slice(t.a,t.a+e);return t.a+=e,new Uint8Array(i)}function Vt(t,e){t.a+e>t.b.byteLength&&Ht(),t.a+=e}function Kt(t){var e=t.a;try{for(;Lt(t)&&t.b.getUint8(t.a);)t.a+=1}catch(i){Ht()}return e=t.b.buffer.slice(e,t.a),t.a+=1,Ct(e)}function Ht(){throw new v(3,3e3)}function qt(t,e){for(;Lt(e);){var i=e.a,n=Ut(e),r=Ut(e);if(1==n?n=Bt(e):n||(n=e.b.byteLength-i),r==t)return n;Vt(e,n-(e.a-i))}return-1}function Gt(t,e){for(var i=new Mt(new DataView(t)),n=[[1836019574,0],[1953653099,0],[1835297121,0],[1835626086,0],[1937007212,0],[1937011556,8],[e,0]],r=-1,s=0;s>>31,u&=2147483647;var c=Ut(t);if(Vt(t,4),1==h)throw new v(3,3006);r.push(new kt(r.length,n/o,(n+c)/o,function(){return i},e,e+u-1)),n+=c,e+=u}return r}function Wt(t){this.a=t}function $t(t){this.b=t,this.a=new Mt(t),ys||(ys=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function Yt(t){var e;if(e=Jt(t),7=e&&!(i&1<<8-e);e++);if(8t||i&&t>=i?null:Math.floor(t/n)},getSegmentReference:function(t){var e=t*n;return new kt(t,e,e+n,function(){var i=Et(a,u,t+r,o,e*s);return It(h,[i])},0,null)}}}function de(t,e){for(var i=[],n=0;n=e?null:new VTTCue(t,e,i)}function ke(t,e,i,n){var r=t.g;return Promise.resolve().then(function(){if(this.c){var t=this.h(e,r,i,n,this.i);if(null!=i&&null!=n){for(var s=0;s=this.f);++s)this.c.addCue(t[s]);null==this.b&&(this.b=i),this.a=Math.min(n,this.f)}}}.bind(t))}function Ee(t,e){return null==t.a||t.a=Ss&&i==e.split("-")[0]||t>=Is&&i.split("-")[0]==e.split("-")[0]}function _e(t){t=t.toLowerCase().split("-");var e=_s[t[0]];return e&&(t[0]=e),t.join("-")}function xe(t,e,i){for(var n=0;nt.end(0)-t.start(0)?null:t.length?t.end(t.length-1):null}function ze(t,e){var i=0;if(!t||1==t.length&&1e-6>t.end(0)-t.start(0))return i;var n=!1,r=1e-4;e||(r=.25);for(var s=0;s=t.start(s)&&e=t.start(s)-t.end(s-1))i+=t.end(s)-t.start(s),i+=t.start(s)-t.end(s-1);else if(0=t.end(s-1)){if(!(.04>=t.start(s)-e))break;i+=t.end(s)-e,n=!0}else n=!1;return i}function We(t,e,i){this.f=t,this.h=e,this.j=i,this.c={},this.b=null,this.a={},this.g=new E,this.i=!1}function $e(){var t={};return'video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hvc1.1.6.L93.90",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="av1",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",video/mp2t; codecs="mp4a.40.2",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").forEach(function(e){t[e]=!!Es[e]||MediaSource.isTypeSupported(e);var i=e.split(";")[0];t[i]=t[i]||t[e]}),t}function Ye(t,e){var i;return"text"==e?i=t.b.b:(i=Xe(t,e),i=!i||1==i.length&&1e-6>i.end(0)-i.start(0)?null:1==i.length&&0>i.start(0)?0:i.length?i.start(0):null),i}function Je(t,e,i,n){return"text"==e?(e=Ee(t.b,i),!e&&n&&(e=Ee(t.b,i+n))&&(e+=n)):(t=Xe(t,e),e=ze(t,i),!e&&n&&(e=ze(t,i+n))&&(e+=n)),e}function Xe(t,e){try{return t.c[e].buffered}catch(i){return null}}function Qe(t,e,i,n,r){return"text"==e?ke(t.b,i,n,r):ii(t,e,t.Yc.bind(t,e,i))}function Ze(t,e){return"text"==e?t.b.remove(0,1/0):ii(t,e,t.Gb.bind(t,e,0,t.h.duration))}function ti(t,e,i){return"text"==e?(t.b.g=i,Promise.resolve()):ii(t,e,t.Oc.bind(t,e,i))}function ei(t,e,i){return"text"==e?(t.b.f=i,Promise.resolve()):Promise.all([ii(t,e,t.Pb.bind(t,e)),ii(t,e,t.Mc.bind(t,e,i))])}function ii(t,e,i){if(t.i)return Promise.reject();if(i={start:i,p:new b},t.a[e].push(i),1==t.a[e].length)try{i.start()}catch(n){"QuotaExceededError"==n.name?i.p.reject(new v(3,3017,e)):i.p.reject(new v(3,3015,n)),ri(t,e)}return i.p}function ni(t,e){if(t.i)return Promise.reject();var i,n=[];for(i in t.c){var r=new b,s={start:function(t){t.resolve()}.bind(null,r),p:r};t.a[i].push(s),n.push(r),1==t.a[i].length&&s.start()}return Promise.all(n).then(function(){var t,i;try{e()}catch(n){i=Promise.reject(new v(3,3015,n))}for(t in this.c)ri(this,t);return i}.bind(t),function(){return Promise.reject()}.bind(t))}function ri(t,e){t.a[e].shift();var i=t.a[e][0];if(i)try{i.start()}catch(n){i.p.reject(new v(3,3015,n)),ri(t,e)}}function si(t,e,i){var n=!1;return t.streamSets.forEach(function(t){t.streams.forEach(function(r){var s=r.allowedByApplication;r.allowedByApplication=!0,"video"==t.type?(r.widthe.maxWidth||r.width>i.width||r.heighte.maxHeight||r.height>i.height||r.width*r.heighte.maxPixels||r.bandwidthe.maxVideoBandwidth)&&(r.allowedByApplication=!1):"audio"==t.type&&(r.bandwidthe.maxAudioBandwidth)&&(r.allowedByApplication=!1),s!=r.allowedByApplication&&(n=!0)})}),n}function ai(t,e,i){var n="",r=null;for(t&&t.B&&(n=t.keySystem(),r=t.s),t=0;tr.indexOf(h)?(s.streams.splice(o,1),--o):!a||u.mimeType==a.mimeType&&u.codecs.split(".")[0]==a.codecs.split(".")[0]||(s.streams.splice(o,1),--o):(s.streams.splice(o,1),--o)}s.streams.length||(i.streamSets.splice(t,1),--t)}}}function oi(t,e){return t.streamSets.map(function(t){var i=e?e[t.type]:null;return t.streams.filter(function(t){return t.allowedByApplication&&t.allowedByKeySystem}).map(function(e){return{id:e.id,active:i==e,type:t.type,bandwidth:e.bandwidth,language:t.language,kind:e.kind||null,width:e.width||null,height:e.height||null,frameRate:e.frameRate||void 0,codecs:e.codecs||null}})}).reduce(O,[])}function ui(t,e){for(var i=0;ir?(r=e,n.video=t):e==r&&li(t)t.streams.length?e:(t.streams.forEach(function(t){e+=t.bandwidth}),e/t.streams.length)}function di(t){var e=0;return t?(t.streams.forEach(function(t){t.height>e&&(e=t.height)}),e):e}function fi(t,e){var i=t;return e&&(i+='; codecs="'+e+'"'),i}function pi(){this.m=this.l=this.j=this.c=this.a=null,this.h=[],this.b=null,this.g=[],this.v=1,this.i={},this.s=0,this.f=null,this.La=this.La.bind(this)}function mi(t){return t.a.request(0,ge(t.h,t.c.retryParameters)).then(function(t){if(this.a)return gi(this,t.data,t.uri)}.bind(t))}function gi(t,e,i){var n=Ct(e),r=new DOMParser,s=null;e=null;try{s=r.parseFromString(n,"text/xml")}catch(a){}if(s&&"MPD"==s.documentElement.tagName&&(e=s.documentElement),!e)throw new v(4,4001);i=[i],n=X(e,"Location").map(Q).filter(U),0e.s||(e.f=t.setTimeout(e.Xc.bind(e),1e3*Math.max(Math.max(3,e.s)-i,0)))}function wi(t,e,i){e=e||{contentType:"",mimeType:"",codecs:"",frameRate:void 0},i=i||e.M;var n=X(t,"BaseURL").map(Q),r=t.getAttribute("contentType")||e.contentType,s=t.getAttribute("mimeType")||e.mimeType,a=t.getAttribute("codecs")||e.codecs,o=Z(t,"frameRate",at)||e.frameRate;return r||(r=_i(s,a)),{M:It(i,n),Ia:J(t,"SegmentBase")||e.Ia,Z:J(t,"SegmentList")||e.Z,Ja:J(t,"SegmentTemplate")||e.Ja,width:Z(t,"width",st)||e.width,height:Z(t,"height",st)||e.height,contentType:r,mimeType:s,codecs:a,frameRate:o,id:t.getAttribute("id")}}function ki(t){var e={};t.forEach(function(t){e[t.id]=[t]}),t.forEach(function(t){var i=e[t.id];t.cd.forEach(function(t){(t=e[t])&&t!=i&&(i.push.apply(i,t),t.forEach(function(t){e[t.id]=i}))})});var i=[],n=[];return K(e).forEach(function(t){if(!(0<=n.indexOf(t))){n.push(t);var e=new k;t.forEach(function(t){e.push(t.contentType||"",t)}),e.keys().forEach(function(t){var n=new k;e.get(t).forEach(function(t){n.push(t.language,t)}),n.keys().forEach(function(e){var r=n.get(e);e={language:e,type:t,primary:r.some(function(t){return t.gc}),drmInfos:r.map(function(t){return t.drmInfos}).reduce(O,[]),streams:r.map(function(t){return t.streams}).reduce(O,[])},i.push(e)})})}}),i}function Ei(t){var e;return e=0+(t.Ia?1:0),e+=t.Z?1:0,(e+=t.Ja?1:0)?(1!=e&&(t.Ia&&(t.Z=null),t.Ja=null),!0):"text"==t.contentType||"application"==t.contentType}function Si(t,e,i,n){return e=It(e,[i]),e=ge(e,t.c.retryParameters),e.method=n,t.a.request(0,e).then(function(t){if("HEAD"==n){if(!t.headers||!t.headers.date)return 0;t=t.headers.date}else t=Ct(t.data);return t=Date.parse(t),isNaN(t)?0:t-Date.now()})}function Ii(t,e,i,n){i=i.map(function(t){return{scheme:t.getAttribute("schemeIdUri"),value:t.getAttribute("value")}});var r=t.c.dash.clockSyncUri;return n&&!i.length&&r&&i.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),L(i,function(t){var i=t.value;switch(t.scheme){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return Si(this,e,i,"HEAD");case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return Si(this,e,i,"GET");case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return t=Date.parse(i),isNaN(t)?0:t-Date.now();case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":return Promise.reject();default:return Promise.reject()}}.bind(t))["catch"](function(){return 0})}function _i(t,e){return Es[fi(t,e)]?"text":t.split("/")[0]}function xi(t,e){var i=Ct(t),n=[],r=new DOMParser,s=null;try{s=r.parseFromString(i,"text/xml")}catch(a){throw new v(2,2005)}if(s){var o,u,h;if(!(r=s.getElementsByTagName("tt")[0]))throw new v(2,2006);if(s=r.getAttribute("ttp:frameRate"),o=r.getAttribute("ttp:subFrameRate"),u=r.getAttribute("ttp:frameRateMultiplier"),h=r.getAttribute("ttp:tickRate"),i=r.getAttribute("xml:space")||"default","default"!=i&&"preserve"!=i)throw new v(2,2005);for(i="default"==i,s=new Ai(s,o,u,h),o=xi.b(r.getElementsByTagName("styling")[0]),u=xi.b(r.getElementsByTagName("layout")[0]),r=xi.b(r.getElementsByTagName("body")[0]),h=0;ht.c.da()?t.c.ta():Math.max(t.c.Ua(),t.c.ta())}function Ui(t,e){e!=t.h&&(t.h=e,Vi(t,t.g),t.l(e))}function Bi(e){Fi(e),e.i=t.setTimeout(e.tc.bind(e),250)}function Fi(e){e.i&&(t.clearTimeout(e.i),e.i=null)}function Vi(e,i){null!=e.f&&(t.clearInterval(e.f),e.f=null),e.g=i,e.a.playbackRate=e.h||0>i?0:i,!e.h&&0>i&&(e.f=t.setInterval(function(){this.a.currentTime+=i/4}.bind(e),250))}function Ki(t,e){var i=t.c,n=i.ta(),r=i.Y();return i.R()&&1/0!=i.c?(i=n+1,n=i+t.j,e>=n&&e<=r||ze(t.a.buffered,e)&&e>=i&&e<=r?e:e>r?r:r=i&&e<=r?e:Math.min(n+2,r)):er?r:e}function Hi(t,e,i){t.a.currentTime=i;var n=0,r=function(){!this.a||10<=n++||this.a.currentTime!=e||(this.a.currentTime=i,setTimeout(r,100))}.bind(t);setTimeout(r,100)}function qi(t,e){var i=t.c.ta();return ei?i:e)}function Gi(t,e,i,n,r,s,a,o,u){this.m=t,this.f=e,this.T=i,this.a=n,this.G=r,this.v=s,this.j=a,this.w=o||null,this.B=u||null,this.h=null,this.i=1,this.C=Promise.resolve(),this.g=[],this.l={},this.b={},this.c=this.s=this.J=!1}function zi(t){return t.a.periods[dn(t,Oi(t.m))]}function Wi(t){return H(t.b,function(t){return t.stream})}function $i(t,e){var i={};return i.text=e,Xi(t,i)}function Yi(t,e,i,n){var r=t.b[e];!r&&"text"==e&&t.h.ignoreTextStreamFailures?$i(t,i):r&&(e=t.g[fn(t,i)])&&e.za&&(e=t.l[i.id])&&e.za&&r.stream!=i&&(r.stream=i,r.Ma=!0,n&&(r.aa?r.Qa=!0:r.fa?(r.ma=!0,r.Qa=!0):(vn(r),mn(t,r,!0))))}function Ji(t){var e=Oi(t.m);if(!Object.keys(t.b).every(function(t){return 0e?t.f.Aa(e):t.f.Aa(Math.pow(2,32))}function en(t,e){var i,n=Oi(t.m),r=t.f;i=e.type,i="text"==i?r.b.a:Ge(Xe(r,i));var s=e.va&&e.V?t.a.periods[fn(t,e.va)].startTime+e.V.endTime:n,r=fn(t,e.stream),a=dn(t,s),o=Je(t.f,e.type,n,.1),u=Math.max(t.i*Math.max(t.a.minBufferTime||0,t.h.rebufferingGoal),t.i*t.h.bufferingGoal);return s>=t.a.presentationTimeline.da()?(e.endOfStream=!0,null):(e.endOfStream=!1,e.Ga=a,a!=r?null:o>=u?.5:(e.V&&e.stream==e.va?(s=e.V.position+1,i=nn(t,e,r,s)):(s=e.V?e.stream.findSegmentPosition(Math.max(0,t.a.periods[fn(t,e.va)].startTime+e.V.endTime-t.a.periods[r].startTime)):e.stream.findSegmentPosition(Math.max(0,(i||n)-t.a.periods[r].startTime)),null==s?i=null:(a=null,null==i&&(a=nn(t,e,r,Math.max(0,s-1))),i=a||nn(t,e,r,s))),i?(rn(t,e,n,r,i),null):1))}function nn(t,e,i,n){return i=t.a.periods[i],(e=e.stream.getSegmentReference(n))?(t=t.a.presentationTimeline,n=t.Y(),i.startTime+e.endTimen?null:e):null}function rn(t,e,i,n,r){var s=t.a.periods[n],a=e.stream,o=t.a.periods[n+1],u=null,u=o?o.startTime:t.a.presentationTimeline.da();n=an(t,e,n,u),e.fa=!0,e.Ma=!1,o=pn(t,r),Promise.all([n,o]).then(function(t){if(!this.c&&!this.s)return on(this,e,i,s,a,r,t[1])}.bind(t)).then(function(){this.c||this.s||(e.fa=!1,e.cb=!1,gn(this,e,0),hn(this,a))}.bind(t))["catch"](function(t){this.c||this.s||(e.fa=!1,1001==t.code||1002==t.code||1003==t.code?"text"==e.type&&this.h.ignoreTextStreamFailures&&1001==t.code?delete this.b.text:(this.j(t),gn(this,e,4)):3017==t.code?sn(this,e,t):"text"==e.type&&this.h.ignoreTextStreamFailures?delete this.b.text:(e.Wa=!0,this.j(t)))}.bind(t))}function sn(t,e,i){if(!K(t.b).some(function(t){return t!=e&&t.cb})){var n=Math.round(100*t.i);if(20=i?Promise.resolve():t.f.remove(e.type,n,n+i).then(function(){}.bind(t)))}function hn(t,e){if(!t.J&&(t.J=K(t.b).every(function(t){return"text"==t.type||!t.ma&&!t.aa&&t.V}),t.J)){var i=fn(t,e);for(t.g[i]||Qi(t,i).then(function(){this.v()}.bind(t))["catch"](j),i=0;i=t.a.periods[i].startTime)return i;return 0}function fn(t,e){for(var i=0;in.length||"data"!=n[0])throw new v(1,1004,e);if(n=n.slice(1).join(":").split(","),2>n.length)throw new v(1,1004,e);var r=n[0],n=t.decodeURIComponent(n.slice(1).join(",")),r=r.split(";"),s=null;if(1=e.status&&202!=e.status){var r=e.getAllResponseHeaders().split("\r\n").reduce(function(t,e){var i=e.split(": ");return t[i[0].toLowerCase()]=i.slice(1).join(": "),t},{});e.responseURL&&(t=e.responseURL),i({uri:t,data:e.response,headers:r})}else{r=null;try{r=Nt(e.response)}catch(s){}n(new v(1,1001,t,e.status,r))}},r.onerror=function(){n(new v(1,1002,t))},r.ontimeout=function(){n(new v(1,1003,t))};for(var s in e.headers)r.setRequestHeader(s,e.headers[s]);r.send(e.body)})}function Tn(){this.a=null,this.c=[],this.b={}}function wn(t,e,i){return Sn(t,e,"readwrite",function(t){return t.put(i)})}function kn(t,e){var i=[];return Sn(t,"segment","readwrite",function(t){return t.openCursor()},function(t){if(t){if(e(t.value)){var n=t["delete"](),r=new b;n.onsuccess=r.resolve,n.onerror=In.bind(null,n,r),i.push(r)}t["continue"]()}}).then(function(){return Promise.all(i)}).then(function(){return i.length})}function En(t,e){var i=0;return Sn(t,e,"readonly",function(t){return t.openCursor(null,"prev")},function(t){t&&(i=t.key+1)}).then(function(){return i})}function Sn(t,e,i,n,r){i=t.a.transaction([e],i);var s=n(i.objectStore(e)),a=new b;r&&(s.onsuccess=function(t){r(t.target.result)}),s.onerror=In.bind(null,s,a);var o={transaction:i,I:a};t.c.push(o);var u=function(){this.c.splice(this.c.indexOf(o),1)}.bind(t);return i.oncomplete=function(){u(),a.resolve(s.result)},i.onerror=function(t){u(),In(s,a,t)},a}function In(t,e,i){"AbortError"==t.error.name?e.reject(new v(9,9002)):e.reject(new v(9,9001,t.error)),i.preventDefault()}function _n(t){return{offlineUri:"offline:"+t.key,originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,tracks:t.periods[0].streams.map(function(t){return{id:t.id,active:!1,type:t.contentType,bandwidth:0,language:t.language,kind:t.kind||null,width:t.width,height:t.height,frameRate:t.frameRate,codecs:t.codecs}}),appMetadata:t.appMetadata}}function xn(t,e,i){this.b={},this.i=i,this.m=t,this.l=e,this.j=this.a=null,this.f=this.h=this.g=this.c=0}function An(t,e,i,n,r){t.b[e]=t.b[e]||[],t.b[e].push({uris:i.a(),L:i.L,D:i.D,mb:n,Ea:r})}function Cn(t,e){t.c=0,t.g=0,t.h=0,t.f=0,K(t.b).forEach(function(t){t.forEach(function(t){null!=t.D?this.c+=t.D-t.L+1:this.h+=t.mb}.bind(this))}.bind(t)),t.a=e,t.a.size=t.c;var i=K(t.b).map(function(t){var e=0,i=function(){if(!this.i)return Promise.reject(new v(9,9002));if(e>=t.length)return Promise.resolve();var n=t[e++];return Pn(this,n).then(i)}.bind(this);return i()}.bind(t));return t.b={},t.j=Promise.all(i)}function Pn(t,e){var i=ge(e.uris,t.l);(e.L||null!=e.D)&&(i.headers.Range="bytes="+e.L+"-"+(null==e.D?"":e.D));var n;return t.m.request(1,i).then(function(t){return this.a?(n=t.data.byteLength,e.Ea(t.data)):Promise.reject(new v(9,9002))}.bind(t)).then(function(){if(!this.a)return Promise.reject(new v(9,9002));null==e.D?(this.a.size+=n,this.f+=e.mb):this.g+=n;var t=(this.g+this.f)/(this.c+this.h),i=_n(this.a);this.i.progressCallback(i,t)}.bind(t))}function Nn(){}function Rn(t){var e=new ye(null,0);e.Aa(t.duration);var i=t.drmInfo?[t.drmInfo]:[];return{presentationTimeline:e,minBufferTime:10,offlineSessionIds:t.sessionIds,periods:t.periods.map(function(t){return{startTime:t.startTime,streamSets:t.streams.map(function(n){var r=n.segments.map(function(t,e){return new kt(e,t.startTime,t.endTime,function(){return[t.uri]},0,null)});return e.Ha(t.startTime,r),r=new Wt(r),{language:n.language,type:n.contentType,primary:n.primary,drmInfos:i,streams:[{id:n.id,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:r.find.bind(r),getSegmentReference:r.get.bind(r),initSegmentReference:n.initSegmentUri?new wt(function(){return[n.initSegmentUri]},0,null):null,presentationTimeOffset:n.presentationTimeOffset,mimeType:n.mimeType,codecs:n.codecs,bandwidth:0,width:n.width||void 0,height:n.height||void 0,kind:n.kind,encrypted:n.encrypted,keyId:n.keyId,allowedByApplication:!0,allowedByKeySystem:!0}]}})}})}}function Dn(t){if(/^offline:([0-9]+)$/.exec(t)){var e={uri:t,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Promise.resolve(e)}if(e=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(t)){var i=Number(e[1]),n=new Tn;return n.init(xs).then(function(){return n.get("segment",i)}).then(function(e){return n.o().then(function(){if(!e)throw new v(9,9003,i);return{uri:t,data:e.data,headers:{}}})})}return Promise.reject(new v(1,9004,t))}function Mn(){this.a=Promise.resolve(),this.c=this.b=this.f=!1,this.h=new Promise(function(t){this.g=t}.bind(this))}function Ln(t){return t.f||(t.a=t.a.then(function(t){return this.b=!0,Promise.resolve(t)}.bind(t),function(t){return this.b=!0,Promise.reject(t)}.bind(t))),t.f=!0,t.a}function On(t,e,i,n,r){var s,a=r in n;for(s in e){var o=r+"."+s,u=a?n[r]:i[s],h=!!{".abr.manager":!0}[o];(a||s in t)&&(void 0===e[s]?void 0===u||a?delete t[s]:t[s]=u:h?t[s]=e[s]:"object"==typeof t[s]&&"object"==typeof e[s]?On(t[s],e[s],u,n,o):typeof e[s]==typeof u&&(t[s]=e[s]))}}function jn(t,e){x.call(this),this.B=!1,this.f=t,this.s=null,this.w=new E,this.Ka=new h,this.pa=this.c=this.m=this.b=this.j=this.qa=this.G=this.h=this.g=this.i=null,this.Ob=1e9,this.oa=[],this.Da=!1,this.sa=!0,this.J=this.l=null,this.v={},this.a=Hn(this),this.Ca={width:1/0,height:1/0},this.C=[],this.na=this.T=this.ra=0,e&&e(this),this.i=new pe(this.Tc.bind(this)),this.qa=Un(this);for(var i=0;i=i.a.length)){for(var n=[],r=0;rthis.a?this.b:Math.min(s(this.c),s(this.f))},e("shaka.abr.SimpleAbrManager",h),h.prototype.stop=function(){this.g=null,this.f=!1,this.h={},this.a={},this.c=null},h.prototype.stop=h.prototype.stop,h.prototype.init=function(t){this.g=t},h.prototype.init=h.prototype.init,h.prototype.chooseStreams=function(t){for(var e in t)this.h[e]=t[e];if(e={},"audio"in t){var i=c(this);i?(e.audio=i,this.a.audio=i):delete this.a.audio}return"video"in t&&((i=l(this))?(e.video=i,this.a.video=i):delete this.a.video),"text"in t&&(e.text=t.text.streams[0]),this.c=Date.now(),e},h.prototype.chooseStreams=h.prototype.chooseStreams,h.prototype.enable=function(){this.f=!0},h.prototype.enable=h.prototype.enable,h.prototype.disable=function(){this.f=!1},h.prototype.disable=h.prototype.disable,h.prototype.segmentDownloaded=function(t,e,i){var n=this.b;if(e-=t,16e3>i||(t=8e3*i/e,e/=1e3,n.a+=i,r(n.c,e,t),r(n.f,e,t)),null!=this.c&&this.f)t:{if(this.i){if(8e3>Date.now()-this.c)break t}else{if(!(128e3<=this.b.a))break t;this.i=!0}i={},(n=c(this))&&(i.audio=n,this.a.audio=n),(n=l(this))&&(i.video=n,this.a.video=n),this.c=Date.now(),this.b.getBandwidthEstimate(),this.g(i)}},h.prototype.segmentDownloaded=h.prototype.segmentDownloaded,h.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate()},h.prototype.getBandwidthEstimate=h.prototype.getBandwidthEstimate,h.prototype.setDefaultEstimate=function(t){this.b.setDefaultEstimate(t)},h.prototype.setDefaultEstimate=h.prototype.setDefaultEstimate,f.prototype.preventDefault=function(){},f.prototype.stopImmediatePropagation=function(){this.a=!0},f.prototype.stopPropagation=function(){};var ts="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),es="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),is=["loop","playbackRate"],ns=["pause","play"],rs="adaptation buffering emsg error loading unloading texttrackvisibility trackschanged".split(" "),ss="drmInfo getConfiguration getManifestUri getPlaybackRate getTracks getStats isBuffering isInProgress isLive isTextTrackVisible keySystem seekRange".split(" "),as=[["getConfiguration","configure"]],os=[["isTextTrackVisible","setTextTrackVisibility"]],us="addTextTrack cancelTrickPlay configure resetConfiguration selectTrack setTextTrackVisibility trickPlay".split(" "),hs=["load","unload"];e("shaka.util.Error",v),v.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},v.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9},v.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_TTML:2006,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,DASH_DUPLICATE_REPRESENTATION_ID:4018,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,LOAD_INTERRUPTED:7e3,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,INDEXED_DB_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007},Qr=y.prototype,Qr.o=function(){return T(this),this.a&&(this.a.stop(function(){},function(){}),this.a=null),this.B=this.w=this.l=null,this.f=this.j=this.g=!1,this.h=this.c=this.b=this.a=this.i=null,Promise.resolve()},Qr.N=function(){return this.f},Qr.bb=function(){return this.v},Qr.init=function(){if(t.chrome&&chrome.cast&&chrome.cast.isAvailable){delete t.__onGCastApiAvailable,this.g=!0,this.l();var e=new chrome.cast.SessionRequest(this.C),e=new chrome.cast.ApiConfig(e,this.jc.bind(this),this.qc.bind(this),"origin_scoped");chrome.cast.initialize(e,function(){},function(){})}else t.__onGCastApiAvailable=function(t){t&&this.init()}.bind(this)},Qr.eb=function(t){this.i=t,this.f&&w(this,{type:"appData",appData:this.i})},Qr.cast=function(t){return this.g?this.j?this.f?Promise.reject(new v(8,8002)):(this.h=new b,chrome.cast.requestSession(this.$a.bind(this,t),this.ub.bind(this)),this.h):Promise.reject(new v(8,8001)):Promise.reject(new v(8,8e3))},Qr.get=function(t,e){if("video"==t){if(0<=ns.indexOf(e))return this.Fb.bind(this,t,e)}else if("player"==t){if(0<=us.indexOf(e))return this.Fb.bind(this,t,e);if(0<=hs.indexOf(e))return this.Fc.bind(this,t,e);if(0<=ss.indexOf(e))return this.Cb.bind(this,t,e)}return this.Cb(t,e)},Qr.set=function(t,e,i){this.b[t][e]=i,w(this,{type:"set",targetName:t,property:e,value:i})},Qr.$a=function(t,e){this.a=e,this.a.addUpdateListener(this.vb.bind(this)),this.a.addMessageListener("urn:x-cast:com.google.shaka.v2",this.kc.bind(this)),this.vb(),w(this,{type:"init",initState:t,appData:this.i}),this.h.resolve()},Qr.ub=function(t){var e=8003;switch(t.code){case"cancel":e=8004;break;case"timeout":e=8005;break;case"receiver_unavailable":e=8006}this.h.reject(new v(8,e,t))},Qr.Cb=function(t,e){return this.b[t][e]},Qr.Fb=function(t,e){w(this,{type:"call",targetName:t,methodName:e,args:Array.prototype.slice.call(arguments,2)})},Qr.Fc=function(t,e){var i=Array.prototype.slice.call(arguments,2),n=new b,r=this.m.toString();return this.m++,this.c[r]=n,w(this,{type:"asyncCall",targetName:t,methodName:e,args:i,id:r}),n},Qr.jc=function(t){var e=this.s();this.h=new b,this.$a(e,t)},Qr.qc=function(t){this.j="available"==t,this.l()},Qr.vb=function(){var t=!!this.a&&"connected"==this.a.status;if(this.f&&!t){this.B();for(var e in this.b)this.b[e]={};T(this)}this.v=(this.f=t)?this.a.receiver.friendlyName:"",this.l()},Qr.kc=function(t,e){var i=m(e);switch(i.type){case"event":var n=i.targetName,r=i.event;this.w(n,new f(r.type,r));break;case"update":r=i.update;for(n in r){var s,i=this.b[n]||{};for(s in r[n])i[s]=r[n][s]}break;case"asyncComplete":if(n=i.id,s=i.error,i=this.c[n],delete this.c[n],i)if(s){n=new v(s.category,s.code);for(r in s)n[r]=s[r];i.reject(n)}else i.resolve()}},Qr=k.prototype,Qr.push=function(t,e){this.a.hasOwnProperty(t)?this.a[t].push(e):this.a[t]=[e]},Qr.set=function(t,e){this.a[t]=e},Qr.has=function(t){return this.a.hasOwnProperty(t)},Qr.get=function(t){return(t=this.a[t])?t.slice():null},Qr.remove=function(t,e){var i=this.a[t];if(i)for(var n=0;n=i.startTime&&tt||t>=this.a.length?null:this.a[t]):null},Wt.prototype.get=Wt.prototype.get,Wt.prototype.Ya=function(t){for(var e=[],i=0,n=0;is.startTime||(.1t);++e);this.a.splice(0,e)},Wt.prototype.evict=Wt.prototype.Sa;var ys;e("shaka.net.NetworkingEngine",pe),pe.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2};var Ts={};pe.registerScheme=function(t,e){Ts[t]=e},pe.unregisterScheme=function(t){delete Ts[t]},pe.prototype.Dc=function(t){this.b.push(t)},pe.prototype.registerRequestFilter=pe.prototype.Dc,pe.prototype.ed=function(t){var e=this.b;t=e.indexOf(t),0<=t&&e.splice(t,1)},pe.prototype.unregisterRequestFilter=pe.prototype.ed,pe.prototype.Tb=function(){this.b=[]},pe.prototype.clearAllRequestFilters=pe.prototype.Tb,pe.prototype.Eb=function(t){this.c.push(t)},pe.prototype.registerResponseFilter=pe.prototype.Eb,pe.prototype.Nb=function(t){var e=this.c;t=e.indexOf(t),0<=t&&e.splice(t,1)},pe.prototype.unregisterResponseFilter=pe.prototype.Nb,pe.prototype.Ub=function(){this.c=[]},pe.prototype.clearAllResponseFilters=pe.prototype.Ub,pe.prototype.o=function(){this.f=!0,this.b=[],this.c=[];for(var t=[],e=0;e=e||i.endTime<=t)}),null==this.b||e<=this.b||t>=this.a||(t<=this.b&&e>=this.a?this.b=this.a=null:t<=this.b&&ethis.b&&e>=this.a&&(this.a=t)))}.bind(this))};var Ss=1,Is=2,_s={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};Ae.prototype.cancel=function(){null!=this.a&&(clearTimeout(this.a),this.a=null)},Qr=Pe.prototype,Qr.o=function(){this.c=!0;var t=this.a.map(function(t){return(t.ga.close()||Promise.resolve())["catch"](j)});return this.j.reject(),this.f&&t.push(this.f.o()),this.l&&t.push(this.l.setMediaKeys(null)["catch"](j)),this.v&&this.v.cancel(),this.f=this.l=this.g=this.s=this.b=this.v=null,this.a=[],this.m=[],this.h=this.i=this.G=null,Promise.all(t)},Qr.configure=function(t){this.i=t},Qr.init=function(t,e){var i={},n=[];return this.C=e,this.m=t.offlineSessionIds,Le(this,t,e||0n||i&&1e3>n)&&(this.a.splice(e,1),t.close()),Ce(this.v)}},Qr.Cc=function(){q(this.w,function(t,e){return"expired"==e})&&this.h(new v(6,6014)),this.J(this.w)},Qr=We.prototype,Qr.o=function(){this.i=!0;var t,e=[];for(t in this.a){var i=this.a[t],n=i[0];for(this.a[t]=i.slice(0,1),n&&e.push(n.p["catch"](j)),n=1;ni.length)return null;var n=null;if(t=xi.qa(t,e))for(e=0;et[0].indexOf("-->")&&(r=t[0],t.splice(0,1));var s=new Pi(t[0]),a=Di.a(s),o=Ni(s,/[ \t]+--\x3e[ \t]+/g),u=Di.a(s);if(null==a||!o||null==u)throw new v(2,2001);if(n?(a+=i,u+=i):(a+=e,u+=e),t=we(a,u,t.slice(1).join("\n").trim()),!t)return null;for(Ni(s,/[ \t]+/gm),e=Ri(s);e;)Di.j(t,e),Ni(s,/[ \t]+/gm),e=Ri(s);return null!=r&&(t.id=r),t},Di.j=function(t,e){var i;(i=/^align:(start|middle|center|end|left|right)$/.exec(e))?(t.align=i[1],"center"==i[1]&&"center"!=t.align&&(t.position="auto",t.align="middle")):(i=/^vertical:(lr|rl)$/.exec(e))?t.vertical=i[1]:(i=/^size:(\d{1,2}|100)%$/.exec(e))?t.size=Number(i[1]):(i=/^position:(\d{1,2}|100)%(?:,(line-left|line-right|center|start|end))?$/.exec(e))?(t.position=Number(i[1]),i[2]&&(t.positionAlign=i[2])):(i=/^line:(\d{1,2}|100)%(?:,(start|end|center))?$/.exec(e))?(t.snapToLines=!1,t.line=Number(i[1]),i[2]&&(t.lineAlign=i[2])):(i=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(e))&&(t.snapToLines=!0,t.line=Number(i[1]),i[2]&&(t.lineAlign=i[2]))},Di.a=function(t){if(t=Ni(t,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g),!t)return null;var e=Number(t[2]),i=Number(t[3]);return 59=(this.c.R()?this.c.Y()-.1:this.a.duration-.1)||this.a.ended;this.h?(e||t>=this.j)&&Ui(this,!1):!e&&.5>t&&Ui(this,!0)},Qr.Ta=function(){return this.g},Qr.pc=function(){this.a.playbackRate!=(this.h||0>this.g?0:this.g)&&Vi(this,this.a.playbackRate)},Qr.xb=function(){this.b.ka(this.a,"loadedmetadata");var t=ji(this);.001>Math.abs(this.a.currentTime-t)?(S(this.b,this.a,"seeking",this.zb.bind(this)),S(this.b,this.a,"playing",this.yb.bind(this))):(S(this.b,this.a,"seeking",this.rc.bind(this)),this.a.currentTime=t)},Qr.rc=function(){this.b.ka(this.a,"seeking"),S(this.b,this.a,"seeking",this.zb.bind(this)),S(this.b,this.a,"playing",this.yb.bind(this))},Qr.zb=function(){var t=this.a.currentTime,e=Ki(this,t);.001this.oa.indexOf(t.id)}.bind(this))},jn.prototype.getTracks=jn.prototype.getTracks,jn.prototype.Lc=function(t,e){if(this.b){var i=ui(zi(this.b),t);if(i){var n=i.stream;n.allowedByApplication&&n.allowedByKeySystem&&(this.C.push({timestamp:Date.now()/1e3,id:n.id,type:t.type,fromAdaptation:!1}),i={},i[t.type]=n,"text"!=t.type&&(n=Wi(this.b).text,this.configure({abr:{enabled:!1}}),n&&(i.text=n)),qn(this,i,e))}}},jn.prototype.selectTrack=jn.prototype.Lc,jn.prototype.fc=function(){return"showing"==this.s.mode},jn.prototype.isTextTrackVisible=jn.prototype.fc,jn.prototype.Nc=function(t){this.s.mode=t?"showing":"hidden",Jn(this)},jn.prototype.setTextTrackVisibility=jn.prototype.Nc,jn.prototype.getStats=function(){Gn(this);var t={},e={},i=this.f&&this.f.getVideoPlaybackQuality?this.f.getVideoPlaybackQuality():{};return this.b&&(e=Wi(this.b),t=e.video||{},e=e.audio||{}),{width:t.width||0,height:t.height||0,streamBandwidth:t.bandwidth+e.bandwidth||0,decodedFrames:Number(i.totalVideoFrames),droppedFrames:Number(i.droppedVideoFrames),estimatedBandwidth:this.a.abr.manager.getBandwidthEstimate(),playTime:this.ra,bufferingTime:this.T,switchHistory:this.C.slice(0)}},jn.prototype.getStats=jn.prototype.getStats,jn.prototype.addTextTrack=function(t,e,i,n,r){if(!this.b)return Promise.reject();for(var s,a=zi(this.b),o=0;oe&&(e+=Math.pow(2,32)),e=e.toString(16)),this.ha(new v(3,3016,t,e))}}},Qr.Rc=function(t){var e=["output-restricted","internal-error"],i=zi(this.b),n=!1;i.streamSets.forEach(function(i){i.streams.forEach(function(i){var r=i.allowedByKeySystem;i.keyId&&i.keyId in t&&(i.allowedByKeySystem=0>e.indexOf(t[i.keyId])),r!=i.allowedByKeySystem&&(n=!0)})}),Wn(this,i),n&&Yn(this)},e("shaka.offline.Storage",Xn),Xn.support=Qn,Xn.prototype.o=function(){var t=this.l,e=this.a,i=this.g?this.g.o()["catch"](function(){}).then(function(){return Promise.all(t.map(function(t){return e.remove("segment",t)}))}).then(function(){return e.o()}):Promise.resolve();return this.j=this.c=this.g=this.a=null,i},Xn.prototype.destroy=Xn.prototype.o,Xn.prototype.configure=function(t){On(this.j,t,tr(this),{},"")},Xn.prototype.configure=Xn.prototype.configure,Xn.prototype.$c=function(t,e,i){function n(t){s=t}if(this.v)return Promise.reject(new v(9,9006));this.v=!0;var r,s=null;return er(this).then(function(){return sr(this),Zn(this,t,n,i)}.bind(this)).then(function(i){if(sr(this),this.b=i.manifest,this.h=i.Wb,this.b.presentationTimeline.R()||this.b.presentationTimeline.ea())throw new v(9,9005,t);this.b.periods.forEach(this.s.bind(this)),this.f=this.a.b.manifest++,this.m=0,i=this.b.periods.map(this.w.bind(this));var n=this.h.b,s=Me(this.h);if(n){if(!s.length)throw new v(9,9007,t);n.initData=[]}return r={key:this.f,originalManifestUri:t,duration:this.m,size:0,periods:i,sessionIds:s,drmInfo:n,appMetadata:e},Cn(this.g,r)}.bind(this)).then(function(){if(sr(this),s)throw s;return wn(this.a,"manifest",r)}.bind(this)).then(function(){return ir(this)}.bind(this)).then(function(){return _n(r)}.bind(this))["catch"](function(t){return ir(this)["catch"](j).then(function(){throw t})}.bind(this))},Xn.prototype.store=Xn.prototype.$c,Xn.prototype.remove=function(t){function e(t){6013!=t.code&&(a=t)}var i=t.offlineUri,n=/^offline:([0-9]+)$/.exec(i);if(!n)return Promise.reject(new v(9,9004,i));var r,s,a=null,o=Number(n[1]);return er(this).then(function(){return sr(this),this.a.get("manifest",o)}.bind(this)).then(function(t){if(sr(this),!t)throw new v(9,9003,i);return r=t,t=Rn(r),s=new Pe(this.c.i,e,function(){}),s.configure(this.c.getConfiguration().drm),s.init(t,!0)}.bind(this)).then(function(){return Re(s,r.sessionIds)}.bind(this)).then(function(){return s.o()}.bind(this)).then(function(){if(sr(this),a)throw a;var e=r.periods.map(function(t){return t.streams.map(function(t){var e=t.segments.map(function(t){return t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(t.uri),Number(t[1])});return t.initSegmentUri&&(t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(t.initSegmentUri),e.push(Number(t[1]))),e}).reduce(O,[])}).reduce(O,[]),i=0,n=e.length,s=this.j.progressCallback;return kn(this.a,function(r){return r=e.indexOf(r.key),0<=r&&(s(t,i/n),i++),0<=r}.bind(this))}.bind(this)).then(function(){return sr(this),this.j.progressCallback(t,1),this.a.remove("manifest",o)}.bind(this))},Xn.prototype.remove=Xn.prototype.remove,Xn.prototype.list=function(){var t=[];return er(this).then(function(){return sr(this),this.a.forEach("manifest",function(e){t.push(_n(e))})}.bind(this)).then(function(){return t})},Xn.prototype.list=Xn.prototype.list,Xn.prototype.B=function(t){var e=[],i=t.filter(function(t){return"video"==t.type&&480>=t.height});i.sort(function(t,e){return e.bandwidth-t.bandwidth}),i.length&&e.push(i[0]);for(var n=_e(this.c.getConfiguration().preferredAudioLanguage),i=[0,Ss,Is],r=t.filter(function(t){return"audio"==t.type}),i=i.map(function(t){return r.filter(function(e){return e=_e(e.language),Ie(t,n,e)})}),s=r,a=0;ae.indexOf("Apple")||(0<=i.indexOf("Version/8")?t.MediaSource=null:0<=i.indexOf("Version/9")?Lr():0<=i.indexOf("Version/10")&&(Lr(),Or()))}});var Ds=0;Br.prototype.then=function(t,e){var i=new Br;switch(this.ja){case 1:qr(this,i,t);break;case 2:qr(this,i,e);break;case Ds:this.c.push({I:i,Ea:t}),this.b.push({I:i,Ea:e})}return i},Br.prototype["catch"]=function(t){return this.then(void 0,t)},Br.prototype.W=function(t){if(this.ja==Ds){for(this.Pa=t,this.ja=1,t=0;t