/** * @license * Video.js 7.5.5 * Copyright Brightcove, Inc. * Available under Apache License Version 2.0 * * * Includes vtt.js * Available under Apache License Version 2.0 * */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,function(h,d){h=h&&h.hasOwnProperty("default")?h.default:h,d=d&&d.hasOwnProperty("default")?d.default:d;var p="7.5.5";function f(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t,n){return(o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&s(r,n.prototype),r}).apply(null,arguments)}function v(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,t){return t||(t=e.slice(0)),e.raw=t,e}var l=[],e=function(o,a){return function(e,t,n){var i=a.levels[t],r=new RegExp("^("+i+")$");if("log"!==e&&n.unshift(e.toUpperCase()+":"),n.unshift(o+":"),l&&l.push([].concat(n)),h.console){var s=h.console[e];s||"debug"!==e||(s=h.console.info||h.console.log),s&&i&&r.test(e)&&s[Array.isArray(n)?"apply":"call"](h.console,n)}}};var g=function t(n){var i,r="info",s=function(){for(var e=arguments.length,t=new Array(e),n=0;n',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),d.body.appendChild(i));for(var s={},o=0;ox',e=t.firstChild.href}return e},Yt=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""},Gt=function(e){var t=h.location,n=Xt(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Qt=Object.freeze({parseUrl:Xt,getAbsoluteURL:$t,getFileExtension:Yt,isCrossOrigin:Gt}),Jt=function(e){var t=Zt.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Zt=Object.prototype.toString;var en=At(function(e,t){(t=e.exports=function(e){return e.replace(/^\s*|\s*$/g,"")}).left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}}),tn=(en.left,en.right,Function.prototype.toString),nn=/^\s*class\b/,rn=function(e){try{var t=tn.call(e);return nn.test(t)}catch(e){return!1}},sn=Object.prototype.toString,on="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,an=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(on)return function(e){try{return!rn(e)&&(tn.call(e),!0)}catch(e){return!1}}(e);if(rn(e))return!1;var t=sn.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},ln=Object.prototype.toString,cn=Object.prototype.hasOwnProperty,un=function(e,t,n){if(!an(t))throw new TypeError("iterator must be a function");var i;3<=arguments.length&&(i=n),"[object Array]"===ln.call(e)?function(e,t,n){for(var i=0,r=e.length;i=e?t.push(r):r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e&&t.push(r)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(var s=0;s","‎":"‎","‏":"‏"," ":" "},Nn={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Dn={v:"title",lang:"lang"},On={rt:"ruby"};function In(s,n){function e(){if(!n)return null;var e,t=n.match(/^([^<]*)(<[^>]*>?)?/);return e=t[1]?t[1]:t[2],n=n.substr(e.length),e}function t(e){return Ln[e]}function i(e){for(;f=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(f[0],t);return e}function r(e,t){var n=Nn[e];if(!n)return null;var i=s.document.createElement(n);i.localName=n;var r=Dn[e];return r&&t&&(i[r]=t.trim()),i}for(var o,a,l,c=s.document.createElement("div"),u=c,h=[];null!==(o=e());)if("<"!==o[0])u.appendChild(s.document.createTextNode(i(o)));else{if("/"===o[1]){h.length&&h[h.length-1]===o.substr(2).replace(">","")&&(h.pop(),u=u.parentNode);continue}var d,p=jn(o.substr(1,o.length-2));if(p){d=s.document.createProcessingInstruction("timestamp",p),u.appendChild(d);continue}var f=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=r(f[1],f[3])))continue;if(a=u,On[(l=d).localName]&&On[l.localName]!==a.localName)continue;f[2]&&(d.className=f[2].substr(1).replace("."," ")),h.push(f[1]),u.appendChild(d),u=d}return c}var Rn=[[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 Bn(e){for(var t=0;t=n[0]&&e<=n[1])return!0}return!1}function Fn(){}function Hn(e,t,n){Fn.call(this),this.cue=t,this.cueDiv=In(e,t.text);var i={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(i,this.cueDiv),this.div=e.document.createElement("div"),i={direction:function(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;0<=n;n--)e.push(t.childNodes[n])}function s(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var i=n.match(/^.*(\n|\r)/);return i?i[e.length=0]:n}return"ruby"===t.tagName?s(e):t.childNodes?(r(e,t),s(e)):void 0}for(r(t,e);n=s(t);)for(var i=0;ih&&(u=u<0?-1:1,u*=Math.ceil(h/c)*c),r<0&&(u+=""===i.vertical?a.height:a.width,s=s.reverse()),n.move(d,u)}else{var p=n.lineHeight/a.height*100;switch(i.lineAlign){case"middle":r-=p/2;break;case"end":r-=p}switch(i.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,"%")})}s=["+y","-x","+x","-y"],n=new Vn(t)}var f=function(e,t){for(var n,i=new Vn(e),r=1,s=0;se.left&&this.tope.top},Vn.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Vn.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},Vn.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)},Vn.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}},Vn.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,i=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||i,height:e.height||t,bottom:e.bottom||i+(e.height||t),width:e.width||n}},Wn.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Wn.convertCueToDOMTree=function(e,t){return e&&t?In(e,t):null};Wn.processCues=function(i,r,e){if(!i||!r||!e)return null;for(;e.firstChild;)e.removeChild(e.firstChild);var s=i.document.createElement("div");if(s.style.position="absolute",s.style.left="0",s.style.right="0",s.style.top="0",s.style.bottom="0",s.style.margin="1.5%",e.appendChild(s),function(e){for(var t=0;t