!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.videojs=e()}(this,function(){var p="6.2.7",t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n,d="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},r={},i=(Object.freeze||Object)({default:r}),o=i&&r||i,s=void 0!==t?t:"undefined"!=typeof window?window:{};"undefined"!=typeof document?n=document:(n=s["__GLOBAL_DOCUMENT_CACHE@4"])||(n=s["__GLOBAL_DOCUMENT_CACHE@4"]=o);var a,l,c,u,f=n,h=d.navigator&&d.navigator.userAgent||"",v=/AppleWebKit\/([\d.]+)/i.exec(h),y=v?parseFloat(v.pop()):null,g=/iPad/i.test(h),m=/iPhone/i.test(h)&&!g,_=/iPod/i.test(h),b=m||g||_,T=(a=h.match(/OS (\d+)_/i))&&a[1]?a[1]:null,C=/Android/i.test(h),k=function(){var t=h.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),w=C&&/webkit/i.test(h)&&k<2.3,E=C&&k<5&&y<537,S=/Firefox/i.test(h),x=/Edge/i.test(h),j=!x&&/Chrome/i.test(h),A=(l=h.match(/Chrome\/(\d+)/))&&l[1]?parseFloat(l[1]):null,P=/MSIE\s8\.0/.test(h),N=(c=/MSIE\s(\d+)\.\d/.exec(h),!(u=c&&parseFloat(c[1]))&&/Trident\/7.0/i.test(h)&&/rv:11.0/.test(h)&&(u=11),u),O=/Safari/i.test(h)&&!j&&!C&&!x,M=O||b,I=it()&&("ontouchstart"in d||d.DocumentTouch&&d.document instanceof d.DocumentTouch),D=it()&&"backgroundSize"in d.document.createElement("video").style,L=(Object.freeze||Object)({IS_IPAD:g,IS_IPHONE:m,IS_IPOD:_,IS_IOS:b,IOS_VERSION:T,IS_ANDROID:C,ANDROID_VERSION:k,IS_OLD_ANDROID:w,IS_NATIVE_ANDROID:E,IS_FIREFOX:S,IS_EDGE:x,IS_CHROME:j,CHROME_VERSION:A,IS_IE8:P,IE_VERSION:N,IS_SAFARI:O,IS_ANY_SAFARI:M,TOUCH_ENABLED:I,BACKGROUND_SIZE_SUPPORTED:D}),R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},F=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},V=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},H=function(t,e){return t.raw=e,t},W=Object.prototype.toString,U=function(t){return q(t)?Object.keys(t):[]};function z(e,n){U(e).forEach(function(t){return n(e[t],t)})}function X(n){for(var t=arguments.length,e=Array(1',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),f.body.appendChild(i));for(var o={},s=0;sx',t=e.firstChild.href}return t},getFileExtension:Je,isCrossOrigin:Qe}),tn=function(t){var e=en.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)},en=Object.prototype.toString;var nn=e(function(t,e){(e=t.exports=function(t){return t.replace(/^\s*|\s*$/g,"")}).left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}}),rn=function(t,e,n){if(!tn(e))throw new TypeError("iterator must be a function");arguments.length<3&&(n=this);"[object Array]"===on.call(t)?function(t,e,n){for(var r=0,i=t.length;r=t?e.push(i):i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t&&e.push(i)}if(c=!1,e.length!==this.activeCues_.length)c=!0;else for(var o=0;o","‎":"‎","‏":"‏"," ":" "},An={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Pn={v:"title",lang:"lang"},Nn={rt:"ruby"};function On(o,n){function t(){if(!n)return null;var t,e=n.match(/^([^<]*)(<[^>]+>?)?/);return t=e[1]?e[1]:e[2],n=n.substr(t.length),t}function e(t){return jn[t]}function r(t){for(;f=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(f[0],e);return t}function i(t,e){var n=An[t];if(!n)return null;var r=o.document.createElement(n);r.localName=n;var i=Pn[t];return i&&e&&(r[i]=e.trim()),r}for(var s,a,l,c=o.document.createElement("div"),u=c,h=[];null!==(s=t());)if("<"!==s[0])u.appendChild(o.document.createTextNode(r(s)));else{if("/"===s[1]){h.length&&h[h.length-1]===s.substr(2).replace(">","")&&(h.pop(),u=u.parentNode);continue}var p,d=wn(s.substr(1,s.length-2));if(d){p=o.document.createProcessingInstruction("timestamp",d),u.appendChild(p);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(p=i(f[1],f[3])))continue;if(a=u,Nn[(l=p).localName]&&Nn[l.localName]!==a.localName)continue;f[2]&&(p.className=f[2].substr(1).replace("."," ")),h.push(f[1]),u.appendChild(p),u=p}return c}var Mn=[[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 In(t){for(var e=0;e=n[0]&&t<=n[1])return!0}return!1}function Dn(){}function Ln(t,e,n){var r=/MSIE\s8\.0/.test(navigator.userAgent),i="rgba(255, 255, 255, 1)",o="rgba(0, 0, 0, 0.8)";r&&(i="rgb(255, 255, 255)",o="rgb(0, 0, 0)"),Dn.call(this),this.cue=e,this.cueDiv=On(t,e.text);var s={color:i,backgroundColor:o,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};r||(s.writingMode=""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",s.unicodeBidi="plaintext"),this.applyStyles(s,this.cueDiv),this.div=t.document.createElement("div"),s={textAlign:"middle"===e.align?"center":e.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},r||(s.direction=function(t){var e=[],n="";if(!t||!t.childNodes)return"ltr";function i(t,e){for(var n=e.childNodes.length-1;0<=n;n--)t.push(e.childNodes[n])}function o(t){if(!t||!t.length)return null;var e=t.pop(),n=e.textContent||e.innerText;if(n){var r=n.match(/^.*(\n|\r)/);return r?r[t.length=0]:n}return"ruby"===e.tagName?o(t):e.childNodes?(i(t,e),o(t)):void 0}for(i(e,t);n=o(e);)for(var r=0;rh&&(u=u<0?-1:1,u*=Math.ceil(h/c)*c),i<0&&(u+=""===r.vertical?a.height:a.width,o=o.reverse()),n.move(p,u)}else{var d=n.lineHeight/a.height*100;switch(r.lineAlign){case"middle":i-=d/2;break;case"end":i-=d}switch(r.vertical){case"":e.applyStyles({top:e.formatStyle(i,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(i,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(i,"%")})}o=["+y","-x","+x","-y"],n=new Rn(e)}var f=function(t,e){for(var n,r=new Rn(t),i=1,o=0;ot.left&&this.topt.top},Rn.prototype.overlapsAny=function(t){for(var e=0;e=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},Rn.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.leftt.right;case"+y":return this.topt.bottom}},Rn.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},Rn.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},Rn.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,n=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,r=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return{left:(t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t).left,right:t.right,top:t.top||r,height:t.height||e,bottom:t.bottom||r+(t.height||e),width:t.width||n}},Fn.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},Fn.convertCueToDOMTree=function(t,e){return t&&e?On(t,e):null};Fn.processCues=function(r,i,t){if(!r||!i||!t)return null;for(;t.firstChild;)t.removeChild(t.firstChild);var o=r.document.createElement("div");if(o.style.position="absolute",o.style.left="0",o.style.right="0",o.style.top="0",o.style.bottom="0",o.style.margin="1.5%",t.appendChild(o),function(t){for(var e=0;e