layNegative&&t.insertBefore(ba("span",{},{"aria-hidden":!0},"-"),this.contentEl_)
return t}
i.updateContent=function(e){if("number"==typeof this.player_.duration()){var t
t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime()
this.updateTextNode_(t)}}
return t}(ru)
uu.prototype.labelText_="Remaining Time"
uu.prototype.controlText_="Remaining Time"
Bs.registerComponent("RemainingTimeDisplay",uu)
var lu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).updateShowing()
n.on(n.player(),"durationchange",(function(e){return n.updateShowing(e)}))
return n}var i=t.prototype
i.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"})
this.contentEl_=ba("div",{className:"vjs-live-display"},{"aria-live":"off"})
this.contentEl_.appendChild(ba("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "}))
this.contentEl_.appendChild(L.createTextNode(this.localize("LIVE")))
t.appendChild(this.contentEl_)
return t}
i.dispose=function(){this.contentEl_=null
e.prototype.dispose.call(this)}
i.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()}
return t}(Bs)
Bs.registerComponent("LiveDisplay",lu)
var cu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).updateLiveEdgeStatus()
if(n.player_.liveTracker){n.updateLiveEdgeStatusHandler_=function(e){return n.updateLiveEdgeStatus(e)}
n.on(n.player_.liveTracker,"liveedgechange",n.updateLiveEdgeStatusHandler_)}return n}var i=t.prototype
i.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"})
this.textEl_=ba("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"})
t.appendChild(this.textEl_)
return t}
i.updateLiveEdgeStatus=function(){if(!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()){this.setAttribute("aria-disabled",!0)
this.addClass("vjs-at-live-edge")
this.controlText("Seek to live, currently playing live")}else{this.setAttribute("aria-disabled",!1)
this.removeClass("vjs-at-live-edge")
this.controlText("Seek to live, currently behind live")}}
i.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()}
i.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_)
this.textEl_=null
e.prototype.dispose.call(this)}
return t}($o)
cu.prototype.controlText_="Seek to live, currently playing live"
Bs.registerComponent("SeekToLive",cu)
var du=function(e,t,i){e=Number(e)
return Math.min(i,Math.max(t,isNaN(e)?t:e))},hu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).handleMouseDown_=function(e){return n.handleMouseDown(e)}
n.handleMouseUp_=function(e){return n.handleMouseUp(e)}
n.handleKeyDown_=function(e){return n.handleKeyDown(e)}
n.handleClick_=function(e){return n.handleClick(e)}
n.handleMouseMove_=function(e){return n.handleMouseMove(e)}
n.update_=function(e){return n.update(e)}
n.bar=n.getChild(n.options_.barName)
n.vertical(!!n.options_.vertical)
n.enable()
return n}var i=t.prototype
i.enabled=function(){return this.enabled_}
i.enable=function(){if(!this.enabled()){this.on("mousedown",this.handleMouseDown_)
this.on("touchstart",this.handleMouseDown_)
this.on("keydown",this.handleKeyDown_)
this.on("click",this.handleClick_)
this.on(this.player_,"controlsvisible",this.update)
this.playerEvent&&this.on(this.player_,this.playerEvent,this.update)
this.removeClass("disabled")
this.setAttribute("tabindex",0)
this.enabled_=!0}}
i.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument
this.off("mousedown",this.handleMouseDown_)
this.off("touchstart",this.handleMouseDown_)
this.off("keydown",this.handleKeyDown_)
this.off("click",this.handleClick_)
this.off(this.player_,"controlsvisible",this.update_)
this.off(e,"mousemove",this.handleMouseMove_)
this.off(e,"mouseup",this.handleMouseUp_)
this.off(e,"touchmove",this.handleMouseMove_)
this.off(e,"touchend",this.handleMouseUp_)
this.removeAttribute("tabindex")
this.addClass("disabled")
this.playerEvent&&this.off(this.player_,this.playerEvent,this.update)
this.enabled_=!1}}
i.createEl=function(t,i,n){void 0===i&&(i={})
void 0===n&&(n={})
i.className=i.className+" vjs-slider"
i=Hr({tabIndex:0},i)
n=Hr({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n)
return e.prototype.createEl.call(this,t,i,n)}
i.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument
"mousedown"===e.type&&e.preventDefault()
"touchstart"!==e.type||na||e.preventDefault()
La()
this.addClass("vjs-sliding")
this.trigger("slideractive")
this.on(t,"mousemove",this.handleMouseMove_)
this.on(t,"mouseup",this.handleMouseUp_)
this.on(t,"touchmove",this.handleMouseMove_)
this.on(t,"touchend",this.handleMouseUp_)
this.handleMouseMove(e,!0)}
i.handleMouseMove=function(e){}
i.handleMouseUp=function(){var e=this.bar.el_.ownerDocument
Da()
this.removeClass("vjs-sliding")
this.trigger("sliderinactive")
this.off(e,"mousemove",this.handleMouseMove_)
this.off(e,"mouseup",this.handleMouseUp_)
this.off(e,"touchmove",this.handleMouseMove_)
this.off(e,"touchend",this.handleMouseUp_)
this.update()}
i.update=function(){var e=this
if(this.el_&&this.bar){var t=this.getProgress()
if(t===this.progress_)return t
this.progress_=t
this.requestNamedAnimationFrame("Slider#update",(function(){var i=e.vertical()?"height":"width"
e.bar.el().style[i]=(100*t).toFixed(2)+"%"}))
return t}}
i.getProgress=function(){return Number(du(this.getPercent(),0,1).toFixed(4))}
i.calculateDistance=function(e){var t=Na(this.el_,e)
return this.vertical()?t.y:t.x}
i.handleKeyDown=function(t){if(M.isEventKey(t,"Left")||M.isEventKey(t,"Down")){t.preventDefault()
t.stopPropagation()
this.stepBack()}else if(M.isEventKey(t,"Right")||M.isEventKey(t,"Up")){t.preventDefault()
t.stopPropagation()
this.stepForward()}else e.prototype.handleKeyDown.call(this,t)}
i.handleClick=function(e){e.stopPropagation()
e.preventDefault()}
i.vertical=function(e){if(void 0===e)return this.vertical_||!1
this.vertical_=!!e
this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}
return t}(Bs)
Bs.registerComponent("Slider",hu)
var pu=function(e,t){return du(e/t*100,0,100).toFixed(2)+"%"},fu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).partEls_=[]
n.on(t,"progress",(function(e){return n.update(e)}))
return n}var i=t.prototype
i.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),i=ba("span",{className:"vjs-control-text"}),n=ba("span",{textContent:this.localize("Loaded")}),r=L.createTextNode(": ")
this.percentageEl_=ba("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"})
t.appendChild(i)
i.appendChild(n)
i.appendChild(r)
i.appendChild(this.percentageEl_)
return t}
i.dispose=function(){this.partEls_=null
this.percentageEl_=null
e.prototype.dispose.call(this)}
i.update=function(e){var t=this
this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,i=t.player_.buffered(),n=e&&e.isLive()?e.seekableEnd():t.player_.duration(),r=t.player_.bufferedEnd(),a=t.partEls_,s=pu(r,n)
if(t.percent_!==s){t.el_.style.width=s
Ta(t.percentageEl_,s)
t.percent_=s}for(var o=0;o<i.length;o++){var u=i.start(o),l=i.end(o),c=a[o]
if(!c){c=t.el_.appendChild(ba())
a[o]=c}if(c.dataset.start!==u||c.dataset.end!==l){c.dataset.start=u
c.dataset.end=l
c.style.left=pu(u,r)
c.style.width=pu(l-u,r)}}for(var d=a.length;d>i.length;d--)t.el_.removeChild(a[d-1])
a.length=i.length}))}
return t}(Bs)
Bs.registerComponent("LoadProgressBar",fu)
var mu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).update=vs(gs(N(n),n.update),ms)
return n}var i=t.prototype
i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}
i.update=function(e,t,i){var n=Ma(this.el_),r=Ra(this.player_.el()),a=e.width*t
if(r&&n){var s=e.left-r.left+a,o=e.width-a+(r.right-e.right),u=n.width/2
s<u?u+=u-s:o<u&&(u=o)
u<0?u=0:u>n.width&&(u=n.width)
u=Math.round(u)
this.el_.style.right="-"+u+"px"
this.write(i)}}
i.write=function(e){Ta(this.el_,e)}
i.updateTime=function(e,t,i,n){var r=this
this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var a,s=r.player_.duration()
if(r.player_.liveTracker&&r.player_.liveTracker.isLive()){var o=r.player_.liveTracker.liveWindow(),u=o-t*o
a=(u<1?"":"-")+nu(u,o)}else a=nu(i,s)
r.update(e,t,a)
n&&n()}))}
return t}(Bs)
Bs.registerComponent("TimeTooltip",mu)
var gu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).update=vs(gs(N(n),n.update),ms)
return n}var i=t.prototype
i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}
i.update=function(e,t){var i=this.getChild("timeTooltip")
if(i){var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()
i.updateTime(e,t,n)}}
return t}(Bs)
gu.prototype.options_={children:[]}
da||Jr||gu.prototype.options_.children.push("timeTooltip")
Bs.registerComponent("PlayProgressBar",gu)
var vu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).update=vs(gs(N(n),n.update),ms)
return n}var i=t.prototype
i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})}
i.update=function(e,t){var i=this,n=t*this.player_.duration()
this.getChild("timeTooltip").updateTime(e,t,n,(function(){i.el_.style.left=e.width*t+"px"}))}
return t}(Bs)
vu.prototype.options_={children:["timeTooltip"]}
Bs.registerComponent("MouseTimeDisplay",vu)
var yu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).setEventHandlers_()
return n}var i=t.prototype
i.setEventHandlers_=function(){var e=this
this.update_=gs(this,this.update)
this.update=vs(this.update_,ms)
this.on(this.player_,["ended","durationchange","timeupdate"],this.update)
this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update)
this.updateInterval=null
this.enableIntervalHandler_=function(t){return e.enableInterval_(t)}
this.disableIntervalHandler_=function(t){return e.disableInterval_(t)}
this.on(this.player_,["playing"],this.enableIntervalHandler_)
this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_)
"hidden"in L&&"visibilityState"in L&&this.on(L,"visibilitychange",this.toggleVisibility_)}
i.toggleVisibility_=function(e){if("hidden"===L.visibilityState){this.cancelNamedAnimationFrame("SeekBar#update")
this.cancelNamedAnimationFrame("Slider#update")
this.disableInterval_(e)}else{this.player_.ended()||this.player_.paused()||this.enableInterval_()
this.update()}}
i.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,ms))}
i.disableInterval_=function(e){if(!(this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type)&&this.updateInterval){this.clearInterval(this.updateInterval)
this.updateInterval=null}}
i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}
i.update=function(t){var i=this
if("hidden"!==L.visibilityState){var n=e.prototype.update.call(this)
this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=i.player_.ended()?i.player_.duration():i.getCurrentTime_(),t=i.player_.liveTracker,r=i.player_.duration()
t&&t.isLive()&&(r=i.player_.liveTracker.liveCurrentTime())
if(i.percent_!==n){i.el_.setAttribute("aria-valuenow",(100*n).toFixed(2))
i.percent_=n}if(i.currentTime_!==e||i.duration_!==r){i.el_.setAttribute("aria-valuetext",i.localize("progress bar timing: currentTime={1} duration={2}",[nu(e,r),nu(r,r)],"{1} of {2}"))
i.currentTime_=e
i.duration_=r}i.bar&&i.bar.update(Ra(i.el()),i.getProgress())}))
return n}}
i.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser()
this.player_.currentTime(e)}
i.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}
i.getPercent=function(){var e,t=this.getCurrentTime_(),i=this.player_.liveTracker
if(i&&i.isLive()){e=(t-i.seekableStart())/i.liveWindow()
i.atLiveEdge()&&(e=1)}else e=t/this.player_.duration()
return e}
i.handleMouseDown=function(t){if(Ha(t)){t.stopPropagation()
this.videoWasPlaying=!this.player_.paused()
this.player_.pause()
e.prototype.handleMouseDown.call(this,t)}}
i.handleMouseMove=function(e,t){void 0===t&&(t=!1)
if(Ha(e)){t||this.player_.scrubbing()||this.player_.scrubbing(!0)
var i,n=this.calculateDistance(e),r=this.player_.liveTracker
if(r&&r.isLive()){if(n>=.99){r.seekToLiveEdge()
return}var a=r.seekableStart(),s=r.liveCurrentTime();(i=a+n*r.liveWindow())>=s&&(i=s)
i<=a&&(i=a+.1)
if(i===1/0)return}else(i=n*this.player_.duration())===this.player_.duration()&&(i-=.1)
this.userSeek_(i)}}
i.enable=function(){e.prototype.enable.call(this)
var t=this.getChild("mouseTimeDisplay")
t&&t.show()}
i.disable=function(){e.prototype.disable.call(this)
var t=this.getChild("mouseTimeDisplay")
t&&t.hide()}
i.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t)
t&&t.stopPropagation()
this.player_.scrubbing(!1)
this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})
this.videoWasPlaying?zs(this.player_.play()):this.update_()}
i.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)}
i.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)}
i.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()}
i.handleKeyDown=function(t){var i=this.player_.liveTracker
if(M.isEventKey(t,"Space")||M.isEventKey(t,"Enter")){t.preventDefault()
t.stopPropagation()
this.handleAction(t)}else if(M.isEventKey(t,"Home")){t.preventDefault()
t.stopPropagation()
this.userSeek_(0)}else if(M.isEventKey(t,"End")){t.preventDefault()
t.stopPropagation()
i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration())}else if(/^[0-9]$/.test(M(t))){t.preventDefault()
t.stopPropagation()
var n=10*(M.codes[M(t)]-M.codes[0])/100
i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*n):this.userSeek_(this.player_.duration()*n)}else if(M.isEventKey(t,"PgDn")){t.preventDefault()
t.stopPropagation()
this.userSeek_(this.player_.currentTime()-60)}else if(M.isEventKey(t,"PgUp")){t.preventDefault()
t.stopPropagation()
this.userSeek_(this.player_.currentTime()+60)}else e.prototype.handleKeyDown.call(this,t)}
i.dispose=function(){this.disableInterval_()
this.off(this.player_,["ended","durationchange","timeupdate"],this.update)
this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update)
this.off(this.player_,["playing"],this.enableIntervalHandler_)
this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_)
"hidden"in L&&"visibilityState"in L&&this.off(L,"visibilitychange",this.toggleVisibility_)
e.prototype.dispose.call(this)}
return t}(hu)
yu.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"}
da||Jr||yu.prototype.options_.children.splice(1,0,"mouseTimeDisplay")
Bs.registerComponent("SeekBar",yu)
var _u=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).handleMouseMove=vs(gs(N(n),n.handleMouseMove),ms)
n.throttledHandleMouseSeek=vs(gs(N(n),n.handleMouseSeek),ms)
n.handleMouseUpHandler_=function(e){return n.handleMouseUp(e)}
n.handleMouseDownHandler_=function(e){return n.handleMouseDown(e)}
n.enable()
return n}var i=t.prototype
i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})}
i.handleMouseMove=function(e){var t=this.getChild("seekBar")
if(t){var i=t.getChild("playProgressBar"),n=t.getChild("mouseTimeDisplay")
if(i||n){var r=t.el(),a=Ma(r),s=Na(r,e).x
s=du(s,0,1)
n&&n.update(a,s)
i&&i.update(a,t.getProgress())}}}
i.handleMouseSeek=function(e){var t=this.getChild("seekBar")
t&&t.handleMouseMove(e)}
i.enabled=function(){return this.enabled_}
i.disable=function(){this.children().forEach((function(e){return e.disable&&e.disable()}))
if(this.enabled()){this.off(["mousedown","touchstart"],this.handleMouseDownHandler_)
this.off(this.el_,"mousemove",this.handleMouseMove)
this.removeListenersAddedOnMousedownAndTouchstart()
this.addClass("disabled")
this.enabled_=!1
if(this.player_.scrubbing()){var e=this.getChild("seekBar")
this.player_.scrubbing(!1)
e.videoWasPlaying&&zs(this.player_.play())}}}
i.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()}))
if(!this.enabled()){this.on(["mousedown","touchstart"],this.handleMouseDownHandler_)
this.on(this.el_,"mousemove",this.handleMouseMove)
this.removeClass("disabled")
this.enabled_=!0}}
i.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument
this.off(e,"mousemove",this.throttledHandleMouseSeek)
this.off(e,"touchmove",this.throttledHandleMouseSeek)
this.off(e,"mouseup",this.handleMouseUpHandler_)
this.off(e,"touchend",this.handleMouseUpHandler_)}
i.handleMouseDown=function(e){var t=this.el_.ownerDocument,i=this.getChild("seekBar")
i&&i.handleMouseDown(e)
this.on(t,"mousemove",this.throttledHandleMouseSeek)
this.on(t,"touchmove",this.throttledHandleMouseSeek)
this.on(t,"mouseup",this.handleMouseUpHandler_)
this.on(t,"touchend",this.handleMouseUpHandler_)}
i.handleMouseUp=function(e){var t=this.getChild("seekBar")
t&&t.handleMouseUp(e)
this.removeListenersAddedOnMousedownAndTouchstart()}
return t}(Bs)
_u.prototype.options_={children:["seekBar"]}
Bs.registerComponent("ProgressControl",_u)
var bu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return n.handlePictureInPictureChange(e)}))
n.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return n.handlePictureInPictureEnabledChange(e)}))
n.on(t,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(function(){if("audio"===t.currentType().substring(0,5)||t.audioPosterMode()||t.audioOnlyMode()){t.isInPictureInPicture()&&t.exitPictureInPicture()
n.hide()}else n.show()}))
n.disable()
return n}var i=t.prototype
i.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)}
i.handlePictureInPictureEnabledChange=function(){L.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()}
i.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture")
this.handlePictureInPictureEnabledChange()}
i.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}
return t}($o)
bu.prototype.controlText_="Picture-in-Picture"
Bs.registerComponent("PictureInPictureToggle",bu)
var Tu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).on(t,"fullscreenchange",(function(e){return n.handleFullscreenChange(e)}))
!1===L[t.fsApi_.fullscreenEnabled]&&n.disable()
return n}var i=t.prototype
i.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)}
i.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")}
i.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}
return t}($o)
Tu.prototype.controlText_="Fullscreen"
Bs.registerComponent("FullscreenToggle",Tu)
var ku=function(e){B(t,e)
function t(){return e.apply(this,arguments)||this}t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-volume-level"})
t.appendChild(e.prototype.createEl.call(this,"span",{className:"vjs-control-text"}))
return t}
return t}(Bs)
Bs.registerComponent("VolumeLevel",ku)
var Su=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).update=vs(gs(N(n),n.update),ms)
return n}var i=t.prototype
i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}
i.update=function(e,t,i,n){if(!i){var r=Ra(this.el_),a=Ra(this.player_.el()),s=e.width*t
if(!a||!r)return
var o=e.left-a.left+s,u=e.width-s+(a.right-e.right),l=r.width/2
o<l?l+=l-o:u<l&&(l=u)
l<0?l=0:l>r.width&&(l=r.width)
this.el_.style.right="-"+l+"px"}this.write(n+"%")}
i.write=function(e){Ta(this.el_,e)}
i.updateVolume=function(e,t,i,n,r){var a=this
this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){a.update(e,t,i,n.toFixed(0))
r&&r()}))}
return t}(Bs)
Bs.registerComponent("VolumeLevelTooltip",Su)
var Eu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).update=vs(gs(N(n),n.update),ms)
return n}var i=t.prototype
i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})}
i.update=function(e,t,i){var n=this,r=100*t
this.getChild("volumeLevelTooltip").updateVolume(e,t,i,r,(function(){i?n.el_.style.bottom=e.height*t+"px":n.el_.style.left=e.width*t+"px"}))}
return t}(Bs)
Eu.prototype.options_={children:["volumeLevelTooltip"]}
Bs.registerComponent("MouseVolumeLevelDisplay",Eu)
var Cu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).on("slideractive",(function(e){return n.updateLastVolume_(e)}))
n.on(t,"volumechange",(function(e){return n.updateARIAAttributes(e)}))
t.ready((function(){return n.updateARIAAttributes()}))
return n}var i=t.prototype
i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}
i.handleMouseDown=function(t){Ha(t)&&e.prototype.handleMouseDown.call(this,t)}
i.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay")
if(t){var i=this.el(),n=Ra(i),r=this.vertical(),a=Na(i,e)
a=r?a.y:a.x
a=du(a,0,1)
t.update(n,a,r)}if(Ha(e)){this.checkMuted()
this.player_.volume(this.calculateDistance(e))}}
i.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)}
i.getPercent=function(){return this.player_.muted()?0:this.player_.volume()}
i.stepForward=function(){this.checkMuted()
this.player_.volume(this.player_.volume()+.1)}
i.stepBack=function(){this.checkMuted()
this.player_.volume(this.player_.volume()-.1)}
i.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_()
this.el_.setAttribute("aria-valuenow",t)
this.el_.setAttribute("aria-valuetext",t+"%")}
i.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())}
i.updateLastVolume_=function(){var e=this,t=this.player_.volume()
this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))}
return t}(hu)
Cu.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"}
da||Jr||Cu.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay")
Cu.prototype.playerEvent="volumechange"
Bs.registerComponent("VolumeBar",Cu)
var wu=function(e){B(t,e)
function t(t,i){var n
void 0===i&&(i={})
i.vertical=i.vertical||!1
if(void 0===i.volumeBar||Wr(i.volumeBar)){i.volumeBar=i.volumeBar||{}
i.volumeBar.vertical=i.vertical}n=e.call(this,t,i)||this
!function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden")
e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(N(n),t)
n.throttledHandleMouseMove=vs(gs(N(n),n.handleMouseMove),ms)
n.handleMouseUpHandler_=function(e){return n.handleMouseUp(e)}
n.on("mousedown",(function(e){return n.handleMouseDown(e)}))
n.on("touchstart",(function(e){return n.handleMouseDown(e)}))
n.on("mousemove",(function(e){return n.handleMouseMove(e)}))
n.on(n.volumeBar,["focus","slideractive"],(function(){n.volumeBar.addClass("vjs-slider-active")
n.addClass("vjs-slider-active")
n.trigger("slideractive")}))
n.on(n.volumeBar,["blur","sliderinactive"],(function(){n.volumeBar.removeClass("vjs-slider-active")
n.removeClass("vjs-slider-active")
n.trigger("sliderinactive")}))
return n}var i=t.prototype
i.createEl=function(){var t="vjs-volume-horizontal"
this.options_.vertical&&(t="vjs-volume-vertical")
return e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})}
i.handleMouseDown=function(e){var t=this.el_.ownerDocument
this.on(t,"mousemove",this.throttledHandleMouseMove)
this.on(t,"touchmove",this.throttledHandleMouseMove)
this.on(t,"mouseup",this.handleMouseUpHandler_)
this.on(t,"touchend",this.handleMouseUpHandler_)}
i.handleMouseUp=function(e){var t=this.el_.ownerDocument
this.off(t,"mousemove",this.throttledHandleMouseMove)
this.off(t,"touchmove",this.throttledHandleMouseMove)
this.off(t,"mouseup",this.handleMouseUpHandler_)
this.off(t,"touchend",this.handleMouseUpHandler_)}
i.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)}
return t}(Bs)
wu.prototype.options_={children:["volumeBar"]}
Bs.registerComponent("VolumeControl",wu)
var Iu=function(e){B(t,e)
function t(t,i){var n
n=e.call(this,t,i)||this
!function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden")
e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(N(n),t)
n.on(t,["loadstart","volumechange"],(function(e){return n.update(e)}))
return n}var i=t.prototype
i.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)}
i.handleClick=function(e){var t=this.player_.volume(),i=this.player_.lastVolume_()
if(0===t){var n=i<.1?.1:i
this.player_.volume(n)
this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}
i.update=function(e){this.updateIcon_()
this.updateControlText_()}
i.updateIcon_=function(){var e=this.player_.volume(),t=3
da&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted)
0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2)
for(var i=0;i<4;i++)Ca(this.el_,"vjs-vol-"+i)
Ea(this.el_,"vjs-vol-"+t)}
i.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute"
this.controlText()!==e&&this.controlText(e)}
return t}($o)
Iu.prototype.controlText_="Mute"
Bs.registerComponent("MuteToggle",Iu)
var Pu=function(e){B(t,e)
function t(t,i){var n
void 0===i&&(i={})
void 0!==i.inline?i.inline=i.inline:i.inline=!0
if(void 0===i.volumeControl||Wr(i.volumeControl)){i.volumeControl=i.volumeControl||{}
i.volumeControl.vertical=!i.inline}(n=e.call(this,t,i)||this).handleKeyPressHandler_=function(e){return n.handleKeyPress(e)}
n.on(t,["loadstart"],(function(e){return n.volumePanelState_(e)}))
n.on(n.muteToggle,"keyup",(function(e){return n.handleKeyPress(e)}))
n.on(n.volumeControl,"keyup",(function(e){return n.handleVolumeControlKeyUp(e)}))
n.on("keydown",(function(e){return n.handleKeyPress(e)}))
n.on("mouseover",(function(e){return n.handleMouseOver(e)}))
n.on("mouseout",(function(e){return n.handleMouseOut(e)}))
n.on(n.volumeControl,["slideractive"],n.sliderActive_)
n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_)
return n}var i=t.prototype
i.sliderActive_=function(){this.addClass("vjs-slider-active")}
i.sliderInactive_=function(){this.removeClass("vjs-slider-active")}
i.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden")
this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}
i.createEl=function(){var t="vjs-volume-panel-horizontal"
this.options_.inline||(t="vjs-volume-panel-vertical")
return e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})}
i.dispose=function(){this.handleMouseOut()
e.prototype.dispose.call(this)}
i.handleVolumeControlKeyUp=function(e){M.isEventKey(e,"Esc")&&this.muteToggle.focus()}
i.handleMouseOver=function(e){this.addClass("vjs-hover")
us(L,"keyup",this.handleKeyPressHandler_)}
i.handleMouseOut=function(e){this.removeClass("vjs-hover")
ls(L,"keyup",this.handleKeyPressHandler_)}
i.handleKeyPress=function(e){M.isEventKey(e,"Esc")&&this.handleMouseOut()}
return t}(Bs)
Pu.prototype.options_={children:["muteToggle","volumeControl"]}
Bs.registerComponent("VolumePanel",Pu)
var xu=function(e){B(t,e)
function t(t,i){var n
n=e.call(this,t,i)||this
i&&(n.menuButton_=i.menuButton)
n.focusedChild_=-1
n.on("keydown",(function(e){return n.handleKeyDown(e)}))
n.boundHandleBlur_=function(e){return n.handleBlur(e)}
n.boundHandleTapClick_=function(e){return n.handleTapClick(e)}
return n}var i=t.prototype
i.addEventListenerForItem=function(e){if(e instanceof Bs){this.on(e,"blur",this.boundHandleBlur_)
this.on(e,["tap","click"],this.boundHandleTapClick_)}}
i.removeEventListenerForItem=function(e){if(e instanceof Bs){this.off(e,"blur",this.boundHandleBlur_)
this.off(e,["tap","click"],this.boundHandleTapClick_)}}
i.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t))
this.removeEventListenerForItem(t)
e.prototype.removeChild.call(this,t)}
i.addItem=function(e){var t=this.addChild(e)
t&&this.addEventListenerForItem(t)}
i.createEl=function(){var t=this.options_.contentElType||"ul"
this.contentEl_=ba(t,{className:"vjs-menu-content"})
this.contentEl_.setAttribute("role","menu")
var i=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"})
i.appendChild(this.contentEl_)
us(i,"click",(function(e){e.preventDefault()
e.stopImmediatePropagation()}))
return i}
i.dispose=function(){this.contentEl_=null
this.boundHandleBlur_=null
this.boundHandleTapClick_=null
e.prototype.dispose.call(this)}
i.handleBlur=function(e){var t=e.relatedTarget||L.activeElement
if(!this.children().some((function(e){return e.el()===t}))){var i=this.menuButton_
i&&i.buttonPressed_&&t!==i.el().firstChild&&i.unpressButton()}}
i.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton()
var t=this.children()
if(!Array.isArray(t))return
var i=t.filter((function(t){return t.el()===e.target}))[0]
if(!i)return
"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}}
i.handleKeyDown=function(e){if(M.isEventKey(e,"Left")||M.isEventKey(e,"Down")){e.preventDefault()
e.stopPropagation()
this.stepForward()}else if(M.isEventKey(e,"Right")||M.isEventKey(e,"Up")){e.preventDefault()
e.stopPropagation()
this.stepBack()}}
i.stepForward=function(){var e=0
void 0!==this.focusedChild_&&(e=this.focusedChild_+1)
this.focus(e)}
i.stepBack=function(){var e=0
void 0!==this.focusedChild_&&(e=this.focusedChild_-1)
this.focus(e)}
i.focus=function(e){void 0===e&&(e=0)
var t=this.children().slice()
t.length&&t[0].hasClass("vjs-menu-title")&&t.shift()
if(t.length>0){e<0?e=0:e>=t.length&&(e=t.length-1)
this.focusedChild_=e
t[e].el_.focus()}}
return t}(Bs)
Bs.registerComponent("Menu",xu)
var Au=function(e){B(t,e)
function t(t,i){var n
void 0===i&&(i={});(n=e.call(this,t,i)||this).menuButton_=new $o(t,i)
n.menuButton_.controlText(n.controlText_)
n.menuButton_.el_.setAttribute("aria-haspopup","true")
var r=$o.prototype.buildCSSClass()
n.menuButton_.el_.className=n.buildCSSClass()+" "+r
n.menuButton_.removeClass("vjs-control")
n.addChild(n.menuButton_)
n.update()
n.enabled_=!0
var a=function(e){return n.handleClick(e)}
n.handleMenuKeyUp_=function(e){return n.handleMenuKeyUp(e)}
n.on(n.menuButton_,"tap",a)
n.on(n.menuButton_,"click",a)
n.on(n.menuButton_,"keydown",(function(e){return n.handleKeyDown(e)}))
n.on(n.menuButton_,"mouseenter",(function(){n.addClass("vjs-hover")
n.menu.show()
us(L,"keyup",n.handleMenuKeyUp_)}))
n.on("mouseleave",(function(e){return n.handleMouseLeave(e)}))
n.on("keydown",(function(e){return n.handleSubmenuKeyDown(e)}))
return n}var i=t.prototype
i.update=function(){var e=this.createMenu()
if(this.menu){this.menu.dispose()
this.removeChild(this.menu)}this.menu=e
this.addChild(e)
this.buttonPressed_=!1
this.menuButton_.el_.setAttribute("aria-expanded","false")
this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()}
i.createMenu=function(){var e=new xu(this.player_,{menuButton:this})
this.hideThreshold_=0
if(this.options_.title){var t=ba("li",{className:"vjs-menu-title",textContent:Ls(this.options_.title),tabIndex:-1}),i=new Bs(this.player_,{el:t})
e.addItem(i)}this.items=this.createItems()
if(this.items)for(var n=0;n<this.items.length;n++)e.addItem(this.items[n])
return e}
i.createItems=function(){}
i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})}
i.buildWrapperCSSClass=function(){var t="vjs-menu-button"
!0===this.options_.inline?t+="-inline":t+="-popup"
return"vjs-menu-button "+t+" "+$o.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)}
i.buildCSSClass=function(){var t="vjs-menu-button"
!0===this.options_.inline?t+="-inline":t+="-popup"
return"vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)}
i.controlText=function(e,t){void 0===t&&(t=this.menuButton_.el())
return this.menuButton_.controlText(e,t)}
i.dispose=function(){this.handleMouseLeave()
e.prototype.dispose.call(this)}
i.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()}
i.handleMouseLeave=function(e){this.removeClass("vjs-hover")
ls(L,"keyup",this.handleMenuKeyUp_)}
i.focus=function(){this.menuButton_.focus()}
i.blur=function(){this.menuButton_.blur()}
i.handleKeyDown=function(e){if(M.isEventKey(e,"Esc")||M.isEventKey(e,"Tab")){this.buttonPressed_&&this.unpressButton()
if(!M.isEventKey(e,"Tab")){e.preventDefault()
this.menuButton_.focus()}}else if((M.isEventKey(e,"Up")||M.isEventKey(e,"Down"))&&!this.buttonPressed_){e.preventDefault()
this.pressButton()}}
i.handleMenuKeyUp=function(e){(M.isEventKey(e,"Esc")||M.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")}
i.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)}
i.handleSubmenuKeyDown=function(e){if(M.isEventKey(e,"Esc")||M.isEventKey(e,"Tab")){this.buttonPressed_&&this.unpressButton()
if(!M.isEventKey(e,"Tab")){e.preventDefault()
this.menuButton_.focus()}}}
i.pressButton=function(){if(this.enabled_){this.buttonPressed_=!0
this.menu.show()
this.menu.lockShowing()
this.menuButton_.el_.setAttribute("aria-expanded","true")
if(da&&ya())return
this.menu.focus()}}
i.unpressButton=function(){if(this.enabled_){this.buttonPressed_=!1
this.menu.unlockShowing()
this.menu.hide()
this.menuButton_.el_.setAttribute("aria-expanded","false")}}
i.disable=function(){this.unpressButton()
this.enabled_=!1
this.addClass("vjs-disabled")
this.menuButton_.disable()}
i.enable=function(){this.enabled_=!0
this.removeClass("vjs-disabled")
this.menuButton_.enable()}
return t}(Bs)
Bs.registerComponent("MenuButton",Au)
var Ou=function(e){B(t,e)
function t(t,i){var n,r=i.tracks;(n=e.call(this,t,i)||this).items.length<=1&&n.hide()
if(!r)return N(n)
var a=gs(N(n),n.update)
r.addEventListener("removetrack",a)
r.addEventListener("addtrack",a)
r.addEventListener("labelchange",a)
n.player_.on("ready",a)
n.player_.on("dispose",(function(){r.removeEventListener("removetrack",a)
r.removeEventListener("addtrack",a)
r.removeEventListener("labelchange",a)}))
return n}return t}(Au)
Bs.registerComponent("TrackButton",Ou)
var Lu=["Tab","Esc","Up","Down","Right","Left"],Du=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).selectable=i.selectable
n.isSelected_=i.selected||!1
n.multiSelectable=i.multiSelectable
n.selected(n.isSelected_)
n.selectable?n.multiSelectable?n.el_.setAttribute("role","menuitemcheckbox"):n.el_.setAttribute("role","menuitemradio"):n.el_.setAttribute("role","menuitem")
return n}var i=t.prototype
i.createEl=function(t,i,n){this.nonIconControl=!0
var r=e.prototype.createEl.call(this,"li",Hr({className:"vjs-menu-item",tabIndex:-1},i),n)
r.replaceChild(ba("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),r.querySelector(".vjs-icon-placeholder"))
return r}
i.handleKeyDown=function(t){Lu.some((function(e){return M.isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)}
i.handleClick=function(e){this.selected(!0)}
i.selected=function(e){if(this.selectable)if(e){this.addClass("vjs-selected")
this.el_.setAttribute("aria-checked","true")
this.controlText(", selected")
this.isSelected_=!0}else{this.removeClass("vjs-selected")
this.el_.setAttribute("aria-checked","false")
this.controlText("")
this.isSelected_=!1}}
return t}(qo)
Bs.registerComponent("MenuItem",Du)
var Ru=function(e){B(t,e)
function t(t,i){var n,r=i.track,a=t.textTracks()
i.label=r.label||r.language||"Unknown"
i.selected="showing"===r.mode;(n=e.call(this,t,i)||this).track=r
n.kinds=(i.kinds||[i.kind||n.track.kind]).filter(Boolean)
var s=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i]
n.handleTracksChange.apply(N(n),t)},o=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i]
n.handleSelectedLanguageChange.apply(N(n),t)}
t.on(["loadstart","texttrackchange"],s)
a.addEventListener("change",s)
a.addEventListener("selectedlanguagechange",o)
n.on("dispose",(function(){t.off(["loadstart","texttrackchange"],s)
a.removeEventListener("change",s)
a.removeEventListener("selectedlanguagechange",o)}))
if(void 0===a.onchange){var u
n.on(["tap","click"],(function(){if("object"!=typeof x.Event)try{u=new x.Event("change")}catch(e){}u||(u=L.createEvent("Event")).initEvent("change",!0,!0)
a.dispatchEvent(u)}))}n.handleTracksChange()
return n}var i=t.prototype
i.handleClick=function(t){var i=this.track,n=this.player_.textTracks()
e.prototype.handleClick.call(this,t)
if(n)for(var r=0;r<n.length;r++){var a=n[r];-1!==this.kinds.indexOf(a.kind)&&(a===i?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled"))}}
i.handleTracksChange=function(e){var t="showing"===this.track.mode
t!==this.isSelected_&&this.selected(t)}
i.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage
if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return
this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}
i.dispose=function(){this.track=null
e.prototype.dispose.call(this)}
return t}(Du)
Bs.registerComponent("TextTrackMenuItem",Ru)
var Mu=function(e){B(t,e)
function t(t,i){i.track={player:t,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"}
i.kinds||(i.kinds=[i.kind])
i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off"
i.selectable=!0
i.multiSelectable=!1
return e.call(this,t,i)||this}var i=t.prototype
i.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var a=t[n]
if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.mode){i=!1
break}}i!==this.isSelected_&&this.selected(i)}
i.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,r=t.length;n<r;n++){var a=t[n]
if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){i=!1
break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}
return t}(Ru)
Bs.registerComponent("OffTextTrackMenuItem",Mu)
var Nu=function(e){B(t,e)
function t(t,i){void 0===i&&(i={})
i.tracks=t.textTracks()
return e.call(this,t,i)||this}t.prototype.createItems=function(e,t){void 0===e&&(e=[])
void 0===t&&(t=Ru)
var i
this.label_&&(i=this.label_+" off")
e.push(new Mu(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i}))
this.hideThreshold_+=1
var n=this.player_.textTracks()
Array.isArray(this.kinds_)||(this.kinds_=[this.kind_])
for(var r=0;r<n.length;r++){var a=n[r]
if(this.kinds_.indexOf(a.kind)>-1){var s=new t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1})
s.addClass("vjs-"+a.kind+"-menu-item")
e.push(s)}}return e}
return t}(Ou)
Bs.registerComponent("TextTrackButton",Nu)
var Uu=function(e){B(t,e)
function t(t,i){var n,r=i.track,a=i.cue,s=t.currentTime()
i.selectable=!0
i.multiSelectable=!1
i.label=a.text
i.selected=a.startTime<=s&&s<a.endTime;(n=e.call(this,t,i)||this).track=r
n.cue=a
return n}t.prototype.handleClick=function(t){e.prototype.handleClick.call(this)
this.player_.currentTime(this.cue.startTime)}
return t}(Du)
Bs.registerComponent("ChaptersTrackMenuItem",Uu)
var Bu=function(e){B(t,e)
function t(t,i,n){var r;(r=e.call(this,t,i,n)||this).selectCurrentItem_=function(){r.items.forEach((function(e){e.selected(r.track_.activeCues[0]===e.cue)}))}
return r}var i=t.prototype
i.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)}
i.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)}
i.update=function(t){if(!t||!t.track||"chapters"===t.track.kind){var i=this.findChaptersTrack()
if(i!==this.track_){this.setTrack(i)
e.prototype.update.call(this)}else(!this.items||i&&i.cues&&i.cues.length!==this.items.length)&&e.prototype.update.call(this)}}
i.setTrack=function(e){if(this.track_!==e){this.updateHandler_||(this.updateHandler_=this.update.bind(this))
if(this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_)
t&&t.removeEventListener("load",this.updateHandler_)
this.track_.removeEventListener("cuechange",this.selectCurrentItem_)
this.track_=null}this.track_=e
if(this.track_){this.track_.mode="hidden"
var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_)
i&&i.addEventListener("load",this.updateHandler_)
this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}
i.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var i=e[t]
if(i.kind===this.kind_)return i}}
i.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ls(this.kind_))}
i.createMenu=function(){this.options_.title=this.getMenuCaption()
return e.prototype.createMenu.call(this)}
i.createItems=function(){var e=[]
if(!this.track_)return e
var t=this.track_.cues
if(!t)return e
for(var i=0,n=t.length;i<n;i++){var r=t[i],a=new Uu(this.player_,{track:this.track_,cue:r})
e.push(a)}return e}
return t}(Nu)
Bu.prototype.kind_="chapters"
Bu.prototype.controlText_="Chapters"
Bs.registerComponent("ChaptersButton",Bu)
var Fu=function(e){B(t,e)
function t(t,i,n){var r
r=e.call(this,t,i,n)||this
var a=t.textTracks(),s=gs(N(r),r.handleTracksChange)
a.addEventListener("change",s)
r.on("dispose",(function(){a.removeEventListener("change",s)}))
return r}var i=t.prototype
i.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!1,n=0,r=t.length;n<r;n++){var a=t[n]
if(a.kind!==this.kind_&&"showing"===a.mode){i=!0
break}}i?this.disable():this.enable()}
i.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)}
i.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)}
return t}(Nu)
Fu.prototype.kind_="descriptions"
Fu.prototype.controlText_="Descriptions"
Bs.registerComponent("DescriptionsButton",Fu)
var ju=function(e){B(t,e)
function t(t,i,n){return e.call(this,t,i,n)||this}var i=t.prototype
i.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)}
i.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)}
return t}(Nu)
ju.prototype.kind_="subtitles"
ju.prototype.controlText_="Subtitles"
Bs.registerComponent("SubtitlesButton",ju)
var Vu=function(e){B(t,e)
function t(t,i){var n
i.track={player:t,kind:i.kind,label:i.kind+" settings",selectable:!1,default:!1,mode:"disabled"}
i.selectable=!1
i.name="CaptionSettingsMenuItem";(n=e.call(this,t,i)||this).addClass("vjs-texttrack-settings")
n.controlText(", opens "+i.kind+" settings dialog")
return n}t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()}
return t}(Ru)
Bs.registerComponent("CaptionSettingsMenuItem",Vu)
var Hu=function(e){B(t,e)
function t(t,i,n){return e.call(this,t,i,n)||this}var i=t.prototype
i.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)}
i.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)}
i.createItems=function(){var t=[]
if((!this.player().tech_||!this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")){t.push(new Vu(this.player_,{kind:this.kind_}))
this.hideThreshold_+=1}return e.prototype.createItems.call(this,t)}
return t}(Nu)
Hu.prototype.kind_="captions"
Hu.prototype.controlText_="Captions"
Bs.registerComponent("CaptionsButton",Hu)
var qu=function(e){B(t,e)
function t(){return e.apply(this,arguments)||this}t.prototype.createEl=function(t,i,n){var r=e.prototype.createEl.call(this,t,i,n),a=r.querySelector(".vjs-menu-item-text")
if("captions"===this.options_.track.kind){a.appendChild(ba("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0}))
a.appendChild(ba("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))}return r}
return t}(Ru)
Bs.registerComponent("SubsCapsMenuItem",qu)
var Wu=function(e){B(t,e)
function t(t,i){var n
void 0===i&&(i={});(n=e.call(this,t,i)||this).label_="subtitles";["en","en-us","en-ca","fr-ca"].indexOf(n.player_.language_)>-1&&(n.label_="captions")
n.menuButton_.controlText(Ls(n.label_))
return n}var i=t.prototype
i.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)}
i.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)}
i.createItems=function(){var t=[]
if((!this.player().tech_||!this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")){t.push(new Vu(this.player_,{kind:this.label_}))
this.hideThreshold_+=1}return t=e.prototype.createItems.call(this,t,qu)}
return t}(Nu)
Wu.prototype.kinds_=["captions","subtitles"]
Wu.prototype.controlText_="Subtitles"
Bs.registerComponent("SubsCapsButton",Wu)
var Gu=function(e){B(t,e)
function t(t,i){var n,r=i.track,a=t.audioTracks()
i.label=r.label||r.language||"Unknown"
i.selected=r.enabled;(n=e.call(this,t,i)||this).track=r
n.addClass("vjs-"+r.kind+"-menu-item")
var s=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i]
n.handleTracksChange.apply(N(n),t)}
a.addEventListener("change",s)
n.on("dispose",(function(){a.removeEventListener("change",s)}))
return n}var i=t.prototype
i.createEl=function(t,i,n){var r=e.prototype.createEl.call(this,t,i,n),a=r.querySelector(".vjs-menu-item-text")
if("main-desc"===this.options_.track.kind){a.appendChild(ba("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0}))
a.appendChild(ba("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))}return r}
i.handleClick=function(t){e.prototype.handleClick.call(this,t)
this.track.enabled=!0
if(this.player_.tech_.featuresNativeAudioTracks)for(var i=this.player_.audioTracks(),n=0;n<i.length;n++){var r=i[n]
r!==this.track&&(r.enabled=r===this.track)}}
i.handleTracksChange=function(e){this.selected(this.track.enabled)}
return t}(Du)
Bs.registerComponent("AudioTrackMenuItem",Gu)
var zu=function(e){B(t,e)
function t(t,i){void 0===i&&(i={})
i.tracks=t.audioTracks()
return e.call(this,t,i)||this}var i=t.prototype
i.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)}
i.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)}
i.createItems=function(e){void 0===e&&(e=[])
this.hideThreshold_=1
for(var t=this.player_.audioTracks(),i=0;i<t.length;i++){var n=t[i]
e.push(new Gu(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e}
return t}(Ou)
zu.prototype.controlText_="Audio Track"
Bs.registerComponent("AudioTrackButton",zu)
var Ku=function(e){B(t,e)
function t(t,i){var n,r=i.rate,a=parseFloat(r,10)
i.label=r
i.selected=a===t.playbackRate()
i.selectable=!0
i.multiSelectable=!1;(n=e.call(this,t,i)||this).label=r
n.rate=a
n.on(t,"ratechange",(function(e){return n.update(e)}))
return n}var i=t.prototype
i.handleClick=function(t){e.prototype.handleClick.call(this)
this.player().playbackRate(this.rate)}
i.update=function(e){this.selected(this.player().playbackRate()===this.rate)}
return t}(Du)
Ku.prototype.contentElType="button"
Bs.registerComponent("PlaybackRateMenuItem",Ku)
var Xu=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).menuButton_.el_.setAttribute("aria-describedby",n.labelElId_)
n.updateVisibility()
n.updateLabel()
n.on(t,"loadstart",(function(e){return n.updateVisibility(e)}))
n.on(t,"ratechange",(function(e){return n.updateLabel(e)}))
n.on(t,"playbackrateschange",(function(e){return n.handlePlaybackRateschange(e)}))
return n}var i=t.prototype
i.createEl=function(){var t=e.prototype.createEl.call(this)
this.labelElId_="vjs-playback-rate-value-label-"+this.id_
this.labelEl_=ba("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"})
t.appendChild(this.labelEl_)
return t}
i.dispose=function(){this.labelEl_=null
e.prototype.dispose.call(this)}
i.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)}
i.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)}
i.createItems=function(){for(var e=this.playbackRates(),t=[],i=e.length-1;i>=0;i--)t.push(new Ku(this.player(),{rate:e[i]+"x"}))
return t}
i.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())}
i.handleClick=function(e){var t=this.player().playbackRate(),i=this.playbackRates(),n=(i.indexOf(t)+1)%i.length
this.player().playbackRate(i[n])}
i.handlePlaybackRateschange=function(e){this.update()}
i.playbackRates=function(){var e=this.player()
return e.playbackRates&&e.playbackRates()||[]}
i.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}
i.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}
i.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}
return t}(Au)
Xu.prototype.controlText_="Playback Rate"
Bs.registerComponent("PlaybackRateMenuButton",Xu)
var Yu=function(e){B(t,e)
function t(){return e.apply(this,arguments)||this}var i=t.prototype
i.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)}
i.createEl=function(t,i,n){void 0===t&&(t="div")
void 0===i&&(i={})
void 0===n&&(n={})
i.className||(i.className=this.buildCSSClass())
return e.prototype.createEl.call(this,t,i,n)}
return t}(Bs)
Bs.registerComponent("Spacer",Yu)
var Qu=function(e){B(t,e)
function t(){return e.apply(this,arguments)||this}var i=t.prototype
i.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)}
i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:" "})}
return t}(Yu)
Bs.registerComponent("CustomControlSpacer",Qu)
var $u=function(e){B(t,e)
function t(){return e.apply(this,arguments)||this}t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})}
return t}(Bs)
$u.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]}
"exitPictureInPicture"in L&&$u.prototype.options_.children.splice($u.prototype.options_.children.length-1,0,"pictureInPictureToggle")
Bs.registerComponent("ControlBar",$u)
var Ju=function(e){B(t,e)
function t(t,i){var n;(n=e.call(this,t,i)||this).on(t,"error",(function(e){return n.open(e)}))
return n}var i=t.prototype
i.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)}
i.content=function(){var e=this.player().error()
return e?this.localize(e.message):""}
return t}($s)
Ju.prototype.options_=R({},$s.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0})
Bs.registerComponent("ErrorDisplay",Ju)
var Zu="vjs-text-track-settings",el=["#000","Black"],tl=["#00F","Blue"],il=["#0FF","Cyan"],nl=["#0F0","Green"],rl=["#F0F","Magenta"],al=["#F00","Red"],sl=["#FFF","White"],ol=["#FF0","Yellow"],ul=["1","Opaque"],ll=["0.5","Semi-Transparent"],cl=["0","Transparent"],dl={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[el,sl,al,nl,tl,ol,rl,il]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ul,ll,cl]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[sl,el,al,nl,tl,ol,rl,il]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[ul,ll]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[cl,ll,ul]}}
dl.windowColor.options=dl.backgroundColor.options
function hl(e,t){t&&(e=t(e))
if(e&&"none"!==e)return e}var pl=function(e){B(t,e)
function t(t,i){var n
i.temporary=!1;(n=e.call(this,t,i)||this).updateDisplay=n.updateDisplay.bind(N(n))
n.fill()
n.hasBeenOpened_=n.hasBeenFilled_=!0
n.endDialog=ba("p",{className:"vjs-control-text",textContent:n.localize("End of dialog window.")})
n.el().appendChild(n.endDialog)
n.setDefaults()
void 0===i.persistTextTrackSettings&&(n.options_.persistTextTrackSettings=n.options_.playerOptions.persistTextTrackSettings)
n.on(n.$(".vjs-done-button"),"click",(function(){n.saveSettings()
n.close()}))
n.on(n.$(".vjs-default-button"),"click",(function(){n.setDefaults()
n.updateDisplay()}))
Vr(dl,(function(e){n.on(n.$(e.selector),"change",n.updateDisplay)}))
n.options_.persistTextTrackSettings&&n.restoreSettings()
return n}var i=t.prototype
i.dispose=function(){this.endDialog=null
e.prototype.dispose.call(this)}
i.createElSelect_=function(e,t,i){var n=this
void 0===t&&(t="")
void 0===i&&(i="label")
var r=dl[e],a=r.id.replace("%s",this.id_),s=[t,a].join(" ").trim()
return["<"+i+' id="'+a+'" class="'+("label"===i?"vjs-label":"")+'">',this.localize(r.label),"</"+i+">",'<select aria-labelledby="'+s+'">'].concat(r.options.map((function(e){var t=a+"-"+e[1].replace(/\W+/g,"")
return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+s+" "+t+'">',n.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")}
i.createElFgColor_=function(){var e="captions-text-legend-"+this.id_
return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")}
i.createElBgColor_=function(){var e="captions-background-"+this.id_
return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")}
i.createElWinColor_=function(){var e="captions-window-"+this.id_
return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")}
i.createElColors_=function(){return ba("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})}
i.createElFont_=function(){return ba("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})}
i.createElControls_=function(){var e=this.localize("restore all settings to the default values")
return ba("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})}
i.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]}
i.label=function(){return this.localize("Caption Settings Dialog")}
i.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}
i.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"}
i.getValues=function(){var e=this
return function(e,t,i){void 0===i&&(i=0)
return jr(e).reduce((function(i,n){return t(i,e[n],n)}),i)}(dl,(function(t,i,n){var r,a,s=(r=e.$(i.selector),a=i.parser,hl(r.options[r.options.selectedIndex].value,a))
void 0!==s&&(t[n]=s)
return t}),{})}
i.setValues=function(e){var t=this
Vr(dl,(function(i,n){!function(e,t,i){if(t)for(var n=0;n<e.options.length;n++)if(hl(e.options[n].value,i)===t){e.selectedIndex=n
break}}(t.$(i.selector),e[n],i.parser)}))}
i.setDefaults=function(){var e=this
Vr(dl,(function(t){var i=t.hasOwnProperty("default")?t.default:0
e.$(t.selector).selectedIndex=i}))}
i.restoreSettings=function(){var e
try{e=JSON.parse(x.localStorage.getItem(Zu))}catch(e){Ur.warn(e)}e&&this.setValues(e)}
i.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues()
try{Object.keys(e).length?x.localStorage.setItem(Zu,JSON.stringify(e)):x.localStorage.removeItem(Zu)}catch(e){Ur.warn(e)}}}
i.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay")
e&&e.updateDisplay()}
i.conditionalBlur_=function(){this.previouslyActiveEl_=null
var e=this.player_.controlBar,t=e&&e.subsCapsButton,i=e&&e.captionsButton
t?t.focus():i&&i.focus()}
return t}($s)
Bs.registerComponent("TextTrackSettings",pl)
var fl=function(e){B(t,e)
function t(t,i){var n,r=i.ResizeObserver||x.ResizeObserver
null===i.ResizeObserver&&(r=!1)
var a=Ds({createEl:!r,reportTouchActivity:!1},i);(n=e.call(this,t,a)||this).ResizeObserver=i.ResizeObserver||x.ResizeObserver
n.loadListener_=null
n.resizeObserver_=null
n.debouncedHandler_=function(e,t,i,n){void 0===n&&(n=x)
var r,a=function(){var a=this,s=arguments,o=function(){r=null
o=null
i||e.apply(a,s)}
!r&&i&&e.apply(a,s)
n.clearTimeout(r)
r=n.setTimeout(o,t)}
a.cancel=function(){n.clearTimeout(r)
r=null}
return a}((function(){n.resizeHandler()}),100,!1,N(n))
if(r){n.resizeObserver_=new n.ResizeObserver(n.debouncedHandler_)
n.resizeObserver_.observe(t.el())}else{n.loadListener_=function(){if(n.el_&&n.el_.contentWindow){var e=n.debouncedHandler_,t=n.unloadListener_=function(){ls(this,"resize",e)
ls(this,"unload",t)
t=null}
us(n.el_.contentWindow,"unload",t)
us(n.el_.contentWindow,"resize",e)}}
n.one("load",n.loadListener_)}return n}var i=t.prototype
i.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})}
i.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}
i.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel()
if(this.resizeObserver_){this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el())
this.resizeObserver_.disconnect()}this.loadListener_&&this.off("load",this.loadListener_)
this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow)
this.ResizeObserver=null
this.resizeObserver=null
this.debouncedHandler_=null
this.loadListener_=null
e.prototype.dispose.call(this)}
return t}(Bs)
Bs.registerComponent("ResizeManager",fl)
var ml={trackingThreshold:20,liveTolerance:15},gl=function(e){B(t,e)
function t(t,i){var n,r=Ds(ml,i,{createEl:!1});(n=e.call(this,t,r)||this).handleVisibilityChange_=function(e){return n.handleVisibilityChange(e)}
n.trackLiveHandler_=function(){return n.trackLive_()}
n.handlePlay_=function(e){return n.handlePlay(e)}
n.handleFirstTimeupdate_=function(e){return n.handleFirstTimeupdate(e)}
n.handleSeeked_=function(e){return n.handleSeeked(e)}
n.seekToLiveEdge_=function(e){return n.seekToLiveEdge(e)}
n.reset_()
n.on(n.player_,"durationchange",(function(e){return n.handleDurationchange(e)}))
n.on(n.player_,"canplay",(function(){return n.toggleTracking()}))
aa&&"hidden"in L&&"visibilityState"in L&&n.on(L,"visibilitychange",n.handleVisibilityChange_)
return n}var i=t.prototype
i.handleVisibilityChange=function(){this.player_.duration()===1/0&&(L.hidden?this.stopTracking():this.startTracking())}
i.trackLive_=function(){var e=this.player_.seekable()
if(e&&e.length){var t=Number(x.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3
this.lastTime_=t
this.pastSeekEnd_=this.pastSeekEnd()+i
var n=this.liveCurrentTime(),r=this.player_.currentTime(),a=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-r)>this.options_.liveTolerance
this.timeupdateSeen_&&n!==1/0||(a=!1)
if(a!==this.behindLiveEdge_){this.behindLiveEdge_=a
this.trigger("liveedgechange")}}}
i.handleDurationchange=function(){this.toggleTracking()}
i.toggleTracking=function(){if(this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold){this.player_.options_.liveui&&this.player_.addClass("vjs-liveui")
thi