/**
* @license
* video.js 7.4.1
* 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/document"),require("global/window")):"function"==typeof define&&define.amd?define(["global/document","global/window"],t):e.videojs=t(e.document,e.window)}(this,function(d,v){d=d&&d.hasownproperty("default")?d.default:d,v=v&&v.hasownproperty("default")?v.default:v;var p="7.4.1";function f(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 m(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 g=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;"),d.body.appendchild(n));for(var a={},s=0;sx',e=t.firstchild.href}return e},gt=function(e){if("string"==typeof e){var t=/^(\/?)([\s\s]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().tolowercase()}return""},xt=function(e){var t=v.location,i=zt(e);return(":"===i.protocol?t.protocol:i.protocol)+i.host!==t.protocol+t.host},yt=object.freeze({parseurl:zt,getabsoluteurl:wt,getfileextension:gt,iscrossorigin:xt}),$t=function(e){var t=kt.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)},kt=object.prototype.tostring;"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function qt(e,t){return e(t={exports:{}},t.exports),t.exports}var jt=qt(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*$/,"")}}),zt=(jt.left,jt.right,function.prototype.tostring),ei=/^\s*class\b/,ti=function(e){try{var t=zt.call(e);return ei.test(t)}catch(e){return!1}},ii=object.prototype.tostring,ni="function"==typeof symbol&&"symbol"==typeof symbol.tostringtag,ri=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(ni)return function(e){try{return!ti(e)&&(zt.call(e),!0)}catch(e){return!1}}(e);if(ti(e))return!1;var t=ii.call(e);return"[object function]"===t||"[object generatorfunction]"===t},ai=object.prototype.tostring,si=object.prototype.hasownproperty,oi=function(e,t,i){if(!ri(t))throw new typeerror("iterator must be a function");var n;3<=arguments.length&&(n=i),"[object array]"===ai.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","":"","":""," ":" "},pi={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},ui={v:"title",lang:"lang"},ii={rt:"ruby"};function xi(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 oi[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=pi[e];if(!i)return null;var n=a.document.createelement(i);n.localname=i;var r=ui[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=ci(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,ii[(u=d).localname]&&ii[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 di=[[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 ri(e){for(var t=0;t=i[0]&&e<=i[1])return!0}return!1}function mi(){}function bi(e,t,i){mi.call(this),this.cue=t,this.cuediv=xi(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 ni(t)}var f=function(e,t){for(var i,n=new ni(e),r=1,a=0;ae.left&&this.tope.top},ni.prototype.overlapsany=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},ni.prototype.overlapsoppositeaxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},ni.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)},ni.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}},ni.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}},fi.stringdecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new error("error - expected string data.");return decodeuricomponent(encodeuricomponent(e))}}},fi.convertcuetodomtree=function(e,t){return e&&t?xi(e,t):null};fi.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&&g.error("creating a clickablecomponent with an html element of "+e+" is not supported; use a button instead."),i=b({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(d,"keydown",ke(this,this.handlekeypress))},t.handlekeypress=function(e){32===e.which||13===e.which?(e.preventdefault(),this.trigger("click")):r.prototype.handlekeypress&&r.prototype.handlekeypress.call(this,e)},t.handleblur=function(e){de(d,"keydown",ke(this,this.handlekeypress))},e}(je);je.registercomponent("clickablecomponent",pn);var fn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update(),e.on("posterchange",ke(m(m(i)),i.update)),i}f(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())},e}(pn);je.registercomponent("posterimage",fn);var mn="#222",gn={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 yn(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 vn(e,t,i){try{e.style[t]=i}catch(e){return}}var _n=function(a){function e(i,e,t){var n;n=a.call(this,i,e,t)||this;var r=ke(m(m(n)),n.updatedisplay);return i.on("loadstart",ke(m(m(n)),n.toggledisplay)),i.on("texttrackchange",r),i.on("loadedmetadata",ke(m(m(n)),n.preselecttrack)),i.ready(ke(m(m(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=b({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 g.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){32!==e.which&&13!==e.which&&t.prototype.handlekeypress.call(this,e)},e}(pn);je.registercomponent("button",tn);var sn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).mouseused_=!1,i.on("mousedown",i.handlemousedown),i}f(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)wt(t);else{var i=this.player_.getchild("controlbar"),n=i&&i.getchild("playtoggle");if(n){var r=function(){return n.focus()};kt(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}(tn);sn.prototype.controltext_="play video",je.registercomponent("bigplaybutton",sn);var kn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).controltext(t&&t.controltext||i.localize("close")),i}f(e,n);var t=e.prototype;return t.buildcssclass=function(){return"vjs-close-button "+n.prototype.buildcssclass.call(this)},t.handleclick=function(e){this.trigger({type:"close",bubbles:!1})},e}(tn);je.registercomponent("closebutton",kn);var wn=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}f(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}(tn);wn.prototype.controltext_="play",je.registercomponent("playtoggle",wn);var cn=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:t+"-display"},{"aria-live":"off",role:"presentation"}),this.updatetextnode_(),i.appendchild(this.contentel_),i},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_=d.createtextnode(this.formattedtime_||this.formattime_(0)),this.contentel_.appendchild(this.textnode_)}},t.formattime_=function(e){return an(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);ln.prototype.labeltext_="time",ln.prototype.controltext_="time",je.registercomponent("timedisplay",ln);var on=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).on(e,"ended",i.handleended),i}f(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}(ln);on.prototype.labeltext_="current time",on.prototype.controltext_="current time",je.registercomponent("currenttimedisplay",on);var pn=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}f(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}(ln);pn.prototype.labeltext_="duration",pn.prototype.controltext_="duration",je.registercomponent("durationdisplay",pn);var un=function(e){function t(){return e.apply(this,arguments)||this}return f(t,e),t.prototype.createel=function(){return e.prototype.createel.call(this,"div",{classname:"vjs-time-control vjs-time-divider",innerhtml:"/
"},{"aria-hidden":!0})},t}(je);je.registercomponent("timedivider",un);var in=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}f(e,n);var t=e.prototype;return t.buildcssclass=function(){return"vjs-remaining-time"},t.formattime_=function(e){return"-"+n.prototype.formattime_.call(this,e)},t.updatecontent=function(e){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}(ln);in.prototype.labeltext_="remaining time",in.prototype.controltext_="remaining time",je.registercomponent("remainingtimedisplay",in);var xn=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}f(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",xn);var dn=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}f(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}(tn);dn.prototype.controltext_="seek to live, currently playing live",je.registercomponent("seektolive",dn);var rn=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}f(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=b({tabindex:0},t),i=b({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){37===e.which||40===e.which?(e.preventdefault(),this.stepback()):38!==e.which&&39!==e.which||(e.preventdefault(),this.stepforward())},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",rn);var mn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).partels_=[],i.on(e,"progress",i.update),i}f(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",mn);var bn=function(e){function t(){return e.apply(this,arguments)||this}f(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?"":"-")+an(n,i)}else e=an(s,t);u.update(r,a,e),o&&o()})},t}(je);je.registercomponent("timetooltip",bn);var nn=function(e){function t(){return e.apply(this,arguments)||this}f(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);nn.prototype.options_={children:[]},ke||je||nn.prototype.options_.children.push("timetooltip"),je.registercomponent("playprogressbar",nn);var jn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).update=we(ke(m(m(i)),i.update),25),i}f(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);jn.prototype.options_={children:["timetooltip"]},je.registercomponent("mousetimedisplay",jn);var fn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).seteventhandlers_(),i}f(e,n);var t=e.prototype;return t.seteventhandlers_=function(){var t=this;this.update=we(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"],function(){t.clearinterval(t.updateinterval),t.updateinterval=t.setinterval(function(){t.requestanimationframe(function(){t.update()})},30)}),this.on(this.player_,["ended","pause","waiting"],function(e){t.player_.livetracker&&t.player_.livetracker.islive()&&"ended"!==e.type||t.clearinterval(t.updateinterval)}),this.on(this.player_,["timeupdate","ended"],this.update)},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()),i&&i.seekableend()===1/0?this.disable():this.enable(),this.el_.setattribute("aria-valuenow",(100*t).tofixed(2)),this.el_.setattribute("aria-valuetext",this.localize("progress bar timing: currenttime={1} duration={2}",[an(e,n),an(n,n)],"{1} of {2}")),this.bar.update(v(this.el_),t)},t.update=function(e){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){$(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($(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){32===e.which||13===e.which?(e.preventdefault(),this.handleaction(e)):n.prototype.handlekeypress&&n.prototype.handlekeypress.call(this,e)},e}(rn);fn.prototype.options_={children:["loadprogressbar","playprogressbar"],barname:"playprogressbar"},ke||je||fn.prototype.options_.children.splice(1,0,"mousetimedisplay"),fn.prototype.playerevent="timeupdate",je.registercomponent("seekbar",fn);var vn=function(n){function e(e,t){var i;return(i=n.call(this,e,t)||this).handlemousemove=we(ke(m(m(i)),i.handlemousemove),25),i.throttledhandlemouseseek=we(ke(m(m(i)),i.handlemouseseek),25),i.enable(),i}f(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",qn);var zn=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}f(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){$(e)&&n.prototype.handlemousedown.call(this,e)},t.handlemousemove=function(e){$(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}(rn);zn.prototype.options_={children:["volumelevel"],barname:"volumelevel"},zn.prototype.playerevent="volumechange",je.registercomponent("volumebar",zn);var wn=function(a){function e(e,t){var i,n,r;return void 0===t&&(t={}),t.vertical=t.vertical||!1,("undefined"==typeof t.volumebar||c(t.volumebar))&&(t.volumebar=t.volumebar||{},t.volumebar.vertical=t.vertical),i=a.call(this,e,t)||this,n=m(m(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=we(ke(m(m(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}f(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);wn.prototype.options_={children:["volumebar"]},je.registercomponent("volumecontrol",wn);var gn=function(a){function e(e,t){var i,n,r;return i=a.call(this,e,t)||this,n=m(m(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}f(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;ke&&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++)i(this.el_,"vjs-vol-"+i);u(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}(tn);gn.prototype.controltext_="mute",je.registercomponent("mutetoggle",gn);var xn=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||c(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}f(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);xn.prototype.options_={children:["mutetoggle","volumecontrol"]},je.registercomponent("volumepanel",xn);var yn=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}f(e,n);var t=e.prototype;return t.additem=function(t){this.addchild(t),t.on("blur",ke(this,this.handleblur)),t.on(["tap","click"],ke(this,function(e){this.menubutton_&&(this.menubutton_.unpressbutton(),"captionsettingsmenuitem"!==t.name()&&this.menubutton_.focus())}))},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,n.prototype.dispose.call(this)},t.handleblur=function(e){var t=e.relatedtarget||d.activeelement;if(!this.children().some(function(e){return e.el()===t})){var i=this.menubutton_;i&&i.buttonpressed_&&t!==i.el().firstchild&&i.unpressbutton()}},t.handlekeypress=function(e){37===e.which||40===e.which?(e.preventdefault(),this.stepforward()):38!==e.which&&39!==e.which||(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",yn);var $n=function(r){function e(e,t){var i;void 0===t&&(t={}),(i=r.call(this,e,t)||this).menubutton_=new tn(e,t),i.menubutton_.controltext(i.controltext_),i.menubutton_.el_.setattribute("aria-haspopup","true");var n=tn.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}f(e,r);var t=e.prototype;return t.update=function(){var e=this.createmenu();this.menu&&(this.menu.dispose(),this.removechild(this.menu)),this.menu=e,this.addchild(e),this.buttonpressed_=!1,this.menubutton_.el_.setattribute("aria-expanded","false"),this.items&&this.items.length<=this.hidethreshold_?this.hide():this.show()},t.createmenu=function(){var e=new yn(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,e.children_.unshift(t),o(t,e.contentel())}if(this.items=this.createitems(),this.items)for(var i=0;i