(window.webpackJsonp=window.webpackJsonp||[]).push([[93],{140:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,l=r(48),d=r(0),o=(n=d)&&n.__esModule?n:{default:n},f=function(t,e,r){var n,l;return void 0===e&&(e=t.mediaSequence+t.segments.length),er){var l=[r,e];e=l[0],r=l[1]}if(e<0){for(var i=e;i=r););return Math.max(0,i)};e.safeLiveIndex=m;var v=function(t,e,r){if(!t||!t.segments)return null;if(t.endList)return c(t);if(null===e)return null;e=e||0;var n=r?m(t):t.segments.length;return f(t,t.mediaSequence+n,e)};e.playlistEnd=v;var w=function(t,e){var r=e||0,n=v(t,e,!0);return null===n?(0,l.createTimeRange)():(0,l.createTimeRange)(r,n)};e.seekable=w;var I=function(t){return t-Math.floor(t)===0},D=function(t,e){if(I(e))return e+.1*t;for(var r=e.toString().split(".")[1].length,i=1;i<=r;i++){var n=Math.pow(10,i),l=e*n;if(I(l)||i===r)return(l+t)/n}},T=D.bind(null,1),A=D.bind(null,-1),N=function(t,e,r,n){var i=void 0,l=void 0,d=t.segments.length,time=e-n;if(time<0){if(r>0)for(i=r-1;i>=0;i--)if(l=t.segments[i],(time+=A(l.duration))>0)return{mediaIndex:i,startTime:n-h(t,r,i)};return{mediaIndex:0,startTime:e}}if(r<0){for(i=r;i<0;i++)if((time-=t.targetDuration)<0)return{mediaIndex:0,startTime:e};r=0}for(i=r;iDate.now()};e.isBlacklisted=y;var E=function(t){return t.excludeUntil&&t.excludeUntil===1/0};e.isIncompatible=E;var S=function(t){var e=y(t);return!t.disabled&&!e};e.isEnabled=S;var B=function(t){return t.disabled};e.isDisabled=B;var O=function(t){for(var i=0;ir||t.height>n})).filter(function(t){return t.width===T[0].width&&t.height===T[0].height}),m=A[A.length-1],N=A.filter(function(t){return t.bandwidth===m.bandwidth})[0]);var y=N||D||v||f[0]||o[0];return y?y.playlist:null};e.simpleSelector=m;e.lastBandwidthSelector=function(){return m(this.playlists.master,this.systemBandwidth,parseInt(f(this.tech_.el(),"width"),10),parseInt(f(this.tech_.el(),"height"),10))};e.movingAverageBandwidthSelector=function(t){var e=-1;if(t<0||t>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){return e<0&&(e=this.systemBandwidth),e=t*this.systemBandwidth+(1-t)*e,m(this.playlists.master,e,parseInt(f(this.tech_.el(),"width"),10),parseInt(f(this.tech_.el(),"height"),10))}};e.minRebufferMaxBandwidthSelector=function(t){var e=t.master,r=t.currentTime,n=t.bandwidth,l=t.duration,o=t.segmentDuration,f=t.timeUntilRebuffer,m=t.currentTimeline,v=t.syncController,w=e.playlists.filter(function(t){return!d.default.isIncompatible(t)}),I=w.filter(d.default.isEnabled);I.length||(I=w.filter(function(t){return!d.default.isDisabled(t)}));var D=I.filter(d.default.hasAttribute.bind(null,"BANDWIDTH")).map(function(t){var e=v.getSyncPoint(t,l,m,r)?1:2;return{playlist:t,rebufferingImpact:d.default.estimateSegmentRequestTime(o,n,t)*e-f}}),T=D.filter(function(t){return t.rebufferingImpact<=0});return c(T,function(a,b){return h(b.playlist,a.playlist)}),T.length?T[0]:(c(D,function(a,b){return a.rebufferingImpact-b.rebufferingImpact}),D[0]||null)};e.lowestBitrateCompatibleVariantSelector=function(){var t=this.playlists.master.playlists.filter(d.default.isEnabled);return c(t,function(a,b){return h(a,b)}),t.filter(function(t){return(0,o.parseCodecs)(t.attributes.CODECS).videoCodec})[0]||null}}}]);