diff --git a/embed/min/wrappers/videojs.js b/embed/min/wrappers/videojs.js
index afb62206..03b814b4 100644
--- a/embed/min/wrappers/videojs.js
+++ b/embed/min/wrappers/videojs.js
@@ -1 +1 @@
-mistplayers.videojs={name:"VideoJS player",mimes:["html5/application/vnd.apple.mpegurl","html5/application/vnd.apple.mpegurl;version=7"],priority:MistUtil.object.keys(mistplayers).length+1,isMimeSupported:function(e){return this.mimes.indexOf(e)==-1?false:true},isBrowserSupported:function(e,t,i){if(location.protocol!=MistUtil.http.url.split(t.url).protocol){i.log("HTTP/HTTPS mismatch for this source");return false}if(location.protocol=="file:"&&e=="html5/application/vnd.apple"){i.log("This source ("+e+") won't load if the page is run via file://");return false}return"MediaSource"in window},player:function(){},scriptsrc:function(e){return e+"/videojs.js"}};var p=mistplayers.videojs.player;p.prototype=new MistPlayer;p.prototype.build=function(e,t){var i=this;var r;function o(){if(e.destroyed){return}e.log("Building VideoJS player..");r=document.createElement("video");if(e.source.type!="html5/video/ogg"){r.crossOrigin="anonymous"}var o=e.source.type.split("/");if(o[0]=="html5"){o.shift()}var s=document.createElement("source");s.setAttribute("src",e.source.url);i.source=s;r.appendChild(s);s.type=o.join("/");e.log("Adding "+s.type+" source @ "+e.source.url);MistUtil.class.add(r,"video-js");var n={};if(e.options.autoplay){n.autoplay=true}if(e.options.loop&&e.info.type!="live"){n.loop=true;r.loop=true}if(e.options.muted){n.muted=true;r.muted=true}if(e.options.poster){n.poster=e.options.poster}if(e.options.controls=="stock"){r.setAttribute("controls","");if(!document.getElementById("videojs-css")){var a=document.createElement("link");a.rel="stylesheet";a.href=e.options.host+"/skins/videojs.css";a.id="videojs-css";document.head.appendChild(a)}}else{n.controls=false}i.onready(function(){e.log("Building videojs");i.videojs=videojs(r,n,function(){e.log("Videojs initialized")});i.api.unload=function(){if(i.videojs){videojs(r).dispose();i.videojs=false;e.log("Videojs instance disposed")}};MistUtil.event.addListener(e.options.target,"error",function(t){var r=false;switch(t.message){case"Stream is shutting down":{t.preventDefault();break}case"Stream is offline":{e.clearError();t.preventDefault();if(e.video){r=MistUtil.event.addListener(e.video,"waiting",function(){i.api.pause();e.showError("Stream is offline ",{polling:true});if(r){MistUtil.event.removeListener(r)}})}break}case"Stream is waiting for data":{if(r){MistUtil.event.removeListener(r)}i.api.pause();e.reload();break}}},e.video)});e.log("Built html");if("Proxy"in window&&"Reflect"in window){var l={get:{},set:{}};e.player.api=new Proxy(r,{get:function(e,t,i){if(t in l.get){return l.get[t].apply(e,arguments)}var r=e[t];if(typeof r==="function"){return function(){return r.apply(e,arguments)}}return r},set:function(e,t,i){if(t in l.set){return l.set[t].call(e,i)}return e[t]=i}});e.player.api.load=function(){};if(e.info.type=="live"){function p(e){var t=0;if(e.buffered.length){t=e.buffered.end(e.buffered.length-1)}return t}var u=0;l.get.duration=function(){if(e.info){var t=(e.info.lastms+(new Date).getTime()-e.info.updated.getTime())*.001;return t}return 0};e.player.api.lastProgress=new Date;e.player.api.liveOffset=0;MistUtil.event.addListener(r,"progress",function(){e.player.api.lastProgress=new Date});l.set.currentTime=function(t){var i=e.player.api.currentTime-t;var r=t-e.player.api.duration;e.log("Seeking to "+MistUtil.format.time(t)+" ("+Math.round(r*-10)/10+"s from live)");e.video.currentTime-=i};var d=0;l.get.currentTime=function(){if(e.info){d=e.info.lastms*.001}var t=this.currentTime+d-e.player.api.liveOffset-u;if(isNaN(t)){return 0}return t}}}else{i.api=r}e.player.setSize=function(t){if("videojs"in e.player){e.player.videojs.dimensions(t.width,t.height);r.parentNode.style.width=t.width+"px";r.parentNode.style.height=t.height+"px"}this.api.style.width=t.width+"px";this.api.style.height=t.height+"px"};e.player.api.setSource=function(t){if(!e.player.videojs){return}if(e.player.videojs.src()!=t){e.player.videojs.src({type:e.player.videojs.currentSource().type,src:t})}};e.player.api.setSubtitle=function(e){var t=r.getElementsByTagName("track");for(var i=t.length-1;i>=0;i--){r.removeChild(t[i])}if(e){var o=document.createElement("track");r.appendChild(o);o.kind="subtitles";o.label=e.label;o.srclang=e.lang;o.src=e.src;o.setAttribute("default","")}};t(r)}if("videojs"in window){o()}else{var s=e.urlappend(mistplayers.videojs.scriptsrc(e.options.host));var n;window.onerror=function(t,i,o,s,a){if(i==n.src){r.pause();e.showError("Error in videojs player");e.reload()}return false};n=MistUtil.scripts.insert(s,{onerror:function(t){var i="Failed to load videojs.js";if(t.message){i+=": "+t.message}e.showError(i)},onload:o},e)}};
\ No newline at end of file
+mistplayers.videojs={name:"VideoJS player",mimes:["html5/application/vnd.apple.mpegurl","html5/application/vnd.apple.mpegurl;version=7"],priority:MistUtil.object.keys(mistplayers).length+1,isMimeSupported:function(e){return this.mimes.indexOf(e)==-1?false:true},isBrowserSupported:function(e,t,i){if(location.protocol!=MistUtil.http.url.split(t.url).protocol){i.log("HTTP/HTTPS mismatch for this source");return false}if(location.protocol=="file:"&&e=="html5/application/vnd.apple"){i.log("This source ("+e+") won't load if the page is run via file://");return false}return"MediaSource"in window},player:function(){},scriptsrc:function(e){return e+"/videojs.js"}};var p=mistplayers.videojs.player;p.prototype=new MistPlayer;p.prototype.build=function(e,t){var i=this;var r;function o(){if(e.destroyed){return}e.log("Building VideoJS player..");r=document.createElement("video");if(e.source.type!="html5/video/ogg"){r.crossOrigin="anonymous"}var o=e.source.type.split("/");if(o[0]=="html5"){o.shift()}var s=document.createElement("source");s.setAttribute("src",e.source.url);i.source=s;r.appendChild(s);s.type=o.join("/");e.log("Adding "+s.type+" source @ "+e.source.url);MistUtil.class.add(r,"video-js");var n={};if(e.options.autoplay){n.autoplay=true}if(e.options.loop&&e.info.type!="live"){r.setAttribute("loop","")}if(e.options.muted){r.setAttribute("muted","")}if(e.options.poster){n.poster=e.options.poster}if(e.options.controls=="stock"){r.setAttribute("controls","");if(!document.getElementById("videojs-css")){var a=document.createElement("link");a.rel="stylesheet";a.href=e.options.host+"/skins/videojs.css";a.id="videojs-css";document.head.appendChild(a)}}else{n.controls=false}i.onready(function(){e.log("Building videojs");i.videojs=videojs(r,n,function(){e.log("Videojs initialized")});i.api.unload=function(){if(i.videojs){videojs(r).dispose();i.videojs=false;e.log("Videojs instance disposed")}};MistUtil.event.addListener(e.options.target,"error",function(t){var r=false;switch(t.message){case"Stream is shutting down":{t.preventDefault();break}case"Stream is offline":{e.clearError();t.preventDefault();if(e.video){r=MistUtil.event.addListener(e.video,"ended",function(){e.showError("Stream is offline ",{polling:true});if(r){MistUtil.event.removeListener(r)}})}break}case"Stream is waiting for data":{if(r){MistUtil.event.removeListener(r)}i.api.pause();e.reload();break}}},e.video)});e.log("Built html");if("Proxy"in window&&"Reflect"in window){var l={get:{},set:{}};e.player.api=new Proxy(r,{get:function(e,t,i){if(t in l.get){return l.get[t].apply(e,arguments)}var r=e[t];if(typeof r==="function"){return function(){return r.apply(e,arguments)}}return r},set:function(e,t,i){if(t in l.set){return l.set[t].call(e,i)}return e[t]=i}});e.player.api.load=function(){};if(e.info.type=="live"){function p(e){var t=0;if(e.buffered.length){t=e.buffered.end(e.buffered.length-1)}return t}var d=0;l.get.duration=function(){if(e.info){var t=(e.info.lastms+(new Date).getTime()-e.info.updated.getTime())*.001;return t}return 0};e.player.api.lastProgress=new Date;e.player.api.liveOffset=0;MistUtil.event.addListener(r,"progress",function(){e.player.api.lastProgress=new Date});l.set.currentTime=function(t){var i=e.player.api.currentTime-t;var r=t-e.player.api.duration;e.log("Seeking to "+MistUtil.format.time(t)+" ("+Math.round(r*-10)/10+"s from live)");e.video.currentTime-=i};var u=0;l.get.currentTime=function(){if(e.info){u=e.info.lastms*.001}var t=this.currentTime+u-e.player.api.liveOffset-d;if(isNaN(t)){return 0}return t}}}else{i.api=r}e.player.setSize=function(t){if("videojs"in e.player){e.player.videojs.dimensions(t.width,t.height);r.parentNode.style.width=t.width+"px";r.parentNode.style.height=t.height+"px"}this.api.style.width=t.width+"px";this.api.style.height=t.height+"px"};e.player.api.setSource=function(t){if(!e.player.videojs){return}if(e.player.videojs.src()!=t){e.player.videojs.src({type:e.player.videojs.currentSource().type,src:t})}};e.player.api.setSubtitle=function(e){var t=r.getElementsByTagName("track");for(var i=t.length-1;i>=0;i--){r.removeChild(t[i])}if(e){var o=document.createElement("track");r.appendChild(o);o.kind="subtitles";o.label=e.label;o.srclang=e.lang;o.src=e.src;o.setAttribute("default","")}};t(r)}if("videojs"in window){o()}else{var s=e.urlappend(mistplayers.videojs.scriptsrc(e.options.host));var n;window.onerror=function(t,i,o,s,a){if(i==n.src){r.pause();e.showError("Error in videojs player");e.reload()}return false};n=MistUtil.scripts.insert(s,{onerror:function(t){var i="Failed to load videojs.js";if(t.message){i+=": "+t.message}e.showError(i)},onload:o},e)}};
\ No newline at end of file
diff --git a/embed/players/video.js b/embed/players/video.js
index 6ad3e681..4407340a 100644
--- a/embed/players/video.js
+++ b/embed/players/video.js
@@ -52262,13 +52262,18 @@
if (!playlist || !mediaSource) {
return false;
}
-
+
var segments = playlist.segments; // determine a few boolean values to help make the branch below easier
// to read
- var appendedLastSegment = segmentIndex === segments.length; // if we've buffered to the end of the video, we need to call endOfStream
- // so that MediaSources can trigger the `ended` event when it runs out of
- // buffered data instead of waiting for me
+ if (segments.length || (segmentIndex !== null)) {
+ var appendedLastSegment = segmentIndex === segments.length; // if we've buffered to the end of the video, we need to call endOfStream
+ // so that MediaSources can trigger the `ended` event when it runs out of
+ // buffered data instead of waiting for me
+ }
+ else {
+ appendedLastSegment = true;
+ }
return playlist.endList && mediaSource.readyState === 'open' && appendedLastSegment;
};
@@ -52920,12 +52925,12 @@
var segmentInfo = this.checkBuffer_(this.buffered_(), this.playlist_, this.mediaIndex, this.hasPlayed_(), this.currentTime_(), this.syncPoint_);
- if (!segmentInfo) {
+ if (this.isEndOfStream_(segmentInfo ? segmentInfo.mediaIndex : null)) {
+ this.endOfStream();
return;
}
- if (this.isEndOfStream_(segmentInfo.mediaIndex)) {
- this.endOfStream();
+ if (!segmentInfo) {
return;
}
@@ -58923,4 +58928,4 @@
}));
-!function(){!function(a){var b=a&&a.videojs;b&&(b.CDN_VERSION="7.5.4")}(window)}();
\ No newline at end of file
+!function(){!function(a){var b=a&&a.videojs;b&&(b.CDN_VERSION="7.5.4")}(window)}();
diff --git a/embed/players/video.min.js b/embed/players/video.min.js
index 3c246cc0..e95efa36 100644
--- a/embed/players/video.min.js
+++ b/embed/players/video.min.js
@@ -1,14 +1 @@
-/**
- * @license
- * Video.js 7.5.4
- * 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(v,h){v=v&&v.hasOwnProperty("default")?v.default:v,h=h&&h.hasOwnProperty("default")?h.default:h;var d="7.5.4";function p(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t,i){return(s=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,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&a(r,i.prototype),r}).apply(null,arguments)}function f(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 u=[],e=function(s,o){return function(e,t,i){var n=o.levels[t],r=new RegExp("^("+n+")$");if("log"!==e&&i.unshift(e.toUpperCase()+":"),i.unshift(s+":"),u&&u.push([].concat(i)),v.console){var a=v.console[e];a||"debug"!==e||(a=v.console.info||v.console.log),a&&n&&r.test(e)&&a[Array.isArray(i)?"apply":"call"](v.console,i)}}};var m=function t(i){var n,r="info",a=function(){for(var e=arguments.length,t=new Array(e),i=0;i',i=n.firstChild,n.setAttribute("style","display:none; position:absolute;"),h.body.appendChild(n));for(var a={},s=0;sx',e=t.firstChild.href}return e},Kt=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""},$t=function(e){var t=v.location,i=Xt(e);return(":"===i.protocol?t.protocol:i.protocol)+i.host!==t.protocol+t.host},Qt=Object.freeze({parseUrl:Xt,getAbsoluteURL:Yt,getFileExtension:Kt,isCrossOrigin:$t}),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 ei=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*$/,"")}}),ti=(ei.left,ei.right,Function.prototype.toString),ii=/^\s*class\b/,ni=function(e){try{var t=ti.call(e);return ii.test(t)}catch(e){return!1}},ri=Object.prototype.toString,ai="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,si=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(ai)return function(e){try{return!ni(e)&&(ti.call(e),!0)}catch(e){return!1}}(e);if(ni(e))return!1;var t=ri.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},oi=Object.prototype.toString,ui=Object.prototype.hasOwnProperty,li=function(e,t,i){if(!si(t))throw new TypeError("iterator must be a function");var n;3<=arguments.length&&(n=i),"[object Array]"===oi.call(e)?function(e,t,i){for(var n=0,r=e.length;n=e?t.push(r):r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e&&t.push(r)}if(o=!1,t.length!==this.activeCues_.length)o=!0;else for(var a=0;a","":"","":""," ":" "},Ui={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},xi={v:"title",lang:"lang"},Di={rt:"ruby"};function Ri(a,i){function e(){if(!i)return null;var e,t=i.match(/^([^<]*)(<[^>]*>?)?/);return e=t[1]?t[1]:t[2],i=i.substr(e.length),e}function t(e){return Ii[e]}function n(e){for(;f=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(f[0],t);return e}function r(e,t){var i=Ui[e];if(!i)return null;var n=a.document.createElement(i);n.localName=i;var r=xi[e];return r&&t&&(n[r]=t.trim()),n}for(var s,o,u,l=a.document.createElement("div"),c=l,h=[];null!==(s=e());)if("<"!==s[0])c.appendChild(a.document.createTextNode(n(s)));else{if("/"===s[1]){h.length&&h[h.length-1]===s.substr(2).replace(">","")&&(h.pop(),c=c.parentNode);continue}var d,p=Ai(s.substr(1,s.length-2));if(p){d=a.document.createProcessingInstruction("timestamp",p),c.appendChild(d);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=r(f[1],f[3])))continue;if(o=c,Di[(u=d).localName]&&Di[u.localName]!==o.localName)continue;f[2]&&(d.className=f[2].substr(1).replace("."," ")),h.push(f[1]),c.appendChild(d),c=d}return l}var Mi=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Bi(e){for(var t=0;t=i[0]&&e<=i[1])return!0}return!1}function Ni(){}function ji(e,t,i){Ni.call(this),this.cue=t,this.cueDiv=Ri(e,t.text);var n={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement("div"),n={direction:function(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var i=t.childNodes.length-1;0<=i;i--)e.push(t.childNodes[i])}function a(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var n=i.match(/^.*(\n|\r)/);return n?n[e.length=0]:i}return"ruby"===t.tagName?a(e):t.childNodes?(r(e,t),a(e)):void 0}for(r(t,e);i=a(t);)for(var n=0;nh&&(c=c<0?-1:1,c*=Math.ceil(h/l)*l),r<0&&(c+=""===n.vertical?o.height:o.width,a=a.reverse()),i.move(d,c)}else{var p=i.lineHeight/o.height*100;switch(n.lineAlign){case"middle":r-=p/2;break;case"end":r-=p}switch(n.vertical){case"":t.applyStyles({top:t.formatStyle(r,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(r,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(r,"%")})}a=["+y","-x","+x","-y"],i=new Fi(t)}var f=function(e,t){for(var i,n=new Fi(e),r=1,a=0;ae.left&&this.tope.top},Fi.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Fi.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},Fi.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Fi.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Fi.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},Hi.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Hi.convertCueToDOMTree=function(e,t){return e&&t?Ri(e,t):null};Hi.processCues=function(n,r,e){if(!n||!r||!e)return null;for(;e.firstChild;)e.removeChild(e.firstChild);var a=n.document.createElement("div");if(a.style.position="absolute",a.style.left="0",a.style.right="0",a.style.top="0",a.style.bottom="0",a.style.margin="1.5%",e.appendChild(a),function(e){for(var t=0;t',className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&m.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),i=_({role:"button"},i),this.tabIndex_=t.tabIndex;var n=r.prototype.createEl.call(this,e,t,i);return this.createControlTextEl(n),n},t.dispose=function(){this.controlTextEl_=null,r.prototype.dispose.call(this)},t.createControlTextEl=function(e){return this.controlTextEl_=A("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 i=this.localize(e);this.controlText_=e,L(this.controlTextEl_,i),this.nonIconControl||t.setAttribute("title",i)},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("focus",this.handleFocus),this.on("blur",this.handleBlur))},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("focus",this.handleFocus),this.off("blur",this.handleBlur)},t.handleClick=function(e){},t.handleFocus=function(e){he(h,"keydown",ke(this,this.handleKeyPress))},t.handleKeyPress=function(e){Ot.isEventKey(e,"Space")||Ot.isEventKey(e,"Enter")?(e.preventDefault(),this.trigger("click")):r.prototype.handleKeyPress.call(this,e)},t.handleBlur=function(e){de(h,"keydown",ke(this,this.handleKeyPress))},e}(je);je.registerComponent("ClickableComponent",mn);var gn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update(),e.on("posterchange",ke(f(f(i)),i.update)),i}p(e,n);var t=e.prototype;return t.dispose=function(){this.player().off("posterchange",this.update),n.prototype.dispose.call(this)},t.createEl=function(){return A("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_.paused()?wt(this.player_.play()):this.player_.pause(),this.player_.handleFocus({}))},e}(mn);je.registerComponent("PosterImage",gn);var yn="#222",vn={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 _n(e,t){var i;if(4===e.length)i=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.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function bn(e,t,i){try{e.style[t]=i}catch(e){return}}var Tn=function(a){function e(i,e,t){var n;n=a.call(this,i,e,t)||this;var r=ke(f(f(n)),n.updateDisplay);return i.on("loadstart",ke(f(f(n)),n.toggleDisplay)),i.on("texttrackchange",r),i.on("loadedmetadata",ke(f(f(n)),n.preselectTrack)),i.ready(ke(f(f(n)),function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",r),i.on("playerresize",r),v.addEventListener("orientationchange",r),i.on("dispose",function(){return v.removeEventListener("orientationchange",r)});for(var e=this.options_.playerOptions.tracks||[],t=0;t',className:this.buildCSSClass()},t),i=_({type:"button"},i);var n=je.prototype.createEl.call(this,"button",t,i);return this.createControlTextEl(n),n},i.addChild=function(e,t){void 0===t&&(t={});var i=this.constructor.name;return m.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),je.prototype.addChild.call(this,e,t)},i.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},i.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},i.handleKeyPress=function(e){Ot.isEventKey(e,"Space")||Ot.isEventKey(e,"Enter")||t.prototype.handleKeyPress.call(this,e)},e}(mn);je.registerComponent("Button",kn);var Cn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}p(e,n);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 wt(t),void this.player_.handleFocus({});var i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(n){var r=function(){return n.focus()};Ct(t)?t.then(r,function(){}):this.setTimeout(r,1)}else this.player_.focus()},t.handleKeyPress=function(e){this.mouseused_=!1,n.prototype.handleKeyPress.call(this,e)},t.handleMouseDown=function(e){this.mouseused_=!0},e}(kn);Cn.prototype.controlText_="Play Video",je.registerComponent("BigPlayButton",Cn);var wn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).controlText(t&&t.controlText||i.localize("Close")),i}p(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-close-button "+n.prototype.buildCSSClass.call(this)},t.handleKeyPress=function(e){},t.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},e}(kn);je.registerComponent("CloseButton",wn);var En=function(n){function e(e,t){var i;return void 0===t&&(t={}),i=n.call(this,e,t)||this,t.replay=void 0===t.replay||t.replay,i.on(e,"play",i.handlePlay),i.on(e,"pause",i.handlePause),t.replay&&i.on(e,"ended",i.handleEnded),i}p(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-play-control "+n.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}(kn);En.prototype.controlText_="Play",je.registerComponent("PlayToggle",En);var An=function(e,t){e=e<0?0:e;var i=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=n=i="-"),(r=0'+this.localize(this.labelText_)+" "});return this.contentEl_=A("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,n.prototype.dispose.call(this)},t.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=h.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},t.formatTime_=function(e){return Pn(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}(je);On.prototype.labelText_="Time",On.prototype.controlText_="Time",je.registerComponent("TimeDisplay",On);var In=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,"ended",i.handleEnded),i}p(e,n);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}(On);In.prototype.labelText_="Current Time",In.prototype.controlText_="Current Time",je.registerComponent("CurrentTimeDisplay",In);var Un=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,"durationchange",i.updateContent),i.on(e,"loadstart",i.updateContent),i.on(e,"loadedmetadata",i.throttledUpdateContent),i}p(e,n);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}(On);Un.prototype.labelText_="Duration",Un.prototype.controlText_="Duration",je.registerComponent("DurationDisplay",Un);var xn=function(e){function t(){return e.apply(this,arguments)||this}return p(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}(je);je.registerComponent("TimeDivider",xn);var Dn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,"durationchange",i.throttledUpdateContent),i.on(e,"ended",i.handleEnded),i}p(e,n);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-remaining-time"},t.createEl=function(){var e=n.prototype.createEl.call(this);return e.insertBefore(A("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}(On);Dn.prototype.labelText_="Remaining Time",Dn.prototype.controlText_="Remaining Time",je.registerComponent("RemainingTimeDisplay",Dn);var Rn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}p(e,n);var t=e.prototype;return t.createEl=function(){var e=n.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=A("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,n.prototype.dispose.call(this)},t.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},e}(je);je.registerComponent("LiveDisplay",Rn);var Mn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).updateLiveEdgeStatus(),i.player_.liveTracker&&i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatus),i}p(e,n);var t=e.prototype;return t.createEl=function(){var e=n.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=A("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,n.prototype.dispose.call(this)},e}(kn);Mn.prototype.controlText_="Seek to live, currently playing live",je.registerComponent("SeekToLive",Mn);var Bn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}p(e,n);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("focus",this.handleFocus),this.on("blur",this.handleBlur),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("focus",this.handleFocus),this.off("blur",this.handleBlur),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,i){return void 0===t&&(t={}),void 0===i&&(i={}),t.className=t.className+" vjs-slider",t=_({tabIndex:0},t),i=_({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),n.prototype.createEl.call(this,e,t,i)},t.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||nt||e.preventDefault(),j(),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;F(),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 i=(100*e).toFixed(2)+"%",n=t.el().style;return this.vertical()?n.height=i:n.width=i,e}}},t.calculateDistance=function(e){var t=q(this.el_,e);return this.vertical()?t.y:t.x},t.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.handleKeyPress=function(e){Ot.isEventKey(e,"Left")||Ot.isEventKey(e,"Down")?(e.preventDefault(),this.stepBack()):Ot.isEventKey(e,"Right")||Ot.isEventKey(e,"Up")?(e.preventDefault(),this.stepForward()):n.prototype.handleKeyPress.call(this,e)},t.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.handleClick=function(e){e.stopImmediatePropagation(),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}(je);je.registerComponent("Slider",Bn);var Nn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).partEls_=[],i.on(e,"progress",i.update),i}p(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+': 0%'})},t.dispose=function(){this.partEls_=null,n.prototype.dispose.call(this)},t.update=function(e){var t=this.player_.liveTracker,i=this.player_.buffered(),n=t&&t.isLive()?t.seekableEnd():this.player_.duration(),r=this.player_.bufferedEnd(),a=this.partEls_,s=this.$(".vjs-control-text-loaded-percentage"),o=function(e,t,i){var n=e/t||0;return n=100*(1<=n?1:n),i&&(n=n.toFixed(2)),n+"%"};this.el_.style.width=o(r,n),L(s,o(r,n,!0));for(var u=0;ui.length;d--)this.el_.removeChild(a[d-1]);a.length=i.length},e}(je);je.registerComponent("LoadProgressBar",Nn);var jn=function(e){function t(){return e.apply(this,arguments)||this}p(t,e);var i=t.prototype;return 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=V(this.el_),r=V(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;sn.width&&(u=n.width),this.el_.style.right="-"+u+"px",L(this.el_,i)}},i.updateTime=function(r,a,s,o){var u=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var e,t=u.player_.duration();if(u.player_.liveTracker&&u.player_.liveTracker.isLive()){var i=u.player_.liveTracker.liveWindow(),n=i-a*i;e=(n<1?"":"-")+Pn(n,i)}else e=Pn(s,t);u.update(r,a,e),o&&o()})},t}(je);je.registerComponent("TimeTooltip",jn);var Fn=function(e){function t(){return e.apply(this,arguments)||this}p(t,e);var i=t.prototype;return 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)}},t}(je);Fn.prototype.options_={children:[]},$e||Je||Fn.prototype.options_.children.push("timeTooltip"),je.registerComponent("PlayProgressBar",Fn);var Vn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update=Ce(ke(f(f(i)),i.update),25),i}p(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.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"})},e}(je);Vn.prototype.options_={children:["timeTooltip"]},je.registerComponent("MouseTimeDisplay",Vn);var Hn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).setEventHandlers_(),i}p(e,n);var t=e.prototype;return t.setEventHandlers_=function(){this.update=Ce(ke(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 h&&"visibilityState"in h&&this.on(h,"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){h.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 n.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update_=function(e,t){var i=this.player_.liveTracker,n=this.player_.duration();i&&i.isLive()&&(n=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}",[Pn(e,n),Pn(n,n)],"{1} of {2}")),this.bar&&this.bar.update(V(this.el_),t)},t.update=function(e){if(null!==this.el().offsetParent){var t=n.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_(),i=this.player_.liveTracker;return i&&i.isLive()?(e=(t-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),1<=e?1:e||0},t.handleMouseDown=function(e){K(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),n.prototype.handleMouseDown.call(this,e))},t.handleMouseMove=function(e){if(K(e)){var t,i=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){var r=n.seekableStart(),a=n.liveCurrentTime();if(a<=(t=r+i*n.liveWindow())&&(t=a),t<=r&&(t=r+.1),t===1/0)return}else(t=i*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},t.enable=function(){n.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},t.disable=function(){n.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},t.handleMouseUp=function(e){n.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&wt(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.handleKeyPress=function(e){if(Ot.isEventKey(e,"Space")||Ot.isEventKey(e,"Enter"))e.preventDefault(),this.handleAction(e);else if(Ot.isEventKey(e,"Home"))e.preventDefault(),this.player_.currentTime(0);else if(Ot.isEventKey(e,"End"))e.preventDefault(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(Ot(e))){e.preventDefault();var t=10*(Ot.codes[Ot(e)]-Ot.codes[0])/100;this.player_.currentTime(this.player_.duration()*t)}else Ot.isEventKey(e,"PgDn")?(e.preventDefault(),this.player_.currentTime(this.player_.currentTime()-60)):Ot.isEventKey(e,"PgUp")?(e.preventDefault(),this.player_.currentTime(this.player_.currentTime()+60)):n.prototype.handleKeyPress.call(this,e)},e}(Bn);Hn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},$e||Je||Hn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),je.registerComponent("SeekBar",Hn);var qn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).handleMouseMove=Ce(ke(f(f(i)),i.handleMouseMove),25),i.throttledHandleMouseSeek=Ce(ke(f(f(i)),i.handleMouseSeek),25),i.enable(),i}p(e,n);var t=e.prototype;return t.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var i=t.getChild("mouseTimeDisplay"),n=t.el(),r=V(n),a=q(n,e).x;1'})},t}(je);je.registerComponent("VolumeLevel",Wn);var Gn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on("slideractive",i.updateLastVolume_),i.on(e,"volumechange",i.updateARIAAttributes),e.ready(function(){return i.updateARIAAttributes()}),i}p(e,n);var t=e.prototype;return t.createEl=function(){return n.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){K(e)&&n.prototype.handleMouseDown.call(this,e)},t.handleMouseMove=function(e){K(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}(Bn);Gn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Gn.prototype.playerEvent="volumechange",je.registerComponent("VolumeBar",Gn);var Xn=function(a){function e(e,t){var i,n,r;return void 0===t&&(t={}),t.vertical=t.vertical||!1,("undefined"==typeof t.volumeBar||l(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),i=a.call(this,e,t)||this,n=f(f(i)),(r=e).tech_&&!r.tech_.featuresVolumeControl&&n.addClass("vjs-hidden"),n.on(r,"loadstart",function(){r.tech_.featuresVolumeControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")}),i.throttledHandleMouseMove=Ce(ke(f(f(i)),i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}p(e,a);var t=e.prototype;return t.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),a.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}(je);Xn.prototype.options_={children:["volumeBar"]},je.registerComponent("VolumeControl",Xn);var Yn=function(a){function e(e,t){var i,n,r;return i=a.call(this,e,t)||this,n=f(f(i)),(r=e).tech_&&!r.tech_.featuresMuteControl&&n.addClass("vjs-hidden"),n.on(r,"loadstart",function(){r.tech_.featuresMuteControl?n.removeClass("vjs-hidden"):n.addClass("vjs-hidden")}),i.on(e,["loadstart","volumechange"],i.update),i}p(e,a);var t=e.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+a.prototype.buildCSSClass.call(this)},t.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())},t.update=function(e){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var e=this.player_.volume(),t=3;$e&&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++)U(this.el_,"vjs-vol-"+i);I(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}(kn);Yn.prototype.controlText_="Mute",je.registerComponent("MuteToggle",Yn);var Kn=function(n){function e(e,t){var i;return void 0===t&&(t={}),"undefined"!=typeof t.inline?t.inline=t.inline:t.inline=!0,("undefined"==typeof t.volumeControl||l(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),(i=n.call(this,e,t)||this).on(e,["loadstart"],i.volumePanelState_),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}p(e,n);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"),n.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}(je);Kn.prototype.options_={children:["muteToggle","volumeControl"]},je.registerComponent("VolumePanel",Kn);var $n=function(n){function e(e,t){var i;return i=n.call(this,e,t)||this,t&&(i.menuButton_=t.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i.boundHandleBlur_=ke(f(f(i)),i.handleBlur),i.boundHandleTapClick_=ke(f(f(i)),i.handleTapClick),i}p(e,n);var t=e.prototype;return t.addEventListenerForItem=function(e){e instanceof je&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof je&&(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),n.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_=A(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var t=n.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,n.prototype.dispose.call(this)},t.handleBlur=function(e){var t=e.relatedTarget||h.activeElement;if(!this.children().some(function(e){return e.el()===t})){var i=this.menuButton_;i&&i.buttonPressed_&&t!==i.el().firstChild&&i.unpressButton()}},t.handleTapClick=function(t){if(this.menuButton_){this.menuButton_.unpressButton();var e=this.children();if(!Array.isArray(e))return;var i=e.filter(function(e){return e.el()===t.target})[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}},t.handleKeyPress=function(e){Ot.isEventKey(e,"Left")||Ot.isEventKey(e,"Down")?(e.preventDefault(),this.stepForward()):(Ot.isEventKey(e,"Right")||Ot.isEventKey(e,"Up"))&&(e.preventDefault(),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}(je);je.registerComponent("Menu",$n);var Qn=function(r){function e(e,t){var i;void 0===t&&(t={}),(i=r.call(this,e,t)||this).menuButton_=new kn(e,t),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var n=kn.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+n,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"focus",i.handleFocus),i.on(i.menuButton_,"blur",i.handleBlur),i.on(i.menuButton_,"mouseenter",function(){i.menu.show()}),i.on("keydown",i.handleSubmenuKeyPress),i}p(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 $n(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=A("li",{className:"vjs-menu-title",innerHTML:Be(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var i=new je(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(var n=0;n';a=o.firstChild;o.setAttribute("style","display:none; position:absolute;");t.body.appendChild(o)}var u={};for(var l=0;lx';i=r.firstChild.href}return i};var ui=function e(t){if(typeof t==="string"){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i;var r=i.exec(t);if(r){return r.pop().toLowerCase()}}return""};var li=function t(i){var r=e.location;var n=si(i);var a=n.protocol===":"?r.protocol:n.protocol;var s=a+n.host!==r.protocol+r.host;return s};var ci=Object.freeze({parseUrl:si,getAbsoluteURL:oi,getFileExtension:ui,isCrossOrigin:li});var fi=hi;var di=Object.prototype.toString;function hi(e){var t=di.call(e);return t==="[object Function]"||typeof e==="function"&&t!=="[object RegExp]"||typeof window!=="undefined"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}var pi=Bt(function(e,t){t=e.exports=i;function i(e){return e.replace(/^\s*|\s*$/g,"")}t.left=function(e){return e.replace(/^\s*/,"")};t.right=function(e){return e.replace(/\s*$/,"")}});var mi=pi.left;var vi=pi.right;var gi=Function.prototype.toString;var yi=/^\s*class\b/;var _i=function e(t){try{var i=gi.call(t);return yi.test(i)}catch(e){return false}};var bi=function e(t){try{if(_i(t)){return false}gi.call(t);return true}catch(e){return false}};var Ti=Object.prototype.toString;var Si="[object Function]";var ki="[object GeneratorFunction]";var wi=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var Ci=function e(t){if(!t){return false}if(typeof t!=="function"&&typeof t!=="object"){return false}if(typeof t==="function"&&!t.prototype){return true}if(wi){return bi(t)}if(_i(t)){return false}var i=Ti.call(t);return i===Si||i===ki};var Ei=Object.prototype.toString;var Ai=Object.prototype.hasOwnProperty;var Li=function e(t,i,r){for(var n=0,a=t.length;n=3){n=r}if(Ei.call(t)==="[object Array]"){Li(t,i,n)}else if(typeof t==="string"){Ii(t,i,n)}else{Pi(t,i,n)}};var Ui=Oi;var Di=function e(t){return Object.prototype.toString.call(t)==="[object Array]"};var xi=function e(t){if(!t)return{};var i={};Ui(pi(t).split("\n"),function(e){var t=e.indexOf(":"),r=pi(e.slice(0,t)).toLowerCase(),n=pi(e.slice(t+1));if(typeof i[r]==="undefined"){i[r]=n}else if(Di(i[r])){i[r].push(n)}else{i[r]=[i[r],n]}});return i};var Ri=Bi;var Mi=Object.prototype.hasOwnProperty;function Bi(){var e={};for(var t=0;t0){v=setTimeout(function(){if(l)return;l=true;o.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT";a(e)},e.timeout)}if(o.setRequestHeader){for(u in h){if(h.hasOwnProperty(u)){o.setRequestHeader(u,h[u])}}}else if(e.headers&&!Fi(e.headers)){throw new Error("Headers cannot be set on an XDomainRequest object")}if("responseType"in e){o.responseType=e.responseType}if("beforeSend"in e&&typeof e.beforeSend==="function"){e.beforeSend(o)}o.send(d||null);return o}function zi(e){if(e.responseType==="document"){return e.responseXML}var t=e.responseXML&&e.responseXML.documentElement.nodeName==="parsererror";if(e.responseType===""&&!t){return e.responseXML}return null}function Wi(){}var Gi=function t(i,r){var n=new e.WebVTT.Parser(e,e.vttjs,e.WebVTT.StringDecoder());var a=[];n.oncue=function(e){r.addCue(e)};n.onparsingerror=function(e){a.push(e)};n.onflush=function(){r.trigger({type:"loadeddata",target:r})};n.parse(i);if(a.length>0){if(e.console&&e.console.groupCollapsed){e.console.groupCollapsed("Text Track parsing errors for "+r.src)}a.forEach(function(e){return d.error(e)});if(e.console&&e.console.groupEnd){e.console.groupEnd()}}n.flush()};var Xi=function t(i,r){var n={uri:i};var a=li(i);if(a){n.cors=a}Ni(n,Ae(this,function(t,i,n){if(t){return d.error(t,i)}r.loaded_=true;if(typeof e.WebVTT!=="function"){if(r.tech_){var a;var s=function e(){d.error("vttjs failed to load, stopping trying to process "+r.src);r.tech_.off("vttjsloaded",a)};a=function e(){r.tech_.off("vttjserror",s);return Gi(n,r)};r.tech_.one("vttjsloaded",a);r.tech_.one("vttjserror",s)}}else{Gi(n,r)}}))};var Yi=function(t){r(i,t);function i(e){var i;if(e===void 0){e={}}if(!e.tech){throw new Error("A tech was not provided.")}var r=Ge(e,{kind:ri[e.kind]||"subtitles",language:e.language||e.srclang||""});var n=ni[r.mode]||"disabled";var a=r.default;if(r.kind==="metadata"||r.kind==="chapters"){n="hidden"}i=t.call(this,r)||this;i.tech_=r.tech;i.cues_=[];i.activeCues_=[];var s=new ei(i.cues_);var u=new ei(i.activeCues_);var l=false;var c=Ae(o(o(i)),function(){this.activeCues=this.activeCues;if(l){this.trigger("cuechange");l=false}});if(n!=="disabled"){i.tech_.ready(function(){i.tech_.on("timeupdate",c)},true)}Object.defineProperties(o(o(i)),{default:{get:function e(){return a},set:function e(){}},mode:{get:function e(){return n},set:function e(t){var i=this;if(!ni[t]){return}n=t;if(n!=="disabled"){this.tech_.ready(function(){i.tech_.on("timeupdate",c)},true)}else{this.tech_.off("timeupdate",c)}this.trigger("modechange")}},cues:{get:function e(){if(!this.loaded_){return null}return s},set:function e(){}},activeCues:{get:function e(){if(!this.loaded_){return null}if(this.cues.length===0){return u}var t=this.tech_.currentTime();var i=[];for(var r=0,n=this.cues.length;r=t){i.push(a)}else if(a.startTime===a.endTime&&a.startTime<=t&&a.startTime+.5>=t){i.push(a)}}l=false;if(i.length!==this.activeCues_.length){l=true}else{for(var s=0;s59){return t(i[1],i[2],0,i[4])}else{return t(0,i[1],i[2],i[4])}}function ur(){this.values=ar(null)}ur.prototype={set:function e(t,i){if(!this.get(t)&&i!==""){this.values[t]=i}},get:function e(t,i,r){if(r){return this.has(t)?this.values[t]:i[r]}return this.has(t)?this.values[t]:i},has:function e(t){return t in this.values},alt:function e(t,i,r){for(var n=0;n=0&&i<=100){this.set(t,i);return true}}return false}};function lr(e,t,i,r){var n=r?e.split(r):[e];for(var a in n){if(typeof n[a]!=="string"){continue}var s=n[a].split(i);if(s.length!==2){continue}var o=s[0];var u=s[1];t(o,u)}}function cr(e,t,i){var r=e;function n(){var t=or(e);if(t===null){throw new sr(sr.Errors.BadTimeStamp,"Malformed timestamp: "+r)}e=e.replace(/^[^\sa-zA-Z-]+/,"");return t}function a(e,t){var r=new ur;lr(e,function(e,t){switch(e){case"region":for(var n=i.length-1;n>=0;n--){if(i[n].id===t){r.set(e,i[n].region);break}}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];r.integer(e,s);r.percent(e,s)?r.set("snapToLines",false):null;r.alt(e,s,["auto"]);if(a.length===2){r.alt("lineAlign",a[1],["start","middle","end"])}break;case"position":a=t.split(",");r.percent(e,a[0]);if(a.length===2){r.alt("positionAlign",a[1],["start","middle","end"])}break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","middle","end","left","right"]);break}},/:/,/\s/);t.region=r.get("region",null);t.vertical=r.get("vertical","");t.line=r.get("line","auto");t.lineAlign=r.get("lineAlign","start");t.snapToLines=r.get("snapToLines",true);t.size=r.get("size",100);t.align=r.get("align","middle");t.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align);t.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}function s(){e=e.replace(/^\s+/,"")}s();t.startTime=n();s();if(e.substr(0,3)!=="--\x3e"){throw new sr(sr.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r)}e=e.substr(3);s();t.endTime=n();s();a(e,t)}var fr={"&":"&","<":"<",">":">","":"","":""," ":" "};var dr={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"};var hr={v:"title",lang:"lang"};var pr={rt:"ruby"};function mr(e,t){function i(){if(!t){return null}function e(e){t=t.substr(e.length);return e}var i=t.match(/^([^<]*)(<[^>]*>?)?/);return e(i[1]?i[1]:i[2])}function r(e){return fr[e]}function n(e){while(h=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/)){e=e.replace(h[0],r)}return e}function a(e,t){return!pr[t.localName]||pr[t.localName]===e.localName}function s(t,i){var r=dr[t];if(!r){return null}var n=e.document.createElement(r);n.localName=r;var a=hr[t];if(a&&i){n[a]=i.trim()}return n}var o=e.document.createElement("div"),u=o,l,c=[];while((l=i())!==null){if(l[0]==="<"){if(l[1]==="/"){if(c.length&&c[c.length-1]===l.substr(2).replace(">","")){c.pop();u=u.parentNode}continue}var f=or(l.substr(1,l.length-2));var d;if(f){d=e.document.createProcessingInstruction("timestamp",f);u.appendChild(d);continue}var h=l.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!h){continue}d=s(h[1],h[3]);if(!d){continue}if(!a(u,d)){continue}if(h[2]){d.className=h[2].substr(1).replace("."," ")}c.push(h[1]);u.appendChild(d);u=d;continue}u.appendChild(e.document.createTextNode(n(l)))}return o}var vr=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function gr(e){for(var t=0;t=i[0]&&e<=i[1]){return true}}return false}function yr(e){var t=[],i="",r;if(!e||!e.childNodes){return"ltr"}function n(e,t){for(var i=t.childNodes.length-1;i>=0;i--){e.push(t.childNodes[i])}}function a(e){if(!e||!e.length){return null}var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\n|\r)/);if(r){e.length=0;return r[0]}return i}if(t.tagName==="ruby"){return a(e)}if(t.childNodes){n(e,t);return a(e)}}n(t,e);while(i=a(t)){for(var s=0;s=0&&e.line<=100)){return e.line}if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement){return-1}var t=e.track,i=t.textTrackList,r=0;for(var n=0;ne.left&&this.tope.top};Sr.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right};Sr.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}};Sr.prototype.intersectPercentage=function(e){var t=Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left)),i=Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top)),r=t*i;return r/(this.height*this.width)};Sr.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}};Sr.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0;var i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0;var r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e;var n={left:e.left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||i};return n};function kr(e,t,i,r){function n(e,t){var n,a=new Sr(e),s=1;for(var o=0;ou){n=new Sr(e);s=u}e=new Sr(a)}return n||a}var a=new Sr(t),s=t.cue,o=_r(s),u=[];if(s.snapToLines){var l;switch(s.vertical){case"":u=["+y","-y"];l="height";break;case"rl":u=["+x","-x"];l="width";break;case"lr":u=["-x","+x"];l="width";break}var c=a.lineHeight,f=c*Math.round(o),d=i[l]+c,h=u[0];if(Math.abs(f)>d){f=f<0?-1:1;f*=Math.ceil(d/c)*c}if(o<0){f+=s.vertical===""?i.height:i.width;u=u.reverse()}a.move(h,f)}else{var p=a.lineHeight/i.height*100;switch(s.lineAlign){case"middle":o-=p/2;break;case"end":o-=p;break}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")});break}u=["+y","-x","+x","-y"];a=new Sr(t)}var m=n(a,u);t.move(m.toCSSCompatValues(i))}function wr(){}wr.StringDecoder=function(){return{decode:function e(t){if(!t){return""}if(typeof t!=="string"){throw new Error("Error - expected string data.")}return decodeURIComponent(encodeURIComponent(t))}}};wr.convertCueToDOMTree=function(e,t){if(!e||!t){return null}return mr(e,t)};var Cr=.05;var Er="sans-serif";var Ar="1.5%";wr.processCues=function(e,t,i){if(!e||!t||!i){return null}while(i.firstChild){i.removeChild(i.firstChild)}var r=e.document.createElement("div");r.style.position="absolute";r.style.left="0";r.style.right="0";r.style.top="0";r.style.bottom="0";r.style.margin=Ar;i.appendChild(r);function n(e){for(var t=0;t100){throw new Error("Position must be between 0 and 100.")}h=t;this.hasBeenReset=true}},positionAlign:{enumerable:true,get:function e(){return p},set:function e(t){var i=Dr(t);if(!i){throw new SyntaxError("An invalid or illegal string was specified.")}p=i;this.hasBeenReset=true}},size:{enumerable:true,get:function e(){return m},set:function e(t){if(t<0||t>100){throw new Error("Size must be between 0 and 100.")}m=t;this.hasBeenReset=true}},align:{enumerable:true,get:function e(){return v},set:function e(t){var i=Dr(t);if(!i){throw new SyntaxError("An invalid or illegal string was specified.")}v=i;this.hasBeenReset=true}}});this.displayState=undefined}xr.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Rr=xr;var Mr={"":true,up:true};function Br(e){if(typeof e!=="string"){return false}var t=Mr[e.toLowerCase()];return t?e.toLowerCase():false}function Nr(e){return typeof e==="number"&&e>=0&&e<=100}function jr(){var e=100;var t=3;var i=0;var r=100;var n=0;var a=100;var s="";Object.defineProperties(this,{width:{enumerable:true,get:function t(){return e},set:function t(i){if(!Nr(i)){throw new Error("Width must be between 0 and 100.")}e=i}},lines:{enumerable:true,get:function e(){return t},set:function e(i){if(typeof i!=="number"){throw new TypeError("Lines must be set to a number.")}t=i}},regionAnchorY:{enumerable:true,get:function e(){return r},set:function e(t){if(!Nr(t)){throw new Error("RegionAnchorX must be between 0 and 100.")}r=t}},regionAnchorX:{enumerable:true,get:function e(){return i},set:function e(t){if(!Nr(t)){throw new Error("RegionAnchorY must be between 0 and 100.")}i=t}},viewportAnchorY:{enumerable:true,get:function e(){return a},set:function e(t){if(!Nr(t)){throw new Error("ViewportAnchorY must be between 0 and 100.")}a=t}},viewportAnchorX:{enumerable:true,get:function e(){return n},set:function e(t){if(!Nr(t)){throw new Error("ViewportAnchorX must be between 0 and 100.")}n=t}},scroll:{enumerable:true,get:function e(){return s},set:function e(t){var i=Br(t);if(i===false){throw new SyntaxError("An invalid or illegal string was specified.")}s=i}}})}var Fr=jr;var Vr=Bt(function(t){var i=t.exports={WebVTT:Lr,VTTCue:Rr,VTTRegion:Fr};e.vttjs=i;e.WebVTT=i.WebVTT;var r=i.VTTCue;var n=i.VTTRegion;var a=e.VTTCue;var s=e.VTTRegion;i.shim=function(){e.VTTCue=r;e.VTTRegion=n};i.restore=function(){e.VTTCue=a;e.VTTRegion=s};if(!e.VTTCue){i.shim()}});var Hr=Vr.WebVTT;var qr=Vr.VTTCue;var zr=Vr.VTTRegion;function Wr(e,t,i,r,n){if(n===void 0){n={}}var a=e.textTracks();n.kind=t;if(i){n.label=i}if(r){n.language=r}n.tech=e;var s=new nr.text.TrackClass(n);a.addTrack(s);return s}var Gr=function(i){r(n,i);function n(e,t){var r;if(e===void 0){e={}}if(t===void 0){t=function e(){}}e.reportTouchActivity=false;r=i.call(this,null,e,t)||this;r.hasStarted_=false;r.on("playing",function(){this.hasStarted_=true});r.on("loadstart",function(){this.hasStarted_=false});nr.names.forEach(function(t){var i=nr[t];if(e&&e[i.getterName]){r[i.privateName]=e[i.getterName]}});if(!r.featuresProgressEvents){r.manualProgressOn()}if(!r.featuresTimeupdateEvents){r.manualTimeUpdatesOn()}["Text","Audio","Video"].forEach(function(t){if(e["native"+t+"Tracks"]===false){r["featuresNative"+t+"Tracks"]=false}});if(e.nativeCaptions===false||e.nativeTextTracks===false){r.featuresNativeTextTracks=false}else if(e.nativeCaptions===true||e.nativeTextTracks===true){r.featuresNativeTextTracks=true}if(!r.featuresNativeTextTracks){r.emulateTextTracks()}r.autoRemoteTextTracks_=new nr.text.ListClass;r.initTrackListeners();if(!e.nativeControlsForTouch){r.emitTapEvents()}if(r.constructor){r.name_=r.constructor.name||"Unknown Tech"}return r}var a=n.prototype;a.triggerSourceset=function e(t){var i=this;if(!this.isReady_){this.one("ready",function(){return i.setTimeout(function(){return i.triggerSourceset(t)},1)})}this.trigger({src:t,type:"sourceset"})};a.manualProgressOn=function e(){this.on("durationchange",this.onDurationChange);this.manualProgress=true;this.one("ready",this.trackProgress)};a.manualProgressOff=function e(){this.manualProgress=false;this.stopTrackingProgress();this.off("durationchange",this.onDurationChange)};a.trackProgress=function e(t){this.stopTrackingProgress();this.progressInterval=this.setInterval(Ae(this,function(){var e=this.bufferedPercent();if(this.bufferedPercent_!==e){this.trigger("progress")}this.bufferedPercent_=e;if(e===1){this.stopTrackingProgress()}}),500)};a.onDurationChange=function e(t){this.duration_=this.duration()};a.buffered=function e(){return gt(0,0)};a.bufferedPercent=function e(){return yt(this.buffered(),this.duration_)};a.stopTrackingProgress=function e(){this.clearInterval(this.progressInterval)};a.manualTimeUpdatesOn=function e(){this.manualTimeUpdates=true;this.on("play",this.trackCurrentTime);this.on("pause",this.stopTrackingCurrentTime)};a.manualTimeUpdatesOff=function e(){this.manualTimeUpdates=false;this.stopTrackingCurrentTime();this.off("play",this.trackCurrentTime);this.off("pause",this.stopTrackingCurrentTime)};a.trackCurrentTime=function e(){if(this.currentTimeInterval){this.stopTrackingCurrentTime()}this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})},250)};a.stopTrackingCurrentTime=function e(){this.clearInterval(this.currentTimeInterval);this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})};a.dispose=function e(){this.clearTracks(ir.names);if(this.manualProgress){this.manualProgressOff()}if(this.manualTimeUpdates){this.manualTimeUpdatesOff()}i.prototype.dispose.call(this)};a.clearTracks=function e(t){var i=this;t=[].concat(t);t.forEach(function(e){var t=i[e+"Tracks"]()||[];var r=t.length;while(r--){var n=t[r];if(e==="text"){i.removeRemoteTextTrack(n)}t.removeTrack(n)}})};a.cleanupAutoTextTracks=function e(){var t=this.autoRemoteTextTracks_||[];var i=t.length;while(i--){var r=t[i];this.removeRemoteTextTrack(r)}};a.reset=function e(){};a.error=function e(t){if(t!==undefined){this.error_=new Et(t);this.trigger("error")}return this.error_};a.played=function e(){if(this.hasStarted_){return gt(0,0)}return gt()};a.setCurrentTime=function e(){if(this.manualTimeUpdates){this.trigger({type:"timeupdate",target:this,manuallyTriggered:true})}};a.initTrackListeners=function e(){var t=this;ir.names.forEach(function(e){var i=ir[e];var r=function i(){t.trigger(e+"trackchange")};var n=t[i.getterName]();n.addEventListener("removetrack",r);n.addEventListener("addtrack",r);t.on("dispose",function(){n.removeEventListener("removetrack",r);n.removeEventListener("addtrack",r)})})};a.addWebVttScript_=function i(){var r=this;if(e.WebVTT){return}if(t.body.contains(this.el())){if(!this.options_["vtt.js"]&&S(Vr)&&Object.keys(Vr).length>0){this.trigger("vttjsloaded");return}var n=t.createElement("script");n.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js";n.onload=function(){r.trigger("vttjsloaded")};n.onerror=function(){r.trigger("vttjserror")};this.on("dispose",function(){n.onload=null;n.onerror=null});e.WebVTT=true;this.el().parentNode.appendChild(n)}else{this.ready(this.addWebVttScript_)}};a.emulateTextTracks=function e(){var t=this;var i=this.textTracks();var r=this.remoteTextTracks();var n=function e(t){return i.addTrack(t.track)};var a=function e(t){return i.removeTrack(t.track)};r.on("addtrack",n);r.on("removetrack",a);this.addWebVttScript_();var s=function e(){return t.trigger("texttrackchange")};var o=function e(){s();for(var t=0;t=0;n--){var a=e[n];if(a[t]){a[t](r,i)}}}function un(e){Yr[e.id()]=null}function ln(e,t){var i=Yr[e.id()];var r=null;if(i===undefined||i===null){r=t(e);Yr[e.id()]=[[t,r]];return r}for(var n=0;n',className:this.buildCSSClass(),tabIndex:0},r);if(i==="button"){d.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead.")}n=b({role:"button"},n);this.tabIndex_=r.tabIndex;var a=e.prototype.createEl.call(this,i,r,n);this.createControlTextEl(a);return a};n.dispose=function t(){this.controlTextEl_=null;e.prototype.dispose.call(this)};n.createControlTextEl=function e(t){this.controlTextEl_=U("span",{className:"vjs-control-text"},{"aria-live":"polite"});if(t){t.appendChild(this.controlTextEl_)}this.controlText(this.controlText_,t);return this.controlTextEl_};n.controlText=function e(t,i){if(i===void 0){i=this.el()}if(t===undefined){return this.controlText_||"Need Text"}var r=this.localize(t);this.controlText_=t;D(this.controlTextEl_,r);if(!this.nonIconControl){i.setAttribute("title",r)}};n.buildCSSClass=function t(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)};n.enable=function e(){if(!this.enabled_){this.enabled_=true;this.removeClass("vjs-disabled");this.el_.setAttribute("aria-disabled","false");if(typeof this.tabIndex_!=="undefined"){this.el_.setAttribute("tabIndex",this.tabIndex_)}this.on(["tap","click"],this.handleClick);this.on("focus",this.handleFocus);this.on("blur",this.handleBlur)}};n.disable=function e(){this.enabled_=false;this.addClass("vjs-disabled");this.el_.setAttribute("aria-disabled","true");if(typeof this.tabIndex_!=="undefined"){this.el_.removeAttribute("tabIndex")}this.off(["tap","click"],this.handleClick);this.off("focus",this.handleFocus);this.off("blur",this.handleBlur)};n.handleClick=function e(t){};n.handleFocus=function e(i){ve(t,"keydown",Ae(this,this.handleKeyPress))};n.handleKeyPress=function t(i){if(Nt.isEventKey(i,"Space")||Nt.isEventKey(i,"Enter")){i.preventDefault();this.trigger("click")}else{e.prototype.handleKeyPress.call(this,i)}};n.handleBlur=function e(i){ge(t,"keydown",Ae(this,this.handleKeyPress))};return i}(Xe);Xe.registerComponent("ClickableComponent",gn);var yn=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.update();t.on("posterchange",Ae(o(o(r)),r.update));return r}var i=t.prototype;i.dispose=function t(){this.player().off("posterchange",this.update);e.prototype.dispose.call(this)};i.createEl=function e(){var t=U("div",{className:"vjs-poster",tabIndex:-1});return t};i.update=function e(t){var i=this.player().poster();this.setSrc(i);if(i){this.show()}else{this.hide()}};i.setSrc=function e(t){var i="";if(t){i='url("'+t+'")'}this.el_.style.backgroundImage=i};i.handleClick=function e(t){if(!this.player_.controls()){return}if(this.player_.paused()){Ot(this.player_.play())}else{this.player_.pause()}this.player_.handleFocus({})};return t}(gn);Xe.registerComponent("PosterImage",yn);var _n="#222";var bn="#ccc";var Tn={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 Sn(e,t){var i;if(e.length===4){i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]}else if(e.length===7){i=e.slice(1)}else{throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.")}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function kn(e,t,i){try{e.style[t]=i}catch(e){return}}var wn=function(t){r(i,t);function i(i,r,n){var a;a=t.call(this,i,r,n)||this;var s=Ae(o(o(a)),a.updateDisplay);i.on("loadstart",Ae(o(o(a)),a.toggleDisplay));i.on("texttrackchange",s);i.on("loadedmetadata",Ae(o(o(a)),a.preselectTrack));i.ready(Ae(o(o(a)),function(){if(i.tech_&&i.tech_.featuresNativeTextTracks){this.hide();return}i.on("fullscreenchange",s);i.on("playerresize",s);e.addEventListener("orientationchange",s);i.on("dispose",function(){return e.removeEventListener("orientationchange",s)});var t=this.options_.playerOptions.tracks||[];for(var r=0;r',className:this.buildCSSClass()},i);r=b({type:"button"},r);var n=Xe.prototype.createEl.call(this,t,i,r);this.createControlTextEl(n);return n};i.addChild=function e(t,i){if(i===void 0){i={}}var r=this.constructor.name;d.warn("Adding an actionable (user controllable) child to a Button ("+r+") is not supported; use a ClickableComponent instead.");return Xe.prototype.addChild.call(this,t,i)};i.enable=function t(){e.prototype.enable.call(this);this.el_.removeAttribute("disabled")};i.disable=function t(){e.prototype.disable.call(this);this.el_.setAttribute("disabled","disabled")};i.handleKeyPress=function t(i){if(!(Nt.isEventKey(i,"Space")||Nt.isEventKey(i,"Enter"))){e.prototype.handleKeyPress.call(this,i)}};return t}(gn);Xe.registerComponent("Button",En);var An=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.mouseused_=false;r.on("mousedown",r.handleMouseDown);return r}var i=t.prototype;i.buildCSSClass=function e(){return"vjs-big-play-button"};i.handleClick=function e(t){var i=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY){Ot(i);this.player_.handleFocus({});return}var r=this.player_.getChild("controlBar");var n=r&&r.getChild("playToggle");if(!n){this.player_.focus();return}var a=function e(){return n.focus()};if(Pt(i)){i.then(a,function(){})}else{this.setTimeout(a,1)}};i.handleKeyPress=function t(i){this.mouseused_=false;e.prototype.handleKeyPress.call(this,i)};i.handleMouseDown=function e(t){this.mouseused_=true};return t}(En);An.prototype.controlText_="Play Video";Xe.registerComponent("BigPlayButton",An);var Ln=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.controlText(i&&i.controlText||r.localize("Close"));return r}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)};i.handleKeyPress=function e(t){};i.handleClick=function e(t){this.trigger({type:"close",bubbles:false})};return t}(En);Xe.registerComponent("CloseButton",Ln);var In=function(e){r(t,e);function t(t,i){var r;if(i===void 0){i={}}r=e.call(this,t,i)||this;i.replay=i.replay===undefined||i.replay;r.on(t,"play",r.handlePlay);r.on(t,"pause",r.handlePause);if(i.replay){r.on(t,"ended",r.handleEnded)}return r}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)};i.handleClick=function e(t){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};i.handleSeeked=function e(t){this.removeClass("vjs-ended");if(this.player_.paused()){this.handlePause(t)}else{this.handlePlay(t)}};i.handlePlay=function e(t){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.controlText("Pause")};i.handlePause=function e(t){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.controlText("Play")};i.handleEnded=function e(t){this.removeClass("vjs-playing");this.addClass("vjs-ended");this.controlText("Replay");this.one(this.player_,"seeked",this.handleSeeked)};return t}(En);In.prototype.controlText_="Play";Xe.registerComponent("PlayToggle",In);var Pn=function e(t,i){t=t<0?0:t;var r=Math.floor(t%60);var n=Math.floor(t/60%60);var a=Math.floor(t/3600);var s=Math.floor(i/60%60);var o=Math.floor(i/3600);if(isNaN(t)||t===Infinity){a=n=r="-"}a=a>0||o>0?a+":":"";n=((a||s>=10)&&n<10?"0"+n:n)+":";r=r<10?"0"+r:r;return a+n+r};var On=Pn;function Un(e){On=e}function Dn(){On=Pn}function xn(e,t){if(t===void 0){t=e}return On(e,t)}var Rn=function(e){r(i,e);function i(t,i){var r;r=e.call(this,t,i)||this;r.throttledUpdateContent=Le(Ae(o(o(r)),r.updateContent),25);r.on(t,"timeupdate",r.throttledUpdateContent);return r}var n=i.prototype;n.createEl=function t(){var i=this.buildCSSClass();var r=e.prototype.createEl.call(this,"div",{className:i+" vjs-time-control vjs-control",innerHTML:''+this.localize(this.labelText_)+" "});this.contentEl_=U("span",{className:i+"-display"},{"aria-live":"off",role:"presentation"});this.updateTextNode_();r.appendChild(this.contentEl_);return r};n.dispose=function t(){this.contentEl_=null;this.textNode_=null;e.prototype.dispose.call(this)};n.updateTextNode_=function e(){if(!this.contentEl_){return}while(this.contentEl_.firstChild){this.contentEl_.removeChild(this.contentEl_.firstChild)}this.textNode_=t.createTextNode(this.formattedTime_||this.formatTime_(0));this.contentEl_.appendChild(this.textNode_)};n.formatTime_=function e(t){return xn(t)};n.updateFormattedTime_=function e(t){var i=this.formatTime_(t);if(i===this.formattedTime_){return}this.formattedTime_=i;this.requestAnimationFrame(this.updateTextNode_)};n.updateContent=function e(t){};return i}(Xe);Rn.prototype.labelText_="Time";Rn.prototype.controlText_="Time";Xe.registerComponent("TimeDisplay",Rn);var Mn=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.on(t,"ended",r.handleEnded);return r}var i=t.prototype;i.buildCSSClass=function e(){return"vjs-current-time"};i.updateContent=function e(t){var i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(i)};i.handleEnded=function e(t){if(!this.player_.duration()){return}this.updateFormattedTime_(this.player_.duration())};return t}(Rn);Mn.prototype.labelText_="Current Time";Mn.prototype.controlText_="Current Time";Xe.registerComponent("CurrentTimeDisplay",Mn);var Bn=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.on(t,"durationchange",r.updateContent);r.on(t,"loadstart",r.updateContent);r.on(t,"loadedmetadata",r.throttledUpdateContent);return r}var i=t.prototype;i.buildCSSClass=function e(){return"vjs-duration"};i.updateContent=function e(t){var i=this.player_.duration();if(this.duration_!==i){this.duration_=i;this.updateFormattedTime_(i)}};return t}(Rn);Bn.prototype.labelText_="Duration";Bn.prototype.controlText_="Duration";Xe.registerComponent("DurationDisplay",Bn);var Nn=function(e){r(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"/
"},{"aria-hidden":true})};return t}(Xe);Xe.registerComponent("TimeDivider",Nn);var jn=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.on(t,"durationchange",r.throttledUpdateContent);r.on(t,"ended",r.handleEnded);return r}var i=t.prototype;i.buildCSSClass=function e(){return"vjs-remaining-time"};i.createEl=function t(){var i=e.prototype.createEl.call(this);i.insertBefore(U("span",{},{"aria-hidden":true},"-"),this.contentEl_);return i};i.updateContent=function e(t){if(typeof this.player_.duration()!=="number"){return}if(this.player_.remainingTimeDisplay){this.updateFormattedTime_(this.player_.remainingTimeDisplay())}else{this.updateFormattedTime_(this.player_.remainingTime())}};i.handleEnded=function e(t){if(!this.player_.duration()){return}this.updateFormattedTime_(0)};return t}(Rn);jn.prototype.labelText_="Remaining Time";jn.prototype.controlText_="Remaining Time";Xe.registerComponent("RemainingTimeDisplay",jn);var Fn=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.updateShowing();r.on(r.player(),"durationchange",r.updateShowing);return r}var i=t.prototype;i.createEl=function t(){var i=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});this.contentEl_=U("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"});i.appendChild(this.contentEl_);return i};i.dispose=function t(){this.contentEl_=null;e.prototype.dispose.call(this)};i.updateShowing=function e(t){if(this.player().duration()===Infinity){this.show()}else{this.hide()}};return t}(Xe);Xe.registerComponent("LiveDisplay",Fn);var Vn=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.updateLiveEdgeStatus();if(r.player_.liveTracker){r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatus)}return r}var i=t.prototype;i.createEl=function t(){var i=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});this.textEl_=U("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"});i.appendChild(this.textEl_);return i};i.updateLiveEdgeStatus=function e(t){if(!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()){this.setAttribute("aria-disabled",true);this.addClass("vjs-at-live-edge");this.controlText("Seek to live, currently playing live")}else{this.setAttribute("aria-disabled",false);this.removeClass("vjs-at-live-edge");this.controlText("Seek to live, currently behind live")}};i.handleClick=function e(){this.player_.liveTracker.seekToLiveEdge()};i.dispose=function t(){if(this.player_.liveTracker){this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus)}this.textEl_=null;e.prototype.dispose.call(this)};return t}(En);Vn.prototype.controlText_="Seek to live, currently playing live";Xe.registerComponent("SeekToLive",Vn);var Hn=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.bar=r.getChild(r.options_.barName);r.vertical(!!r.options_.vertical);r.enable();return r}var i=t.prototype;i.enabled=function e(){return this.enabled_};i.enable=function e(){if(this.enabled()){return}this.on("mousedown",this.handleMouseDown);this.on("touchstart",this.handleMouseDown);this.on("focus",this.handleFocus);this.on("blur",this.handleBlur);this.on("click",this.handleClick);this.on(this.player_,"controlsvisible",this.update);if(this.playerEvent){this.on(this.player_,this.playerEvent,this.update)}this.removeClass("disabled");this.setAttribute("tabindex",0);this.enabled_=true};i.disable=function e(){if(!this.enabled()){return}var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown);this.off("touchstart",this.handleMouseDown);this.off("focus",this.handleFocus);this.off("blur",this.handleBlur);this.off("click",this.handleClick);this.off(this.player_,"controlsvisible",this.update);this.off(t,"mousemove",this.handleMouseMove);this.off(t,"mouseup",this.handleMouseUp);this.off(t,"touchmove",this.handleMouseMove);this.off(t,"touchend",this.handleMouseUp);this.removeAttribute("tabindex");this.addClass("disabled");if(this.playerEvent){this.off(this.player_,this.playerEvent,this.update)}this.enabled_=false};i.createEl=function t(i,r,n){if(r===void 0){r={}}if(n===void 0){n={}}r.className=r.className+" vjs-slider";r=b({tabIndex:0},r);n=b({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n);return e.prototype.createEl.call(this,i,r,n)};i.handleMouseDown=function e(t){var i=this.bar.el_.ownerDocument;if(t.type==="mousedown"){t.preventDefault()}if(t.type==="touchstart"&&!ot){t.preventDefault()}z();this.addClass("vjs-sliding");this.trigger("slideractive");this.on(i,"mousemove",this.handleMouseMove);this.on(i,"mouseup",this.handleMouseUp);this.on(i,"touchmove",this.handleMouseMove);this.on(i,"touchend",this.handleMouseUp);this.handleMouseMove(t)};i.handleMouseMove=function e(t){};i.handleMouseUp=function e(){var t=this.bar.el_.ownerDocument;W();this.removeClass("vjs-sliding");this.trigger("sliderinactive");this.off(t,"mousemove",this.handleMouseMove);this.off(t,"mouseup",this.handleMouseUp);this.off(t,"touchmove",this.handleMouseMove);this.off(t,"touchend",this.handleMouseUp);this.update()};i.update=function e(){if(!this.el_){return}var t=this.getPercent();var i=this.bar;if(!i){return}if(typeof t!=="number"||t!==t||t<0||t===Infinity){t=0}var r=(t*100).toFixed(2)+"%";var n=i.el().style;if(this.vertical()){n.height=r}else{n.width=r}return t};i.calculateDistance=function e(t){var i=Y(this.el_,t);if(this.vertical()){return i.y}return i.x};i.handleFocus=function e(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)};i.handleKeyPress=function t(i){if(Nt.isEventKey(i,"Left")||Nt.isEventKey(i,"Down")){i.preventDefault();this.stepBack()}else if(Nt.isEventKey(i,"Right")||Nt.isEventKey(i,"Up")){i.preventDefault();this.stepForward()}else{e.prototype.handleKeyPress.call(this,i)}};i.handleBlur=function e(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)};i.handleClick=function e(t){t.stopImmediatePropagation();t.preventDefault()};i.vertical=function e(t){if(t===undefined){return this.vertical_||false}this.vertical_=!!t;if(this.vertical_){this.addClass("vjs-slider-vertical")}else{this.addClass("vjs-slider-horizontal")}};return t}(Xe);Xe.registerComponent("Slider",Hn);var qn=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.partEls_=[];r.on(t,"progress",r.update);return r}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+': 0%'})};i.dispose=function t(){this.partEls_=null;e.prototype.dispose.call(this)};i.update=function e(t){var i=this.player_.liveTracker;var r=this.player_.buffered();var n=i&&i.isLive()?i.seekableEnd():this.player_.duration();var a=this.player_.bufferedEnd();var s=this.partEls_;var o=this.$(".vjs-control-text-loaded-percentage");var u=function e(t,i,r){var n=t/i||0;n=(n>=1?1:n)*100;if(r){n=n.toFixed(2)}return n+"%"};this.el_.style.width=u(a,n);D(o,u(a,n,true));for(var l=0;lr.length;h--){this.el_.removeChild(s[h-1])}s.length=r.length};return t}(Xe);Xe.registerComponent("LoadProgressBar",qn);var zn=function(e){r(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})};i.update=function e(t,i,r){var n=G(this.el_);var a=G(this.player_.el());var s=t.width*i;if(!a||!n){return}var o=t.left-a.left+s;var u=t.width-s+(a.right-t.right);var l=n.width/2;if(on.width){l=n.width}this.el_.style.right="-"+l+"px";D(this.el_,r)};i.updateTime=function e(t,i,r,n){var a=this;if(this.rafId_){this.cancelAnimationFrame(this.rafId_)}this.rafId_=this.requestAnimationFrame(function(){var e;var s=a.player_.duration();if(a.player_.liveTracker&&a.player_.liveTracker.isLive()){var o=a.player_.liveTracker.liveWindow();var u=o-i*o;e=(u<1?"":"-")+xn(u,o)}else{e=xn(r,s)}a.update(t,i,e);if(n){n()}})};return t}(Xe);Xe.registerComponent("TimeTooltip",zn);var Wn=function(e){r(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})};i.update=function e(t,i){var r=this.getChild("timeTooltip");if(!r){return}var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();r.updateTime(t,i,n)};return t}(Xe);Wn.prototype.options_={children:[]};if(!et&&!it){Wn.prototype.options_.children.push("timeTooltip")}Xe.registerComponent("PlayProgressBar",Wn);var Gn=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.update=Le(Ae(o(o(r)),r.update),25);return r}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})};i.update=function e(t,i){var r=this;var n=i*this.player_.duration();this.getChild("timeTooltip").updateTime(t,i,n,function(){r.el_.style.left=t.width*i+"px"})};return t}(Xe);Gn.prototype.options_={children:["timeTooltip"]};Xe.registerComponent("MouseTimeDisplay",Gn);var Xn=5;var Yn=12;var Kn=30;var $n=function(e){r(i,e);function i(t,i){var r;r=e.call(this,t,i)||this;r.setEventHandlers_();return r}var n=i.prototype;n.setEventHandlers_=function e(){this.update=Le(Ae(this,this.update),Kn);this.on(this.player_,"timeupdate",this.update);this.on(this.player_,"ended",this.handleEnded);this.on(this.player_,"durationchange",this.update);if(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_);if("hidden"in t&&"visibilityState"in t){this.on(t,"visibilitychange",this.toggleVisibility_)}};n.toggleVisibility_=function e(i){if(t.hidden){this.disableInterval_(i)}else{this.enableInterval_();this.requestAnimationFrame(this.update)}};n.enableInterval_=function e(){var t=this;this.clearInterval(this.updateInterval);this.updateInterval=this.setInterval(function(){t.requestAnimationFrame(t.update)},Kn)};n.disableInterval_=function e(t){if(this.player_.liveTracker&&this.player_.liveTracker.isLive()&&t.type!=="ended"){return}this.clearInterval(this.updateInterval)};n.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})};n.update_=function e(t,i){var r=this.player_.liveTracker;var n=this.player_.duration();if(r&&r.isLive()){n=this.player_.liveTracker.liveCurrentTime()}this.el_.setAttribute("aria-valuenow",(i*100).toFixed(2));this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[xn(t,n),xn(n,n)],"{1} of {2}"));if(this.bar){this.bar.update(G(this.el_),i)}};n.update=function t(i){if(this.el().offsetParent===null){return}var r=e.prototype.update.call(this);this.update_(this.getCurrentTime_(),r);return r};n.getCurrentTime_=function e(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()};n.handleEnded=function e(t){this.update_(this.player_.duration(),1)};n.getPercent=function e(){var t=this.getCurrentTime_();var i;var r=this.player_.liveTracker;if(r&&r.isLive()){i=(t-r.seekableStart())/r.liveWindow();if(r.atLiveEdge()){i=1}}else{i=t/this.player_.duration()}return i>=1?1:i||0};n.handleMouseDown=function t(i){if(!ee(i)){return}i.stopPropagation();this.player_.scrubbing(true);this.videoWasPlaying=!this.player_.paused();this.player_.pause();e.prototype.handleMouseDown.call(this,i)};n.handleMouseMove=function e(t){if(!ee(t)){return}var i;var r=this.calculateDistance(t);var n=this.player_.liveTracker;if(!n||!n.isLive()){i=r*this.player_.duration();if(i===this.player_.duration()){i=i-.1}}else{var a=n.seekableStart();var s=n.liveCurrentTime();i=a+r*n.liveWindow();if(i>=s){i=s}if(i<=a){i=a+.1}if(i===Infinity){return}}this.player_.currentTime(i)};n.enable=function t(){e.prototype.enable.call(this);var i=this.getChild("mouseTimeDisplay");if(!i){return}i.show()};n.disable=function t(){e.prototype.disable.call(this);var i=this.getChild("mouseTimeDisplay");if(!i){return}i.hide()};n.handleMouseUp=function t(i){e.prototype.handleMouseUp.call(this,i);if(i){i.stopPropagation()}this.player_.scrubbing(false);this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:true});if(this.videoWasPlaying){Ot(this.player_.play())}};n.stepForward=function e(){this.player_.currentTime(this.player_.currentTime()+Xn)};n.stepBack=function e(){this.player_.currentTime(this.player_.currentTime()-Xn)};n.handleAction=function e(t){if(this.player_.paused()){this.player_.play()}else{this.player_.pause()}};n.handleKeyPress=function t(i){if(Nt.isEventKey(i,"Space")||Nt.isEventKey(i,"Enter")){i.preventDefault();this.handleAction(i)}else if(Nt.isEventKey(i,"Home")){i.preventDefault();this.player_.currentTime(0)}else if(Nt.isEventKey(i,"End")){i.preventDefault();this.player_.currentTime(this.player_.duration())}else if(/^[0-9]$/.test(Nt(i))){i.preventDefault();var r=(Nt.codes[Nt(i)]-Nt.codes["0"])*10/100;this.player_.currentTime(this.player_.duration()*r)}else if(Nt.isEventKey(i,"PgDn")){i.preventDefault();this.player_.currentTime(this.player_.currentTime()-Xn*Yn)}else if(Nt.isEventKey(i,"PgUp")){i.preventDefault();this.player_.currentTime(this.player_.currentTime()+Xn*Yn)}else{e.prototype.handleKeyPress.call(this,i)}};return i}(Hn);$n.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};if(!et&&!it){$n.prototype.options_.children.splice(1,0,"mouseTimeDisplay")}Xe.registerComponent("SeekBar",$n);var Qn=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.handleMouseMove=Le(Ae(o(o(r)),r.handleMouseMove),25);r.throttledHandleMouseSeek=Le(Ae(o(o(r)),r.handleMouseSeek),25);r.enable();return r}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})};i.handleMouseMove=function e(t){var i=this.getChild("seekBar");if(i){var r=i.getChild("mouseTimeDisplay");var n=i.el();var a=G(n);var s=Y(n,t).x;if(s>1){s=1}else if(s<0){s=0}if(r){r.update(a,s)}}};i.handleMouseSeek=function e(t){var i=this.getChild("seekBar");if(i){i.handleMouseMove(t)}};i.enabled=function e(){return this.enabled_};i.disable=function e(){this.children().forEach(function(e){return e.disable&&e.disable()});if(!this.enabled()){return}this.off(["mousedown","touchstart"],this.handleMouseDown);this.off(this.el_,"mousemove",this.handleMouseMove);this.handleMouseUp();this.addClass("disabled");this.enabled_=false};i.enable=function e(){this.children().forEach(function(e){return e.enable&&e.enable()});if(this.enabled()){return}this.on(["mousedown","touchstart"],this.handleMouseDown);this.on(this.el_,"mousemove",this.handleMouseMove);this.removeClass("disabled");this.enabled_=true};i.handleMouseDown=function e(t){var i=this.el_.ownerDocument;var r=this.getChild("seekBar");if(r){r.handleMouseDown(t)}this.on(i,"mousemove",this.throttledHandleMouseSeek);this.on(i,"touchmove",this.throttledHandleMouseSeek);this.on(i,"mouseup",this.handleMouseUp);this.on(i,"touchend",this.handleMouseUp)};i.handleMouseUp=function e(t){var i=this.el_.ownerDocument;var r=this.getChild("seekBar");if(r){r.handleMouseUp(t)}this.off(i,"mousemove",this.throttledHandleMouseSeek);this.off(i,"touchmove",this.throttledHandleMouseSeek);this.off(i,"mouseup",this.handleMouseUp);this.off(i,"touchend",this.handleMouseUp)};return t}(Xe);Qn.prototype.options_={children:["seekBar"]};Xe.registerComponent("ProgressControl",Qn);var Jn=function(e){r(i,e);function i(i,r){var n;n=e.call(this,i,r)||this;n.on(i,"fullscreenchange",n.handleFullscreenChange);if(t[_t.fullscreenEnabled]===false){n.disable()}return n}var n=i.prototype;n.buildCSSClass=function t(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)};n.handleFullscreenChange=function e(t){if(this.player_.isFullscreen()){this.controlText("Non-Fullscreen")}else{this.controlText("Fullscreen")}};n.handleClick=function e(t){if(!this.player_.isFullscreen()){this.player_.requestFullscreen()}else{this.player_.exitFullscreen()}};return i}(En);Jn.prototype.controlText_="Fullscreen";Xe.registerComponent("FullscreenToggle",Jn);var Zn=function e(t,i){if(i.tech_&&!i.tech_.featuresVolumeControl){t.addClass("vjs-hidden")}t.on(i,"loadstart",function(){if(!i.tech_.featuresVolumeControl){t.addClass("vjs-hidden")}else{t.removeClass("vjs-hidden")}})};var ea=function(e){r(t,e);function t(){return e.apply(this,arguments)||this}var i=t.prototype;i.createEl=function t(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})};return t}(Xe);Xe.registerComponent("VolumeLevel",ea);var ta=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;r.on("slideractive",r.updateLastVolume_);r.on(t,"volumechange",r.updateARIAAttributes);t.ready(function(){return r.updateARIAAttributes()});return r}var i=t.prototype;i.createEl=function t(){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(i){if(!ee(i)){return}e.prototype.handleMouseDown.call(this,i)};i.handleMouseMove=function e(t){if(!ee(t)){return}this.checkMuted();this.player_.volume(this.calculateDistance(t))};i.checkMuted=function e(){if(this.player_.muted()){this.player_.muted(false)}};i.getPercent=function e(){if(this.player_.muted()){return 0}return this.player_.volume()};i.stepForward=function e(){this.checkMuted();this.player_.volume(this.player_.volume()+.1)};i.stepBack=function e(){this.checkMuted();this.player_.volume(this.player_.volume()-.1)};i.updateARIAAttributes=function e(t){var i=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",i);this.el_.setAttribute("aria-valuetext",i+"%")};i.volumeAsPercentage_=function e(){return Math.round(this.player_.volume()*100)};i.updateLastVolume_=function e(){var t=this;var i=this.player_.volume();this.one("sliderinactive",function(){if(t.player_.volume()===0){t.player_.lastVolume_(i)}})};return t}(Hn);ta.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};ta.prototype.playerEvent="volumechange";Xe.registerComponent("VolumeBar",ta);var ia=function(e){r(t,e);function t(t,i){var r;if(i===void 0){i={}}i.vertical=i.vertical||false;if(typeof i.volumeBar==="undefined"||S(i.volumeBar)){i.volumeBar=i.volumeBar||{};i.volumeBar.vertical=i.vertical}r=e.call(this,t,i)||this;Zn(o(o(r)),t);r.throttledHandleMouseMove=Le(Ae(o(o(r)),r.handleMouseMove),25);r.on("mousedown",r.handleMouseDown);r.on("touchstart",r.handleMouseDown);r.on(r.volumeBar,["focus","slideractive"],function(){r.volumeBar.addClass("vjs-slider-active");r.addClass("vjs-slider-active");r.trigger("slideractive")});r.on(r.volumeBar,["blur","sliderinactive"],function(){r.volumeBar.removeClass("vjs-slider-active");r.removeClass("vjs-slider-active");r.trigger("sliderinactive")});return r}var i=t.prototype;i.createEl=function t(){var i="vjs-volume-horizontal";if(this.options_.vertical){i="vjs-volume-vertical"}return e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+i})};i.handleMouseDown=function e(t){var i=this.el_.ownerDocument;this.on(i,"mousemove",this.throttledHandleMouseMove);this.on(i,"touchmove",this.throttledHandleMouseMove);this.on(i,"mouseup",this.handleMouseUp);this.on(i,"touchend",this.handleMouseUp)};i.handleMouseUp=function e(t){var i=this.el_.ownerDocument;this.off(i,"mousemove",this.throttledHandleMouseMove);this.off(i,"touchmove",this.throttledHandleMouseMove);this.off(i,"mouseup",this.handleMouseUp);this.off(i,"touchend",this.handleMouseUp)};i.handleMouseMove=function e(t){this.volumeBar.handleMouseMove(t)};return t}(Xe);ia.prototype.options_={children:["volumeBar"]};Xe.registerComponent("VolumeControl",ia);var ra=function e(t,i){if(i.tech_&&!i.tech_.featuresMuteControl){t.addClass("vjs-hidden")}t.on(i,"loadstart",function(){if(!i.tech_.featuresMuteControl){t.addClass("vjs-hidden")}else{t.removeClass("vjs-hidden")}})};var na=function(e){r(t,e);function t(t,i){var r;r=e.call(this,t,i)||this;ra(o(o(r)),t);r.on(t,["loadstart","volumechange"],r.update);return r}var i=t.prototype;i.buildCSSClass=function t(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)};i.handleClick=function e(t){var i=this.player_.volume();var r=this.player_.lastVolume_();if(i===0){var n=r<.1?.1:r;this.player_.volume(n);this.player_.muted(false)}else{this.player_.muted(this.player_.muted()?false:true)}};i.update=function e(t){this.updateIcon_();this.updateControlText_()};i.updateIcon_=function e(){var t=this.player_.volume();var i=3;if(et&&this.player_.tech_&&this.player_.tech_.el_){this.player_.muted(this.player_.tech_.el_.muted)}if(t===0||this.player_.muted()){i=0}else if(t<.33){i=1}else if(t<.67){i=2}for(var r=0;r<4;r++){B(this.el_,"vjs-vol-"+r)}M(this.el_,"vjs-vol-"+i)};i.updateControlText_=function e(){var t=this.player_.muted()||this.player_.volume()===0;var i=t?"Unmute":"Mute";if(this.controlText()!==i){this.controlText(i)}};return t}(En);na.prototype.controlText_="Mute";Xe.registerComponent("MuteToggle",na);var aa=function(e){r(t,e);function t(t,i){var r;if(i===void 0){i={}}if(typeof i.inline!=="undefined"){i.inline=i.inline}else{i.inline=true}if(typeof i.volumeControl==="undefined"||S(i.volumeControl)){i.volumeControl=i.volumeControl||{};i.volumeControl.vertical=!i.inline}r=e.call(this,t,i)||this;r.on(t,["loadstart"],r.volumePanelState_);r.on(r.volumeControl,["slideractive"],r.sliderActive_);r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_);return r}var i=t.prototype;i.sliderActive_=function e(){this.addClass("vjs-slider-active")};i.sliderInactive_=function e(){this.removeClass("vjs-slider-active")};i.volumePanelState_=function e(){if(this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")){this.addClass("vjs-hidden")}if(this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")){this.addClass("vjs-mute-toggle-only")}};i.createEl=function t(){var i="vjs-volume-panel-horizontal";if(!this.options_.inline){i="vjs-volume-panel-vertical"}return e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+i})};return t}(Xe);aa.prototype.options_={children:["muteToggle","volumeControl"]};Xe.registerComponent("VolumePanel",aa);var sa=function(e){r(i,e);function i(t,i){var r;r=e.call(this,t,i)||this;if(i){r.menuButton_=i.menuButton}r.focusedChild_=-1;r.on("keydown",r.handleKeyPress);r.boundHandleBlur_=Ae(o(o(r)),r.handleBlur);r.boundHandleTapClick_=Ae(o(o(r)),r.handleTapClick);return r}var n=i.prototype;n.addEventListenerForItem=function e(t){if(!(t instanceof Xe)){return}this.on(t,"blur",this.boundHandleBlur_);this.on(t,["tap","click"],this.boundHandleTapClick_)};n.removeEventListenerForItem=function e(t){if(!(t instanceof Xe)){return}this.off(t,"blur",this.boundHandleBlur_);this.off(t,["tap","click"],this.boundHandleTapClick_)};n.removeChild=function t(i){if(typeof i==="string"){i=this.getChild(i)}this.removeEventListenerForItem(i);e.prototype.removeChild.call(this,i)};n.addItem=function e(t){var i=this.addChild(t);if(i){this.addEventListenerForItem(i)}};n.createEl=function t(){var i=this.options_.contentElType||"ul";this.contentEl_=U(i,{className:"vjs-menu-content"});this.contentEl_.setAttribute("role","menu");var r=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});r.appendChild(this.contentEl_);ve(r,"click",function(e){e.preventDefault();e.stopImmediatePropagation()});return r};n.dispose=function t(){this.contentEl_=null;this.boundHandleBlur_=null;this.boundHandleTapClick_=null;e.prototype.dispose.call(this)};n.handleBlur=function e(i){var r=i.relatedTarget||t.activeElement;if(!this.children().some(function(e){return e.el()===r})){var n=this.menuButton_;if(n&&n.buttonPressed_&&r!==n.el().firstChild){n.unpressButton()}}};n.handleTapClick=function e(t){if(this.menuButton_){this.menuButton_.unpressButton();var i=this.children();if(!Array.isArray(i)){return}var r=i.filter(function(e){return e.el()===t.target})[0];if(!r){return}if(r.name()!=="CaptionSettingsMenuItem"){this.menuButton_.focus()}}};n.handleKeyPress=function e(t){if(Nt.isEventKey(t,"Left")||Nt.isEventKey(t,"Down")){t.preventDefault();this.stepForward()}else if(Nt.isEventKey(t,"Right")||Nt.isEventKey(t,"Up")){t.preventDefault();this.stepBack()}};n.stepForward=function e(){var t=0;if(this.focusedChild_!==undefined){t=this.focusedChild_+1}this.focus(t)};n.stepBack=function e(){var t=0;if(this.focusedChild_!==undefined){t=this.focusedChild_-1}this.focus(t)};n.focus=function e(t){if(t===void 0){t=0}var i=this.children().slice();var r=i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className);if(r){i.shift()}if(i.length>0){if(t<0){t=0}else if(t>=i.length){t=i.length-1}this.focusedChild_=t;i[t].el_.focus()}};return i}(Xe);Xe.registerComponent("Menu",sa);var oa=function(e){r(i,e);function i(t,i){var r;if(i===void 0){i={}}r=e.call(this,t,i)||this;r.menuButton_=new En(t,i);r.menuButton_.controlText(r.controlText_);r.menuButton_.el_.setAttribute("aria-haspopup","true");var n=En.prototype.buildCSSClass();r.menuButton_.el_.className=r.buildCSSClass()+" "+n;r.menuButton_.removeClass("vjs-control");r.addChild(r.menuButton_);r.update();r.enabled_=true;r.on(r.menuButton_,"tap",r.handleClick);r.on(r.menuButton_,"click",r.handleClick);r.on(r.menuButton_,"focus",r.handleFocus);r.on(r.menuButton_,"blur",r.handleBlur);r.on(r.menuButton_,"mouseenter",function(){r.menu.show()});r.on("keydown",r.handleSubmenuKeyPress);return r}var n=i.prototype;n.update=function e(){var t=this.createMenu();if(this.menu){this.menu.dispose();this.removeChild(this.menu)}this.menu=t;this.addChild(t);this.buttonPressed_=false;this.menuButton_.el_.setAttribute("aria-expanded","false");if(this.items&&this.items.length<=this.hideThreshold_){this.hide()}else{this.show()}};n.createMenu=function e(){var t=new sa(this.player_,{menuButton:this});this.hideThreshold_=0;if(this.options_.title){var i=U("li",{className:"vjs-menu-title",innerHTML:ze(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var r=new Xe(this.player_,{el:i});t.addItem(r)}this.items=this.createItems();if(this.items){for(var n=0;n