/**
* @license
* Video.js 7.5.5
* Copyright Brightcove, Inc.
* Available under Apache License Version 2.0
*
*
* Includes vtt.js
* Available under Apache License Version 2.0
*
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,function(h,d){h=h&&h.hasOwnProperty("default")?h.default:h,d=d&&d.hasOwnProperty("default")?d.default:d;var p="7.5.5";function f(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t,n){return(o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&s(r,n.prototype),r}).apply(null,arguments)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,t){return t||(t=e.slice(0)),e.raw=t,e}var l=[],e=function(o,a){return function(e,t,n){var i=a.levels[t],r=new RegExp("^("+i+")$");if("log"!==e&&n.unshift(e.toUpperCase()+":"),n.unshift(o+":"),l&&l.push([].concat(n)),h.console){var s=h.console[e];s||"debug"!==e||(s=h.console.info||h.console.log),s&&i&&r.test(e)&&s[Array.isArray(n)?"apply":"call"](h.console,n)}}};var g=function t(n){var i,r="info",s=function(){for(var e=arguments.length,t=new Array(e),n=0;n',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),d.body.appendChild(i));for(var s={},o=0;ox',e=t.firstChild.href}return e},Gt=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""},Yt=function(e){var t=h.location,n=Xt(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Qt=Object.freeze({parseUrl:Xt,getAbsoluteURL:$t,getFileExtension:Gt,isCrossOrigin:Yt}),Jt=function(e){var t=Zt.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Zt=Object.prototype.toString;var en=Pt(function(e,t){(t=e.exports=function(e){return e.replace(/^\s*|\s*$/g,"")}).left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}}),tn=(en.left,en.right,Function.prototype.toString),nn=/^\s*class\b/,rn=function(e){try{var t=tn.call(e);return nn.test(t)}catch(e){return!1}},sn=Object.prototype.toString,on="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,an=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(on)return function(e){try{return!rn(e)&&(tn.call(e),!0)}catch(e){return!1}}(e);if(rn(e))return!1;var t=sn.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},ln=Object.prototype.toString,cn=Object.prototype.hasOwnProperty,un=function(e,t,n){if(!an(t))throw new TypeError("iterator must be a function");var i;3<=arguments.length&&(i=n),"[object Array]"===ln.call(e)?function(e,t,n){for(var i=0,r=e.length;i=e?t.push(r):r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e&&t.push(r)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(var s=0;s',className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&g.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=m({role:"button"},n),this.tabIndex_=t.tabIndex;var i=r.prototype.createEl.call(this,e,t,n);return this.createControlTextEl(i),i},t.dispose=function(){this.controlTextEl_=null,r.prototype.dispose.call(this)},t.createControlTextEl=function(e){return this.controlTextEl_=x("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,j(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},t.buildCSSClass=function(){return"vjs-control vjs-button "+r.prototype.buildCSSClass.call(this)},t.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!=typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},t.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!=typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},t.handleClick=function(e){},t.handleKeyDown=function(e){At.isEventKey(e,"Space")||At.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):r.prototype.handleKeyDown.call(this,e)},e}(Be);Be.registerComponent("ClickableComponent",zn);var Wn=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).update(),e.on("posterchange",Ce(v(v(n)),n.update)),n}f(e,i);var t=e.prototype;return t.dispose=function(){this.player().off("posterchange",this.update),i.prototype.dispose.call(this)},t.createEl=function(){return x("div",{className:"vjs-poster",tabIndex:-1})},t.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},t.handleClick=function(e){this.player_.controls()&&(this.player_.tech(!0).focus(),this.player_.paused()?St(this.player_.play()):this.player_.pause())},e}(zn);Be.registerComponent("PosterImage",Wn);var Kn="#222",Un={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function qn(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Xn(e,t,n){try{e.style[t]=n}catch(e){return}}var $n=function(s){function e(n,e,t){var i;i=s.call(this,n,e,t)||this;var r=Ce(v(v(i)),i.updateDisplay);return n.on("loadstart",Ce(v(v(i)),i.toggleDisplay)),n.on("texttrackchange",r),n.on("loadedmetadata",Ce(v(v(i)),i.preselectTrack)),n.ready(Ce(v(v(i)),function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",r),n.on("playerresize",r),h.addEventListener("orientationchange",r),n.on("dispose",function(){return h.removeEventListener("orientationchange",r)});for(var e=this.options_.playerOptions.tracks||[],t=0;t',className:this.buildCSSClass()},t),n=m({type:"button"},n);var i=Be.prototype.createEl.call(this,"button",t,n);return this.createControlTextEl(i),i},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return g.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Be.prototype.addChild.call(this,e,t)},n.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(e){At.isEventKey(e,"Space")||At.isEventKey(e,"Enter")?e.stopPropagation():t.prototype.handleKeyDown.call(this,e)},e}(zn);Be.registerComponent("Button",Yn);var Qn=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).mouseused_=!1,n.on("mousedown",n.handleMouseDown),n}f(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-big-play-button"},t.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY)return St(t),void this.player_.tech(!0).focus();var n=this.player_.getChild("controlBar"),i=n&&n.getChild("playToggle");if(i){var r=function(){return i.focus()};Et(t)?t.then(r,function(){}):this.setTimeout(r,1)}else this.player_.tech(!0).focus()},t.handleKeyDown=function(e){this.mouseused_=!1,i.prototype.handleKeyDown.call(this,e)},t.handleMouseDown=function(e){this.mouseused_=!0},e}(Yn);Qn.prototype.controlText_="Play Video",Be.registerComponent("BigPlayButton",Qn);var Jn=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).controlText(t&&t.controlText||n.localize("Close")),n}f(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-close-button "+i.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},e}(Yn);Be.registerComponent("CloseButton",Jn);var Zn=function(i){function e(e,t){var n;return void 0===t&&(t={}),n=i.call(this,e,t)||this,t.replay=void 0===t.replay||t.replay,n.on(e,"play",n.handlePlay),n.on(e,"pause",n.handlePause),t.replay&&n.on(e,"ended",n.handleEnded),n}f(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-play-control "+i.prototype.buildCSSClass.call(this)},t.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.handleEnded=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(Yn);Zn.prototype.controlText_="Play",Be.registerComponent("PlayToggle",Zn);var ei=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),i=Math.floor(e/60%60),r=Math.floor(e/3600),s=Math.floor(t/60%60),o=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=i=n="-"),(r=0'+this.localize(this.labelText_)+" "});return this.contentEl_=x("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),this.updateTextNode_(),t.appendChild(this.contentEl_),t},t.dispose=function(){this.contentEl_=null,this.textNode_=null,i.prototype.dispose.call(this)},t.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=d.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},t.formatTime_=function(e){return ni(e)},t.updateFormattedTime_=function(e){var t=this.formatTime_(e);t!==this.formattedTime_&&(this.formattedTime_=t,this.requestAnimationFrame(this.updateTextNode_))},t.updateContent=function(e){},e}(Be);ii.prototype.labelText_="Time",ii.prototype.controlText_="Time",Be.registerComponent("TimeDisplay",ii);var ri=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).on(e,"ended",n.handleEnded),n}f(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-current-time"},t.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(t)},t.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(ii);ri.prototype.labelText_="Current Time",ri.prototype.controlText_="Current Time",Be.registerComponent("CurrentTimeDisplay",ri);var si=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).on(e,"durationchange",n.updateContent),n.on(e,"loadstart",n.updateContent),n.on(e,"loadedmetadata",n.throttledUpdateContent),n}f(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-duration"},t.updateContent=function(e){var t=this.player_.duration();this.duration_!==t&&(this.duration_=t,this.updateFormattedTime_(t))},e}(ii);si.prototype.labelText_="Duration",si.prototype.controlText_="Duration",Be.registerComponent("DurationDisplay",si);var oi=function(e){function t(){return e.apply(this,arguments)||this}return f(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"/
"},{"aria-hidden":!0})},t}(Be);Be.registerComponent("TimeDivider",oi);var ai=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).on(e,"durationchange",n.throttledUpdateContent),n.on(e,"ended",n.handleEnded),n}f(e,i);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-remaining-time"},t.createEl=function(){var e=i.prototype.createEl.call(this);return e.insertBefore(x("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},t.updateContent=function(e){"number"==typeof this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},t.handleEnded=function(e){this.player_.duration()&&this.updateFormattedTime_(0)},e}(ii);ai.prototype.labelText_="Remaining Time",ai.prototype.controlText_="Remaining Time",Be.registerComponent("RemainingTimeDisplay",ai);var li=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).updateShowing(),n.on(n.player(),"durationchange",n.updateShowing),n}f(e,i);var t=e.prototype;return t.createEl=function(){var e=i.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=x("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},t.dispose=function(){this.contentEl_=null,i.prototype.dispose.call(this)},t.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},e}(Be);Be.registerComponent("LiveDisplay",li);var ci=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).updateLiveEdgeStatus(),n.player_.liveTracker&&n.on(n.player_.liveTracker,"liveedgechange",n.updateLiveEdgeStatus),n}f(e,i);var t=e.prototype;return t.createEl=function(){var e=i.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=x("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},t.updateLiveEdgeStatus=function(e){!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")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},t.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},t.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,i.prototype.dispose.call(this)},e}(Yn);ci.prototype.controlText_="Seek to live, currently playing live",Be.registerComponent("SeekToLive",ci);var ui=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}f(e,i);var t=e.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){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)},t.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}},t.createEl=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),t.className=t.className+" vjs-slider",t=m({tabIndex:0},t),n=m({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),i.prototype.createEl.call(this,e,t,n)},t.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||it||e.preventDefault(),B(),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)},t.handleMouseMove=function(e){},t.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;H(),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()},t.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var n=(100*e).toFixed(2)+"%",i=t.el().style;return this.vertical()?i.height=n:i.width=n,e}}},t.calculateDistance=function(e){var t=W(this.el_,e);return this.vertical()?t.y:t.x},t.handleKeyDown=function(e){At.isEventKey(e,"Left")||At.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):At.isEventKey(e,"Right")||At.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):i.prototype.handleKeyDown.call(this,e)},t.handleClick=function(e){e.stopPropagation(),e.preventDefault()},t.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")},e}(Be);Be.registerComponent("Slider",ui);var hi=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).partEls_=[],n.on(e,"progress",n.update),n}f(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+': 0%'})},t.dispose=function(){this.partEls_=null,i.prototype.dispose.call(this)},t.update=function(e){var t=this.player_.liveTracker,n=this.player_.buffered(),i=t&&t.isLive()?t.seekableEnd():this.player_.duration(),r=this.player_.bufferedEnd(),s=this.partEls_,o=this.$(".vjs-control-text-loaded-percentage"),a=function(e,t,n){var i=e/t||0;return i=100*(1<=i?1:i),n&&(i=i.toFixed(2)),i+"%"};this.el_.style.width=a(r,i),j(o,a(r,i,!0));for(var l=0;ln.length;d--)this.el_.removeChild(s[d-1]);s.length=n.length},e}(Be);Be.registerComponent("LoadProgressBar",hi);var di=function(e){function t(){return e.apply(this,arguments)||this}f(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var i=V(this.el_),r=V(this.player_.el()),s=e.width*t;if(r&&i){var o=e.left-r.left+s,a=e.width-s+(r.right-e.right),l=i.width/2;oi.width&&(l=i.width),this.el_.style.right="-"+l+"px",j(this.el_,n)}},n.updateTime=function(r,s,o,a){var l=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var e,t=l.player_.duration();if(l.player_.liveTracker&&l.player_.liveTracker.isLive()){var n=l.player_.liveTracker.liveWindow(),i=n-s*n;e=(i<1?"":"-")+ni(i,n)}else e=ni(o,t);l.update(r,s,e),a&&a()})},t}(Be);Be.registerComponent("TimeTooltip",di);var pi=function(e){function t(){return e.apply(this,arguments)||this}f(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,i)}},t}(Be);pi.prototype.options_={children:[]},Ye||Je||pi.prototype.options_.children.push("timeTooltip"),Be.registerComponent("PlayProgressBar",pi);var fi=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).update=Ee(Ce(v(v(n)),n.update),25),n}f(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.update=function(e,t){var n=this,i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,function(){n.el_.style.left=e.width*t+"px"})},e}(Be);fi.prototype.options_={children:["timeTooltip"]},Be.registerComponent("MouseTimeDisplay",fi);var vi=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).setEventHandlers_(),n}f(e,i);var t=e.prototype;return t.setEventHandlers_=function(){this.update=Ee(Ce(this,this.update),30),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.on(this.player_,"durationchange",this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in d&&"visibilityState"in d&&this.on(d,"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){d.hidden?this.disableInterval_(e):(this.enableInterval_(),this.requestAnimationFrame(this.update))},t.enableInterval_=function(){var e=this;this.clearInterval(this.updateInterval),this.updateInterval=this.setInterval(function(){e.requestAnimationFrame(e.update)},30)},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&"ended"!==e.type||this.clearInterval(this.updateInterval)},t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update_=function(e,t){var n=this.player_.liveTracker,i=this.player_.duration();n&&n.isLive()&&(i=this.player_.liveTracker.liveCurrentTime()),this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[ni(e,i),ni(i,i)],"{1} of {2}")),this.bar&&this.bar.update(V(this.el_),t)},t.update=function(e){if(null!==this.el().offsetParent){var t=i.prototype.update.call(this);return this.update_(this.getCurrentTime_(),t),t}},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.handleEnded=function(e){this.update_(this.player_.duration(),1)},t.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),1<=e?1:e||0},t.handleMouseDown=function(e){G(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),i.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e){if(G(e)){var t,n=this.calculateDistance(e),i=this.player_.liveTracker;if(i&&i.isLive()){var r=i.seekableStart(),s=i.liveCurrentTime();if(s<=(t=r+n*i.liveWindow())&&(t=s),t<=r&&(t=r+.1),t===1/0)return}else(t=n*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},t.enable=function(){i.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},t.disable=function(){i.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},t.handleMouseUp=function(e){i.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&St(this.player_.play())},t.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(e){if(At.isEventKey(e,"Space")||At.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(At.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(0);else if(At.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(At(e))){e.preventDefault(),e.stopPropagation();var t=10*(At.codes[At(e)]-At.codes[0])/100;this.player_.currentTime(this.player_.duration()*t)}else At.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):At.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):i.prototype.handleKeyDown.call(this,e)},e}(ui);vi.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Ye||Je||vi.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Be.registerComponent("SeekBar",vi);var gi=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).handleMouseMove=Ee(Ce(v(v(n)),n.handleMouseMove),25),n.throttledHandleMouseSeek=Ee(Ce(v(v(n)),n.handleMouseSeek),25),n.enable(),n}f(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("mouseTimeDisplay"),i=t.el(),r=V(i),s=W(i,e).x;1'})},t}(Be);Be.registerComponent("VolumeLevel",_i);var mi=function(i){function e(e,t){var n;return(n=i.call(this,e,t)||this).on("slideractive",n.updateLastVolume_),n.on(e,"volumechange",n.updateARIAAttributes),e.ready(function(){return n.updateARIAAttributes()}),n}f(e,i);var t=e.prototype;return t.createEl=function(){return i.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(e){G(e)&&i.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){G(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},e}(ui);mi.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},mi.prototype.playerEvent="volumechange",Be.registerComponent("VolumeBar",mi);var bi=function(s){function e(e,t){var n,i,r;return void 0===t&&(t={}),t.vertical=t.vertical||!1,("undefined"==typeof t.volumeBar||c(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),n=s.call(this,e,t)||this,i=v(v(n)),(r=e).tech_&&!r.tech_.featuresVolumeControl&&i.addClass("vjs-hidden"),i.on(r,"loadstart",function(){r.tech_.featuresVolumeControl?i.removeClass("vjs-hidden"):i.addClass("vjs-hidden")}),n.throttledHandleMouseMove=Ee(Ce(v(v(n)),n.handleMouseMove),25),n.on("mousedown",n.handleMouseDown),n.on("touchstart",n.handleMouseDown),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")}),n}f(e,s);var t=e.prototype;return t.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),s.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},t.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.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.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.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},e}(Be);bi.prototype.options_={children:["volumeBar"]},Be.registerComponent("VolumeControl",bi);var Ti=function(s){function e(e,t){var n,i,r;return n=s.call(this,e,t)||this,i=v(v(n)),(r=e).tech_&&!r.tech_.featuresMuteControl&&i.addClass("vjs-hidden"),i.on(r,"loadstart",function(){r.tech_.featuresMuteControl?i.removeClass("vjs-hidden"):i.addClass("vjs-hidden")}),n.on(e,["loadstart","volumechange"],n.update),n}f(e,s);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+s.prototype.buildCSSClass.call(this)},t.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var i=n<.1?.1:n;this.player_.volume(i),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},t.update=function(e){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),t=3;Ye&&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 n=0;n<4;n++)D(this.el_,"vjs-vol-"+n);M(this.el_,"vjs-vol-"+t)},t.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(Yn);Ti.prototype.controlText_="Mute",Be.registerComponent("MuteToggle",Ti);var ki=function(i){function e(e,t){var n;return void 0===t&&(t={}),"undefined"!=typeof t.inline?t.inline=t.inline:t.inline=!0,("undefined"==typeof t.volumeControl||c(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),(n=i.call(this,e,t)||this).on(e,["loadstart"],n.volumePanelState_),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}f(e,i);var t=e.prototype;return t.sliderActive_=function(){this.addClass("vjs-slider-active")},t.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.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")},t.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),i.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}(Be);ki.prototype.options_={children:["muteToggle","volumeControl"]},Be.registerComponent("VolumePanel",ki);var Ci=function(i){function e(e,t){var n;return n=i.call(this,e,t)||this,t&&(n.menuButton_=t.menuButton),n.focusedChild_=-1,n.on("keydown",n.handleKeyDown),n.boundHandleBlur_=Ce(v(v(n)),n.handleBlur),n.boundHandleTapClick_=Ce(v(v(n)),n.handleTapClick),n}f(e,i);var t=e.prototype;return t.addEventListenerForItem=function(e){e instanceof Be&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof Be&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},t.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),i.prototype.removeChild.call(this,e)},t.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},t.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=x(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var t=i.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),he(t,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,i.prototype.dispose.call(this)},t.handleBlur=function(e){var t=e.relatedTarget||d.activeElement;if(!this.children().some(function(e){return e.el()===t})){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},t.handleTapClick=function(t){if(this.menuButton_){this.menuButton_.unpressButton();var e=this.children();if(!Array.isArray(e))return;var n=e.filter(function(e){return e.el()===t.target})[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},t.handleKeyDown=function(e){At.isEventKey(e,"Left")||At.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(At.isEventKey(e,"Right")||At.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),0=t.length&&(e=t.length-1),t[this.focusedChild_=e].el_.focus())},e}(Be);Be.registerComponent("Menu",Ci);var Ei=function(r){function e(e,t){var n;void 0===t&&(t={}),(n=r.call(this,e,t)||this).menuButton_=new Yn(e,t),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");var i=Yn.prototype.buildCSSClass();return n.menuButton_.el_.className=n.buildCSSClass()+" "+i,n.menuButton_.removeClass("vjs-control"),n.addChild(n.menuButton_),n.update(),n.enabled_=!0,n.on(n.menuButton_,"tap",n.handleClick),n.on(n.menuButton_,"click",n.handleClick),n.on(n.menuButton_,"keydown",n.handleKeyDown),n.on(n.menuButton_,"mouseenter",function(){n.menu.show()}),n.on("keydown",n.handleSubmenuKeyDown),n}f(e,r);var t=e.prototype;return t.update=function(){var e=this.createMenu();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()},t.createMenu=function(){var e=new Ci(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=x("li",{className:"vjs-menu-title",innerHTML:Re(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var n=new Be(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var i=0;i