@theoplayer/theoads 8.13.2 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/THEOplayer.chromeless.d.ts +2 -2
- package/THEOplayer.chromeless.esm.js +3 -3
- package/THEOplayer.chromeless.js +3 -3
- package/THEOplayer.common.d.ts +22 -730
- package/THEOplayer.common.esm.js +3 -3
- package/THEOplayer.d.ts +2 -2
- package/THEOplayer.esm.js +3 -3
- package/THEOplayer.js +3 -3
- package/THEOplayer.transmux.asmjs.js +3 -3
- package/THEOplayer.transmux.js +3 -3
- package/package.json +1 -1
- package/theoplayer.d.js +3 -3
- package/theoplayer.sw.js +3 -3
package/THEOplayer.esm.js
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
THEOplayer is based on patented technology developed by
|
|
35
35
|
THEO Technologies (https://www.theoplayer.com).
|
|
36
36
|
|
|
37
|
-
Version:
|
|
38
|
-
Created: 2025-
|
|
37
|
+
Version: 9.0.0
|
|
38
|
+
Created: 2025-04-03T12:51:26.614Z
|
|
39
39
|
*/
|
|
40
|
-
var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,u=(a.location,a.navigator,a.setTimeout),c=a.clearTimeout,v=a.setInterval,m=a.clearInterval,b=a.Error,k=a.TypeError,w=a.SyntaxError,_=a.Object,x=a.Math,C=a.parseInt,S=a.parseFloat,j=a.isNaN,T=a.Uint8Array;a.Worker,a.WorkerGlobalScope,a.XMLHttpRequest;import{$ as M,$a as A,A as P,Aa as E,B as N,Ba as I,C as B,Ca as F,D,Da as $,E as R,Ea as U,F as O,Fa as V,G as L,Ga as H,H as z,Ha as q,I as W,Ia as G,J as X,Ja as J,K as Q,Ka as Y,L as K,La as Z,M as tt,Ma as it,N as st,Na as et,O as nt,Oa as rt,P as ht,Pa as ot,Q as at,Qa as ut,R as ct,Ra as lt,S as dt,Sa as ft,T as vt,Ta as pt,U as mt,Ua as gt,V as yt,Va as bt,W as kt,Wa as wt,X as _t,Xa as xt,Y as Ct,Ya as St,Z as jt,Za as Tt,_ as Mt,_a as At,a as Pt,aa as Et,ab as Nt,b as It,ba as Bt,bb as Ft,c as f,ca as Dt,cb as $t,d as Rt,da as Ut,db as Ot,e as Vt,ea as Lt,eb as Ht,f as zt,fa as qt,fb as Wt,g as Gt,ga as Xt,gb as Jt,h as Qt,ha as Yt,hb as Kt,i as Zt,ia as ti,ib as ii,j as si,ja as ei,jb as ni,k as ri,ka as hi,l as oi,la as ai,m as ui,ma as ci,n as li,na as di,o as fi,oa as vi,p as pi,pa as mi,q as gi,qa as yi,r as bi,ra as ki,s as wi,sa as _i,t as xi,ta as Ci,u as Si,ua as ji,v as Ti,va as Mi,w as Ai,wa as Pi,x as Ei,xa as Ni,y as Ii,ya as Bi,z as Fi,za as Di}from"./THEOplayer.common.esm.js";f(),f(),f(),f();var $i=[];function Ri(t){$i.push(t)}var Ui=[];function Oi(t){Ui.push(t)}f(),f(),f(),f();var g=void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Vi=void 0!==h?h:{createElement:function(){}};function Li(t,i){return i||(i=t.slice(0)),t.raw=i,t}var Hi=1;function zi(){return Hi++}var qi,Wi=_.prototype.toString,Gi=function(t){return Qi(t)?_.keys(t):[]};function Xi(t,i){Gi(t).forEach((function(s){return i(t[s],s)}))}function Ji(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),e=1;e<i;e++)s[e-1]=arguments[e];return _.assign?_.assign.apply(_,[t].concat(s)):(s.forEach((function(i){i&&Xi(i,(function(i,s){t[s]=i}))})),t)}function Qi(t){return!!t&&"object"==typeof t}function Yi(t){return Qi(t)&&"[object Object]"===Wi.call(t)&&t.constructor===_}var Ki=function(t,i,s){void 0===s&&(s=!!Ys&&Ys<11),"log"!==t&&i.unshift(t.toUpperCase()+":"),qi.history.push(i),i.unshift("VIDEOJS:");var e=g.console&&g.console[t];e&&(s&&(i=i.map((function(t){if(Qi(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(i){return String(t)}return String(t)})).join(" ")),e.apply?e[Array.isArray(i)?"apply":"call"](g.console,i):e(i))};(qi=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];Ki("log",i)}).history=[],qi.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ki("error",i)},qi.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Ki("warn",i)};var Zi=qi,ts="undefined"!=typeof globalThis?globalThis:void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function is(t){return t.replace(/\n\r?\s*/g,"")}var ss,es=function(t){for(var i="",s=0;s<arguments.length;s++)i+=is(t[s])+(arguments[s+1]||"");return i};function ns(t){return"string"==typeof t&&/\S/.test(t)}function rs(t){if(/\s/.test(t))throw new b("class has illegal whitespace characters")}function hs(){return Vi===g.document&&void 0!==Vi.createElement}function os(t){return Qi(t)&&1===t.nodeType}function as(t){return function(i,s){if(!ns(i))return Vi[t](null);ns(s)&&(s=Vi.querySelector(s));var e=os(s)?s:Vi;return e[t]&&e[t](i)}}function us(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=Vi.createElement(t);return _.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Zi.warn(es(ss||(ss=Li(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."])),t,s)),n.setAttribute(t,s)):"textContent"===t?cs(n,s):n[t]=s})),_.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&As(n,e),n}function cs(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function ls(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var ds={},fs="vdata"+(new Date).getTime();function vs(t){var i=t[fs];return i||(i=t[fs]=zi()),ds[i]||(ds[i]={}),ds[i]}function ps(t){var i=t[fs];return!!i&&!!_.getOwnPropertyNames(ds[i]).length}function ms(t){var i=t[fs];if(i){delete ds[i];try{delete t[fs]}catch(i){t.removeAttribute?t.removeAttribute(fs):t[fs]=null}}}function gs(t,i){return rs(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function ys(t,i){return t.classList?t.classList.add(i):gs(t,i)||(t.className=(t.className+" "+i).trim()),t}function bs(t,i){return t.classList?t.classList.remove(i):(rs(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function ks(t,i,s){var e=gs(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?ys(t,i):bs(t,i),t}function ws(t,i){_.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function _s(t){var i={};if(t&&t.attributes&&t.attributes.length>0)for(var s=t.attributes,e=s.length-1;e>=0;e--){var n=s[e].name,r=s[e].value;"boolean"!=typeof t[n]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+",")||(r=null!==r),i[n]=r}return i}function xs(t,i,s){t.setAttribute(i,s)}function Cs(t,i){t.removeAttribute(i)}function Ss(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=Vi.documentElement,e=Vi.body,n=s.clientLeft||e.clientLeft||0,r=g.pageXOffset||e.scrollLeft,h=i.left+r-n,o=s.clientTop||e.clientTop||0,a=g.pageYOffset||e.scrollTop,u=i.top+a-o;return{left:x.round(h),top:x.round(u)}}function js(t,i){var s={},e=Ss(t),n=t.offsetWidth,r=t.offsetHeight,h=e.top,o=e.left,a=i.pageY,u=i.pageX;return i.changedTouches&&(u=i.changedTouches[0].pageX,a=i.changedTouches[0].pageY),s.y=x.max(0,x.min(1,(h-a+r)/r)),s.x=x.max(0,x.min(1,(u-o)/n)),s}function Ts(t){return Qi(t)&&3===t.nodeType}function Ms(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function As(t,i){return function(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),os(t)||Ts(t)?t:"string"==typeof t&&/\S/.test(t)?Vi.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function Ps(t,i){return As(Ms(t),i)}var Es,Ns=as("querySelector"),Is=as("querySelectorAll"),Bs=g.navigator&&g.navigator.userAgent||"",Fs=/AppleWebKit\/([\d.]+)/i.exec(Bs),Ds=Fs?S(Fs.pop()):null,$s=/iPad/i.test(Bs),Rs=/iPhone/i.test(Bs)&&!$s,Us=/iPod/i.test(Bs),Os=Rs||$s||Us,Vs=(Es=Bs.match(/OS (\d+)_/i))&&Es[1]?Es[1]:null,Ls=/Android/i.test(Bs),Hs=function(){var t=Bs.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&S(t[1]),s=t[2]&&S(t[2]);return i&&s?S(t[1]+"."+t[2]):i||null}(),zs=Ls&&/webkit/i.test(Bs)&&Hs<2.3,qs=Ls&&Hs<5&&Ds<537,Ws=/Firefox/i.test(Bs),Gs=/Edge/i.test(Bs),Xs=!Gs&&/Chrome/i.test(Bs),Js=function(){var t=Bs.match(/Chrome\/(\d+)/);return t&&t[1]?S(t[1]):null}(),Qs=/MSIE\s8\.0/.test(Bs),Ys=function(){var t=/MSIE\s(\d+)\.\d/.exec(Bs),i=t&&S(t[1]);return!i&&/Trident\/7.0/i.test(Bs)&&/rv:11.0/.test(Bs)&&(i=11),i}(),Ks=/Safari/i.test(Bs)&&!Xs&&!Ls&&!Gs,Zs=Ks||Os,te=hs()&&("ontouchstart"in g||g.DocumentTouch&&g.document instanceof g.DocumentTouch),ie=hs()&&"backgroundSize"in g.document.createElement("video").style,se=_.freeze({__proto__:null,IS_IPAD:$s,IS_IPHONE:Rs,IS_IPOD:Us,IS_IOS:Os,IOS_VERSION:Vs,IS_ANDROID:Ls,ANDROID_VERSION:Hs,IS_OLD_ANDROID:zs,IS_NATIVE_ANDROID:qs,IS_FIREFOX:Ws,IS_EDGE:Gs,IS_CHROME:Xs,CHROME_VERSION:Js,IS_IE8:Qs,IE_VERSION:Ys,IS_SAFARI:Ks,IS_ANY_SAFARI:Zs,TOUCH_ENABLED:te,BACKGROUND_SIZE_SUPPORTED:ie});function ee(t,i){var s=vs(t);0===s.handlers[i].length&&(delete s.handlers[i],t.removeEventListener?t.removeEventListener(i,s.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+i,s.dispatcher)),_.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===_.getOwnPropertyNames(s).length&&ms(t)}function ne(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function re(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||g.event;for(var n in t={},e)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&"path"!==n&&("returnValue"===n&&e.preventDefault||(t[n]=e[n]));if(t.target||(t.target=t.srcElement||Vi),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){e.preventDefault&&e.preventDefault(),t.returnValue=!1,e.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){e.stopPropagation&&e.stopPropagation(),t.cancelBubble=!0,e.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=s,t.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=s,null!==t.clientX&&void 0!==t.clientX){var r=Vi.documentElement,h=Vi.body;t.pageX=t.clientX+(r&&r.scrollLeft||h&&h.scrollLeft||0)-(r&&r.clientLeft||h&&h.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||h&&h.scrollTop||0)-(r&&r.clientTop||h&&h.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var he=!1;!function(){try{var t=_.defineProperty({},"passive",{get:function(){he=!0}});g.addEventListener("test",null,t)}catch(t){}}();var oe=["touchstart","touchmove"];function ae(t,i,s){if(Array.isArray(i))return ne(ae,t,i,s);var e=vs(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=zi()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=re(i);var n=e.handlers[i.type];if(n)for(var r=n.slice(0),h=0,o=r.length;h<o&&!i.isImmediatePropagationStopped();h++)try{r[h].call(t,i,s)}catch(t){Zi.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;he&&oe.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function ue(t,i,s){if(ps(t)){var e=vs(t);if(e.handlers){if(Array.isArray(i))return ne(ue,t,i,s);var n=function(i){e.handlers[i]=[],ee(t,i)};if(i){var r=e.handlers[i];if(r)if(s){if(s.guid)for(var h=0;h<r.length;h++)r[h].guid===s.guid&&r.splice(h--,1);ee(t,i)}else n(i)}else for(var o in e.handlers)n(o)}}}function ce(t,i,s){var e=ps(t)?vs(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=re(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)ce.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=vs(i.target);i.target[i.type]&&(r.disabled=!0,"function"==typeof i.target[i.type]&&i.target[i.type](),r.disabled=!1)}return!i.defaultPrevented}function le(t,i,s){if(Array.isArray(i))return ne(le,t,i,s);var e=function e(){ue(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||zi(),ae(t,i,e)}var de,fe=!1,ve=function(){if(hs()){var t=Vi.getElementsByTagName("video"),i=Vi.getElementsByTagName("audio"),s=[];if(t&&t.length>0)for(var e=0,n=t.length;e<n;e++)s.push(t[e]);if(i&&i.length>0)for(var r=0,h=i.length;r<h;r++)s.push(i[r]);if(s&&s.length>0)for(var o=0,a=s.length;o<a;o++){var u=s[o];if(!u||!u.getAttribute){pe(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&de(u)}else fe||pe(1)}};function pe(t,i){i&&(de=i),g.setTimeout(ve,t)}hs()&&"complete"===Vi.readyState?fe=!0:le(g,"load",(function(){fe=!0}));var me=function(t){var i=Vi.createElement("style");return i.className=t,i},ge=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},n=function(t,i,s){i.guid||(i.guid=zi());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function ye(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function be(){for(var t={},i=arguments.length,s=new Array(i),e=0;e<i;e++)s[e]=arguments[e];return s.forEach((function(i){i&&Xi(i,(function(i,s){Yi(i)?(Yi(t[s])||(t[s]={}),t[s]=be(t[s],i)):t[s]=i}))})),t}var i=function(){function t(t,i,s){if(!t&&this.play?this.t=t=this:this.t=t,this.h=be({},this.h),i=this.h=be(this.h,i),this.o=i.id||i.el&&i.el.id,!this.o){var e=t&&t.id&&t.id()||"no_player";this.o=e+"u"+zi()}this.l=i.name||null,i.el?this.v=i.el:!1!==i.createEl&&(this.v=this.createEl()),this.m=[],this.k={},this.C={},!1!==i.initChildren&&this.initChildren(),this.ready(s),!1!==i.reportTouchActivity&&this.enableTouchActivity()}var i=t.prototype;return i.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.m)for(var t=this.m.length-1;t>=0;t--)this.m[t].dispose&&this.m[t].dispose();this.m=null,this.k=null,this.C=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),ms(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return Zi.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=be(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,s){return us(t,i,s)},i.localize=function(t){var i=this.t.language&&this.t.language(),s=this.t.languages&&this.t.languages();if(!i||!s)return t;var e=s[i];if(e&&e[t])return e[t];var n=s[i.split("-")[0]];return n&&n[t]?n[t]:t},i.contentEl=function(){return this.S||this.v},i.id=function(){return this.o},i.name=function(){return this.l},i.children=function(){return this.m},i.getChildById=function(t){return this.k[t]},i.getChild=function(t){if(t)return t=ye(t),this.C[t]},i.addChild=function(i,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.m.length),"string"==typeof i){r=ye(i),s||(s={}),!0===s&&(Zi.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),s={});var h=s.componentClass||r;s.name=r;var o=t.getComponent(h);if(!o)throw new b("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.t||this,s)}else n=i;if(this.m.splice(e,0,n),"function"==typeof n.id&&(this.k[n.id()]=n),(r=r||n.name&&ye(n.name()))&&(this.C[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.m){for(var i=!1,s=this.m.length-1;s>=0;s--)if(this.m[s]===t){i=!0,this.m.splice(s,1);break}if(i){this.k[t.id()]=null,this.C[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,s=this.h.children;if(s){var e,n=this.h,r=t.getComponent("Tech");(e=Array.isArray(s)?s:_.keys(s)).concat(_.keys(this.h).filter((function(t){return!e.some((function(i){return"string"==typeof i?t===i:t===i.name}))}))).map((function(t){var e,n;return"string"==typeof t?n=s[e=t]||i.h[e]||{}:(e=t.name,n=t),{name:e,opts:n}})).filter((function(i){var s=t.getComponent(i.opts.componentClass||ye(i.name));return s&&!r.isTech(s)})).forEach((function(t){var s=t.name,e=t.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=i.h.playerOptions;var r=i.addChild(s,e);r&&(i[s]=r)}}))}},i.buildCSSClass=function(){return""},i.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))ae(this.v,t,n(this,i));else{var r=t,h=i,o=n(this,s),a=function(){return e.off(r,h,o)};a.guid=o.guid,this.on("dispose",a);var u=function(){return e.off("dispose",a)};u.guid=o.guid,t.nodeName?(ae(r,h,o),ae(r,"dispose",u)):"function"==typeof t.on&&(r.on(h,o),r.on("dispose",u))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))ue(this.v,t,i);else{var e=t,r=i,h=n(this,s);this.off("dispose",h),t.nodeName?(ue(e,r,h),ue(e,"dispose",h)):(e.off(r,h),e.off("dispose",h))}return this},i.one=function(t,i,s){var e=arguments,r=this;if("string"==typeof t||Array.isArray(t))le(this.v,t,n(this,i));else{var h=t,o=i,a=n(this,s),u=function t(){r.off(h,o,t),a.apply(null,e)};u.guid=a.guid,this.on(h,o,u)}return this},i.trigger=function(t,i){return ce(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.j?i?t.call(this):this.setTimeout(t,1):(this.T=this.T||[],this.T.push(t))),this},i.triggerReady=function(){this.j=!0,this.setTimeout((function(){var t=this.T;this.T=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},i.$=function(t,i){return Ns(t,i||this.contentEl())},i.$$=function(t,i){return Is(t,i||this.contentEl())},i.hasClass=function(t){return gs(this.v,t)},i.addClass=function(t){return ys(this.v,t),this},i.removeClass=function(t){return bs(this.v,t),this},i.toggleClass=function(t,i){return ks(this.v,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},i.setAttribute=function(t,i){return xs(this.v,t,i),this},i.removeAttribute=function(t){return Cs(this.v,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.v.style[t]=i:this.v.style[t]="auto"===i?"":i+"px",s||this.trigger("resize"),this;if(!this.v)return 0;var e=this.v.style[t],n=e.indexOf("px");return C(-1!==n?e.slice(0,n):this.v["offset"+ye(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new b("currentDimension only accepts width or height value");if("function"==typeof g.getComputedStyle){var s=g.getComputedStyle(this.v);i=s.getPropertyValue(t)||s[t]}if(0===(i=S(i))){var e="offset"+ye(t);i=this.v[e]}return i},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.v.focus()},i.blur=function(){this.v.blur()},i.emitTapEvents=function(){var t,i=0,s=null;this.on("touchstart",(function(e){1===e.touches.length&&(s={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},i=(new Date).getTime(),t=!0)})),this.on("touchmove",(function(i){if(i.touches.length>1)t=!1;else if(s){var e=i.touches[0].pageX-s.pageX,n=i.touches[0].pageY-s.pageY;x.sqrt(e*e+n*n)>10&&(t=!1)}}));var e=function(){t=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",(function(e){(s=null,!0===t)&&((new Date).getTime()-i<200&&(e.preventDefault(),this.trigger("tap")))}))},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=n(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){i(),this.clearInterval(t),t=this.setInterval(i,250)}));var s=function(s){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",s),this.on("touchcancel",s)}},i.setTimeout=function(t,i){t=n(this,t);var s=g.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){g.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=n(this,t);var s=g.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){g.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,s){if(i){if(i=ye(i),t.M||(t.M={}),"Player"===i&&t.M[i]){var e=t.M[i];if(e.players&&_.keys(e.players).length>0&&_.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new b("Can not register Player component after player has been created")}return t.M[i]=s,s}},t.getComponent=function(i){if(i)return i=ye(i),t.M&&t.M[i]?t.M[i]:g&&g.videojs&&g.videojs[i]?(Zi.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),g.videojs[i]):void 0},t.extend=function(i){i=i||{},Zi.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=i.init||i.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=_.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();i.registerComponent("Component",i);var ke=function(){};function we(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _e(t,i){return(_e=_.setPrototypeOf?_.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function xe(t,i){t.prototype=_.create(i.prototype),t.prototype.constructor=t,_e(t,i)}function Ce(t,i,s,e){return void 0===e&&(Zi.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new b("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+i+") is greater than or equal to the maximum bound ("+s+").")}(t,e,s.length-1),s[e][i]}function Se(t){return void 0===t||0===t.length?{length:0,start:function(){throw new b("This TimeRanges object is empty")},end:function(){throw new b("This TimeRanges object is empty")}}:{length:t.length,start:Ce.bind(null,"start",0,t),end:Ce.bind(null,"end",1,t)}}function je(t,i){return Array.isArray(t)?Se(t):void 0===t||void 0===i?Se():Se([[t,i]])}function Te(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=je(0,0));for(var r=0;r<t.length;r++)s=t.start(r),(e=t.end(r))>i&&(e=i),n+=e-s;return n/i}ke.prototype.A={},ke.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},ae(this,t,i),this.addEventListener=s},ke.prototype.addEventListener=ke.prototype.on,ke.prototype.off=function(t,i){ue(this,t,i)},ke.prototype.removeEventListener=ke.prototype.off,ke.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},le(this,t,i),this.addEventListener=s},ke.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=re(t),this.A[i]&&this["on"+i]&&this["on"+i](t),ce(this,t)},ke.prototype.dispatchEvent=ke.prototype.trigger;var Me,Ae,Pe,Ee,Ne={prefixed:!0},Ie=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Be=Ie[0];for(Ae=0;Ae<Ie.length;Ae++)if(Ie[Ae][1]in Vi){Me=Ie[Ae];break}if(Me){for(Pe=0;Pe<Me.length;Pe++)Ne[Be[Pe]]=Me[Pe];Ne.prefixed=Me[0]!==Be[0]}function Fe(t){if(t instanceof Fe)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:Qi(t)&&("number"==typeof t.code&&(this.code=t.code),Ji(this,t)),this.message||(this.message=Fe.defaultMessages[this.code]||"")}for(Fe.prototype.code=0,Fe.prototype.message="",Fe.prototype.status=null,Fe.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Fe.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},Ee=0;Ee<Fe.errorTypes.length;Ee++)Fe[Fe.errorTypes[Ee]]=Ee,Fe.prototype[Fe.errorTypes[Ee]]=Ee;var De=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var $e=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(i,s,e){return t[s]&&(i[s]=t[s]),i}),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},Re=function(t){var i=t.$$("track"),s=Array.prototype.map.call(i,(function(t){return t.track}));return Array.prototype.map.call(i,(function(t){var i=$e(t.track);return t.src&&(i.src=t.src),i})).concat(Array.prototype.filter.call(t.textTracks(),(function(t){return-1===s.indexOf(t)})).map($e))},Ue=function(t,i){return t.forEach((function(t){var s=i.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach((function(t){return s.addCue(t)}))})),i.textTracks()},Oe="vjs-modal-dialog",Ve=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).P=e.N=e.I=!1,e.closeable(!e.h.uncloseable),e.content(e.h.content),e.S=us("div",{className:Oe+"-content"},{role:"document"}),e.B=us("p",{className:Oe+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),cs(e.B,e.description()),e.v.appendChild(e.B),e.v.appendChild(e.S),e.on(i,"languagechange",e.handleLanguagechange),e}xe(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"F","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},s.buildCSSClass=function(){return Oe+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},s.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},s.label=function(){return this.h.label||this.localize("Modal Window")},s.description=function(){var t=this.h.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},s.open=function(){if(!this.P){var t=this.player();this.trigger("beforemodalopen"),this.P=!0,(this.h.fillAlways||!this.N&&!this.I)&&this.fill(),this.D=!t.paused(),this.h.pauseOnOpen&&this.D&&t.pause(),this.closeable()&&this.on(this.v.ownerDocument,"keydown",n(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.N=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.P},s.close=function(){if(this.P){var t=this.player();this.trigger("beforemodalclose"),this.P=!1,this.D&&this.h.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.v.ownerDocument,"keydown",n(this,this.handleKeyPress)),t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.h.temporary&&this.dispose()}return this},s.closeable=function(t){if("boolean"==typeof t){var i=this.R=!!t,s=this.getChild("closeButton");if(i&&!s){var e=this.S;this.S=this.v,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.S=e,this.on(s,"close",this.close)}!i&&s&&(this.off(s,"close",this.close),this.removeChild(s),s.dispose())}return this.R},s.fill=function(){return this.fillWith(this.content())},s.fillWith=function(t){var i=this.contentEl(),s=i.parentNode,e=i.nextSibling;return this.trigger("beforemodalfill"),this.I=!0,s.removeChild(i),this.empty(),Ps(i,t),this.trigger("modalfill"),e?s.insertBefore(i,e):s.appendChild(i),this},s.empty=function(){return this.trigger("beforemodalempty"),Ms(this.contentEl()),this.trigger("modalempty"),this},s.content=function(t){return void 0!==t&&(this.U=t),this.U},s.handleLanguagechange=function(){this.v.setAttribute("aria-label",this.label()),cs(this.B,this.description()),this.opened()?this.fill():(this.N||this.I)&&(this.N=!1,this.I=!1,this.empty())},i}(i);Ve.prototype.h={pauseOnOpen:!0,temporary:!0},i.registerComponent("ModalDialog",Ve);var Le=function(){function t(i){var s=this;if(Qs)for(var e in s=Vi.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.O.call(s,i),_.defineProperty(s,"length",{get:function(){return this.V}}),Qs)return s}var i=t.prototype;return i.O=function(t){var i=this.length||0,s=0,e=t.length;this.L=t,this.V=t.length;var n=function(t){""+t in this||_.defineProperty(this,""+t,{get:function(){return this.L[t]}})};if(i<e)for(s=i;s<e;s++)n.call(this,s)},i.getCueById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},t}(),He={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ze={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},qe={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},We={disabled:"disabled",hidden:"hidden",showing:"showing"},Ge=function(t){function i(s){var e;void 0===s&&(s={});var n=we(e=t.call(this)||this);if(Qs)for(var r in n=Vi.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",zi()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){_.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||we(e)}return xe(i,t),i}(ke),Xe=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=Vi.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=Vi.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),Vi.body.appendChild(e));for(var r={},h=0;h<i.length;h++)r[i[h]]=s[i[h]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),n&&Vi.body.removeChild(e),r},Je=function(t){var i=g.location,s=Xe(t);return(":"===s.protocol?i.protocol:s.protocol)+s.host!==i.protocol+i.host},Qe={exports:{}};void 0!==s?Qe.exports=s:void 0!==ts?Qe.exports=ts:"undefined"!=typeof self?Qe.exports=self:Qe.exports={};var Ye=function(t){var i=Ke.call(t);return"[object Function]"===i||"function"==typeof t&&"[object RegExp]"!==i||void 0!==s&&(t===s.setTimeout||t===s.alert||t===s.confirm||t===s.prompt)},Ke=_.prototype.toString;var Ze,tn,sn,en,nn,rn,hn,on,an,un,cn,ln,dn=Array.prototype.slice,fn=_.prototype.toString,vn=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==fn.call(i))throw new k("Function.prototype.bind called on incompatible "+i);for(var s,e=dn.call(arguments,1),n=x.max(0,i.length-e.length),r=[],h=0;h<n;h++)r.push("$"+h);if(s=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var n=i.apply(this,e.concat(dn.call(arguments)));return _(n)===n?n:this}return i.apply(t,e.concat(dn.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},pn=Function.prototype.bind||vn,mn=_.prototype.toString,gn=function(t){var i=mn.call(t),s="[object Arguments]"===i;return s||(s="[object Array]"!==i&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===mn.call(t.callee)),s};_.keys||(tn=_.prototype.hasOwnProperty,sn=_.prototype.toString,en=gn,nn=_.prototype.propertyIsEnumerable,rn=!nn.call({toString:null},"toString"),hn=nn.call((function(){}),"prototype"),on=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],an=function(t){var i=t.constructor;return i&&i.prototype===t},un={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},cn=function(){if(void 0===s)return!1;for(var t in s)try{if(!un["$"+t]&&tn.call(s,t)&&null!==s[t]&&"object"==typeof s[t])try{an(s[t])}catch(t){return!0}}catch(t){return!0}return!1}(),ln=function(t){if(void 0===s||!cn)return an(t);try{return an(t)}catch(t){return!1}},Ze=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===sn.call(t),e=en(t),n=i&&"[object String]"===sn.call(t),r=[];if(!i&&!s&&!e)throw new k("Object.keys called on a non-object");var h=hn&&s;if(n&&t.length>0&&!tn.call(t,0))for(var o=0;o<t.length;++o)r.push(String(o));if(e&&t.length>0)for(var a=0;a<t.length;++a)r.push(String(a));else for(var u in t)h&&"prototype"===u||!tn.call(t,u)||r.push(String(u));if(rn)for(var c=ln(t),l=0;l<on.length;++l)c&&"constructor"===on[l]||!tn.call(t,on[l])||r.push(on[l]);return r});var yn=Ze,bn=Array.prototype.slice,kn=gn,wn=_.keys,_n=wn?function(t){return wn(t)}:yn,xn=_.keys;_n.shim=function(){if(_.keys){var t=function(){var t=_.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(_.keys=function(t){return kn(t)?xn(bn.call(t)):xn(t)})}else _.keys=_n;return _.keys||_n};var Cn=_n,Sn="function"==typeof Pt&&"symbol"==typeof Pt("foo"),jn=_.prototype.toString,Tn=Array.prototype.concat,Mn=_.defineProperty,An=Mn&&function(){var t={};try{for(var i in Mn(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),Pn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===jn.call(t)}(e)&&e())&&(An?Mn(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},En=function(t,i){var s=arguments.length>2?arguments[2]:{},e=Cn(i);Sn&&(e=Tn.call(e,_.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)Pn(t,e[n],i[e[n]],s[e[n]])};En.supportsDescriptors=!!An;var e,Nn=En,In=_.getOwnPropertyDescriptor?function(){return _.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new k},Bn="function"==typeof Pt&&"symbol"==typeof It,Fn=_.getPrototypeOf||function(t){return t.__proto__},Dn=void 0===T?e:Fn(T),$n={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Bn?Fn([][It]()):e,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":e,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":e,"$ %AsyncGenerator%":e,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":e,"$ %AsyncIteratorPrototype%":e,"$ %Atomics%":"undefined"==typeof Atomics?e:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?e:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?e:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":b,"$ %ErrorPrototype%":b.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?e:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?e:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":e,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":e,"$ %Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?e:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?e:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?e:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":j,"$ %IteratorPrototype%":Bn?Fn(Fn([][It]())):e,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?e:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Bn?Fn((new Map)[It]()):e,"$ %MapPrototype%":"undefined"==typeof Map?e:Map.prototype,"$ %Math%":x,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":_,"$ %ObjectPrototype%":_.prototype,"$ %ObjProto_toString%":_.prototype.toString,"$ %ObjProto_valueOf%":_.prototype.valueOf,"$ %parseFloat%":S,"$ %parseInt%":C,"$ %Promise%":"undefined"==typeof Promise?e:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?e:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?e:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?e:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?e:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?e:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?e:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?e:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?e:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Bn?Fn((new Set)[It]()):e,"$ %SetPrototype%":"undefined"==typeof Set?e:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Bn?Fn(""[It]()):e,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Bn?Pt:e,"$ %SymbolPrototype%":Bn?Pt.prototype:e,"$ %SyntaxError%":w,"$ %SyntaxErrorPrototype%":w.prototype,"$ %ThrowTypeError%":In,"$ %TypedArray%":Dn,"$ %TypedArrayPrototype%":Dn?Dn.prototype:e,"$ %TypeError%":k,"$ %TypeErrorPrototype%":k.prototype,"$ %Uint8Array%":void 0===T?e:T,"$ %Uint8ArrayPrototype%":void 0===T?e:T.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?e:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?e:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?e:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?e:WeakSet.prototype},Rn=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new k('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in $n))throw new w("intrinsic "+t+" does not exist!");if(void 0===$n[s]&&!i)throw new k("intrinsic "+t+" exists, but is not available. Please file an issue!");return $n[s]},Un=pn.call(Function.call,_.prototype.hasOwnProperty),On=Rn,Vn=On("%TypeError%"),Ln=On("%SyntaxError%"),Hn=Un,zn={"Property Descriptor":function(t,i){if("Object"!==t.Type(i))return!1;var s={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var e in i)if(Hn(i,e)&&!s[e])return!1;var n=Hn(i,"[[Value]]"),r=Hn(i,"[[Get]]")||Hn(i,"[[Set]]");if(n&&r)throw new Vn("Property Descriptors may not be both accessor and data descriptors");return!0}},qn=Number.isNaN||function(t){return t!=t},Wn=Number.isNaN||function(t){return t!=t},Gn=Number.isFinite||function(t){return"number"==typeof t&&!Wn(t)&&t!==1/0&&t!==-1/0},Xn=Function.prototype.toString,Jn=/^\s*class\b/,Qn=function(t){try{var i=Xn.call(t);return Jn.test(i)}catch(t){return!1}},Yn=_.prototype.toString,Kn="function"==typeof Pt&&"symbol"==typeof Pt.toStringTag,Zn=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(Kn)return function(t){try{return!Qn(t)&&(Xn.call(t),!0)}catch(t){return!1}}(t);if(Qn(t))return!1;var i=Yn.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},tr=_.prototype.toString,ir=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},sr=Zn,er=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===tr.call(t)?String:Number)===String||i===Number){var s,e,n=i===String?["toString","valueOf"]:["valueOf","toString"];for(e=0;e<n.length;++e)if(sr(t[n[e]])&&(s=t[n[e]](),ir(s)))return s;throw new k("No default value")}throw new k("invalid [[DefaultValue]] hint supplied")},nr=Rn,rr=nr("%Object%"),hr=nr("%TypeError%"),or=nr("%String%"),ar=function(t,i,s,e){var n=zn[i];if("function"!=typeof n)throw new Ln("unknown record type: "+i);if(!n(t,e))throw new Vn(s+" must be a "+i);console.log(n(t,e),e)},ur=qn,cr=Gn,lr=function(t){return t>=0?1:-1},dr=function(t,i){var s=t%i;return x.floor(s>=0?s:s+i)},fr=Un,vr={ToPrimitive:function(t){return ir(t)?t:arguments.length>1?er(t,arguments[1]):er(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return ur(i)?0:0!==i&&cr(i)?lr(i)*x.floor(x.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(ur(i)||0===i||!cr(i))return 0;var s=lr(i)*x.floor(x.abs(i));return dr(s,65536)},ToString:function(t){return or(t)},ToObject:function(t){return this.CheckObjectCoercible(t),rr(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new hr(i||"Cannot call method on "+t);return t},IsCallable:Zn,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:ur(t)&&ur(i)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var s in t)if(fr(t,s)&&!i[s])return!1;var e=fr(t,"[[Value]]"),n=fr(t,"[[Get]]")||fr(t,"[[Set]]");if(e&&n)throw new hr("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(ar(this,"Property Descriptor","Desc",t),!(!fr(t,"[[Get]]")&&!fr(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(ar(this,"Property Descriptor","Desc",t),!(!fr(t,"[[Value]]")&&!fr(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(ar(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(ar(this,"Property Descriptor","Desc",t),this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new hr("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new hr("ToPropertyDescriptor requires an object");var i={};if(fr(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),fr(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),fr(t,"value")&&(i["[[Value]]"]=t.value),fr(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),fr(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new k("getter must be a function");i["[[Get]]"]=s}if(fr(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new hr("setter must be a function");i["[[Set]]"]=e}if((fr(i,"[[Get]]")||fr(i,"[[Set]]"))&&(fr(i,"[[Value]]")||fr(i,"[[Writable]]")))throw new hr("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},pr=pn.call(Function.call,String.prototype.replace),mr=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,gr=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,yr=function(){var t=vr.ToString(vr.CheckObjectCoercible(this));return pr(pr(t,mr,""),gr,"")},br=yr,kr=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:br},wr=Nn,_r=kr,xr=Nn,Cr=yr,Sr=kr,jr=function(){var t=_r();return wr(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},Tr=pn.call(Function.call,Sr());xr(Tr,{getPolyfill:Sr,implementation:Cr,shim:jr});var Mr=Tr,Ar=Zn,Pr=_.prototype.toString,Er=_.prototype.hasOwnProperty,Nr=Mr,Ir=function(t,i,s){if(!Ar(i))throw new k("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===Pr.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)Er.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e):"string"==typeof t?function(t,i,s){for(var e=0,n=t.length;e<n;e++)null==s?i(t.charAt(e),e,t):i.call(s,t.charAt(e),e,t)}(t,i,e):function(t,i,s){for(var e in t)Er.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Br=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)Fr.call(s,e)&&(t[e]=s[e])}return t},Fr=_.prototype.hasOwnProperty;var Dr=Qe.exports,$r=Ye,Rr=function(t){if(!t)return{};var i={};return Ir(Nr(t).split("\n"),(function(t){var s=t.indexOf(":"),e=Nr(t.slice(0,s)).toLowerCase(),n=Nr(t.slice(s+1));void 0===i[e]?i[e]=n:!function(t){return"[object Array]"===_.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},Ur=Br,Or=Lr;function Vr(t,i,s){var e=t;return $r(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=Ur(i,{uri:t}),e.callback=s,e}function Lr(t,i,s){return Hr(i=Vr(t,i,s))}function Hr(t){if(void 0===t.callback)throw new b("callback argument missing");var i=!1,s=function(s,e,n){i||(i=!0,t.callback(s,e,n))};function e(){var t=void 0;if(t=l.response?l.response:l.responseText||function(t){if("document"===t.responseType)return t.responseXML;var i=204===t.status&&t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!i)return t.responseXML;return null}(l),y)try{t=JSON.parse(t)}catch(t){}return t}var n={body:void 0,headers:{},statusCode:0,method:v,url:f,rawRequest:l};function r(t){return c(d),t instanceof b||(t=new b(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;c(d),i=t.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var r=n,h=null;return 0!==i?(r={body:e(),statusCode:i,method:v,headers:{},url:f,rawRequest:l},l.getAllResponseHeaders&&(r.headers=Rr(l.getAllResponseHeaders()))):h=new b("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,l=t.xhr||null;l||(l=t.cors||t.useXDR?new Lr.XDomainRequest:new Lr.XMLHttpRequest);var d,f=l.url=t.uri||t.url,v=l.method=t.method||"GET",p=t.body||t.data||null,m=l.headers=t.headers||{},g=!!t.sync,y=!1;if("json"in t&&(y=!0,m.accept||m.Accept||(m.Accept="application/json"),"GET"!==v&&"HEAD"!==v&&(m["content-type"]||m["Content-Type"]||(m["Content-Type"]="application/json"),p=JSON.stringify(t.json))),l.onreadystatechange=function(){4===l.readyState&&h()},l.onload=h,l.onerror=r,l.onprogress=function(){},l.ontimeout=r,l.open(v,f,!g,t.username,t.password),g||(l.withCredentials=!!t.withCredentials),!g&&t.timeout>0&&(d=u((function(){a=!0,l.abort("timeout");var t=new b("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}),t.timeout)),l.setRequestHeader)for(o in m)m.hasOwnProperty(o)&&l.setRequestHeader(o,m[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new b("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(l.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(l),l.send(p),l}Lr.XMLHttpRequest=Dr.XMLHttpRequest||function(){},Lr.XDomainRequest="withCredentials"in new Lr.XMLHttpRequest?Lr.XMLHttpRequest:Dr.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){Lr["delete"===t?"del":t]=function(i,s,e){return(s=Vr(i,s,e)).method=t.toUpperCase(),Hr(s)}}));var zr=function(t,i){var s=new g.WebVTT.Parser(g,g.vttjs,g.WebVTT.StringDecoder()),e=[];s.oncue=function(t){i.addCue(t)},s.onparsingerror=function(t){e.push(t)},s.onflush=function(){i.trigger({type:"loadeddata",target:i})},s.parse(t),e.length>0&&(g.console&&g.console.groupCollapsed&&g.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach((function(t){return Zi.error(t)})),g.console&&g.console.groupEnd&&g.console.groupEnd()),s.flush()},qr=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new b("A tech was not provided.");var r=be(s,{kind:qe[s.kind]||"subtitles",language:s.language||s.srclang||""}),h=We[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(h="hidden");var a=e=t.call(this,r)||this;if(a.H=r.tech,Qs)for(var u in i.prototype)"constructor"!==u&&(a[u]=i.prototype[u]);a.L=[],a.q=[];var c=new Le(a.L),l=new Le(a.q),d=!1,f=n(a,(function(){this.activeCues,d&&(this.trigger("cuechange"),d=!1)}));return"disabled"!==h&&a.H.ready((function(){a.H.on("timeupdate",f)}),!0),_.defineProperty(a,"default",{get:function(){return o},set:function(){}}),_.defineProperty(a,"mode",{get:function(){return h},set:function(t){var i=this;We[t]&&("showing"===(h=t)&&this.H.ready((function(){i.H.on("timeupdate",f)}),!0),this.trigger("modechange"))}}),_.defineProperty(a,"cues",{get:function(){return this.W?c:null},set:function(){}}),_.defineProperty(a,"activeCues",{get:function(){if(!this.W)return null;if(0===this.cues.length)return l;for(var t=this.H.currentTime(),i=[],s=0,e=this.cues.length;s<e;s++){var n=this.cues[s];(n.startTime<=t&&n.endTime>=t||n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t)&&i.push(n)}if(d=!1,i.length!==this.q.length)d=!0;else for(var r=0;r<i.length;r++)-1===this.q.indexOf(i[r])&&(d=!0);return this.q=i,l.O(this.q),l},set:function(){}}),r.src?(a.src=r.src,function(t,i){var s={uri:t},e=Je(t);e&&(s.cors=e),Or(s,n(this,(function(t,s,e){if(t)return Zi.error(t,s);if(i.W=!0,"function"!=typeof g.WebVTT){if(i.H){var n=function(){return zr(e,i)};i.H.on("vttjsloaded",n),i.H.on("vttjserror",(function(){Zi.error("vttjs failed to load, stopping trying to process "+i.src),i.H.off("vttjsloaded",n)}))}}else zr(e,i)})))}(r.src,a)):a.W=!0,a||we(e)}xe(i,t);var s=i.prototype;return s.addCue=function(t){var i=t;if(g.vttjs&&!(t instanceof g.vttjs.VTTCue)){for(var s in i=new g.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)s in i||(i[s]=t[s]);i.id=t.id,i.G=t}var e=this.H.textTracks();if(e)for(var n=0;n<e.length;n++)e[n]!==this&&e[n].removeCue(i);this.L.push(i),this.cues.O(this.L)},s.removeCue=function(t){for(var i=this.L.length;i--;){var s=this.L[i];if(s===t||s.G&&s.G===t){this.L.splice(i,1),this.cues.O(this.L);break}}},i}(Ge);qr.prototype.A={cuechange:"cuechange"};var Wr=function(t){function i(s){var e,n;void 0===s&&(s={});var r=we(e=t.call(this)||this);if(Qs)for(var h in r=Vi.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new qr(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,_.defineProperty(r,"readyState",{get:function(){return n}}),_.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),Qs?r||we(e):e}return xe(i,t),i}(ke);Wr.prototype.A={load:"load"},Wr.NONE=0,Wr.LOADING=1,Wr.LOADED=2,Wr.ERROR=3;var Gr,Xr=function(){function t(i){void 0===i&&(i=[]);var s=this;if(Qs)for(var e in s=Vi.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.X=[],_.defineProperty(s,"length",{get:function(){return this.X.length}});for(var n=0,r=i.length;n<r;n++)s.J(i[n]);if(Qs)return s}var i=t.prototype;return i.J=function(t){var i=this.X.length;""+i in this||_.defineProperty(this,i,{get:function(){return this.X[i]}}),-1===this.X.indexOf(t)&&this.X.push(t)},i.Y=function(t){for(var i,s=0,e=this.X.length;s<e;s++)if(t===this.X[s].track){i=this.X[s];break}return i},i.K=function(t){for(var i=0,s=this.X.length;i<s;i++)if(t===this.X[i]){this.X.splice(i,1);break}},t}(),Jr=function(t){function i(s,e){var n;if(void 0===s&&(s=[]),void 0===e&&(e=null),n=t.call(this)||this,!e&&(e=we(n),Qs))for(var r in e=Vi.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.Z=[],_.defineProperty(e,"length",{get:function(){return this.Z.length}});for(var h=0;h<s.length;h++)e.tt(s[h]);return e||we(n)}xe(i,t);var s=i.prototype;return s.tt=function(t){var i=this.Z.length;""+i in this||_.defineProperty(this,i,{get:function(){return this.Z[i]}}),-1===this.Z.indexOf(t)&&(this.Z.push(t),this.trigger({track:t,type:"addtrack"}))},s.it=function(t){for(var i,s=0,e=this.length;s<e;s++)if(this[s]===t){(i=this[s]).off&&i.off(),this.Z.splice(s,1);break}i&&this.trigger({track:i,type:"removetrack"})},s.getTrackById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},i}(ke);for(Gr in Jr.prototype.A={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Jr.prototype.A)Jr.prototype["on"+Gr]=null;var Qr=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),Qs){for(var r in n=Vi.createElement("custom"),Jr.prototype)"constructor"!==r&&(n[r]=Jr.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||we(e)}return xe(i,t),i.prototype.tt=function(i){t.prototype.tt.call(this,i),i.addEventListener("modechange",n(this,(function(){this.trigger("change")})))},i}(Jr),Yr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},Kr=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].selected){Yr(s,s[r]);break}if(Qs){for(var h in n=Vi.createElement("custom"),Jr.prototype)"constructor"!==h&&(n[h]=Jr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,_.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||we(e)}xe(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.selected&&Yr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.st||(s.st=!0,Yr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(Jr),Zr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},th=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].enabled){Zr(s,s[r]);break}if(Qs){for(var h in n=Vi.createElement("custom"),Jr.prototype)"constructor"!==h&&(n[h]=Jr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,n||we(e)}xe(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&Zr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.st||(s.st=!0,Zr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(Jr),ih=void 0;var sh=function(t){function i(i,s){var e;return void 0===i&&(i={}),void 0===s&&(s=function(){}),i.reportTouchActivity=!1,(e=t.call(this,null,i,s)||this).et=!1,e.on("playing",(function(){this.et=!0})),e.on("loadstart",(function(){this.et=!1})),e.nt=i.textTracks,e.rt=i.videoTracks,e.ht=i.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===i["native"+t+"Tracks"]&&(e["featuresNative"+t+"Tracks"]=!1)})),!1===i.nativeCaptions&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.ot=new Qr,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}xe(i,t);var s=i.prototype;return s.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},s.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},s.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(n(this,(function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()})),500)},s.onDurationChange=function(t){this.ct=this.duration()},s.buffered=function(){return je(0,0)},s.bufferedPercent=function(){return Te(this.buffered(),this.ct)},s.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},s.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},s.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},s.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},s.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},s.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach((function(t){for(var s=i[t+"Tracks"]()||[],e=s.length;e--;){var n=s[e];"text"===t&&i.removeRemoteTextTrack(n),s.it(n)}}))},s.cleanupAutoTextTracks=function(){for(var t=this.ot||[],i=t.length;i--;){var s=t[i];this.removeRemoteTextTrack(s)}},s.reset=function(){},s.error=function(t){return void 0!==t&&(this.lt=new Fe(t),this.trigger("error")),this.lt},s.played=function(){return this.et?je(0,0):je()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=n(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",n(this,(function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)}))))},s.initTrackListeners=function(){var t=this;["video","audio"].forEach((function(i){var s=function(){t.trigger(i+"trackchange")},e=t[i+"Tracks"]();e.addEventListener("removetrack",s),e.addEventListener("addtrack",s),t.on("dispose",(function(){e.removeEventListener("removetrack",s),e.removeEventListener("addtrack",s)}))}))},s.dt=function(){var t=this;if(!g.WebVTT)if(Vi.body.contains(this.el())){if(!this.h["vtt.js"]&&Yi(ih)&&_.keys(ih).length>0)return void this.trigger("vttjsloaded");var i=Vi.createElement("script");i.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){i.onload=null,i.onerror=null})),g.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.dt)},s.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var s=this.remoteTextTracks(),e=function(t){return i.tt(t.track)},n=function(t){return i.it(t.track)};s.on("addtrack",e),s.on("removetrack",n),this.dt();var r=function(){return t.trigger("texttrackchange")},h=function(){r();for(var t=0;t<i.length;t++){var s=i[t];s.removeEventListener("cuechange",r),"showing"===s.mode&&s.addEventListener("cuechange",r)}};h(),i.addEventListener("change",h),i.addEventListener("addtrack",h),i.addEventListener("removetrack",h),this.on("dispose",(function(){s.off("addtrack",e),s.off("removetrack",n),i.removeEventListener("change",h),i.removeEventListener("addtrack",h),i.removeEventListener("removetrack",h);for(var t=0;t<i.length;t++){i[t].removeEventListener("cuechange",r)}}))}},s.videoTracks=function(){return this.rt=this.rt||new Kr,this.rt},s.audioTracks=function(){return this.ht=this.ht||new th,this.ht},s.textTracks=function(){return this.nt=this.nt||new Qr,this.nt},s.remoteTextTracks=function(){return this.ft=this.ft||new Qr,this.ft},s.remoteTextTrackEls=function(){return this.vt=this.vt||new Xr,this.vt},s.addTextTrack=function(t,i,s){if(!t)throw new b("TextTrack kind is required but was not provided");return function(t,i,s,e,n){void 0===n&&(n={});var r=t.textTracks();n.kind=i,s&&(n.label=s),e&&(n.language=e),n.tech=t;var h=new qr(n);return r.tt(h),h}(this,t,i,s)},s.createRemoteTextTrack=function(t){var i=be(t,{tech:this});return new Wr(i)},s.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(Zi.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().J(s),this.remoteTextTracks().tt(s.track),!0!==i&&this.ot.tt(s.track),s},s.removeRemoteTextTrack=function(t){var i=this.remoteTextTrackEls().Y(t);this.remoteTextTrackEls().K(i),this.remoteTextTracks().it(t),this.ot.it(t)},s.getVideoPlaybackQuality=function(){return{}},s.setPoster=function(){},s.playsinline=function(){},s.setPlaysinline=function(){},s.canPlayType=function(){return""},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,s){if(i.gt||(i.gt={}),!i.isTech(s))throw new b("Tech "+t+" must be a Tech");return i.gt[t]=s,s},i.getTech=function(t){return i.gt&&i.gt[t]?i.gt[t]:g&&g.videojs&&g.videojs[t]?(Zi.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),g.videojs[t]):void 0},i}(i);sh.prototype.nt,sh.prototype.ht,sh.prototype.rt,sh.prototype.featuresVolumeControl=!0,sh.prototype.featuresFullscreenResize=!1,sh.prototype.featuresPlaybackRate=!1,sh.prototype.featuresProgressEvents=!1,sh.prototype.featuresTimeupdateEvents=!1,sh.prototype.featuresNativeTextTracks=!1,sh.withSourceHandlers=function(t){t.registerSourceHandler=function(i,s){var e=t.sourceHandlers;e||(e=t.sourceHandlers=[]),void 0===s&&(s=e.length),e.splice(s,0,i)},t.canPlayType=function(i){for(var s,e=t.sourceHandlers||[],n=0;n<e.length;n++)if(s=e[n].canPlayType(i))return s;return""},t.selectSourceHandler=function(i,s){for(var e=t.sourceHandlers||[],n=0;n<e.length;n++)if(e[n].canHandleSource(i,s))return e[n];return null},t.canPlaySource=function(i,s){var e=t.selectSourceHandler(i,s);return e?e.canHandleSource(i,s):""};["seekable","duration"].forEach((function(t){var i=this[t];"function"==typeof i&&(this[t]=function(){return this.yt&&this.yt[t]?this.yt[t].apply(this.yt,arguments):i.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(i){var s=t.selectSourceHandler(i,this.h);return s||(t.nativeSourceHandler?s=t.nativeSourceHandler:Zi.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),s!==t.nativeSourceHandler&&(this.bt=i,this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.one(this.v,"loadstart",t.prototype.kt)),this.yt=s.handleSource(i,this,this.h),this.on("dispose",this.disposeSourceHandler),this},t.prototype.kt=function(){this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.wt=function(){this.disposeSourceHandler(),this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.disposeSourceHandler=function(){this.bt&&(this.clearTracks(["audio","video"]),this.bt=null),this.cleanupAutoTextTracks(),this.yt&&(this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.yt.dispose&&this.yt.dispose(),this.yt=null)}},i.registerComponent("Tech",sh),i.registerComponent("MediaTechController",sh),sh.registerTech("Tech",sh);var eh=function(t){function s(s,e,n){var r;if(r=t.call(this,s,e,n)||this,e.playerOptions.sources&&0!==e.playerOptions.sources.length)s.src(e.playerOptions.sources);else for(var h=0,o=e.playerOptions.techOrder;h<o.length;h++){var a=ye(o[h]),u=sh.getTech(a);if(a||(u=i.getComponent(a)),u&&u.isSupported()){s._t(a);break}}return r}return xe(s,t),s}(i);i.registerComponent("MediaLoader",eh);var nh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).emitTapEvents(),e.on(i,"languagechange",e.handleLanguagechange),e.enable(),e}xe(i,t);var s=i.prototype;return s.createEl=function(i,s,e){void 0===i&&(i="div"),void 0===s&&(s={}),void 0===e&&(e={}),s=Ji({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&Zi.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=Ji({role:"button","aria-live":"polite"},e),this.xt=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.Ct=us("span",{className:"vjs-control-text"}),t&&t.appendChild(this.Ct),this.controlText(this.St,t),this.Ct},s.controlText=function(t,i){if(void 0===i&&(i=this.el()),void 0===t)return this.St||"Need Text";var s=this.localize(t);return this.St=t,this.Ct.innerHTML=s,this.nonIconControl||i.setAttribute("title",s),this},s.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},s.enable=function(){return this.removeClass("vjs-disabled"),this.v.setAttribute("aria-disabled","false"),void 0!==this.xt&&this.v.setAttribute("tabIndex",this.xt),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this},s.disable=function(){return this.addClass("vjs-disabled"),this.v.setAttribute("aria-disabled","true"),void 0!==this.xt&&this.v.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this},s.handleLanguagechange=function(){this.controlText(this.St)},s.handleClick=function(t){},s.handleFocus=function(t){ae(Vi,"keydown",n(this,this.handleKeyPress))},s.handleKeyPress=function(i){32===i.which||13===i.which?(i.preventDefault(),this.handleClick(i)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,i)},s.handleBlur=function(t){ue(Vi,"keydown",n(this,this.handleKeyPress))},i}(i);i.registerComponent("ClickableComponent",nh);var rh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",n(we(e),e.update)),e}xe(i,t);var s=i.prototype;return s.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},s.createEl=function(){var t=us("div",{className:"vjs-poster",tabIndex:-1});return ie||(this.jt=us("img"),t.appendChild(this.jt)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.jt)this.jt.src=t;else{var i="";t&&(i='url("'+t+'")'),this.v.style.backgroundImage=i}},s.handleClick=function(t){this.t.controls()&&(this.t.paused()?this.t.play():this.t.pause())},i}(nh);i.registerComponent("PosterImage",rh);var hh="#222",oh={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 ah(t,i){return"rgba("+C(t[1]+t[1],16)+","+C(t[2]+t[2],16)+","+C(t[3]+t[3],16)+","+i+")"}function uh(t,i,s){try{t.style[i]=s}catch(t){return}}var ch=function(t){function i(i,s,e){var r;return r=t.call(this,i,s,e)||this,i.on("loadstart",n(we(r),r.toggleDisplay)),i.on("texttrackchange",n(we(r),r.updateDisplay)),i.ready(n(we(r),(function(){if(i.H&&i.H.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",n(this,this.updateDisplay));for(var t=this.h.playerOptions.tracks||[],s=0;s<t.length;s++)this.t.addRemoteTextTrack(t[s],!0);var e,r,h={captions:1,subtitles:1},o=this.t.textTracks();if(o){for(var a=0;a<o.length;a++){var u=o[a];u.default&&("descriptions"!==u.kind||e?u.kind in h&&!r&&(r=u):e=u)}r?r.mode="showing":e&&(e.mode="showing")}}}))),r}xe(i,t);var s=i.prototype;return s.toggleDisplay=function(){this.t.H&&this.t.H.featuresNativeTextTracks?this.hide():this.show()},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},s.clearDisplay=function(){"function"==typeof g.WebVTT&&g.WebVTT.processCues(g,[],this.v)},s.updateDisplay=function(){var t=this.t.textTracks();if(this.clearDisplay(),t){for(var i=null,s=null,e=t.length;e--;){var n=t[e];"showing"===n.mode&&("descriptions"===n.kind?i=n:s=n)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i))}},s.updateForTrack=function(t){if("function"==typeof g.WebVTT&&t.activeCues){for(var i=this.t.textTrackSettings.getValues(),s=[],e=0;e<t.activeCues.length;e++)s.push(t.activeCues[e]);g.WebVTT.processCues(g,s,this.v);for(var n=s.length;n--;){var r=s[n];if(r){var h=r.displayState;if(i.color&&(h.firstChild.style.color=i.color),i.textOpacity&&uh(h.firstChild,"color",ah(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(h.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&uh(h.firstChild,"backgroundColor",ah(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?uh(h,"backgroundColor",ah(i.windowColor,i.windowOpacity)):h.style.backgroundColor=i.windowColor),i.edgeStyle&&("dropshadow"===i.edgeStyle?h.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+hh:"raised"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+hh:"depressed"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+hh:"uniform"===i.edgeStyle&&(h.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+hh)),i.fontPercent&&1!==i.fontPercent){var o=g.parseFloat(h.style.fontSize);h.style.fontSize=o*i.fontPercent+"px",h.style.height="auto",h.style.top="auto",h.style.bottom="2px"}i.fontFamily&&"default"!==i.fontFamily&&("small-caps"===i.fontFamily?h.firstChild.style.fontVariant="small-caps":h.firstChild.style.fontFamily=oh[i.fontFamily])}}}},i}(i);i.registerComponent("TextTrackDisplay",ch);var lh=function(t){function i(){return t.apply(this,arguments)||this}return xe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(i);i.registerComponent("LoadingSpinner",lh);var dh=function(t){function s(){return t.apply(this,arguments)||this}xe(s,t);var e=s.prototype;return e.createEl=function(t,s,e){void 0===t&&(t="button"),void 0===s&&(s={}),void 0===e&&(e={}),s=Ji({className:this.buildCSSClass()},s),"button"!==t&&(Zi.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),s=Ji({tabIndex:0},s),e=Ji({role:"button"},e)),e=Ji({type:"button","aria-live":"polite"},e);var n=i.prototype.createEl.call(this,t,s,e);return this.createControlTextEl(n),n},e.addChild=function(t,s){void 0===s&&(s={});var e=this.constructor.name;return Zi.warn("Adding an actionable (user controllable) child to a Button ("+e+") is not supported; use a ClickableComponent instead."),i.prototype.addChild.call(this,t,s)},e.enable=function(){t.prototype.enable.call(this),this.v.removeAttribute("disabled")},e.disable=function(){t.prototype.disable.call(this),this.v.setAttribute("disabled","disabled")},e.handleKeyPress=function(i){32!==i.which&&13!==i.which&&t.prototype.handleKeyPress.call(this,i)},s}(nh);i.registerComponent("Button",dh);var fh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Tt=!1,e.on("mousedown",e.handleMouseDown),e}xe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this;if(this.Tt&&t.clientX&&t.clientY)this.t.play();else{var s=this.t.getChild("controlBar"),e=s&&s.getChild("playToggle");this.one(this.t,"play",(function(){e?e.focus():i.t.focus()})),this.t.play()}},s.handleKeyPress=function(i){this.Tt=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Tt=!0},i}(dh);fh.prototype.St="Play Video",i.registerComponent("BigPlayButton",fh);var vh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}xe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},i}(dh);i.registerComponent("CloseButton",vh);var ph=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"play",e.handlePlay),e.on(i,"pause",e.handlePause),e}xe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.paused()?this.t.play():this.t.pause()},s.handlePlay=function(t){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},s.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i}(dh);function mh(t,i){void 0===i&&(i=t),t=t<0?0:t;var s=x.floor(t%60),e=x.floor(t/60%60),n=x.floor(t/3600),r=x.floor(i/60%60),h=x.floor(i/3600);return(j(t)||t===1/0)&&(n=e=s="-"),(n=n>0||h>0?n+":":"")+(e=((n||r>=10)&&e<10?"0"+e:e)+":")+(s=s<10?"0"+s:s)}ph.prototype.St="Play",i.registerComponent("PlayToggle",ph);var gh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"languagechange",e.updateContent),e}xe(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.S=us("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00'},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),s=this.localize("Current Time"),e=mh(i,this.t.duration());e!==this.Mt&&(this.Mt=e,this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(i);i.registerComponent("CurrentTimeDisplay",gh);var yh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"durationchange",e.updateContent),e.on(i,"timeupdate",e.updateContent),e.on(i,"loadedmetadata",e.updateContent),e.on(i,"languagechange",e.updateContent),e}xe(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.S=us("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> 0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.duration();if(i&&this.ct!==i){this.ct=i;var s=this.localize("Duration Time"),e=mh(i);this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(i);i.registerComponent("DurationDisplay",yh);var bh=function(t){function i(){return t.apply(this,arguments)||this}return xe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},i}(i);i.registerComponent("TimeDivider",bh);var kh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"durationchange",e.updateContent),e.on(i,"languagechange",e.updateContent),e}xe(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.S=us("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Remaining Time")+"</span> -0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){if(this.t.duration()){var i=this.localize("Remaining Time"),s=mh(this.t.remainingTime());s!==this.Mt&&(this.Mt=s,this.S.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(i);i.registerComponent("RemainingTimeDisplay",kh);var wh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateShowing(),e.on(e.player(),"durationchange",e.updateShowing),e.on(e.player(),"languagechange",e.handleLanguagechange),e}xe(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.S=us("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.Ct=us("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.At=Vi.createTextNode(this.localize("LIVE")),this.S.appendChild(this.Ct),this.S.appendChild(this.At),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.Ct.innerHTML=this.localize("Stream Type"),this.At.innerHTML=this.localize("LIVE")},i}(i);i.registerComponent("LiveDisplay",wh);var _h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).bar=e.getChild(e.h.barName),e.vertical(!!e.h.vertical),e.on("mousedown",e.handleMouseDown),e.on("touchstart",e.handleMouseDown),e.on("focus",e.handleFocus),e.on("blur",e.handleBlur),e.on("click",e.handleClick),e.on(i,"controlsvisible",e.update),e.on(i,e.playerEvent,e.update),e}xe(i,t);var s=i.prototype;return s.createEl=function(i,s,e){return void 0===s&&(s={}),void 0===e&&(e={}),s.className=s.className+" vjs-slider",s=Ji({tabIndex:0},s),e=Ji({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),t.prototype.createEl.call(this,i,s,e)},s.handleMouseDown=function(t){var i=this.bar.v.ownerDocument;t.preventDefault(),Vi.body.focus(),Vi.onselectstart=function(){return!1},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)},s.handleMouseMove=function(t){},s.handleMouseUp=function(){var t=this.bar.v.ownerDocument;Vi.onselectstart=function(){return!0},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()},s.update=function(){if(this.v){var t=this.getPercent(),i=this.bar;if(i){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var s=(100*t).toFixed(2)+"%";this.vertical()?i.el().style.height=s:i.el().style.width=s}}},s.calculateDistance=function(t){var i=js(this.v,t);return this.vertical()?i.y:i.x},s.handleFocus=function(){this.on(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},s.handleBlur=function(){this.off(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},s.vertical=function(t){return void 0===t?this.Pt||!1:(this.Pt=!!t,this.Pt?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(i);function xh(t,i){if(!t||!i)return"";if("function"==typeof g.getComputedStyle){var s=g.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}i.registerComponent("Slider",_h);var Ch=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Et=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}xe(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Nt=us("span",{innerHTML:this.localize("Loaded")}),this.It=Vi.createTextNode(": 0%"),this.Ct=us("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Nt),this.Ct.appendChild(this.It),i.appendChild(this.Ct),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.Et,r=function(t,i){var s=t/i||0;return 100*(s>=1?1:s)+"%"};this.v.style.width=r(e,s);for(var h=0;h<i.length;h++){var o=i.start(h),a=i.end(h),u=n[h];u||(u=this.v.appendChild(us()),n[h]=u),u.style.left=r(o,e),u.style.width=r(a-o,e)}for(var c=n.length;c>i.length;c--)this.v.removeChild(n[c-1]);n.length=i.length},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Loaded")},i}(i);i.registerComponent("LoadProgressBar",Ch);var Sh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(we(e),e.updateDataAttr)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&e.addClass("vjs-keep-tooltips-inside"),e}xe(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"});return this.Bt=us("span",{innerHTML:this.localize("Progress")}),this.Ft=Vi.createTextNode(": 0%"),this.Ct=us("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Bt),this.Ct.appendChild(this.Ft),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",mh(i,this.t.duration()))},s.handleLanguagechange=function(){this.Bt.innerHTML=this.localize("Progress")},i}(i);i.registerComponent("PlayProgressBar",Sh);var jh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(we(e),e.updateDataAttr)),e}xe(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar"});return this.tooltip=us("div",{className:"vjs-time-tooltip"}),this.Bt=us("span",{innerHTML:this.localize("Progress")}),this.Ft=Vi.createTextNode(": 0%"),this.Ct=us("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Bt),this.Ct.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=mh(this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),this.t.duration());this.v.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},s.handleLanguagechange=function(){this.Bt.innerHTML=this.localize("Progress")},i}(i);i.registerComponent("TooltipProgressBar",jh);var Th=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateProgress),e.on(i,"ended",e.updateProgress),i.ready(n(we(e),e.updateProgress)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltipProgressBar=e.addChild("TooltipProgressBar")),e}xe(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},s.updateProgress=function(t){if(this.updateAriaAttributes(this.v),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.v),this.tooltipProgressBar.v.style.width=this.bar.v.style.width;var i=S(xh(this.player().el(),"width")),s=S(xh(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=x.floor(i-s/2)+"px",e.minWidth=x.ceil(s/2)+"px",e.right="-"+s/2+"px"}},s.updateAriaAttributes=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",mh(i,this.t.duration()))},s.getPercent=function(){var t=this.t.currentTime()/this.t.duration();return t>=1?1:t},s.handleMouseDown=function(i){this.t.scrubbing(!0),this.videoWasPlaying=!this.t.paused(),this.t.pause(),t.prototype.handleMouseDown.call(this,i)},s.handleMouseMove=function(t){var i=this.calculateDistance(t)*this.t.duration();i===this.t.duration()&&(i-=.1),this.t.currentTime(i)},s.handleMouseUp=function(i){t.prototype.handleMouseUp.call(this,i),this.t.scrubbing(!1),this.videoWasPlaying&&this.t.play()},s.stepForward=function(){this.t.currentTime(this.t.currentTime()+5)},s.stepBack=function(){this.t.currentTime(this.t.currentTime()-5)},i}(_h);Th.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},Th.prototype.playerEvent="timeupdate",i.registerComponent("SeekBar",Th);var Mh=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltip=us("div",{className:"vjs-time-tooltip"}),e.el().appendChild(e.tooltip),e.addClass("vjs-keep-tooltips-inside")),e.update(0,0),i.on("ready",(function(){e.on(i.controlBar.progressControl.el(),"mousemove",function(t,i){var s=Date.now();return function(){var e=Date.now();e-s>=i&&(t.apply(void 0,arguments),s=e)}}(n(we(e),e.handleMouseMove),25))})),e}xe(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},s.handleMouseMove=function(t){var i=this.t.duration(),s=this.calculateDistance(t)*i,e=t.pageX-Ss(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=mh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Dt(i)+1,n=S(xh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return js(this.el().parentNode,t).x},s.Dt=function(t){if(!this.keepTooltipsInside)return t;var i=S(xh(this.player().el(),"width")),s=S(xh(this.tooltip,"width"))/2,e=t;return t<s?e=x.ceil(s):t>i-s&&(e=x.floor(i-s)),e},i}(i);i.registerComponent("MouseTimeDisplay",Mh);var Ah=function(t){function i(){return t.apply(this,arguments)||this}return xe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(i);Ah.prototype.h={children:["seekBar"]},i.registerComponent("ProgressControl",Ah);var Ph=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}xe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},s.handleFullscreenChange=function(t){this.t.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},s.handleClick=function(t){this.t.isFullscreen()?this.t.exitFullscreen():this.t.requestFullscreen()},i}(dh);Ph.prototype.St="Fullscreen",i.registerComponent("FullscreenToggle",Ph);var Eh=function(t){function i(){return t.apply(this,arguments)||this}return xe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},i}(i);i.registerComponent("VolumeLevel",Eh);var Nh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(n(we(e),e.updateARIAAttributes)),e}xe(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},s.handleMouseMove=function(t){this.checkMuted(),this.t.volume(this.calculateDistance(t))},s.checkMuted=function(){this.t.muted()&&this.t.muted(!1)},s.getPercent=function(){return this.t.muted()?0:this.t.volume()},s.stepForward=function(){this.checkMuted(),this.t.volume(this.t.volume()+.1)},s.stepBack=function(){this.checkMuted(),this.t.volume(this.t.volume()-.1)},s.updateARIAAttributes=function(t){var i=(100*this.t.volume()).toFixed(2);this.v.setAttribute("aria-valuenow",i),this.v.setAttribute("aria-valuetext",i+"%")},i}(_h);Nh.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Nh.prototype.playerEvent="volumechange",i.registerComponent("VolumeBar",Nh);var Ih=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}return xe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(i);Ih.prototype.h={children:["volumeBar"]},i.registerComponent("VolumeControl",Ih);var Bh=function(t){function i(){return t.apply(this,arguments)||this}xe(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=us(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),ae(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(i);i.registerComponent("Popup",Bh);var Fh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}xe(i,t);var s=i.prototype;return s.update=function(){var t=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=t,this.addChild(t),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},s.createPopup=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},i}(nh);i.registerComponent("PopupButton",Fh);var Dh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.update),i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){this.update(),!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}xe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.muted(!this.t.muted())},s.update=function(t){var i=this.t.volume(),s=3;this.t.muted()?s=0:i<.33?s=1:i<.67&&(s=2);var e=this.t.muted()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e);for(var n=0;n<4;n++)bs(this.v,"vjs-vol-"+n);ys(this.v,"vjs-vol-"+s)},i}(dh);Dh.prototype.St="Mute",i.registerComponent("MuteToggle",Dh);var $h=function(t){function i(i,s){var e;function n(){i.H&&!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}return void 0===s&&(s={}),void 0===s.inline&&(s.inline=!0),void 0===s.vertical&&(s.inline?s.vertical=!1:s.vertical=!0),s.volumeBar=s.volumeBar||{},s.volumeBar.vertical=!!s.vertical,(e=t.call(this,i,s)||this).on(i,"volumechange",e.volumeUpdate),e.on(i,"loadstart",e.volumeUpdate),n.call(we(e)),e.on(i,"loadstart",n),e.on(e.volumeBar,["slideractive","focus"],(function(){this.addClass("vjs-slider-active")})),e.on(e.volumeBar,["sliderinactive","blur"],(function(){this.removeClass("vjs-slider-active")})),e.on(e.volumeBar,["focus"],(function(){this.addClass("vjs-lock-showing")})),e.on(e.volumeBar,["blur"],(function(){this.removeClass("vjs-lock-showing")})),e}xe(i,t);var s=i.prototype;return s.buildCSSClass=function(){var i="";return i=this.h.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+t.prototype.buildCSSClass.call(this)+" "+i},s.createPopup=function(){var t=new Bh(this.t,{contentElType:"div"}),i=new Nh(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Dh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],n(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Fh);$h.prototype.volumeUpdate=Dh.prototype.update,$h.prototype.St="Mute",i.registerComponent("VolumeMenuButton",$h);var Rh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}xe(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=us(i,{className:"vjs-menu-content"}),this.S.setAttribute("role","menu");var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.setAttribute("role","presentation"),s.appendChild(this.S),ae(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},s.stepForward=function(){var t=0;void 0!==this.$t&&(t=this.$t+1),this.focus(t)},s.stepBack=function(){var t=0;void 0!==this.$t&&(t=this.$t-1),this.focus(t)},s.focus=function(t){void 0===t&&(t=0);var i=this.children().slice();i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className)&&i.shift(),i.length>0&&(t<0?t=0:t>=i.length&&(t=i.length-1),this.$t=t,i[t].v.focus())},i}(i);i.registerComponent("Menu",Rh);var Uh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e.Rt=!0,e.v.setAttribute("aria-haspopup","true"),e.v.setAttribute("role","menuitem"),e.on("keydown",e.handleSubmenuKeyPress),e}xe(i,t);var s=i.prototype;return s.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.Ut=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Ot?this.hide():this.show()},s.createMenu=function(){var t=new Rh(this.t);if(this.Ot=0,this.h.title){var i=us("li",{className:"vjs-menu-title",innerHTML:ye(this.h.title),tabIndex:-1});this.Ot+=1,t.m.unshift(i),ls(i,t.contentEl())}if(this.items=this.createItems(),this.items)for(var s=0;s<this.items.length;s++)t.addItem(this.items[s]);return t},s.createItems=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",n(this,(function(t){this.unpressButton(),this.v.blur()}))),this.Ut?this.unpressButton():this.pressButton()},s.handleKeyPress=function(i){27===i.which||9===i.which?(this.Ut&&this.unpressButton(),9!==i.which&&i.preventDefault()):38===i.which||40===i.which?this.Ut||(this.pressButton(),i.preventDefault()):t.prototype.handleKeyPress.call(this,i)},s.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.Ut&&this.unpressButton(),9!==t.which&&t.preventDefault())},s.pressButton=function(){this.Rt&&(this.Ut=!0,this.menu.lockShowing(),this.v.setAttribute("aria-expanded","true"),this.menu.focus())},s.unpressButton=function(){this.Rt&&(this.Ut=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.v.focus())},s.disable=function(){return this.Ut=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.Rt=!1,t.prototype.disable.call(this)},s.enable=function(){return this.Rt=!0,t.prototype.enable.call(this)},i}(nh);i.registerComponent("MenuButton",Uh);var Oh=function(t){function i(i,s){var e,r=s.tracks;if((e=t.call(this,i,s)||this).items.length<=1&&e.hide(),!r)return we(e);var h=n(we(e),e.update);return r.addEventListener("removetrack",h),r.addEventListener("addtrack",h),e.t.on("dispose",(function(){r.removeEventListener("removetrack",h),r.removeEventListener("addtrack",h)})),e}return xe(i,t),i}(Uh);i.registerComponent("TrackButton",Oh);var Vh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).selectable=s.selectable,e.selected(s.selected),e.selectable?e.v.setAttribute("role","menuitemcheckbox"):e.v.setAttribute("role","menuitem"),e}xe(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",Ji({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Vt=Vi.createTextNode(this.localize(this.h.label)),n.appendChild(this.Vt),n},s.handleClick=function(t){this.selected(!0)},s.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.v.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.v.setAttribute("aria-checked","false"),this.controlText("")))},s.handleLanguagechange=function(){t.prototype.handleLanguagechange.call(this),this.Vt.innerHTML=this.localize(this.h.label)},i}(nh);i.registerComponent("MenuItem",Vh);var Lh=function(t){function i(i,s){var e,r,h=s.track,o=i.textTracks();if(s.label=h.label||h.language||"Unknown",s.selected=h.default||"showing"===h.mode,(e=t.call(this,i,s)||this).track=h,o){var a=n(we(e),e.handleTracksChange);i.on(["loadstart","texttrackchange"],a),o.addEventListener("change",a),e.on("dispose",(function(){o.removeEventListener("change",a)}))}o&&void 0===o.onchange&&e.on(["tap","click"],(function(){if("object"!=typeof g.Event)try{r=new g.Event("change")}catch(t){}r||(r=Vi.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(r)}));return e}xe(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.track.kind,e=this.t.textTracks();if(t.prototype.handleClick.call(this,i),e)for(var n=0;n<e.length;n++){var r=e[n];r.kind===s&&(r===this.track?"showing"!==r.mode&&(r.mode="showing"):"disabled"!==r.mode&&(r.mode="disabled"))}},s.handleTracksChange=function(t){this.selected("showing"===this.track.mode)},i}(Vh);i.registerComponent("TextTrackMenuItem",Lh);var Hh=function(t){function i(i,s){var e;return s.track={player:i,kind:s.kind,label:s.kind+" off",default:!1,mode:"disabled"},s.selectable=!0,(e=t.call(this,i,s)||this).selected(!0),e}return xe(i,t),i.prototype.handleTracksChange=function(t){for(var i=this.player().textTracks(),s=!0,e=0,n=i.length;e<n;e++){var r=i[e];if(r.kind===this.track.kind&&"showing"===r.mode){s=!1;break}}this.selected(s)},i}(Lh);i.registerComponent("OffTextTrackMenuItem",Hh);var zh=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return xe(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new Hh(this.t,{kind:this.Lt})),this.Ot+=1;var i=this.t.textTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];e.kind===this.Lt&&t.push(new Lh(this.t,{track:e,selectable:!0}))}return t},i}(Oh);i.registerComponent("TextTrackButton",zh);var qh=function(t){function i(i,s){var e,r=s.track,h=s.cue,o=i.currentTime();return s.selectable=!0,s.label=h.text,s.selected=h.startTime<=o&&o<h.endTime,(e=t.call(this,i,s)||this).track=r,e.cue=h,r.addEventListener("cuechange",n(we(e),e.update)),e}xe(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.t.currentTime(this.cue.startTime),this.update(this.cue.startTime)},s.update=function(t){var i=this.cue,s=this.t.currentTime();this.selected(i.startTime<=s&&s<i.endTime)},i}(Vh);i.registerComponent("ChaptersTrackMenuItem",qh);var Wh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Chapters Menu"),n}xe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},s.update=function(i){this.Ht&&(!i||"addtrack"!==i.type&&"removetrack"!==i.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},s.setTrack=function(t){if(this.Ht!==t){if(this.zt||(this.zt=this.update.bind(this)),this.Ht){var i=this.t.remoteTextTrackEls().Y(this.Ht);i&&i.removeEventListener("load",this.zt),this.Ht=null}if(this.Ht=t,this.Ht){this.Ht.mode="hidden";var s=this.t.remoteTextTrackEls().Y(this.Ht);s&&s.addEventListener("load",this.zt)}}},s.findChaptersTrack=function(){for(var t=this.t.textTracks()||[],i=t.length-1;i>=0;i--){var s=t[i];if(s.kind===this.Lt)return s}},s.getMenuCaption=function(){return this.Ht&&this.Ht.label?this.Ht.label:this.localize(ye(this.Lt))},s.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.Ht)return t;var i=this.Ht.cues;if(!i)return t;for(var s=0,e=i.length;s<e;s++){var n=i[s],r=new qh(this.t,{track:this.Ht,cue:n});t.push(r)}return t},i}(zh);Wh.prototype.Lt="chapters",Wh.prototype.St="Chapters",i.registerComponent("ChaptersButton",Wh);var Gh=function(t){function i(i,s,e){var r;(r=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Descriptions Menu");var h=i.textTracks();if(h){var o=n(we(r),r.handleTracksChange);h.addEventListener("change",o),r.on("dispose",(function(){h.removeEventListener("change",o)}))}return r}xe(i,t);var s=i.prototype;return s.handleTracksChange=function(t){for(var i=this.player().textTracks(),s=!1,e=0,n=i.length;e<n;e++){var r=i[e];if(r.kind!==this.Lt&&"showing"===r.mode){s=!0;break}}s?this.disable():this.enable()},s.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},i}(zh);Gh.prototype.Lt="descriptions",Gh.prototype.St="Descriptions",i.registerComponent("DescriptionsButton",Gh);var Xh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Subtitles Menu"),n}return xe(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(zh);Xh.prototype.Lt="subtitles",Xh.prototype.St="Subtitles",i.registerComponent("SubtitlesButton",Xh);var Jh=function(t){function i(i,s){var e;return s.track={player:i,kind:s.kind,label:s.kind+" settings",selectable:!1,default:!1,mode:"disabled"},s.selectable=!1,(e=t.call(this,i,s)||this).addClass("vjs-texttrack-settings"),e.controlText(", opens "+s.kind+" settings dialog"),e}return xe(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").v.focus()},i}(Lh);i.registerComponent("CaptionSettingsMenuItem",Jh);var Qh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Captions Menu"),n}xe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(){var i=[];return this.player().H&&this.player().H.featuresNativeTextTracks||(i.push(new Jh(this.t,{kind:this.Lt})),this.Ot+=1),t.prototype.createItems.call(this,i)},i}(zh);Qh.prototype.Lt="captions",Qh.prototype.St="Captions",i.registerComponent("CaptionsButton",Qh);var Yh=function(t){function i(i,s){var e,r=s.track,h=i.audioTracks();if(s.label=r.label||r.language||"Unknown",s.selected=r.enabled,(e=t.call(this,i,s)||this).track=r,h){var o=n(we(e),e.handleTracksChange);h.addEventListener("change",o),e.on("dispose",(function(){h.removeEventListener("change",o)}))}return e}xe(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.t.audioTracks();if(t.prototype.handleClick.call(this,i),s)for(var e=0;e<s.length;e++){var n=s[e];n.enabled=n===this.track}},s.handleTracksChange=function(t){this.selected(this.track.enabled)},i}(Vh);i.registerComponent("AudioTrackMenuItem",Yh);var Kh=function(t){function i(i,s){var e;return void 0===s&&(s={}),s.tracks=i.audioTracks&&i.audioTracks(),(e=t.call(this,i,s)||this).v.setAttribute("aria-label","Audio Menu"),e}xe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(t){void 0===t&&(t=[]),this.Ot=1;var i=this.t.audioTracks&&this.t.audioTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];t.push(new Yh(this.t,{track:e,selectable:!0}))}return t},i}(Oh);Kh.prototype.St="Audio Track",i.registerComponent("AudioTrackButton",Kh);var Zh=function(t){function i(i,s){var e,n=s.rate,r=S(n,10);return s.label=n,s.selected=1===r,s.selectable=!0,(e=t.call(this,i,s)||this).label=n,e.rate=r,e.on(i,"ratechange",e.update),e}xe(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},s.update=function(t){this.selected(this.player().playbackRate()===this.rate)},i}(Vh);Zh.prototype.contentElType="button",i.registerComponent("PlaybackRateMenuItem",Zh);var to=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateVisibility(),e.updateLabel(),e.on(i,"loadstart",e.updateVisibility),e.on(i,"ratechange",e.updateLabel),e}xe(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Vt=us("div",{className:"vjs-playback-rate-value",innerHTML:1}),i.appendChild(this.Vt),i},s.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},s.createMenu=function(){var t=new Rh(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new Zh(this.player(),{rate:i[s]+"x"}));return t},s.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},s.handleClick=function(t){for(var i=this.player().playbackRate(),s=this.playbackRates(),e=s[0],n=0;n<s.length;n++)if(s[n]>i){e=s[n];break}this.player().playbackRate(e)},s.playbackRates=function(){return this.h.playbackRates||this.h.playerOptions&&this.h.playerOptions.playbackRates},s.playbackRateSupported=function(){return this.player().H&&this.player().H.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},s.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},s.updateLabel=function(t){this.playbackRateSupported()&&(this.Vt.innerHTML=this.player().playbackRate()+"x")},i}(Uh);to.prototype.St="Playback Rate",i.registerComponent("PlaybackRateMenuButton",to);var io=function(t){function i(){return t.apply(this,arguments)||this}xe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},i}(i);i.registerComponent("Spacer",io);var so=function(t){function i(){return t.apply(this,arguments)||this}xe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){var i=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return i.innerHTML=" ",i},i}(io);i.registerComponent("CustomControlSpacer",so);var eo=function(t){function i(){return t.apply(this,arguments)||this}return xe(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(i);eo.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},i.registerComponent("ControlBar",eo);var no=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}xe(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},s.content=function(){var t=this.player().error();return t?this.localize(t.message):""},i}(Ve);no.prototype.h=be(Ve.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),i.registerComponent("ErrorDisplay",no);var ro="vjs-text-track-settings",ho=["#000","Black"],oo=["#00F","Blue"],ao=["#0FF","Cyan"],uo=["#0F0","Green"],co=["#F0F","Magenta"],lo=["#F00","Red"],fo=["#FFF","White"],vo=["#FF0","Yellow"],po=["1","Opaque"],mo=["0.5","Semi-Transparent"],go=["0","Transparent"],yo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ho,fo,lo,uo,oo,vo,co,ao]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[po,mo,go]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[fo,ho,lo,uo,oo,vo,co,ao]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[po,mo]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[go,mo,po]}};function bo(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}yo.windowColor.options=yo.backgroundColor.options;var ko,wo=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=n(we(e),e.updateDisplay),void 0===s.persistTextTrackSettings&&(e.h.persistTextTrackSettings=e.h.playerOptions.persistTextTrackSettings),e.on(e.$(".vjs-done-button"),"click",(function(){e.saveSettings(),e.hide()})),e.on(e.$(".vjs-default-button"),"click",(function(){e.setDefaults(),e.updateDisplay()})),Xi(yo,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.h.persistTextTrackSettings&&e.restoreSettings(),e}xe(i,t);var s=i.prototype;return s.qt=function(t){var i=this,s=yo[t],e=s.id.replace("%s",this.o);return[us("label",{className:"vjs-label",textContent:s.label},{for:e}),us("select",{id:e},void 0,s.options.map((function(t){return us("option",{textContent:i.localize(t[1]),value:t[0]})})))]},s.Wt=function(){var t=us("legend",{textContent:this.localize("Text")}),i=this.qt("color"),s=us("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.qt("textOpacity"));return us("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Gt=function(){var t=us("legend",{textContent:this.localize("Background")}),i=this.qt("backgroundColor"),s=us("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.qt("backgroundOpacity"));return us("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=us("legend",{textContent:this.localize("Window")}),i=this.qt("windowColor"),s=us("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.qt("windowOpacity"));return us("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return us("div",{className:"vjs-tracksettings-colors"},void 0,[this.Wt(),this.Gt(),this.Xt()])},s.Qt=function(){var t=us("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.qt("fontPercent")),i=us("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.qt("edgeStyle")),s=us("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.qt("fontFamily"));return us("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Yt=function(){var t=us("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=us("button",{className:"vjs-done-button",textContent:"Done"});return us("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=us("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=us("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=us("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=us("div",void 0,{role:"document"},[i,s,t]);return us("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},s.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),Gi(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(yo,(function(i,s,e){var n=function(t,i){return bo(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i}),{})},s.setValues=function(t){var i=this;Xi(yo,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(bo(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},s.setDefaults=function(){var t=this;Xi(yo,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},s.restoreSettings=function(){var t;try{t=JSON.parse(g.localStorage.getItem(ro))}catch(t){Zi.warn(t)}t&&this.setValues(t)},s.saveSettings=function(){if(this.h.persistTextTrackSettings){var t=this.getValues();try{_.keys(t).length?g.localStorage.setItem(ro,JSON.stringify(t)):g.localStorage.removeItem(ro)}catch(t){Zi.warn(t)}}},s.updateDisplay=function(){var t=this.t.getChild("textTrackDisplay");t&&t.updateDisplay()},i}(i);i.registerComponent("TextTrackSettings",wo);var _o,xo=function(t){function i(i,s){var e;e=t.call(this,i,s)||this;var r=i.source,h=!1;if(r&&(e.v.currentSrc!==r.src||i.tag&&3===i.tag.Kt)?e.setSource(r):e.Zt(e.v),e.v.hasChildNodes()){for(var o=e.v.childNodes,a=o.length,u=[];a--;){var c=o[a];"track"===c.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().J(c),e.remoteTextTracks().tt(c.track),h||e.v.hasAttribute("crossorigin")||!Je(c.src)||(h=!0)):u.push(c))}for(var l=0;l<u.length;l++)e.v.removeChild(u[l])}return["audio","video"].forEach((function(t){var i=e.el()[t+"Tracks"],s=e[t+"Tracks"](),n=ye(t);e["featuresNative"+n+"Tracks"]&&i&&i.addEventListener&&(e["handle"+n+"ti"]=function(t){s.trigger({type:"change",target:s,currentTarget:s,srcElement:s})},e["handle"+n+"ii"]=function(t){return s.addTrack(t.track)},e["handle"+n+"si"]=function(t){return s.removeTrack(t.track)},i.addEventListener("change",e["handle"+n+"ti"]),i.addEventListener("addtrack",e["handle"+n+"ii"]),i.addEventListener("removetrack",e["handle"+n+"si"]),e["removeOld"+n+"ei"]=function(t){return e.ni(s,i)},e.on("loadstart",e["removeOld"+n+"ei"]))})),e.featuresNativeTextTracks&&(h&&Zi.warn(es(ko||(ko=Li(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."])))),e.ri=n(we(e),e.handleTextTrackChange),e.hi=n(we(e),e.handleTextTrackAdd),e.oi=n(we(e),e.handleTextTrackRemove),e.ai()),e.ci(),(te||Rs||qs)&&!0===i.nativeControlsForTouch&&e.setControls(!0),e.di(),e.triggerReady(),e}xe(i,t);var s=i.prototype;return s.dispose=function(){var s=this;["audio","video","text"].forEach((function(t){var i=ye(t),e=s.v[t+"Tracks"];e&&e.removeEventListener&&(e.removeEventListener("change",s["handle"+i+"ti"]),e.removeEventListener("addtrack",s["handle"+i+"ii"]),e.removeEventListener("removetrack",s["handle"+i+"si"])),e&&s.off("loadstart",s["removeOld"+i+"ei"])})),i.disposeMediaElement(this.v),t.prototype.dispose.call(this)},s.ci=function(){var t,i=this.textTracks(),s=function(){t=[];for(var s=0;s<i.length;s++){var e=i[s];"metadata"===e.kind&&t.push({track:e,storedMode:e.mode})}};s(),i.addEventListener("change",s);var e=function s(){for(var e=0;e<t.length;e++){var n=t[e];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}i.removeEventListener("change",s)};this.on("webkitbeginfullscreen",(function(){i.removeEventListener("change",s),i.removeEventListener("change",e),i.addEventListener("change",e)})),this.on("webkitendfullscreen",(function(){i.removeEventListener("change",s),i.addEventListener("change",s),i.removeEventListener("change",e)}))},s.createEl=function(){var t=this.h.tag;if(!t||!this.h.playerElIngest&&!this.movingMediaElementInDOM){if(t){var s=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(s,t),i.disposeMediaElement(t),t=s}else{t=Vi.createElement("video");var e=be({},this.h.tag&&_s(this.h.tag));te&&!0===this.h.nativeControlsForTouch||delete e.controls,ws(t,Ji(e,{id:this.h.techId,class:"vjs-tech"}))}t.playerId=this.h.playerId}void 0!==this.h.preload&&xs(t,"preload",this.h.preload);for(var n=["loop","muted","playsinline","autoplay"],r=n.length-1;r>=0;r--){var h=n[r],o=this.h[h];void 0!==o&&(o?xs(t,h,h):Cs(t,h),t[h]=o)}return t},s.Zt=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var i=!1,s=function(){i=!0};this.on("loadstart",s);var e=function(){i||this.trigger("loadstart")};return this.on("loadedmetadata",e),void this.ready((function(){this.off("loadstart",s),this.off("loadedmetadata",e),i||this.trigger("loadstart")}))}var n=["loadstart"];n.push("loadedmetadata"),t.readyState>=2&&n.push("loadeddata"),t.readyState>=3&&n.push("canplay"),t.readyState>=4&&n.push("canplaythrough"),this.ready((function(){n.forEach((function(t){this.trigger(t)}),this)}))}},s.ai=function(){var t=this.el().textTracks;if(t){for(var i=0;i<t.length;i++)this.textTracks().tt(t[i]);t.addEventListener&&(t.addEventListener("change",this.ri),t.addEventListener("addtrack",this.hi),t.addEventListener("removetrack",this.oi)),this.on("loadstart",this.fi)}},s.handleTextTrackChange=function(t){var i=this.textTracks();this.textTracks().trigger({type:"change",target:i,currentTarget:i,srcElement:i})},s.handleTextTrackAdd=function(t){this.textTracks().tt(t.track)},s.handleTextTrackRemove=function(t){this.textTracks().it(t.track)},s.ni=function(t,i){var s=[];if(i){for(var e=0;e<t.length;e++){for(var n=t[e],r=!1,h=0;h<i.length;h++)if(i[h]===n){r=!0;break}r||s.push(n)}for(var o=0;o<s.length;o++){var a=s[o];t.it(a)}}},s.fi=function(t){var i=this.textTracks(),s=this.el().textTracks;this.ni(i,s)},s.play=function(){var t=this.v.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))},s.setCurrentTime=function(t){try{this.v.currentTime=t}catch(t){Zi(t,"Video is not ready. (Video.js)")}},s.duration=function(){var t=this;if(this.v.duration===1/0&&Ls&&Xs&&0===this.v.currentTime){return this.on("timeupdate",(function i(){t.v.currentTime>0&&(t.v.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))})),NaN}return this.v.duration||NaN},s.width=function(){return this.v.offsetWidth},s.height=function(){return this.v.offsetHeight},s.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.v){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},s=function(){"webkitPresentationMode"in this.v&&"picture-in-picture"!==this.v.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",s),this.on("dispose",(function(){t.off("webkitbeginfullscreen",s),t.off("webkitendfullscreen",i)}))}},s.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var t=g.navigator&&g.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},s.enterFullScreen=function(){var t=this.v;t.paused&&t.networkState<=t.HAVE_METADATA?(this.v.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},s.exitFullScreen=function(){this.v.webkitExitFullScreen()},s.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},s.reset=function(){i.resetMediaElement(this.v)},s.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},s.setControls=function(t){this.v.controls=!!t},s.addTextTrack=function(i,s,e){return this.featuresNativeTextTracks?this.v.addTextTrack(i,s,e):t.prototype.addTextTrack.call(this,i,s,e)},s.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var s=Vi.createElement("track");return i.kind&&(s.kind=i.kind),i.label&&(s.label=i.label),(i.language||i.srclang)&&(s.srclang=i.language||i.srclang),i.default&&(s.default=i.default),i.id&&(s.id=i.id),i.src&&(s.src=i.src),s},s.addRemoteTextTrack=function(i,s){var e=t.prototype.addRemoteTextTrack.call(this,i,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},s.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)i!==s[e]&&i!==s[e].track||this.el().removeChild(s[e])},s.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),g.performance&&"function"==typeof g.performance.now?t.creationTime=g.performance.now():g.performance&&g.performance.timing&&"number"==typeof g.performance.timing.navigationStart&&(t.creationTime=g.Date.now()-g.performance.timing.navigationStart),t},i}(sh);hs()&&(xo.TEST_VID=Vi.createElement("video"),(_o=Vi.createElement("track")).kind="captions",_o.srclang="en",_o.label="English",xo.TEST_VID.appendChild(_o)),xo.isSupported=function(){try{xo.TEST_VID.volume=.5}catch(t){return!1}return!(!xo.TEST_VID||!xo.TEST_VID.canPlayType)},xo.canControlVolume=function(){try{var t=xo.TEST_VID.volume;return xo.TEST_VID.volume=t/2+.1,t!==xo.TEST_VID.volume}catch(t){return!1}},xo.canControlPlaybackRate=function(){if(Ls&&Xs&&Js<58)return!1;try{var t=xo.TEST_VID.playbackRate;return xo.TEST_VID.playbackRate=t/2+.1,t!==xo.TEST_VID.playbackRate}catch(t){return!1}},xo.supportsNativeTextTracks=function(){return Zs},xo.supportsNativeVideoTracks=function(){return!(!xo.TEST_VID||!xo.TEST_VID.videoTracks)},xo.supportsNativeAudioTracks=function(){return!(!xo.TEST_VID||!xo.TEST_VID.audioTracks)},xo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],xo.prototype.featuresVolumeControl=xo.canControlVolume(),xo.prototype.featuresPlaybackRate=xo.canControlPlaybackRate(),xo.prototype.movingMediaElementInDOM=!Os,xo.prototype.featuresFullscreenResize=!0,xo.prototype.featuresProgressEvents=!0,xo.prototype.featuresTimeupdateEvents=!0,xo.prototype.featuresNativeTextTracks=xo.supportsNativeTextTracks(),xo.prototype.featuresNativeVideoTracks=xo.supportsNativeVideoTracks(),xo.prototype.featuresNativeAudioTracks=xo.supportsNativeAudioTracks();var Co=xo.TEST_VID&&xo.TEST_VID.constructor.prototype.canPlayType,So=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,jo=/^video\/mp4/i;xo.patchCanPlayType=function(){Hs>=4&&!Ws?xo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&So.test(t)?"maybe":Co.call(this,t)}:zs&&(xo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&jo.test(t)?"maybe":Co.call(this,t)})},xo.unpatchCanPlayType=function(){var t=xo.TEST_VID.constructor.prototype.canPlayType;return xo.TEST_VID.constructor.prototype.canPlayType=Co,t},xo.patchCanPlayType(),xo.disposeMediaElement=function(t){if(t){var i=t.nodeName.toLowerCase();if("video"===i||"audio"===i){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}}},xo.resetMediaElement=function(t){if(t){for(var i=t.querySelectorAll("source"),s=i.length;s--;)t.removeChild(i[s]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){xo.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){xo.prototype["set"+ye(t)]=function(i){this.v[t]=i,i?this.v.setAttribute(t,t):this.v.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){xo.prototype[t]=function(){return this.v[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){xo.prototype["set"+ye(t)]=function(i){this.v[t]=i}})),["pause","load"].forEach((function(t){xo.prototype[t]=function(){return this.v[t]()}})),sh.withSourceHandlers(xo),xo.nativeSourceHandler={},xo.nativeSourceHandler.canPlayType=function(t){try{return xo.TEST_VID.canPlayType(t)}catch(t){return""}},xo.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return xo.nativeSourceHandler.canPlayType(t.type);if(t.src){var s=function(t){if("string"==typeof t){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(i)return i.pop().toLowerCase()}return""}(t.src);return xo.nativeSourceHandler.canPlayType("video/"+s)}return""},xo.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},xo.nativeSourceHandler.dispose=function(){},xo.registerSourceHandler(xo.nativeSourceHandler),i.registerComponent("Html5",xo),sh.registerTech("Html5",xo);var To=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],Mo=function(t){function s(i,e,n){var r;if(i.id=i.id||["vjs_video",zi()].join("_"),(e=Ji(s.getTagSettings(i),e)).initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof i.closest){var h=i.closest("[lang]");h&&(e.language=h.getAttribute("lang"))}else for(var o=i;o&&1===o.nodeType;){if(_s(o).hasOwnProperty("lang")){e.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=t.call(this,null,e,n)||this).h||!r.h.techOrder||!r.h.techOrder.length)throw new b("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=i,r.tagAttributes=i&&_s(i),r.language(r.h.language),e.languages){var a={};_.getOwnPropertyNames(e.languages).forEach((function(t){a[t.toLowerCase()]=e.languages[t]})),r.vi=a}else r.vi=s.prototype.h.languages;r.pi={},r.mi=e.poster||"",r.gi=!!e.controls,i.controls=!1,r.yi=!1,r.v=r.createEl();var u=be(r.h);if(e.plugins){var c=e.plugins;_.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):Zi.error("Unable to find plugin:",t)}),we(r))}r.h.playerOptions=u,r.initChildren(),r.isAudio("audio"===i.nodeName.toLowerCase()),r.controls()?r.addClass("vjs-controls-enabled"):r.addClass("vjs-controls-disabled"),r.v.setAttribute("role","region"),r.isAudio()?r.v.setAttribute("aria-label","audio player"):r.v.setAttribute("aria-label","video player"),r.isAudio()&&r.addClass("vjs-audio"),r.bi()&&r.addClass("vjs-no-flex"),Os||r.addClass("vjs-workinghover"),s.players[r.o]=we(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.ki(),r.on("fullscreenchange",r.wi),r.on("stageclick",r._i),r}xe(s,t);var e=s.prototype;return e.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.xi&&this.xi.parentNode&&this.xi.parentNode.removeChild(this.xi),s.players[this.o]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.v&&this.v.player&&(this.v.player=null),this.H&&this.H.dispose(),t.prototype.dispose.call(this)},e.createEl=function(){var i,s=this.tag,e=this.Ci=s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player");i=this.v=e?s.parentNode:t.prototype.createEl.call(this,"div"),s.setAttribute("tabindex","-1"),s.removeAttribute("width"),s.removeAttribute("height");var n=_s(s);if(_.getOwnPropertyNames(n).forEach((function(t){"class"===t?i.className+=" "+n[t]:i.setAttribute(t,n[t])})),s.playerId=s.id,s.id+="Si",s.className="vjs-tech",s.player=i.player=this,this.addClass("vjs-paused"),!0!==g.VIDEOJS_NO_DYNAMIC_STYLE){this.xi=me("vjs-styles-dimensions");var r=Ns(".vjs-styles-defaults"),h=Ns("head");h.insertBefore(this.xi,r?r.nextSibling:h.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var o=s.getElementsByTagName("a"),a=0;a<o.length;a++){var u=o.item(a);ys(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return s.Kt=s.networkState,s.parentNode&&!e&&s.parentNode.insertBefore(i,s),ls(s,i),this.m.unshift(s),this.v=i,i},e.width=function(t){return this.dimension("width",t)},e.height=function(t){return this.dimension("height",t)},e.dimension=function(t,i){var s="width"===t?"ji":"Ti";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=S(i);if(j(e))return Zi.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Mi(),this},e.fluid=function(t){if(void 0===t)return!!this.Ai;this.Ai=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Mi()},e.aspectRatio=function(t){if(void 0===t)return this.Pi;if(!/^\d+\:\d+$/.test(t))throw new b("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Pi=t,this.fluid(!0),this.Mi()},e.Mi=function(){if(!0!==g.VIDEOJS_NO_DYNAMIC_STYLE){var t,i,s,e=(void 0!==this.Pi&&"auto"!==this.Pi?this.Pi:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.ji?this.ji:void 0!==this.Ti?this.Ti/n:this.videoWidth()||300,i=void 0!==this.Ti?this.Ti:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),ge(this.xi,"\n ."+s+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*n+"%;\n }\n ")}else{var r="number"==typeof this.ji?this.ji:this.h.width,h="number"==typeof this.Ti?this.Ti:this.h.height,o=this.H&&this.H.el();o&&(r>=0&&(o.width=r),h>=0&&(o.height=h))}},e._t=function(t,s){var e=this;this.H&&this.Ei(),"Html5"!==t&&this.tag&&(sh.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Ni=t,this.j=!1;var r=Ji({source:s,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Ii",videoTracks:this.rt,textTracks:this.nt,audioTracks:this.ht,autoplay:this.h.autoplay,playsinline:this.h.playsinline,preload:this.h.preload,loop:this.h.loop,muted:this.h.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Ci||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(r.tag=this.tag),s&&(this.Bi=s.type,s.src===this.pi.src&&this.pi.currentTime>0&&(r.startTime=this.pi.currentTime),this.pi.sources=null,this.pi.source=s,this.pi.src=s.src);var h=sh.getTech(t);h||(h=i.getComponent(t)),this.H=new h(r),this.H.ready(n(this,this.Fi),!0),Ue(this.Di||[],this.H),To.forEach((function(t){e.on(e.H,t,e["handleTech"+ye(t)+"_"])})),this.on(this.H,"loadstart",this.$i),this.on(this.H,"waiting",this.Ri),this.on(this.H,"canplay",this.Ui),this.on(this.H,"canplaythrough",this.Oi),this.on(this.H,"playing",this.Vi),this.on(this.H,"ended",this.Li),this.on(this.H,"seeking",this.Hi),this.on(this.H,"seeked",this.zi),this.on(this.H,"play",this.qi),this.on(this.H,"firstplay",this.Wi),this.on(this.H,"pause",this.Gi),this.on(this.H,"durationchange",this.Xi),this.on(this.H,"fullscreenchange",this.Ji),this.on(this.H,"error",this.Qi),this.on(this.H,"loadedmetadata",this.Mi),this.on(this.H,"resize",this.Mi),this.on(this.H,"posterchange",this.Yi),this.on(this.H,"textdata",this.Ki),this.usingNativeControls(this.Zi("controls")),this.controls()&&!this.usingNativeControls()&&this.ts(),this.H.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||ls(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},e.Ei=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.Di=Re(this.H),this.j=!1,this.H.dispose(),this.H=!1},e.tech=function(t){if(t&&t.IWillNotUseThisInPlugins)return this.H;var i="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw g.alert(i),new b(i)},e.ts=function(){this.ss(),this.on(this.H,"mousedown",this.es),this.on(this.H,"touchstart",this.ns),this.on(this.H,"touchmove",this.rs),this.on(this.H,"touchend",this.hs),this.on(this.H,"tap",this.os)},e.ss=function(){this.off(this.H,"tap",this.os),this.off(this.H,"touchstart",this.ns),this.off(this.H,"touchmove",this.rs),this.off(this.H,"touchend",this.hs),this.off(this.H,"mousedown",this.es)},e.Fi=function(){if(this.triggerReady(),this.pi.volume&&this.us("setVolume",this.pi.volume),this.Yi(),this.Xi(),(this.src()||this.currentSrc())&&this.tag&&this.h.autoplay&&this.paused()){try{delete this.tag.poster}catch(t){Zi("deleting tag.poster throws in some browsers",t)}this.play()}},e.$i=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},e.hasStarted=function(t){return void 0!==t?(this.et!==t&&(this.et=t,t?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.et},e.qi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},e.Ri=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},e.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},e.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},e.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},e.Hi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},e.zi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},e.Wi=function(){this.h.starttime&&(Zi.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.h.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},e.Gi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},e.Li=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},e.Xi=function(){this.duration(this.Zi("duration"))},e.es=function(t){0===t.button&&this.controls()&&(void 0!==this.h&&void 0!==this.h.userActions&&void 0!==this.h.userActions.click&&!1===this.h.userActions.click||(void 0!==this.h&&void 0!==this.h.userActions&&"function"==typeof this.h.userActions.click?this.h.userActions.click.call(this,t):this.paused()?this.play():this.pause()))},e.os=function(){this.userActive(!this.userActive())},e.ns=function(){this.userWasActive=this.userActive()},e.rs=function(){this.userWasActive&&this.reportUserActivity()},e.hs=function(t){t.cancelable&&t.preventDefault()},e.wi=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},e._i=function(){this.reportUserActivity()},e.Ji=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},e.Qi=function(){var t=this.H.error();this.error(t)},e.Ki=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},e.getCache=function(){return this.pi},e.us=function(t,i){if(this.H&&!this.H.j)this.H.ready((function(){this[t](i)}),!0);else try{this.H&&this.H[t](i)}catch(t){throw Zi(t),t}},e.Zi=function(t){if(this.H&&this.H.j)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?Zi("Video.js: "+t+" method not defined for "+this.Ni+" playback technology.",i):"TypeError"===i.name?(Zi("Video.js: "+t+" unavailable on "+this.Ni+" playback technology element.",i),this.H.j=!1):Zi(i),i}},e.play=function(){return this.src()||this.currentSrc()?this.us("play"):this.H.one("loadstart",(function(){this.play()})),this},e.pause=function(){return this.us("pause"),this},e.paused=function(){return!1!==this.Zi("paused")},e.scrubbing=function(t){return void 0!==t?(this.yi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.yi},e.currentTime=function(t){return void 0!==t?(this.us("setCurrentTime",t),this):(this.pi.currentTime=this.Zi("currentTime")||0,this.pi.currentTime)},e.duration=function(t){return void 0===t?void 0!==this.pi.duration?this.pi.duration:NaN:((t=S(t))<0&&(t=1/0),t!==this.pi.duration&&(this.pi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},e.remainingTime=function(){return this.duration()-this.currentTime()},e.buffered=function(){var t=this.Zi("buffered");return t&&t.length||(t=je(0,0)),t},e.bufferedPercent=function(){return Te(this.buffered(),this.duration())},e.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},e.volume=function(t){var i;return void 0!==t?(i=x.max(0,x.min(1,S(t))),this.pi.volume=i,this.us("setVolume",i),this):(i=S(this.Zi("volume")),j(i)?1:i)},e.muted=function(t){return void 0!==t?(this.us("setMuted",t),this):this.Zi("muted")||!1},e.supportsFullScreen=function(){return this.Zi("supportsFullScreen")||!1},e.isFullscreen=function(t){return void 0!==t?(this.cs=!!t,this):!!this.cs},e.requestFullscreen=function(t){var i,s=Ne;return this.isFullscreen(!0),s.requestFullscreen?(ae(Vi,s.fullscreenchange,n(this,(function t(i){this.isFullscreen(Vi[s.fullscreenElement]),!1===this.isFullscreen()&&ue(Vi,s.fullscreenchange,t),this.trigger("fullscreenchange")}))),s.prefixed||(i=this.h.fullscreenOptions,void 0!==t&&(i=t)),this.v[s.requestFullscreen](i)):this.H.supportsFullScreen()?this.us("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},e.exitFullscreen=function(){var t=Ne;return this.isFullscreen(!1),t.requestFullscreen?Vi[t.exitFullscreen]():this.H.supportsFullScreen()?this.us("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},e.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=Vi.documentElement.style.overflow,ae(Vi,"keydown",n(this,this.fullWindowOnEscKey)),Vi.documentElement.style.overflow="hidden",ys(Vi.body,"vjs-full-window"),this.trigger("enterFullWindow")},e.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},e.exitFullWindow=function(){this.isFullWindow=!1,ue(Vi,"keydown",this.fullWindowOnEscKey),Vi.documentElement.style.overflow=this.docOrigOverflow,bs(Vi.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.canPlayType=function(t){for(var s,e=0,n=this.h.techOrder;e<n.length;e++){var r=ye(n[e]),h=sh.getTech(r);if(h||(h=i.getComponent(r)),h){if(h.isSupported()&&(s=h.canPlayType(t)))return s}else Zi.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},e.selectSource=function(t){var s,e=this,n=this.h.techOrder.map(ye).map((function(t){return[t,sh.getTech(t)||i.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(Zi.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),r=function(t,i,s){var e;return t.some((function(t){return i.some((function(i){if(e=s(t,i))return!0}))})),e},h=function(t,i){var s=t[0];if(t[1].canPlaySource(i,e.h[s.toLowerCase()]))return{source:i,tech:s}};return(this.h.sourceOrder?r(t,n,(s=h,function(t,i){return s(i,t)})):r(n,t,h))||!1},e.src=function(t){if(void 0===t)return this.Zi("src");var s=sh.getTech(this.Ni);return s||(s=i.getComponent(this.Ni)),Array.isArray(t)?this.ls(t):"string"==typeof t?this.src({src:t}):t instanceof _&&(t.type&&!s.canPlaySource(t,this.h[this.Ni.toLowerCase()])?this.ls([t]):(this.pi.sources=null,this.pi.source=t,this.pi.src=t.src,this.Bi=t.type||"",this.ready((function(){s.prototype.hasOwnProperty("setSource")?this.us("setSource",t):this.us("src",t.src),"auto"===this.h.preload&&this.load(),this.h.autoplay&&this.play()}),!0))),this},e.ls=function(t){var i=this.selectSource(t);i?(i.tech===this.Ni?this.src(i.source):this._t(i.tech,i.source),this.pi.sources=t):(this.setTimeout((function(){this.error({code:4,message:this.localize(this.h.notSupportedMessage)})}),0),this.triggerReady())},e.load=function(){return this.us("load"),this},e.reset=function(){return this._t(ye(this.h.techOrder[0]),null),this.us("reset"),this},e.currentSources=function(){var t=this.currentSource(),i=[];return 0!==_.keys(t).length&&i.push(t),this.pi.sources||i},e.currentSource=function(){var t={},i=this.currentSrc();return i&&(t.src=i),this.pi.source||t},e.currentSrc=function(){return this.Zi("currentSrc")||this.pi.src||""},e.currentType=function(){return this.Bi||""},e.preload=function(t){return void 0!==t?(this.us("setPreload",t),this.h.preload=t,this):this.Zi("preload")},e.autoplay=function(t){return void 0!==t?(this.us("setAutoplay",t),this.h.autoplay=t,this):this.Zi("autoplay",t)},e.playsinline=function(t){return void 0!==t?(this.us("setPlaysinline",t),this.h.playsinline=t,this):this.Zi("playsinline")},e.loop=function(t){return void 0!==t?(this.us("setLoop",t),this.h.loop=t,this):this.Zi("loop")},e.poster=function(t){return void 0===t?this.mi:(t||(t=""),this.mi=t,this.us("setPoster",t),this.trigger("posterchange"),this)},e.Yi=function(){!this.mi&&this.H&&this.H.poster&&(this.mi=this.H.poster()||"",this.trigger("posterchange"))},e.controls=function(t){return void 0!==t?(t=!!t,this.gi!==t&&(this.gi=t,this.usingNativeControls()&&this.us("setControls",t),t?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.ts()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.ss())),this):!!this.gi},e.usingNativeControls=function(t){return void 0!==t?(t=!!t,this.ds!==t&&(this.ds=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.ds},e.error=function(t){return void 0===t?this.lt||null:null===t?(this.lt=t,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close(),this):(this.lt=new Fe(t),this.addClass("vjs-error"),Zi.error("(CODE:"+this.lt.code+" "+Fe.errorTypes[this.lt.code]+")",this.lt.message,this.lt),this.trigger("error"),this)},e.reportUserActivity=function(t){this.fs=!0},e.userActive=function(t){return void 0!==t?((t=!!t)!==this.vs&&(this.vs=t,t?(this.fs=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.fs=!1,this.H&&this.H.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.vs},e.ki=function(){var t,i,s,e,r=n(this,this.reportUserActivity);this.on("mousedown",(function(){r(),this.clearInterval(t),t=this.setInterval(r,250)})),this.on("mousemove",(function(t){t.screenX===i&&t.screenY===s||(i=t.screenX,s=t.screenY,r())})),this.on("mouseup",(function(i){r(),this.clearInterval(t)})),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.fs){this.fs=!1,this.userActive(!0),this.clearTimeout(e);var t=this.h.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.fs||this.userActive(!1)}),t))}}),250)},e.playbackRate=function(t){return void 0!==t?(this.us("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.Zi("playbackRate"):1},e.isAudio=function(t){return void 0!==t?(this.ps=!!t,this):!!this.ps},e.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new Kr,this.rt)},e.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new th,this.ht)},e.textTracks=function(){if(this.H)return this.H.textTracks()},e.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},e.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},e.addTextTrack=function(t,i,s){if(this.H)return this.H.addTextTrack(t,i,s)},e.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},e.removeRemoteTextTrack=function(t){var i=(void 0===t?{}:t).track,s=void 0===i?arguments[0]:i;if(this.H)return this.H.removeRemoteTextTrack(s)},e.getVideoPlaybackQuality=function(){return this.Zi("getVideoPlaybackQuality")},e.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},e.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},e.language=function(t){return void 0===t?this.gs:(this.gs!==String(t).toLowerCase()&&(this.gs=String(t).toLowerCase(),void 0!==this.v&&this.trigger("languagechange")),this)},e.languages=function(){return be(s.prototype.h.languages,this.vi)},e.toJSON=function(){var t=be(this.h),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=be(e)).player=void 0,t.tracks[s]=e}return t},e.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new Ve(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},s.getTagSettings=function(t){var i={sources:[],tracks:[]},s=_s(t),e=s["data-setup"];if(gs(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=De(e||"{}"),r=n[0],h=n[1];r&&Zi.error(r),Ji(s,h)}if(Ji(i,s),t.hasChildNodes())for(var o=t.childNodes,a=0,u=o.length;a<u;a++){var c=o[a],l=c.nodeName.toLowerCase();"source"===l?i.sources.push(_s(c)):"track"===l&&i.tracks.push(_s(c))}return i},e.bi=function(){var t=Vi.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},s}(i);Mo.players={};var Ao=g.navigator;Mo.prototype.h={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:Ao&&(Ao.languages&&Ao.languages[0]||Ao.userLanguage||Ao.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreenOptions:{navigationUI:"hide"}},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Mo.prototype[t]=function(){return this.Zi(t)}})),To.forEach((function(t){Mo.prototype["handleTech"+ye(t)+"_"]=function(){return this.trigger(t)}})),i.registerComponent("Player",Mo);var Po,Eo,No=function(t){function i(s){var e;void 0===s&&(s={});var n=be(s,{kind:ze[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(Qs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return _.defineProperty(r,"enabled",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("enabledchange"))}}),n.enabled&&(r.enabled=n.enabled),r.W=!0,r||we(e)}return xe(i,t),i}(Ge),Io=function(t){function i(s){var e;void 0===s&&(s={});var n=be(s,{kind:He[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(Qs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return _.defineProperty(r,"selected",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("selectedchange"))}}),n.selected&&(r.selected=n.selected),r||we(e)}return xe(i,t),i}(Ge);function Bo(t,s,e){var n;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),Bo.getPlayers()[t])return s&&Zi.warn('Player "'+t+'" is already initialised. Options will not be applied.'),e&&Bo.getPlayers()[t].ready(e),Bo.getPlayers()[t];n=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),Vi.getElementById(t)}(t)}else n=t;if(!n||!n.nodeName)throw new k("The element or ID supplied is not valid. (videojs)");if(n.player||Mo.players[n.playerId])return n.player||Mo.players[n.playerId];s=s||{},Bo.hooks("beforesetup").forEach((function(t){var i=t(n,be(s));Qi(i)&&!Array.isArray(i)?s=be(s,i):Zi.error("please return an object in beforesetup hooks")}));var r=new(i.getComponent("Player"))(n,s,e);return Bo.hooks("setup").forEach((function(t){return t(r)})),r}"undefined"==typeof HTMLVideoElement&&hs()&&(Vi.createElement("video"),Vi.createElement("audio"),Vi.createElement("track")),Bo.ys={},Bo.hooks=function(t,i){return Bo.ys[t]=Bo.ys[t]||[],i&&(Bo.ys[t]=Bo.ys[t].concat(i)),Bo.ys[t]},Bo.hook=function(t,i){Bo.hooks(t,i)},Bo.removeHook=function(t,i){var s=Bo.hooks(t).indexOf(i);return!(s<=-1)&&(Bo.ys[t]=Bo.ys[t].slice(),Bo.ys[t].splice(s,1),!0)},!0!==g.VIDEOJS_NO_DYNAMIC_STYLE&&hs()&&((Po=Ns(".vjs-styles-defaults"))||(Po=me("vjs-styles-defaults"),(Eo=Ns("head"))&&Eo.insertBefore(Po,Eo.firstChild),ge(Po,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),pe(1,Bo),Bo.VERSION="5.20.6-opentelly.14",Bo.options=Mo.prototype.h,Bo.getPlayers=function(){return Mo.players},Bo.players=Mo.players,Bo.getComponent=i.getComponent,Bo.registerComponent=function(t,s){sh.isTech(s)&&Zi.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),i.registerComponent.call(i,t,s)},Bo.getTech=sh.getTech,Bo.registerTech=sh.registerTech,Bo.browser=se,Bo.TOUCH_ENABLED=te,Bo.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in Qi(i)?("function"==typeof i.init&&(Zi.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==_.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new k("Super expression must either be null or a function, not "+typeof i);t.prototype=_.create(i&&i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i&&(t.bs=i)}(s,t),e)e.hasOwnProperty(n)&&(s.prototype[n]=e[n]);return s},Bo.mergeOptions=be,Bo.bind=n,Bo.plugin=function(t,i){Mo.prototype[t]=i},Bo.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),Bo.options.languages=be(Bo.options.languages,((s={})[t]=i,s)),Bo.options.languages[t]},Bo.log=Zi,Bo.createTimeRange=Bo.createTimeRanges=je,Bo.formatTime=mh,Bo.parseUrl=Xe,Bo.isCrossOrigin=Je,Bo.EventTarget=ke,Bo.on=ae,Bo.one=le,Bo.off=ue,Bo.trigger=ce,Bo.xhr=Or,Bo.TextTrack=qr,Bo.AudioTrack=No,Bo.VideoTrack=Io,Bo.isEl=os,Bo.isTextNode=Ts,Bo.createEl=us,Bo.hasClass=gs,Bo.addClass=ys,Bo.removeClass=bs,Bo.toggleClass=ks,Bo.setAttributes=ws,Bo.getAttributes=_s,Bo.emptyEl=Ms,Bo.appendContent=As,Bo.insertContent=Ps,Bo.computedStyle=xh,f(),f();var Fo=10;function Do(t){const i=t.duration;if(j(i)){var s;const i=null==(s=t.source)?void 0:s.streamType;return"live"===i||"dvr"===i}return i===1/0}function $o(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Ro(t){const i=Vo(t);return Do(t)?i.end(i.length-1):i.start(0)}function Uo(t){return Vo(t).start(0)}function Oo(t){const i=Vo(t);return i.end(i.length-1)-i.start(0)}function Vo(t){const i=t.seekable;if(i&&i.length)return i;let s=t.duration;return s=isFinite(s)?s:0,new ti([0,s]).ks()}function Lo(t,i){void 0===i&&(i=t);let s=t<0?"-":"";t=x.abs(t);let e=x.floor(t%60),n=x.floor(t/60%60),r=x.floor(t/3600);const h=x.floor(i/60%60),o=x.floor(i/3600);return(j(t)||t===1/0)&&(r=n=e="-"),r=+r>0||o>0?r+":":"",n=((r||h>=10)&&+n<10?"0"+n:n)+":",e=+e<10?"0"+e:e,s+r+n+e}function Ho(t){return class extends t{get ws(){var t;return null!=(t=this._s)?t:this._s=zo(this.player())}dispose(){this._s=void 0,super.dispose()}constructor(...t){super(...t),this._s=void 0}}}function zo(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function qo(t){const i=zo(t),s=()=>{const s=$o(t);t.toggleClass("theo-at-live",function(t,i){if(Do(t)){let s=t.seekable;return 0===s.length||s.end(s.length-1)-i<Fo}return!1}(i,s)),t.toggleClass("vjs-live",Do(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===Ot(t.duration,t.seekable,null==(i=t.source)?void 0:i.streamType)}(i))};t.on("emptied",s),t.on("timeupdate",s),t.on("durationchange",s)}f(),f();var Wo="theo-ad-playing",Go="theo-dai-ad-playing";function Xo(t,i,s){t.toggleClass(Wo,i),t.toggleClass(Go,i&&s)}function Jo(){this.userActive(!1)}f(),xi(),f(),f();var Qo=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}},Yo=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],Ko=Bo.getTech("Tech"),Zo=Bo.getTech("Html5"),ta=class extends Ko{xs(){var t;for(const t of Yo)this.ws.addEventListener(t,this.Cs);this.ws.addEventListener("error",this.Ss),this.ws.addEventListener("contentprotectionerror",this.Ss),this.ws.addEventListener("sourcechange",this.js),this.ws.addEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.addEventListener(E.MODE_CHANGE,this.Ms),this.ws.textTracks.addEventListener("addtrack",this.As),this.ws.textTracks.addEventListener("removetrack",this.Ps),this.ws.textTracks.addEventListener("change",this.Es),this.ws.audioTracks.addEventListener("addtrack",this.Ns),this.ws.audioTracks.addEventListener("removetrack",this.Is),this.ws.audioTracks.addEventListener("change",this.Bs)}Fs(){var t;for(const t of Yo)this.ws.removeEventListener(t,this.Cs);this.ws.removeEventListener("error",this.Ss),this.ws.removeEventListener("contentprotectionerror",this.Ss),this.ws.removeEventListener("sourcechange",this.js),this.ws.removeEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.removeEventListener(E.MODE_CHANGE,this.Ms),this.ws.textTracks.removeEventListener("addtrack",this.As),this.ws.textTracks.removeEventListener("removetrack",this.Ps),this.ws.textTracks.removeEventListener("change",this.Es),this.ws.audioTracks.removeEventListener("addtrack",this.Ns),this.ws.audioTracks.removeEventListener("removetrack",this.Is),this.ws.audioTracks.removeEventListener("change",this.Bs)}Ds(t){this.trigger(new Qo(t,this))}createEl(){let t=this.h,i=t.player;if(!i)throw new b(this.localize('Missing required tech option "player"'));let s=i.element;return Bo.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.ws}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.ws.buffered}played(){return this.ws.played}reset(){this.ws.stop()}play(){this.ws.play()}pause(){this.ws.pause()}paused(){return this.ws.paused}currentTime(){return this.ws.currentTime}setCurrentTime(t){this.ws.currentTime=t}duration(){return this.ws.duration}volume(){return this.ws.volume}setVolume(t){this.ws.volume=t}muted(){return this.ws.muted}setMuted(t){this.ws.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.ws.src)return this.ws.src;if(this.ws.source){if(!ki(this.ws.source.ads))return this.ws.source.ads[0].sources;if(ni(this.ws.source))return"This source is managed by the Uplynk integration extension.";if(ii(this.ws.source))return"This source is managed by the DAI integration extension.";if(ei(this.ws.source))return"This source is managed by Millicast."}}}setSrc(t){return this.setSource({src:t})}setSource(t){this.lt=null,this.trigger("error")}currentSrc(){return this.ws.src}load(){this.setPreload("auto")}preload(){return this.ws.preload}setPreload(t){this.ws.preload=t}autoplay(){return this.ws.autoplay}setAutoplay(t){this.ws.autoplay=!!t}seeking(){return this.ws.seeking}seekable(){return this.ws.seekable}ended(){return this.ws.ended}playbackRate(){return this.ws.playbackRate}setPlaybackRate(t){this.ws.playbackRate=t}readyState(){return this.ws.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.ws.videoHeight}videoWidth(){return this.ws.videoWidth}supportsFullScreen(){return this.ws.presentation.supportsMode(ci.FULLSCREEN)}enterFullScreen(){this.ws.presentation.requestMode(ci.FULLSCREEN)}exitFullScreen(){this.ws.presentation.requestMode(ci.INLINE)}$s(){let t=this.ws.ads;if(t&&t.playing)return!0;let i=this.ws.vr;return!(!i||i.state===Wt.Rs)}initTextTrackListeners(){return this.on("touchend",(t=>{this.$s()&&(t.preventDefault=()=>{})})),super.initTextTrackListeners()}Zt(){if(!this.src())return;const t=this.readyState();if(0===t){let t=!1,i=()=>{t=!0};this.on("loadstart",i);let s=()=>{t||this.trigger("loadstart")};return this.on("loadedmetadata",s),void this.ready((()=>{this.off("loadstart",i),this.off("loadedmetadata",s),t||this.trigger("loadstart")}))}let i=["loadstart"];i.push("loadedmetadata"),t>=2&&i.push("loadeddata"),t>=3&&i.push("canplay"),t>=4&&i.push("canplaythrough"),this.ready((()=>{for(const t of i)this.trigger(t)}))}dispose(){this.Fs(),this.ws=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return Fi}constructor(t={},i){super(t,i),this.Cs=t=>this.Ds(t),this.Us=!1,this.js=()=>{void 0===this.ws.errorObject&&(this.Ds(new hi(this.ws.currentTime,this.ws.readyState)),this.Ds(new U),this.Ds(new ai(this.ws.duration)))},this.Ts=()=>{this.Ds(new Lt(this.ws.currentTime))},this.As=t=>{this.textTracks().tt(t.track)},this.Ns=t=>{this.audioTracks().tt(t.track)},this.Ps=t=>{this.textTracks().it(t.track)},this.Is=t=>{this.audioTracks().it(t.track)},this.Es=()=>{let t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Bs=()=>{let t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Ms=()=>{if(!this.supportsFullScreen())return;let t=this.Us,i=this.ws.presentation.currentMode===ci.FULLSCREEN;t!==i&&(this.Us=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ss=()=>{const t=this.ws.errorObject,i=t&&Ct(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.ws=this.h.player,this.xs();const s=!this.paused();s&&this.pause(),t.preload&&this.setPreload(t.preload),t.autoplay&&this.setAutoplay(t.autoplay),t.muted&&this.setMuted(t.muted),t.source?this.setSrc(t.source):this.Zt(),s&&this.ready((()=>this.play())),this.triggerReady()}};ta.prototype.featuresFullscreenResize=Zo.prototype.featuresFullscreenResize,ta.prototype.featuresPlaybackRate=Zo.prototype.featuresPlaybackRate,ta.prototype.featuresProgressEvents=!0,ta.prototype.featuresTimeupdateEvents=!0,ta.prototype.featuresNativeTextTracks=!0,Bo.registerTech("THEOplayer",ta),f(),f(),f(),f();var ia=class{constructor(t){this.Os=t=>{ui(this.Vs,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.Ls=t=>{li(this.Vs,"theo-mobile-button-hover")},this.Hs=t=>{this.Vs.blur()},this.Vs=t,t.addEventListener("touchstart",this.Os),t.addEventListener("touchend",this.Ls),t.addEventListener("focusin",this.Hs)}};f(),f(),f(),f();var sa=Bo.getComponent("Menu"),ea=class extends(Ho(sa)){get zs(){return this.player().el()}qs(){ui(this.zs,"theo-menu-opened")}Ws(){li(this.zs,"theo-menu-opened")}constructor(t,i){super(t,i)}};f(),xi();var na=Bo.getComponent("MenuItem"),ra=class extends(Ho(na)){get parentMenu(){return this.Gs}buildCSSClass(){return"theo-menu-item vjs-menu-item"}createEl(){let t=super.createEl("li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){this.Xs||(this.parentMenu.Js(this),"tap"!==t.type&&"keydown"!==t.type||(this.Xs=!0,this.trigger("click"),this.Xs=!1))}dispose(){wi.Ys.Qs&&(this.el().removeEventListener("touchstart",this.Os),this.el().removeEventListener("touchend",this.Ls)),super.dispose()}constructor(t,i,s){super(t,N({selectable:!0},i)),this.Xs=!1,this.Os=t=>{ui(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.Ls=t=>{li(this.el(),"theo-mobile-menu-item-hover")},this.Gs=s,wi.Ys.Qs&&(this.el().addEventListener("touchstart",this.Os),this.el().addEventListener("touchend",this.Ls))}};f();var ha=Bo.getComponent("ClickableComponent"),oa=class extends ha{get parentMenu(){return this.Gs}get Ks(){return this.Zs}set Ks(t){this.Zs=t,this.el().setAttribute("tabindex",this.Ks?"0":"-1"),this.te()}buildCSSClass(){return"theo-primary-background theo-menu-header"}createEl(){let t=super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){!this.Xs&&this.Ks&&(this.Gs.ie(),"tap"===t.type&&(this.Xs=!0,this.trigger("click"),this.Xs=!1))}te(){this.Ks?this.el().setAttribute("aria-label",this.localize("Go back to the previous menu")):this.el().setAttribute("aria-label","")}constructor(t,i,s){super(t,i),this.Xs=!1,this.Zs=!1,this.Gs=s,this.on(t,"languagechange",this.te)}};xi();var aa=class extends ea{get menuHeader(){return this.se}get menuItems(){return this.children()}addMenuItem(t){t=N({playerOptions:this.h.playerOptions},t);let i=new ra(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=N({playerOptions:this.h.playerOptions},t);let i=this.ee(this.player(),t);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}removeMenuItem(t){this.removeChild(t),this.trigger("menuchange")}buildCSSClass(){return"theo-menu vjs-menu"}qs(){super.qs(),s.removeEventListener("resize",this.ne),s.addEventListener("resize",this.ne),this.show()}re(){let t=this.he();if(!t)return;let i=t.getClientRects();wi.Ys.Qs?this.oe(t,i):this.ae(t,i)}he(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ae(t,i){}oe(t,i){}Ws(){s.removeEventListener("resize",this.ne),super.Ws(),this.hide(),wi.Ys.Qs&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=this.contentEl();ui(i,"theo-menu-content");let s=new oa(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.se=s,t}Js(t){}show(){return this.re(),super.show()}dispose(){this.se&&this.se.dispose(),super.dispose()}constructor(t,i){super(t,i),this.ne=()=>this.re(),this.ue=this.player().el(),this.hide(),this.on("menuchange",this.re)}},ua=class extends aa{get ce(){return this.le}set ce(t){this.le&&this.le.de(this),this.le=t,t&&t.fe(this)}ve(t){this.ce.pe(t,"replace")}me(t){t.ce.pe(this,"restore")}ge(){li(this.ye,"vjs-hidden"),this.ye.style.opacity="1",super.show()}be(){ui(this.ye,"vjs-hidden")}qs(){this.ce&&this.ce.qs(),super.qs()}Ws(){this.ce&&this.ce.Ws(),super.Ws(),ui(this.ye,"vjs-hidden")}he(){if(this.ce&&this.ce.ke)return this.ce.ke.ye}ae(t,i){if(i.length>0){let t=i[0].height,s=i[0].width;this.le.we.style.height=t+"px",this.le.we.style.width=s+"px"}super.ae(t,i)}constructor(t,i){super(t,i)}};f(),xi();var ca=class{get we(){return this.Vs}get ke(){return this._e}fe(t){t.be(),this.Vs.appendChild(t.ye)}de(t){this.Vs.removeChild(t.ye)}pe(t,i){if(t==this._e)return;let s=this._e;if(this._e=t,this._e.ge(),this.ke.focus(),wi.Ys.Qs)s.be();else{const t="translateX(100%)",e="translateX(-100%)",n=Mi("transform");s.ye.style.opacity="0",s.ye.style[n]="replace"===i?e:t,this._e.ye.style.opacity="1",this._e.ye.style[n]="",u((()=>{s.be(),s.ye.style[n]=""}),300)}}qs(){this.xe(),this._e.ge(),this.Ce()}Ws(){this.xe(),this._e.be(),this.Se.be(),this._e=this.Se,this.Ce()}Ce(){_i((()=>{li(this.Vs,"theo-no-transition"),li(this._e.ye,"theo-no-transition")}))}xe(){ui(this.Vs,"theo-no-transition"),ui(this._e.ye,"theo-no-transition")}constructor(t){this.Se=this._e=t,this.Vs=h.createElement("div"),this.Vs.className="theo-tertiary-background theo-menu-animation-container",this.Vs.appendChild(this.Se.ye),this.ue=this._e.player().el()}};f(),f();var la=class extends ua{get ye(){return this.el()}get parentMenu(){return this.je}ee(t,i){let s=new da(t,i,this);return s.subMenu.ce=this.ce,s}ie(){this.Te()}Js(t){super.Js(t),this.Te()}Te(){this.parentMenu.me(this)}buildCSSClass(){return"theo-submenu "+(this.Me?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Me=!0;let i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Me=!1,this.je=s,this.menuHeader.Ks=!0}},da=class extends ra{get subMenu(){return this.Ae}handleClick(t){this.parentMenu.ve(this.subMenu)}constructor(t,i,s){super(t,N({selectable:!1},i),s),this.Ae=new la(t,i,s)}},fa=class extends ua{get menuButton(){return this.Pe}createEl(){let t=Bo.createEl("div",{className:this.buildCSSClass()});return this.Ee=super.createEl(),this.Ee.className=super.buildCSSClass(),ui(this.Ee,"theo-menu-content-animatable"),t.appendChild(this.Ee),this.ce=new ca(this),t.appendChild(this.ce.we),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}ee(t,i){let s=new da(t,i,this);return s.subMenu.ce=this.ce,s}ae(t,i){super.ae(t,i);let s=this.ue.getClientRects(),e=s.length>0?s[0]:void 0,n=S(getComputedStyle(this.el()).fontSize);it(this.el(),this.Pe.el(),e,n)}get ye(){return this.Ee}ie(){this.Pe.closeMenu()}dispose(){this.Ne||(this.Ne=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ne=!1,this.Pe=s}};xi(),f();var va=class{set Ie(t){this.Be.innerHTML=this.Fe.localize(t),this.De(),this.$e(),gi(this.Fe.el())}get Ie(){return this.Be.textContent||""}Re(){this.Fe.off("mouseover",this.$e),this.Fe.off("mouseout",this.De),this.Fe.off("dispose",this.Ue),si(this.Be)}constructor(t,i){this.$e=()=>{li(this.Be,"vjs-hidden");let t=this.Fe.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=S(getComputedStyle(this.Be).fontSize);it(this.Be,this.Fe.el(),i,s)},this.De=()=>{ui(this.Be,"vjs-hidden")},this.Ue=()=>this.Re(),this.Fe=t,gi(t.el()),bi(t.el()),this.Be=h.createElement("span"),this.Be.innerHTML=this.Fe.localize(i),this.Be.className="theo-button-tooltip vjs-hidden",this.Be.setAttribute("aria-hidden","true"),this.Fe.el().appendChild(this.Be),this.Fe.on("mouseover",this.$e),this.Fe.on("mouseout",this.De),this.Fe.on("dispose",this.Ue)}},pa=Bo.getComponent("Button"),ma=class extends(Ho(pa)){get Oe(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.Ve}isMenuOpen(){return this.Le}openMenu(){this.He&&!this.Le&&(this.Ve.qs(),this.el().setAttribute("aria-expanded","true"),this.Le=!0,this.Ve.focus())}closeMenu(){this.He&&this.Le&&(this.Ve.Ws(),this.el().setAttribute("aria-expanded","false"),this.Le=!1)}set minimumMenuItems(t){this.ze=t,this.qe()}buildCSSClass(){return"theo-controlbar-button vjs-menu-button vjs-menu-button-popup "+super.buildCSSClass()}createEl(t,i,s){return super.createEl("button",{},{"aria-live":"off"})}handleClick(){this.Le?this.closeMenu():this.openMenu()}enable(){return this.He=!0,super.enable()}disable(){return this.closeMenu(),this.He=!1,super.disable()}te(){this.Be.Ie=this.controlText()}dispose(){this.player().removeChild(this.Ve),this.Ve.dispose(),this.Be.Re(),this.ws.removeEventListener("seeking",this.We),super.dispose()}constructor(t,i){super(t,i),this.Le=!1,this.ze=1,this.He=!0,this.Ge=t=>{let i=this.el().contains(t.target),s=this.Ve.el().contains(t.target),e=!1;var n;wi.Ys.Qs&&this.Oe&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.Le||(e&&t.preventDefault(),this.closeMenu())},this.Xe=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.We=()=>{this.Le&&this.closeMenu()},this.qe=()=>{this.Ve.menuItems.length>=this.ze?this.show():(this.closeMenu(),this.hide())},this.Ve=new fa(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.Ve),this.Be=new va(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),wi.Ys.Je?(this.on(h,"touchend",this.Ge),new ia(this.el())):(this.on(h,"click",this.Ge),this.on(h,"keydown",this.Xe),Bi&&this.on(h,Bi.Qe,this.closeMenu)),this.ws.addEventListener("seeking",this.We),this.on(this.Ve,"menuchange",this.qe),this.on(t,"languagechange",this.te),this.qe()}},ga=Bo.getComponent("Component"),ya=class extends(Bo.getComponent("ControlBar")){addMenuButton(t){t=N({playerOptions:this.h.playerOptions},t);let i=new ma(this.player(),t);return this.addChild(i),i}removeMenuButton(t){this.removeChild(t)}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-secondary-color vjs-control-bar "+super.buildCSSClass()}constructor(t,i){super(t,i),this.addChild("THEOControlBarShadow",void 0,0)}};Bo.registerComponent("THEOControlBarShadow",class extends ga{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}}),f(),f();var ba=Bo.getComponent("VolumeBar"),ka=class extends ba{handleFocus(t){super.handleFocus(t),this.Ye.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.Ye.removeClass("focus-within")}constructor(t,i){super(t,i),this.Ye=i.Ke}};f();var wa=Bo.getComponent("VolumeControl"),_a=class extends wa{constructor(t,i){super(t,i),this.Ze=new ka(t,{Ke:this}),this.addChild(this.Ze)}};_a.prototype.h=N({},wa.prototype.h,{children:[]}),Bo.registerComponent("VolumeControl",_a);var xa=class extends(Ho(ya)){tn(){this.sn(this.nn())}rn(){0===this.hn&&(this.hn=u(this.an,100))}un(t){"opacity"===t.propertyName&&(0!==this.hn&&(c(this.hn),this.hn=0),this.sn(!0))}cn(t){"opacity"===t.propertyName&&(this.nn()||this.sn(!1))}nn(){return"0"!==s.getComputedStyle(this.el()).opacity}sn(t){this.ln!==t&&(this.ln=t,t?this.dn():this.ws.textTrackStyle.marginBottom=void 0)}dn(){const t=this.el().getBoundingClientRect().height;this.ws.textTrackStyle.marginBottom!==t&&(this.ws.textTrackStyle.marginBottom=t)}dispose(){c(this.hn),this.hn=0,this.vn.fn(Ci.pn,this.mn),this.vn.gn(),super.dispose()}constructor(t,i){super(t,i),this.ln=!1,this.hn=0,this.an=()=>{0!==this.hn&&(this.hn=0,this.sn(this.nn()))},this.mn=()=>{this.ln&&this.dn()},this.on(t,"ready",this.tn),this.on(t,"pause",this.tn),this.on(t,"useractive",this.tn),this.on(t,"firstplay",this.rn),this.on(t,"play",this.rn),this.on(t,"userinactive",this.rn),this.on("transitionstart",this.un),this.on("transitionend",this.cn),this.vn=new Pi(this.el()),this.vn.yn(Ci.pn,this.mn),this.vn.bn(!0)}};xa.prototype.h=N({},ya.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),Bo.registerComponent("ControlBar",xa),f();var Ca=class extends ya{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};Ca.prototype.h=N({},ya.prototype.h,{children:[]}),Bo.registerComponent("TopControlBar",Ca),f();var Sa=Bo.getComponent("CurrentTimeDisplay"),ja=class extends(Ho(Sa)){updateContent(){const t=$o(this.player()),i=this.ws,s=Uo(i),e=this.localize("Current Time"),n=Lo(x.max(0,t-s),Oo(i));n!==this.Mt&&(this.Mt=n,this.contentEl().innerHTML='<span class="vjs-control-text">'+e+"</span> "+n)}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}};Bo.registerComponent("CurrentTimeDisplay",ja),f();var Ta=Bo.getComponent("DurationDisplay"),Ma=class extends(Ho(Ta)){updateContent(){const t=this.ws,i=j(t.duration)?NaN:Oo(t),s=t.clip.endTime-t.clip.startTime,e=x.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=Lo(e);this.S.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}dispose(){var t;null==(t=this.ws)||t.clip.removeEventListener("change",this.kn),super.dispose()}constructor(t,i){var s;super(t,i),this.kn=()=>this.updateContent(),this.off(t,"durationchange",this.updateContent),this.on(t,"durationchange",this.updateContent),this.off(t,"timeupdate",this.updateContent),this.on(t,"timeupdate",this.updateContent),this.off(t,"emptied",this.updateContent),this.on(t,"emptied",this.updateContent),null==(s=this.ws)||s.clip.addEventListener("change",this.kn)}};Bo.registerComponent("DurationDisplay",Ma),f(),xi();var Aa=Bo.getComponent("Button"),Pa=class extends(Ho(Aa)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){let t=super.createEl("button",{},{"aria-live":"off"});return this.wn=Bo.createEl("span",{className:"theo-live-control-indicator"}),ri(t,this.wn),t}createControlTextEl(t){let i=super.createControlTextEl(t);return Bo.removeClass(i,"vjs-control-text"),Bo.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.ws;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Ro(i)),t.play()}}_n(){Do(this.ws)?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this._n(),this.on(t,"emptied",this._n),this.on(t,"durationchange",this._n),wi.Ys.Je&&new ia(this.el())}};Bo.registerComponent("LiveDisplay",Pa),f();var Ea=Bo.getComponent("LoadingSpinner");Bo.registerComponent("LoadingSpinner",class extends Ea{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=Bo.createEl("div",{className:"theo-loading-spinner-rotator"}),s=Bo.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=Bo.createEl("div",{className:"theo-loading-spinner-circle-right"});return i.appendChild(s),i.appendChild(e),t.appendChild(i),t}constructor(t,i){super(t,i)}}),f();var Na=Bo.getComponent("LoadProgressBar"),Ia=class extends(Ho(Na)){update(){let t=this.ws,i=ti.xn(Vo(t)),s=i.Cn(0),e=ti.xn(t.buffered).Sn(i),n=i.jn(0)-s,r=e.V&&e.jn(e.V-1)||0;r=x.max(0,r-s);let o=this.el(),a=this.Tn;o.style.width=Ba(r,n);for(let t=0;t<e.V;t++){let i=e.Cn(t),n=e.jn(t),u=a[t];u||(u=h.createElement("div"),a.push(u),o.appendChild(u)),u.style.left=Ba(i-s,r),u.style.width=Ba(n-i,r)}for(let t=a.length;t>e.V;t--)o.removeChild(a[t-1]);a.length=e.V}constructor(t,i){super(t,i),this.Tn=[],this.on(t,"emptied",this.update)}};function Ba(t,i){let s=t/i||0;return 100*(s>=1?1:s)+"%"}Bo.registerComponent("LoadProgressBar",Ia),f(),Vt(),Ai();var Fa=Bo.getComponent("MouseTimeDisplay"),Da=class extends(Ho(Fa)){handleMouseMove(t){let i=t,s=this.ws,e=Uo(s)+this.calculateDistance(i)*Oo(s),n=i.pageX-Z(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){let i=t,s=this.ws,e=Uo(s)+this.calculateDistance(i)*Oo(s),n=i.touches[0].pageX-Z(this.el().parentNode).left;this.update(e,n+"px")}createEl(){let t=super.createEl();return this.Mn=Bo.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.An=t;let s=this.Pn(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(ot(this.Mn,s),this.En())}En(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){let t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=S(getComputedStyle(t).fontSize);it(this.tooltip,this.el(),s,e)}}Pn(t){const i=this.ws,s=t-Ro(i);return Lo(Do(i)?x.min(s,0):s,Oo(i))}dispose(){var t;this.ws.removeEventListener("dimensionchange",this.Nn),null==(t=this.ws.presentation)||t.removeEventListener(E.MODE_CHANGE,this.Nn),super.dispose()}constructor(t,i){var s;(super(t,i),this.An=NaN,this.Nn=()=>{let t=$o(this.player());const i=this.ws;let s=(t-Uo(i))/Oo(i)||0;s=Ei(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(Bo.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.Mn)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),Rt.Qs)&&(this.on(t,"firstplay",this.Nn),this.on(t,"play",this.Nn),this.on(t,"seeking",this.Nn),this.on(t,"seeked",this.Nn),this.on(t,"timeupdate",this.Nn),this.ws.addEventListener("dimensionchange",this.Nn),null==(s=this.ws.presentation)||s.addEventListener(E.MODE_CHANGE,this.Nn),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",Ti((t=>this.handleTouchMove(t)),25)),this.Nn()})))}};Bo.registerComponent("MouseTimeDisplay",Da),f();var $a=Bo.getComponent("PlayProgressBar"),Ra=class extends(Ho($a)){updateDataAttr(){let t=$o(this.player());this.el().setAttribute("data-current-time",this.Pn(t))}Pn(t){let i=this.ws;return Lo(t-Ro(i),Oo(i))}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-play-progress vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}};Bo.registerComponent("PlayProgressBar",Ra),f();var Ua=Bo.getComponent("RemainingTimeDisplay"),Oa=class extends(Ho(Ua)){updateContent(){const t=this.ws,i=Oo(t);if(i){const s=Vo(t).end(0),e=this.localize("Remaining Time"),n=Lo(x.max(0,s-this.player().currentTime()),i);n!==this.Mt&&(this.Mt=n,this.contentEl().innerHTML='<span class="vjs-control-text">'+e+"</span> -"+n)}}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}};Bo.registerComponent("RemainingTimeDisplay",Oa),f(),f();var Va=class{get ws(){return this._s||(this._s=this.In.tech({IWillNotUseThisInPlugins:!0}).theoplayer()),this._s}Bn(t){if(t.kind!==Et.Fn)return;if(0===this.ws.seekable.length)return;this.Dn=t;const i=t.cues.slice();this.Rn.$n(i);for(let t=0;t<i.length;t++){let s=i[t],e=i[t+1],n=!e||s.endTime!==e.startTime,r=new La(s,this.ws,n);this.Un.push(r),this.On.appendChild(r.we)}t.addEventListener("cuechange",this.Vn),this.Vn()}Ln(){this.ws.addEventListener("loadedmetadata",this.Hn),this.ws.addEventListener("loadeddata",this.Hn),this.ws.addEventListener("sourcechange",this.Hn),this.ws.textTracks.addEventListener("addtrack",this.zn),this.ws.textTracks.addEventListener("removetrack",this.qn),this.ws.textTracks.addEventListener("change",this.Hn)}Wn(){this.ws.removeEventListener("loadedmetadata",this.Hn),this.ws.removeEventListener("loadeddata",this.Hn),this.ws.removeEventListener("sourcechange",this.Hn),this.ws.textTracks.removeEventListener("addtrack",this.zn),this.ws.textTracks.removeEventListener("removetrack",this.qn),this.ws.textTracks.removeEventListener("change",this.Hn)}Gn(){if(!(this.ws.readyState<Ut.Xn))for(let t of this.ws.textTracks)if(t.kind===Et.Fn&&t.mode===M.Jn&&t.cues.length>0&&t.readyState!==jt.ERROR)return t}Qn(t){this.Rn.Yn(t)}Kn(){this.Rn.ge()}Zn(){this.Rn.be()}tr(){for(let t of this.Un)t.Re();this.Rn.tr(),this.Un=[],this.ir=void 0,this.Dn&&this.Dn.removeEventListener("cuechange",this.Vn),this.Dn=void 0}Re(){this.Wn(),this.sr.removeEventListener("mousemove",this.er),this.sr.removeEventListener("mouseenter",this.nr),this.sr.removeEventListener("mouseleave",this.rr),this.tr(),this.Rn.Re(),this._s=void 0}constructor(t,i){this.In=i,this.Un=[],this._s=void 0,this.zn=t=>{let i=t.track;i.kind===Et.Fn&&(i.addEventListener("addcue",this.Hn),i.addEventListener("removecue",this.Hn),i.addEventListener("readystatechange",this.Hn)),this.Hn()},this.qn=t=>{let i=t.track;i.kind===Et.Fn&&(i.removeEventListener("addcue",this.Hn),i.removeEventListener("removecue",this.Hn),i.removeEventListener("readystatechange",this.Hn)),this.Hn()},this.er=t=>{let i=this.ws,s=function(t,i){let s,e,n=Z(t),r=t.offsetWidth,h=t.offsetHeight,o=n.top,a=n.left;!function(t){return void 0!==t.changedTouches}(i)?(e=i.pageX,s=i.pageY):(e=i.changedTouches[0].pageX,s=i.changedTouches[0].pageY);let u=Ei((o-s+h)/h,0,1),c=Ei((e-a)/r,0,1);return{x:c,y:u}}(this.On,t),e=Uo(i)+s.x*Oo(i);e===i.duration&&(e-=.1),this.Qn(e)},this.rr=()=>{this.Rn.be()},this.nr=()=>{this.Rn.ge()},this.Hn=()=>{let t=this.Gn();t!==this.Dn&&(this.tr(),t&&this.Bn(t))},this.Vn=()=>{var t,i,s;const e=null==(i=this.Dn)||null==(t=i.activeCues)?void 0:t[0],n=z(this.Un,(t=>t.hr===e));n!==this.ir&&(null==(s=this.ir)||s.ar(),this.ir=n,null==n||n.ur())},this.sr=t,this.Rn=new Ha,this.In.contentEl().appendChild(this.Rn.we),this.On=h.createElement("div"),ui(this.On,"theoplayer-chapterbar"),this.sr.appendChild(this.On),this.sr.addEventListener("mousemove",this.er),this.sr.addEventListener("mouseenter",this.nr),this.sr.addEventListener("mouseleave",this.rr),this.Ln()}},La=class{get we(){return this.Vs}ur(){ui(this.Vs,"theoplayer-chapter-indicator-active")}ar(){li(this.Vs,"theoplayer-chapter-indicator-active")}cr(t,i){let s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1)-s,n=this.hr.startTime,r=this.hr.endTime-n,o=h.createElement("div");ui(o,"theoplayer-chapter-indicator");let a=h.createElement("div");ui(a,"theoplayer-chapter-indicator-highlight"),o.appendChild(a),i&&ui(o,"theoplayer-chapter-indicator-discontinuous");let u=x.min(n/e*100,100),c=100-u,l=x.min(r/e*100,c);return o.style.width=l+"%",o.style.left=u+"%",o}Re(){si(this.Vs)}constructor(t,i,s){this.hr=t,this.Vs=this.cr(i,s)}},Ha=class{be(){this.lr--,0===this.lr&&li(this.we,"theoplayer-chapter-hovering")}$n(t){this.dr=t||[],this.dr.length>0&&(this.we.style.display="")}pr(t){ot(this.mr,t.content)}tr(){this.dr=[],ot(this.mr,""),this.we.style.display="none"}ge(){this.lr++,this.lr>0&&ui(this.we,"theoplayer-chapter-hovering")}Yn(t){for(let i of this.dr)if(za(i,t)){this.pr(i);break}}Re(){si(this.we)}constructor(){this.dr=[],this.lr=0,this.we=h.createElement("div"),ui(this.we,"theoplayer-chaptertitle"),this.we.style.display="none",this.mr=h.createElement("p"),this.we.appendChild(this.mr)}};function za(t,i){return new ti([t.startTime,t.endTime]).gr(i)}var qa=Bo.getComponent("SeekBar"),Wa=class extends(Ho(qa)){updateAriaAttributes(t){const i=$o(this.player()),s=this.ws;t.setAttribute("aria-valuenow",(100*this.yr(i)).toFixed(2)),t.setAttribute("aria-valuetext",Lo(i-Ro(s),Oo(s)))}getPercent(){return this.yr(this.player().currentTime())}handleMouseMove(t){if(this.ws&&this.ws.ads&&this.ws.ads.playing)return;const i=this.ws;let s=Uo(i)+this.calculateDistance(t)*Oo(i);s>=i.duration&&(s=i.duration-.1),this.On.Qn(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.On.Kn(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.On.Zn(),super.handleMouseUp(t)}yr(t){let i=this.ws,s=(t-Uo(i))/Oo(i);return Ei(s,0,1)}dispose(){this.On.Re(),Q(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.On=new Va(this.el(),t)}};Bo.registerComponent("SeekBar",Wa),f(),xi();var Ga=Bo.getComponent("ProgressControl");wi.Ys.Qs&&Bo.registerComponent("ProgressControl",class extends Ga{createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(t){this.seekBar.handleMouseMove(t)}handleMouseDown(t){this.seekBar.handleMouseDown(t)}constructor(t,i){super(t,i),this.on(this,"touchmove",this.handleMouseMove),this.on("touchstart",this.handleMouseDown),this.seekBar.off(["touchmove","touchstart"])}}),f();var Xa=Bo.getComponent("TooltipProgressBar"),Ja=class extends(Ho(Xa)){updateDataAttr(){let t=$o(this.player()),i=this.Pn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}Pn(t){const i=this.ws;return Lo(t-Ro(i),Oo(i))}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-tooltip-progress-bar vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}};function Qa(t){for(const i of t)if(i.enabled)return i}function Ya(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:Ka(t),description:Za(t),hd:!!t.height&&t.height>=720}}function Ka(t){return t.height?t.height+"p":t.bandwidth?Za(t):""}function Za(t){return t.bandwidth?t.bandwidth>1e7?(t.bandwidth/1e6).toFixed(0)+"Mbps":t.bandwidth>1e6?(t.bandwidth/1e6).toFixed(1)+"Mbps":(t.bandwidth/1e3).toFixed(0)+"kbps":""}Bo.registerComponent("TooltipProgressBar",Ja),f(),f(),f(),f(),f();var tu=class{get br(){return this.kr}set br(t){let i=this.kr;for(let s=i.length-1;s>=0;s--){let e=i[s];X(t,e)||this.wr(e)}for(let i of t)this._r(i);this.Cr.re()}get Sr(){return this.Cr.menuItems}jr(t){let i=this.Sr;if(i)for(let s of i)if(s.Tr===t)return s}Mr(t){let i=this.Cr.addMenuItem();return i.Tr=t,i.on("click",(()=>this.Ar(i))),i.el().setAttribute("role","menuitemradio"),i}Pr(t){t.dispose()}Er(t){return!0}_r(t){if(this.Er(t)){X(this.kr,t)||this.kr.push(t);let i=this.jr(t)||this.Mr(t);return this.Nr(i),i}this.wr(t)}wr(t){let i=this.jr(t);i&&(this.Cr.removeMenuItem(i),this.Pr(i)),W(this.kr,t)}Re(){const t=[];for(let i of this.kr)t.push(i);for(let i of t)this.wr(i);Q(t)}constructor(t){this.kr=[],this.Cr=t}},iu=class extends tu{Ir(){return this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",ot(this.Br,this.Fr.localize("Quality")),this.Br}Dr(){return this.$r=h.createElement("span"),this.$r.className="theo-settings-control-menu-quality-automatic",ot(this.$r,this.Fr.localize("Automatic")),this.$r}Rr(){return this.Ur=h.createElement("span"),ot(this.Ur,this.Fr.localize("Automatic")),this.Ur}Or(){return this.Vr=h.createElement("span"),this.Vr.className="theo-primary-color theo-settings-control-menu-item-hd-label",ot(this.Vr,this.Fr.localize("HD")),this.Vr}Lr(){let t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.$r),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Ur),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Vr),this.Hr.el().appendChild(this.Br),this.Hr.el().appendChild(t),this.Hr.el().setAttribute("aria-label",this.Fr.localize("Open the video quality settings menu"))}zr(){let t=this.qr,i=t&&au(t.targetQuality),s=t&&t.activeQuality,e=Ya(this.Wr(i||s))||{name:this.Fr.localize("Automatic")};ot(this.Ur,e.name),fi(this.$r,"vjs-hidden",!!i),fi(this.Vr,"vjs-hidden",!e.hd)}Nr(t){let i=Ya(t.Tr)||{name:this.Fr.localize("Automatic")},s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.Fr.localize("HD")+"</span>"),i.description&&(s+='<span class="theo-settings-control-submenu-item-alternate-value">'+i.description+"</span>"),t.el().innerHTML=s,t.el().setAttribute("aria-label",this.Fr.localize("Set video quality to ")+i.name),t.Tr?t.selected(t.Tr===this.Gr):t.selected(!this.Gr)}Ar(t){this.qr&&(this.qr.targetQuality=t.Tr&&t.Tr.videoQualities)}Wr(t,i){const s=i||this.br;for(let i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Re(){this._s.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Xr),this.Fr.off("languagechange",this.te),this.qr&&(this.qr.removeEventListener("activequalitychanged",this.Jr),this.qr.removeEventListener("targetqualitychanged",this.Qr),this.qr.removeEventListener("update",this.Yr)),super.Re()}constructor(t,i,s){super(t.subMenu),this.qr=void 0,this.Gr=void 0,this.Xr=()=>{let t=Qa(this._s.videoTracks);if(t===this.qr)return;let i=[];if(this.qr&&(this.qr.removeEventListener("activequalitychanged",this.Jr),this.qr.removeEventListener("targetqualitychanged",this.Qr),this.qr.removeEventListener("update",this.Yr)),this.qr=t,t){t.addEventListener("activequalitychanged",this.Jr),t.addEventListener("targetqualitychanged",this.Qr),t.addEventListener("update",this.Yr);const s=eu(hu(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.br=i,this.Qr(),this.Jr()},this.Yr=t=>{const i=t.track;if(i!==this.qr)return;const s=eu(hu(i.qualities.filter((t=>t.available)))),e=i&&au(i.targetQuality);let n;this.Gr=this.Wr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.br=n,this.zr()},this.Jr=()=>{this._r(void 0),this.zr()},this.Qr=()=>{let t=Qa(this._s.videoTracks),i=t&&au(t.targetQuality),s=this.Wr(i),e=this.Gr;s!==e&&(this.Gr=s,s&&e||this._r(void 0),e&&X(this.br,e)&&this._r(e),i&&this._r(s),this.zr())},this.te=()=>{ot(this.Cr.menuHeader.el(),this.Fr.localize("Quality")),ot(this.Br,this.Fr.localize("Quality")),ot(this.$r,this.Fr.localize("Automatic")),ot(this.Ur,this.Fr.localize("Automatic")),ot(this.Vr,this.Fr.localize("HD")),this.Hr.el().setAttribute("aria-label",this.Fr.localize("Open the video quality settings menu"));for(const t of this.Sr)this.Nr(t);this.zr()},this.Hr=t,this._s=i,this.Fr=s,this.Br=this.Ir(),this.$r=this.Dr(),this.Ur=this.Rr(),this.Vr=this.Or(),this.Lr(),ot(this.Cr.menuHeader.el(),this.Fr.localize("Quality")),this.br=[void 0],this._s.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Xr),this.Fr.on("languagechange",this.te),this.Xr()}},su=class{get height(){return this.Kr[0].height}get bandwidth(){return this.Kr[0].bandwidth}get videoQualities(){return this.Kr}get label(){return this.Kr[0].label}add(t){this.Kr.push(t)}constructor(t){this.Kr=t}};function eu(t){let i=[];for(let s of t){let t=s,e=!1;for(let s of i)if(ou(s,t)){s.add(t),e=!0;break}e||i.push(new su([t]))}return i}function nu(t,i){return t&&i?L(t,i):O.Zr}function ru(t,i){return t===i?O.Zr:nu(t.height,i.height)||nu(t.width,i.width)||nu(t.bandwidth,i.bandwidth)}function hu(t){return R(t,ru).reverse()}function ou(t,i){return t.label&&i.label&&t.label===i.label||mt(Ya(t),Ya(i))}function au(t){return Gt(t)?1===t.length?t[0]:void 0:t}function uu(t){return 1===t?"Normal":""+x.round(100*t)/100}f();var cu=class extends tu{Ir(){return this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",ot(this.Br,this.Fr.localize("Speed")),this.Br}Lr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Hr.el().appendChild(this.Br),this.Hr.el().appendChild(t),this.Hr.el().setAttribute("aria-label",this.Fr.localize("Open the video speed settings menu")),t}Mr(t){let i=super.Mr(t);return this.Nr(i),i}Nr(t){const i=t.Tr,s=this.Fr.localize(uu(i));ot(t.el(),s),t.el().setAttribute("aria-label",this.Fr.localize("Set video speed to ")+s),t.selected(t.Tr===this._s.playbackRate)}Ar(t){this._s.playbackRate=t.Tr}Re(){this._s.removeEventListener("ratechange",this.th),this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.ih=void 0,this.th=()=>{this.ih&&this._r(this.ih);let t=this._s.playbackRate;this.ih=t,ot(this.sh,this.Fr.localize(uu(t))),t&&this._r(t)},this.te=()=>{ot(this.Cr.menuHeader.el(),this.Fr.localize("Speed")),ot(this.Br,this.Fr.localize("Speed")),this.Hr.el().setAttribute("aria-label",this.Fr.localize("Open the video speed settings menu"));for(const t of this.Sr)this.Nr(t);this.th()},this.Hr=t,this._s=i,this.Fr=s,this.Br=this.Ir(),this.sh=this.Lr(),ot(this.Cr.menuHeader.el(),this.Fr.localize("Speed")),this.br=e,this._s.addEventListener("ratechange",this.th),this.Fr.on("languagechange",this.te),this.th()}};Bo.registerComponent("SettingsButton",class extends ma{createEl(){let t=super.createEl();return this.eh=Bo.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),ot(this.eh,this.localize("HD")),t.appendChild(this.eh),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}te(){super.te(),ot(this.eh,this.localize("HD")),ot(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.qr&&(this.qr.removeEventListener("activequalitychanged",this.Jr),this.qr=void 0),this.ws.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.nh),this.rh.Re(),this.hh.Re(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.qr=void 0,this.nh=()=>{let t=Qa(this.ws.videoTracks);t!==this.qr&&(this.qr&&this.qr.removeEventListener("activequalitychanged",this.Jr),this.qr=t,t&&t.addEventListener("activequalitychanged",this.Jr),this.Jr())},this.Jr=()=>{var t;const i=null==(t=this.qr)?void 0:t.activeQuality,s=!!(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},ui(this.menu.el(),"theo-settings-control-menu"),ot(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Be.Ie=this.controlText(),this.oh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.rh=new iu(this.oh,this.ws,t);let n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.ah=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.hh=new cu(this.ah,this.ws,t,n),this.ws.videoTracks.addEventListener(["addtrack","removetrack","change"],this.nh),this.nh()}}),f(),f(),f();var lu=class extends tu{uh(t){let i=t.label;if(i)return i;let s=t.language;if(s){let t=Nt(s);if(t)return t.lh}return s||""}dh(){this.br=this.fh}Re(){this.fh.removeEventListener("addtrack",this.ph),this.fh.removeEventListener("removetrack",this.mh),this.fh.removeEventListener("change",this.gh),super.Re()}constructor(t,i){super(t),this.ph=t=>{const i=t.track;this._r(i),i.addEventListener("update",this.yh)},this.mh=t=>{const i=t.track;this.wr(i),i.removeEventListener("update",this.yh)},this.gh=t=>this.dh(),this.yh=()=>{for(const t of this.br)this._r(t)},this.fh=i,this.fh.addEventListener("addtrack",this.ph),this.fh.addEventListener("removetrack",this.mh),this.fh.addEventListener("change",this.gh),this.dh()}},du=class extends lu{Nr(t){let i=t.Tr,s=this.Fr.localize(this.uh(i));ot(t.el(),s),t.el().setAttribute("aria-label",this.Fr.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Ar(t){let i=t.Tr;for(let t of this.ws.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Re(){this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.audioTracks),this.te=()=>{ot(this.Cr.menuHeader.el(),this.Fr.localize("Language"));for(const t of this.Sr)this.Nr(t)},this.ws=i,this.Fr=s,ot(this.Cr.menuHeader.el(),this.Fr.localize("Language")),this.Fr.on("languagechange",this.te)}};Bo.registerComponent("audioTrackButton",class extends ma{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.bh.Re(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.bh=new du(this.menu,this.ws,t),this.controlText("Language"),this.Be.Ie=this.controlText()}}),f(),f();var fu=class extends lu{Er(t){return!!super.Er(t)&&(!t.forced&&Dt(t.kind))}Mr(t){let i=super.Mr(t);ui(i.el(),"theo-text-track-menu-item");let s=h.createElement("span");i.kh=s;let e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.wh=e;let n=t=>this._h(t,i);i.xh=n,e.addEventListener("click",n);let r=h.createElement("div");return r.className="theo-text-track-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),i}Nr(t){let i=t,s=i.Tr,e=this.Fr.localize(this.uh(s));ot(i.kh,e),i.el().setAttribute("aria-label",this.Fr.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===M.Jn)}Pr(t){let i=t;i.wh.removeEventListener("click",i.xh),super.Pr(t)}Ar(t){let i=t.Tr;for(let t of this.ws.textTracks)t!==i&&Bt(t.kind,i.kind)&&(t.mode=M.Ch);i.mode!==M.Jn?i.mode=M.Jn:i.mode=M.Ch}_h(t,i){t.stopImmediatePropagation(),this.Ar(i)}Re(){this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.textTracks),this.te=()=>{ot(this.Cr.menuHeader.el(),this.Fr.localize("Subtitles"));for(const t of this.Sr)this.Nr(t)},this.ws=i,this.Fr=s,ot(this.Cr.menuHeader.el(),s.localize("Subtitles")),this.Fr.on("languagechange",this.te)}};Bo.registerComponent("subtitlesButton",class extends ma{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.bh.Re(),super.dispose()}constructor(t,i){super(t,i),this.bh=new fu(this.menu,this.ws,t),this.controlText("Subtitles"),this.Be.Ie=this.controlText()}}),f(),xi();var vu=Bo.getComponent("playToggle"),pu=class extends(Ho(vu)){handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Be.Ie=this.controlText()}handlePause(t){this.ws.ended||(super.handlePause(t),this.controlText("Play"),this.Be.Ie=this.controlText())}te(){this.Be.Ie=this.controlText()}dispose(){this.Be.Re(),this.ws.removeEventListener("ended",this.Sh),super.dispose()}constructor(t,i){super(t,i),this.Sh=()=>{this.controlText("Replay"),this.Be.Ie=this.controlText()},this.controlText("Play"),this.Be=new va(this,this.controlText()),this.ws.addEventListener("ended",this.Sh),this.on(t,"languagechange",this.te),wi.Ys.Je&&new ia(this.el())}};Bo.registerComponent("playToggle",pu),f(),xi();var mu=Bo.getComponent("fullscreenToggle"),gu=class extends(Ho(mu)){handleClick(t){this.ws.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.Be.Ie=this.controlText()}dispose(){this.Be.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Be=new va(this,this.controlText()),wi.Ys.Je&&new ia(this.el()),this.on(t,"languagechange",this.updateContent)}};Bo.registerComponent("fullscreenToggle",gu),f(),xi();var yu=Bo.getComponent("muteToggle"),bu=class extends(Ho(yu)){handleClick(t){this.ws.muted&&!this.ws.paused&&this.ws.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.te()}te(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Be.Ie=this.controlText()}dispose(){this.Be.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Be=new va(this,this.controlText()),wi.Ys.Je&&new ia(this.el()),this.on(t,"languagechange",this.te),Ii&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};Bo.registerComponent("muteToggle",bu),f();var ku=Bo.getComponent("BigPlayButton"),wu="theo-play-svg-circle",_u='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150" fill="currentColor">\n <circle cx="75" cy="75" r="73" fill="#000" fill-opacity="0.2"></circle>\n <circle cx="75" cy="75" r="73" class="'+wu+'" stroke-width="4" stroke="currentColor" fill="none" transform="rotate(-90,75,75)"></circle>\n <g transform="translate(85,75) scale(0.5625) translate(-75,-75)">\n <path d="m 123.89639,85.432 c -12.865,9.167 -29.482997,19.402 -49.848997,30.7 -19.634,11.035 -36.851,19.7 -51.65,26 l -16.3990002,6.099 c -1.033,-4.433 -2,-11.002 -2.9,-19.7 -2.033,-17.333 -3.04999998,-36.466 -3.04999998,-57.399 0,-19.167 1.38199998,-37.081 4.14799998,-53.75 l 4.0019995,-19.1499994 17.3990007,5.849 c 15.068,5.9999994 31.401,14.5169994 49,25.5509994 18.631,11.666 34.616997,22.766 47.948997,33.3 6.663,5.3 11.463,9.383 14.396,12.25 l -13.046,10.25"></path>\n </g>\n</svg>',xu=class extends(Ho(ku)){createEl(){let t=super.createEl(),i=Bo.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML=_u,t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t),void 0!==this.ws.vr&&"unavailable"!==this.ws.vr.state&&(this.ws.vr.useDeviceMotionControls=!0)}};Bo.registerComponent("BigPlayButton",xu),f(),xi(),Vt();var Cu=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;Bo.registerComponent("MouseTimeDisplay",class extends Da{jh(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Th&&(this.Th=i,this.Mh=i.src?wi.Ah(i.src).href:void 0,this.Th.addEventListener(["addcue","removecue"],this.Ph),this.Eh())}Nh(t){t.track===this.Th&&this.Ih()}createEl(){const t=super.createEl();return this.Bh=Bo.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Fh=Bo.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Dh(t)}Dh(t){let i;if(this.Th&&this.Th.cues){let s=function(t,i){let s=t[0];for(let e of t)if(e.startTime<=i)s=e;else if(i>=e.endTime)return s;return s}(this.Th.cues,t);i=s&&s.content}if(i===this.$h)return;if(this.$h=i,Bo.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",!!i),!i)return void this.Rh();const s=i.match(Cu);if(s){let[,t,i,e,n,r]=s;t=this.Uh(t);const h={Oh:+i,Vh:+e,ji:+n,Ti:+r};this.Lh(t,h)}else{const t=this.Uh(i);this.Lh(t)}}Eh(){j(this.An)||this.Dh(this.An)}Uh(t){return this.Th&&this.Mh?wi.Ah(t,this.Mh).href:t}Lh(t,i){this.Bh&&(this.Bh.src!==t?(this.Bh.onload=()=>{this.Hh(i)},this.Bh.src="",this.Bh.src=t):this.Hh(i))}Hh(t){if(!this.Fh||!this.Bh)return;const i=this.Fh.getContext("2d");i&&(null!=t||(t={Oh:0,Vh:0,ji:this.Bh.naturalWidth,Ti:this.Bh.naturalHeight}),this.Fh.width=t.ji,this.Fh.height=t.Ti,i.drawImage(this.Bh,t.Oh,t.Vh,t.ji,t.Ti,0,0,t.ji,t.Ti),this.zh(this.Fh))}zh(t){this.qh||(ri(this.tooltip,t),this.qh=t),this.En()}Rh(){this.qh&&(this.tooltip.removeChild(this.qh),this.qh=void 0,this.En())}Ih(){void 0!==this.Th&&(this.Th.removeEventListener(["addcue","removecue"],this.Ph),this.Th=void 0),this.Mh=void 0,this.Rh(),this.$h=void 0}dispose(){this.Ih(),super.dispose()}constructor(t,i){super(t,i),this.qh=void 0,this.Th=void 0,this.Mh=void 0,this.Wh=t=>this.jh(t),this.Gh=t=>this.Nh(t),this.Ph=t=>this.Eh(),this.showThumbnails=()=>{this.qh&&this.qh.hidden&&(this.qh.hidden=!1,this.En())},this.hideThumbnails=()=>{!this.qh||this.qh.hidden||this.player().scrubbing()||(this.qh.hidden=!0,this.En())},this.on(this.player().textTracks(),"addtrack",this.Wh),this.on(this.player().textTracks(),"removetrack",this.Gh),Rt.Qs&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}}),f();var Su=Bo.getComponent("VolumeLevel");Bo.registerComponent("VolumeLevel",class extends Su{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}}),f(),f();var ju=Bo.getComponent("Component"),Tu=class extends ju{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};Tu.prototype.h=N({},Tu.prototype.h,{children:[]}),Bo.registerComponent("controlBarMenuContainer",Tu);var Mu=Bo.getComponent("Player"),Au=class extends Mu{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),si(i),this.Ci&&s&&(e?s.insertBefore(t,e):s.appendChild(t)),h.body.removeEventListener("keydown",this.handleKeyPress),h.body.removeEventListener("click",this.handleClick)}constructor(t,i,s){super(t,i,s),this.handleKeyPress=t=>{9===t.which&&this.addClass("theo-probably-keyboard-focus")},this.handleClick=t=>{0===t.x&&0===t.y||this.removeClass("theo-probably-keyboard-focus")},h.body.addEventListener("keydown",this.handleKeyPress),h.body.addEventListener("click",this.handleClick)}};Au.prototype.h=N({},Mu.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),Bo.registerComponent("Player",Au),f(),f();var Pu=Bo.getComponent("Player"),Eu=Pu.prototype.es;Pu.prototype.es=function(t){if(!(this.H&&this.H.$s&&this.H.$s()))return Eu.call(this,t)};var Nu=Pu.prototype.createEl;function Iu(t,i,e,n){let r=N({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},e);r.controlBar=N({progressControl:{keepTooltipsInside:!0}},r.controlBar);let h=r.techOrder||(r.techOrder=[]);-1===h.indexOf("THEOplayer")&&h.unshift("THEOplayer"),(r.theoplayer||(r.theoplayer={})).player=t,e&&Qt(e.language)&&(r.languages=N({},r.languages,{[A]:e.language}),r.language=A),i.setAttribute("data-vjs-player","");let o=i.getAttribute("style"),a=Bo(t.element,r,n);return a.ready((()=>{qo(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===Ft.Xh;Xo(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.uplynk){var s;const e=i=>{const s="adbreakbegin"===i.type;Xo(t,s,!1)};null==(s=i.uplynk)||s.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",e),t.adBreak.addEventListener("adbreakend",e)}))}i.addEventListener("sourcechange",(()=>{Xo(t,!1,!1)}))}}(a,t),function(t){t.on("mouseleave",Jo)}(a)})),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),wi.Ys.Qs&&(ui(i,"theo-mobile"),function(t){let i=s.outerHeight,e=s.outerWidth,n=i>e;n?(li(t,"theo-mobile-landscape"),ui(t,"theo-mobile-portrait")):(li(t,"theo-mobile-portrait"),ui(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",(()=>{oi(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(a),a}Pu.prototype.createEl=function(){let t=Nu.call(this),i=Bo.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t},f(),f(),f(),f();var Bu=Bo.getComponent("Button");var Fu="THEOPiPCloseButton";Bo.registerComponent(Fu,class extends Bu{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.Qh.Jh()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.Qh)}(i))throw new b("Invalid Picture-in-picture options.");this.Qh=i.Qh}});var Du=class extends st{get Yh(){return this.Kh}get Zh(){return this.t.cs()}io(){this.t.yn(ht.so,this.eo),this.no||this.t.yn(ht.ro,this.ho),this.t.oo.on("languagechange",this.te)}ao(){var t;return"theo-pip-"+(null!=(t=this.uo)?t:"bottom-right")}co(t){let i=this.lo;i&&!this.Zh&&(this.do||this.fo(),this.vo(),ui(i,"theo-pip"),ui(i,this.ao()),this.Kh=!0,this.po=t,this.mo=!1,this.yo(new I(ci.PICTURE_IN_PICTURE)))}bo(t){let i=this.lo;i&&(this.ko(),li(i,"theo-pip"),li(i,this.ao()),this.Kh=!1,this.mo=t,this.wo=this.po,this.po=!1,this.yo(new I(ci.INLINE)))}fo(){if(!this.do){let t=this.t.oo;t.addChild(Fu,{Qh:this});let i=h.createElement("div");i.className="theo-pip-overlay",this._o=h.createElement("div"),this._o.className="theo-pip-overlay-text",ot(this._o,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this._o),ri(t.el(),i),this.xo=i,this.do=!0}}Co(){this.So&&!this.jo&&this.t.To&&(this.Mo=this.t.To.Ao(ut,this.Po),this.jo=!0)}Eo(){this.Mo&&this.t.To&&(this.t.To.No(this.Mo),this.jo=!1)}vo(){let t=this.t.oo.contentEl(),i=t.getBoundingClientRect(),s=h.documentElement.clientWidth,e=h.documentElement.clientHeight;t.style.top=i.top+"px",t.style.bottom=e-i.bottom+"px",t.style.right=s-i.right+"px",t.style.left=i.left+"px",t.style.width=i.width+"px",t.style.height=i.height+"px",t.style.position="fixed"}ko(){let t=this.t.oo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}Io(){li(this.lo,"theo-pip"),this.Yh&&this.uo&&li(this.lo,"theo-pip-"+this.uo),this.xo&&(si(this.xo),this.xo=void 0)}gn(){this.Io(),this.Eo(),this.Bo(),this.t.fn(ht.so,this.eo),this.t.fn(ht.ro,this.ho),this.t.oo.off("languagechange",this.te),this.t=void 0}constructor(t,i,s){super(),this.Fo=!1,this.Kh=!1,this.mo=!1,this.po=!1,this.do=!1,this.jo=!1,this.wo=!1,this.eo=()=>{this.Fo=!0,this.So&&!this.Yh&&this.Mo&&this.Do&&this.Mo.$o<=this.Do&&this.co(!1)},this.ho=()=>{this.no||(this.Fo=!1,this.Jh(),this.bo(!1))},this.te=()=>{if(this._o){const t=this.t.oo;ot(this._o,t.localize("Video playing in Picture-in-Picture mode"))}},this.Po=t=>{!this.po&&this.So&&(j(t)||(this.Do&&t<=this.Do||this.wo?this.Kh||this.mo||this.co(!1):this.Kh?this.bo(!1):this.mo=!1))},this.Do=i.visibility,this.uo=i.position,this.no=i.retainPresentationModeOnSourceChange,this.So=void 0!==this.Do,this.t=t,this.lo=t.Ro,this.Jh=s,this.io()}};Ai();var $u=class extends ${Uo(){let t=super.Uo();return t===ci.INLINE&&this.Oo.Yh?ci.PICTURE_IN_PICTURE:t}Vo(t){return t===ci.PICTURE_IN_PICTURE||super.Vo(t)}Lo(t){this.Ho=this.zo,t===ci.FULLSCREEN||t===ci.NATIVE_PICTURE_IN_PICTURE?this.Oo.Eo():this.Oo.Co(),super.Lo(t)}qo(t){super.qo(t),t===ci.PICTURE_IN_PICTURE?tt(this.Go.Wo((t=>this.Xo(t)))):t===ci.FULLSCREEN?this.Oo.bo(!1):this.Oo.bo(!0)}async Xo(t){K(t),await Promise.all([this.Jo(),this.Qo.bo()]).catch(Si),K(t),this.Oo.co(!this.Yo),this.yo(new I(this.zo)),this.Yo=!1,this.Ko=!1}wi(){this.Ko||(this.Oo.Yh&&this.Zo.cs?this.Lo(ci.FULLSCREEN):this.Ho!==ci.PICTURE_IN_PICTURE||this.Zo.cs?super.wi():(this.Yo=!0,this.Lo(ci.PICTURE_IN_PICTURE)))}gn(){super.gn(),this.Oo.gn(),this.ta.fn(ht.so,this.ia),this.ta=void 0}constructor(t,i,s,e){super(i,s),this.Ho=ci.INLINE,this.Yo=!1,this.Jh=()=>{this.zo===ci.PICTURE_IN_PICTURE&&this.Lo(ci.INLINE)},this.sa=t=>{this.Ko||(this.zo!==ci.PICTURE_IN_PICTURE||this.Oo.Yh?this.zo!==ci.PICTURE_IN_PICTURE&&this.Oo.Yh&&(this.Yo=!0,this.Lo(ci.PICTURE_IN_PICTURE)):this.Lo(ci.INLINE))},this.ia=()=>{this.Uo()!==ci.PICTURE_IN_PICTURE&&this.Uo()!==ci.INLINE||this.Oo.Co(),this.ta.fn(ht.so,this.ia)},this.ta=t,this.Oo=new Du(t,e.pip,this.Jh),this.Oo.yn(E.MODE_CHANGE,this.sa),this.ta.yn(ht.so,this.ia)}};f();var Ru,Uu=class extends st{get ea(){return Di.na(this.oo.el())||this.oo.supportsFullScreen()}get cs(){return this.oo.isFullscreen()||this.ra}co(){this.oo.requestFullscreen()}bo(){this.oo.exitFullscreen(),this.ha.bo()}gn(){this.Bo(),this.oo.off("fullscreenchange",this.oa),this.ha.fn(mi.aa,this.oa),this.ha.fn(mi.ua,this.Ds),this.oo.isFullWindow&&this.oo.exitFullscreen()}constructor(t,i){super(),this.Us=!1,this.ra=!1,this.ca=!1,this.oa=()=>{if(this.ca)return;const t=this.Us,i=this.cs;t!==i&&(this.Us=i,this.yo(new Ni))},this.la=()=>{this.ra=this.ha.cs,this.oa()},this.da=()=>{this.ca||(this.oo.isFullWindow&&this.oo.supportsFullScreen()||this.ra&&!this.oo.supportsFullScreen())&&(this.ca=!0,this.oo.exitFullscreen(),this.oo.requestFullscreen(),this.ca=!1,this.oa())},this.oo=t,this.ha=i,this.oo.on("fullscreenchange",this.oa),this.ha.yn(mi.aa,this.la),this.ha.yn(mi.fa,this.da),this.ha.yn(mi.ua,this.Ds),this.oa()}};function Ou(t){return class extends t{get To(){return this.va}cs(){return this.pa.Uo()===ci.FULLSCREEN}ma(){return function(t,i){let s=_.create(t);const e=i.oo;return vt(s,{get controls(){return e.controls()},set controls(t){e.controls(kt(t))},get presentation(){return i.pa.ga},get presentationMode(){return i.pa.Uo()},set presentationMode(t){const s=vi(t);s&&i.pa.Lo(s)},get ui(){return e},get visibility(){return i.To.ga}})}(this.ya,this)}gn(){super.gn(),this.pa.gn(),this.ba.gn(),this.oo.dispose(),this.va.gn()}ka(t){this.oo.src(""),super.ka(t)}constructor(t,i,s){super(i,s),this.Ro=t,this.va=new lt(t),this.ya=super.ma(),_.defineProperty(this.ya,"constructor",{value:gt}),this.oo=Iu(this.ya,this.Ro,s.ui),this.ba=new Uu(this.oo,this.wa),this.pa=new $u(this,this.ba,this.xa._a(),s),this.pa.yn(E.MODE_CHANGE,this.Ds)}}}function Vu(t){return(t=t||{}).position=function(t){switch(t){case"top-left":case"top-right":case"bottom-left":case"bottom-right":return t;default:return}}(t.position),t.visibility=function(t){if(zt(t)&&!j(t))return Ei(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=kt(t.retainPresentationModeOnSourceChange),t}function Lu(){return Ru||(Ru=function(t){let i=t;for(const t of $i)i=t(i);return i}(Ru=Ou(pt()))),Ru}function Hu(t,i){const s=function(t){const i=di(t);return i.ui=i.ui||{},void 0!==(null==t?void 0:t.width)&&void 0===i.ui.width&&(i.ui.width=t.width),void 0!==(null==t?void 0:t.height)&&void 0===i.ui.height&&(i.ui.height=t.height),void 0!==(null==t?void 0:t.fluid)&&void 0===i.ui.fluid&&(i.ui.fluid=t.fluid),i.pip=Vu(i.pip),i}(i),e=h.createElement("div");pi(e),t.appendChild(e);const n=new(Lu())(t,e,s);n.Ca=n;let r=n.ga;return n.Sa(),n.ja(ft),_.defineProperty(r,"constructor",{value:Hu}),r=dt(r),Yt(n),function(t){for(const i of Ui)i(t)}(n),r}f(),f(),f(),f(),f(),xi();var zu="theo-cast-",qu=Bo.getComponent("Button"),Wu=class extends(Ho(qu)){get Ta(){throw new b("Ma")}get Aa(){return this.h.Aa}get Pa(){return this.h.Pa}buildCSSClass(){return zu+"button theo-"+this.Pa+"-button theo-controlbar-button "+super.buildCSSClass()}createEl(t,i,s){const e=super.createEl(),n=h.createElement("div");n.className="theo-button-icon-blur";const r=h.createElement("div");return r.className=zu+"svg-container",r.innerHTML=this.Aa,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.Ea===yi.AVAILABLE)null==(i=this.Ta)||i.start();else if(this.Ea===yi.CONNECTED||this.Ea===yi.CONNECTING){var s;null==(s=this.Ta)||s.stop()}}Na(t){li(this.lo,"theo-"+this.Pa+"-"+this.Ea),this.Ea=t,ui(this.lo,"theo-"+this.Pa+"-"+this.Ea),this.te()}te(){this.Ia(this.Ea),this.Be.Ie=this.controlText()}Ia(t){t===yi.CONNECTED?this.controlText("Stop Casting"):t===yi.AVAILABLE?this.controlText("Start Casting"):t===yi.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.lo=t.el(),this.Ea=yi.UNAVAILABLE,this.controlText("Unavailable"),this.Be=new va(this,this.controlText()),null==(s=this.Ta)||s.addEventListener("statechange",(t=>{const i=t;this.Na(i.state)})),wi.Ys.Je&&(this.Ba=new ia(this.el())),this.Na(this.Ta?this.Ta.state:yi.UNAVAILABLE),this.on(t,"languagechange",this.te)}},Gu=0;function Xu(){const t='\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" fill="currentColor">\n <defs>\n <clipPath id="theo-chromecast-rings-mask-'+Gu+'">\n <path d="M0-36h44V0H0z"/>\n </clipPath>\n </defs>\n <path class="theo-chromecast-outer" d="M2 10a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H28v-4h14V10H6v6H2z"/>\n <path class="theo-chromecast-inner" d="M10 14h28v20H26.74A26 26 0 0 0 10 17.26z"/>\n <g class="theo-chromecast-rings" fill="none" stroke="currentColor" stroke-width="4" transform="translate(2 42)" clip-path="url(#theo-chromecast-rings-mask-'+Gu+')">\n <circle stroke="none" cx="0" cy="0" r="30" />\n <circle class="theo-chromecast-ring theo-chromecast-ring1" stroke-width="6" cx="0" cy="0" r="3" />\n <circle class="theo-chromecast-ring theo-chromecast-ring2" cx="0" cy="0" r="12" />\n <circle class="theo-chromecast-ring theo-chromecast-ring3" cx="0" cy="0" r="20"/>\n <path class="theo-chromecast-ring theo-chromecast-ring4" stroke-linecap="round" d="M0-20A20 20 0 0 1 20 0" />\n </g>\n </svg>';return Gu++,t}Bo.registerComponent("chromecastButton",class extends Wu{get Ta(){var t;return null==(t=this.ws.cast)?void 0:t.chromecast}constructor(t,i){super(t,N({},i,{Pa:"chromecast",Aa:Xu()}))}}),f();var Ju="theo-chromecast-",Qu=Bo.getComponent("Component"),Yu=class t extends(Ho(Qu)){buildCSSClass(){return Ju+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();ui(i,Ju+"overlay");const s=Bo.createEl("div",{className:Ju+"status-icon",innerHTML:t.ICON_SVG}),e=Bo.createEl("div",{className:Ju+"status-info"});ot(e,"Playing on");const n=Bo.createEl("div",{className:Ju+"status-title"}),r=Bo.createEl("div",{className:Ju+"status"});return this.mr=n,r.appendChild(s),r.appendChild(e),r.appendChild(n),i.appendChild(r),i}dispose(){var t;null==(t=this.Fa)||t.removeEventListener("statechange",this.update),this.Fa=void 0,this.ws.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.Fa?(this.mr&&ot(this.mr,this.Fa.receiverName||""),this.Fa.state===yi.CONNECTED?this.show():this.hide()):this.hide()},this.Fa=null==(s=this.ws.cast)?void 0:s.chromecast,null==(e=this.Fa)||e.addEventListener("statechange",this.update),this.ws.addEventListener("play",this.update),this.update()}};Yu.ICON_SVG='\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" fill="currentColor">\n <path d="M7 24v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H11v1.63c3.96 1.28 7.09 4.41 8.37 8.37H25V13zM7 16v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H9c-1.1 0-2 .9-2 2v3h2v-3h18v14h-7v2h7c1.1 0 2-.9 2-2V11c0-1.1-.9-2-2-2z"/>\n</svg>',Bo.registerComponent("chromecastOverlay",Yu),f(),f();Bo.registerComponent("airplayButton",class extends Wu{dispose(){var t,i;null==(t=this.ws.ads)||t.removeEventListener("adbreakbegin",this.Da),null==(i=this.ws.ads)||i.removeEventListener("adbreakend",this.$a),this.ws.removeEventListener("currentsourcechange",this.$a),super.dispose()}get Ta(){var t;return null==(t=this.ws.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,N({},i,{Pa:"airplay",Aa:'\n<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">\n <path class="theo-cast-inner" d="M5 7h14v8H5z"/>\n <path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/>\n</svg>'})),this.$a=()=>{this.enable()},this.Da=()=>{this.disable()},null==(s=this.ws.ads)||s.addEventListener("adbreakbegin",this.Da),null==(e=this.ws.ads)||e.addEventListener("adbreakend",this.$a),this.ws.addEventListener("currentsourcechange",this.$a)}}),f(),f(),f(),xi();var Ku=Bo.getComponent("Button"),Zu=class extends(Ho(Ku)){buildCSSClass(){return"theo-vr-button theo-controlbar-button "+super.buildCSSClass()}handleClick(){this.ws.vr.stereo=!this.ws.vr.stereo,this.te()}_n(){this.ws.vr&&this.ws.vr.state!==Wt.Rs?(this.show(),this.ws.vr.canPresentVR?(this.enable(),this.te()):(this.disable(),this.controlText("No VR capable device found"),this.Ra.Ie=this.controlText())):this.hide()}te(){var t;this.controlText((null==(t=this.ws.vr)?void 0:t.stereo)?"Stop watching in VR":"Watch in VR"),this.Ra.Ie=this.controlText()}dispose(){var t;null==(t=this.ws.vr)||t.removeEventListener("statechange",this.Ua),super.dispose()}constructor(t,i){var s;super(t,i),this.Ua=()=>this._n(),this.controlText("Watch in VR"),this.Ra=new va(this,this.controlText()),null==(s=this.ws.vr)||s.addEventListener("statechange",this.Ua),this._n(),wi.Ys.Je&&new ia(this.el()),this.on(t,"languagechange",this.te)}};Bo.registerComponent("vrButton",Zu),f();var tc=Bo.getComponent("Component"),ic=class extends tc{createEl(){let t=super.createEl("div",{className:this.buildCSSClass()}),i=Bo.createEl("div",{className:"theo-360-fov"});return t.appendChild(i),this.Oa=i,t}buildCSSClass(){return"theo-360-compass "+super.buildCSSClass()}_n(){this.ws.vr.state===Wt.Rs?this.hide():this.show()}Va(){let t=-this.ws.vr.direction.yaw+40;this.Oa.style[Mi("transform")]="scale(0.875) rotate("+t+"deg) skew("+"-10deg)"}dispose(){this.ws.vr.removeEventListener("statechange",this.Ua),this.ws.vr.removeEventListener("directionchange",this.La),super.dispose()}constructor(t,i,s){super(t,i),this.Ua=()=>this._n(),this.La=()=>this.Va(),this.ws=s,this.ws.vr.addEventListener("statechange",this.Ua),this.ws.vr.addEventListener("directionchange",this.La),this._n(),this.Va()}};Vt(),f();var sc=x.pow(2,31)-1,ec=Bo.getComponent("Component"),nc=class extends ec{Ha(){this.ws.vr.state===Wt.za?this.qa():this.Wa()}qa(){if(this.Ga)return;this.Ga=!0;let t=this.ws.element;this.Xa=t.style.zIndex||"",t.style.zIndex=""+sc,this.Ja=this.player().isFullscreen(),this.player().requestFullscreen()}Wa(){if(!this.Ga)return;this.Ga=!1,this.ws.element.style.zIndex=this.Xa,this.Ja?this.player().requestFullscreen():this.player().exitFullscreen()}dispose(){this.Wa(),this.ws.vr.removeEventListener("statechange",this.Qa),super.dispose()}constructor(t,i,s){super(t,i),this.Ga=!1,this.Ja=!1,this.Xa="",this.Qa=()=>this.Ha(),this.ws=s,this.ws.vr.addEventListener("statechange",this.Qa),this.Ha()}};Oi((function(t){let i=t.ga;if(!i.vr)return;let s=t.oo,e=new ic(s,{},i);if(t.yn(ht.ro,(()=>{var i;s.removeChild(e);let n=null==(i=t.Ya())?void 0:i.vr;void 0===n||n.nativeVR||s.addChild(e)})),Rt.Ka){let t=new nc(s,{},i);s.addChild(t)}})),f(),f(),f();var rc=class extends nt{constructor(){super("relatedchange")}},hc=["relatedchange"],oc=class extends st{get ga(){return this.Za||(this.Za=function(t){let i,s={get sources(){return t.tu},set sources(i){t.tu=i},addEventListener(t,s){i.yn(t,s)},removeEventListener(t,s){i.fn(t,s)}};return i=new F(hc,!0,s),i.iu(t),s}(this)),this.Za}get tu(){return this.su}set tu(t){this.su=function(t){return t.filter((t=>t&&(Zt(t.link)||yt(t,["source"]))))}(t),t.length>this.su.length&&console.warn("One or more of the configured related content sources are invalid. Check if they have a source or a link."),this.yo(new rc)}gn(){this.Bo(),this.su=[]}constructor(...t){super(...t),this.su=[]}};Xt((function(t){return class extends t{ma(){const t=this.eu;return vt(super.ma(),{get related(){return t.ga}})}gn(){this.eu.gn(),super.gn()}constructor(t,i){super(t,i),this.eu=new oc}}}),qt.nu),f(),f();var ac=Bo.getComponent("Button"),uc=class extends ac{buildCSSClass(){return"vjs-icon-view-grid theo-related-button "+super.buildCSSClass()}handleClick(){this.hu.ru?this.hu.be():this.hu.ge()}te(){this.Be.Ie=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.lo=t.el(),this.hu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText(this.localize("Related content")),this.Be=new va(this,this.controlText()),this.on(t,"languagechange",this.te)}};f(),f();var cc=Bo.getComponent("Button"),lc=class extends cc{buildCSSClass(){return"theo-secondary-background theo-close-button"}handleClick(){this.ou.hide()}constructor(t,i){super(t),this.ou=i}},dc=(()=>{let t=h.createElement("div");return t.className="theo-related-grid-tile",t.innerHTML='<a class="theo-related-grid-tile-content"><div class="theo-related-grid-tile-image"></div><span class="theo-related-grid-tile-title theo-primary-border theo-tertiary-background"></span><span class="theo-related-grid-tile-duration"></span></a>',t})();function fc(t,i,s){let e=dc.cloneNode(!0),n=e.querySelector(".theo-related-grid-tile-content");yt(s,["source"])?(n.style.cursor="pointer",n.addEventListener("click",(()=>{t.source=s.source,i.be()}))):Zt(s.link)&&n.setAttribute("href",s.link);let r=e.querySelector(".theo-related-grid-tile-image");r.style.backgroundImage='url("'+D(s.image)+'")',r.removeAttribute("id");let h=e.querySelector(".theo-related-grid-tile-title");s.title?(ot(h,s.title),h.removeAttribute("id")):si(h);let o=e.querySelector(".theo-related-grid-tile-duration");return s.duration?(ot(o,s.duration),o.removeAttribute("id")):si(o),e}var vc=[15,12,9,8,6,4,3,2,1];var pc=class{get au(){return"theo-"+this.uu+"-item-grid"}cu(){this.lu.focus()}du(t){this.fu(),function(t){if(t.length)for(let i of vc)if(t.length>=i){t.length=i;break}}(t),this.vu(t.length);for(let i of t){let t=fc(this.pu.ga,this.mu,i);this.gu.appendChild(t)}}fu(){this.gu.innerHTML=""}yu(){let t=h.createElement("div");t.className="theo-overlay-panel";const i=h.createElement("div");return i.className="theo-related-grid",this.bu.className="theo-related",this.lu.controlText("Close Related Content"),this.ku.appendChild(this.bu),this.bu.appendChild(t),t.appendChild(this.lu.el()),t.appendChild(i),i}vu(t){li(this.gu,this.au),this.uu=t,ui(this.gu,this.au)}gn(){si(this.bu),this.wu.gn(),this._u.gn(),this.lu.dispose(),this.pu=void 0}constructor(t,i,s,e,n){this.pu=t,this.xu=i,this.mu=s,this.ku=e,this.uu=12,this.Cu=t=>{this.gu.style.width=t.width+"px"},this.bu=h.createElement("div"),this.lu=new lc(this.xu,{hide:()=>{this.mu.be()}}),this.gu=this.yu(),this._u=new mc(n),this._u.yn(Ci.pn,this.Cu),this.wu=new $t(this.gu,this._u),this.vu(12)}},mc=class extends st{get Su(){return this.ju||0}get Tu(){return this.Mu.Tu}gn(){this.Bo(),this.Mu.fn(Ci.pn,this.Au)}constructor(t){super(),this.Mu=t,this.Au=t=>{let i=t.width;if(9*(t.width/16)>t.height){i=16*(t.height/9)}this.ju=i,this.yo(new ji(this.Su,t.height))},this.Mu.yn(Ci.pn,this.Au)}};f();var gc=class extends nt{constructor(){super("show")}};f();var yc=class extends nt{constructor(){super("hide")}},bc="theo-related-available",kc="theo-related-showing",wc=[...hc,"show","hide"],_c=class extends st{get ga(){return this.Za||(this.Za=function(t){let i;const s={get sources(){return t.tu},set sources(i){t.tu=i},get showing(){return t.ru},show(){t.ge()},hide(){t.be()},addEventListener(t,s){i.yn(t,s)},removeEventListener(t,s){i.fn(t,s)}};return i=new F(wc,!0,s),i.iu(t),s}(this)),this.Za}get tu(){return this.Pu.tu}set tu(t){this.Pu.tu=t}get ru(){return this.Eu}ge(){let t=this.Eu;this.Eu=!0,this.Nu(kc),this.Iu.cu(),this.xu.paused()?this.Bu=!0:this.xu.pause(),t!==this.Eu&&this.yo(new gc)}be(){let t=this.Eu;this.Eu=!1,this.Fu(kc),this.Du.focus(),this.Bu||this.xu.play(),this.Bu=!1,t!==this.Eu&&this.yo(new yc)}Nu(t){this.xu.el().classList.add(t)}Fu(t){this.xu.el().classList.remove(t)}gn(){this.Bo(),this.Iu.gn()}constructor(t,i,s,e){super(),this.Eu=!1,this.Bu=!1,this.$u=t=>{const i=this.tu;this.Iu.du(i),i.length?(this.Nu(bc),this.Du.show()):(this.Fu(bc),this.Du.hide()),this.yo(t)},this.Pu=i,this.Pu.yn("relatedchange",this.$u),this.xu=s,this.Iu=new pc(t,this.xu,this,s.contentEl(),e),this.Du=new uc(s,this,{})}};Ri((function(t){return class extends t{ma(){const t=this.Ru;return vt(super.ma(),{get related(){return t.ga}})}gn(){this.Ru.gn(),super.gn()}constructor(t,i,s){super(t,i,s),this.Ru=new _c(this,this.eu,this.oo,this.Uu)}}})),f(),f(),f();var xc=Bo.getComponent("Button"),Cc=class extends xc{buildCSSClass(){return"vjs-icon-share theo-social-button "+super.buildCSSClass()}handleClick(){this.Ou.showing?this.Ou.hide():this.Ou.show()}te(){this.Be.Ie=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.lo=t.el(),this.Ou=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText("Share Video"),this.Be=new va(this,this.controlText()),this.on(t,"languagechange",this.te)}};function Sc(t,i,s){switch(i){case"iconurl":return function(t,i){let s=h.createElement("a");var e;s.className="theo-social-iconurl",s.title=null!=(e=t.label)?e:"",s.target="Vu",s.href=i;const n=h.createElement("img");var r,o;return n.src=null!=(r=t.icon)?r:"",n.alt=null!=(o=t.label)?o:"",n.width=25,n.height=25,s.appendChild(n),s}(t,s);case"text":return function(t){let i=h.createElement("div");if(i.className="theo-social-text",t.label){let s=h.createElement("h5");s.className="theo-primary-background theo-social-label",ot(s,t.label),i.appendChild(s)}let s=h.createElement("p");var e;return s.className="theo-social-content-container theo-tertiary-background",s.tabIndex=0,ot(s,null!=(e=t.text)?e:""),i.appendChild(s),i}(t);case"texturl":return function(t,i){let s=h.createElement("div");if(s.className="theo-social-texturl",t.label){let i=h.createElement("h5");i.className="theo-primary-background theo-social-label",ot(i,t.label),s.appendChild(i)}let e=h.createElement("div");e.className="theo-social-content-container theo-tertiary-background";let n=h.createElement("a");return n.target="Vu",n.href=i,ot(n,i),e.appendChild(n),s.appendChild(e),s}(t,s)}}f();var jc="<URL>";var Tc=class{get we(){return this.bu}Lu(t){this.fu();for(let i of t)this.Hu(i)}cu(){this.lu.focus()}Hu(t){let i=function(t,i){return t.src?B(t.src,jc)?t.src.replace(jc,i):t.src:i}(t,this.mu.zu),s=function(t){if(t)return t.icon?"iconurl":t.text?"text":"texturl"}(t),e=Sc(t,s,i);e&&("iconurl"===s?this.qu.appendChild(e):this.Wu.appendChild(e))}fu(){this.qu.innerHTML="",this.Wu.innerHTML=""}gn(){si(this.bu),this.Gu.gn()}constructor(t,i,s,e){this.ta=t,this.mu=i,this.ku=s,this.Xu=e;const n=h.createElement("div");n.className="theo-overlay-panel",this.lu=new lc(this.ta,this.mu.ga),this.lu.controlText("Close Share"),this.Iu=h.createElement("div"),this.Iu.className="theo-social-container",this.bu=h.createElement("div"),this.bu.className="theo-social",this.qu=h.createElement("div"),this.qu.className="theo-social-icon-container",this.Wu=h.createElement("div"),this.Wu.className="theo-social-text-container",this.ku.appendChild(this.bu),this.bu.appendChild(n),this.Iu.appendChild(this.qu),this.Iu.appendChild(this.Wu),n.appendChild(this.lu.el()),n.appendChild(this.Iu),this.Gu=new $t(this.bu,this.Xu)}},Mc="theo-social-available",Ac="theo-social-showing",Pc=class{get ga(){return this.Za}get ru(){return this.Eu}get Ju(){return this.Qu}set Ju(t){this.Qu=t,this.Iu.Lu(t),t.length?(this.Nu(Mc),this.Du.show()):(this.Fu(Mc),this.Du.hide())}get zu(){return this.Yu||P()}set zu(t){this.Yu=t}ge(){this.Eu=!0,this.Nu(Ac),this.Iu.cu(),this.Ku.paused()?this.Bu=!0:this.Ku.pause()}be(){this.Eu=!1,this.Fu(Ac),this.Du.focus(),this.Bu||this.Ku.play(),this.Bu=!1}Nu(t){this.Ku.el().classList.add(t)}Fu(t){this.Ku.el().classList.remove(t)}gn(){this.Du.dispose(),this.Iu.gn()}constructor(t,i){this.Eu=!1,this.Qu=[],this.Bu=!1,this.Za=function(t){return{get showing(){return t.ru},get items(){return t.Ju},set items(i){t.Ju=i},get url(){return t.zu},set url(i){t.zu=i},show(){t.ge()},hide(){t.be()}}}(this),this.Ku=t,this.Iu=new Tc(this.Ku,this,t.contentEl(),i),this.Du=new Cc(t,this.Za,{})}};Ri((function(t){return class extends t{ma(){let t=this.Ou;return vt(super.ma(),{get social(){return t.ga}})}constructor(t,i,s){super(t,i,s),this.Ou=new Pc(this.oo,this.Uu)}}})),f(),f();var Ec=Bo.getComponent("Component"),Nc=class extends Ec{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-upnext-container "+super.buildCSSClass()}};Nc.prototype.h=N({},Nc.prototype.h,{children:[]}),Bo.registerComponent("upNextContainer",Nc),f(),f();var Ic="theo-upnext-bar-",Bc=Bo.getComponent("Component"),Fc=class extends Bc{get ru(){return this.Eu}set ru(t){this.Eu=t,this.Zu&&(this.Zu.tabIndex=t?0:-1)}get tc(){return this.ic}set tc(t){this.ic=t}ka(t){this.fu(),this.sc(t)}sc(t){if(t&&t.link&&t.image){const i=h.createElement("div");ui(i,Ic+"content"),i.onclick=()=>{this.ec.next()},i.onkeypress=t=>{13===t.which&&this.ec.next()};let s=h.createElement("div");if(s.style.backgroundImage='url("'+D(t.image)+'")',ui(s,Ic+"image"),i.appendChild(s),t.duration){let i=h.createElement("span");ui(i,Ic+"duration"),i.innerHTML=""+t.duration,s.appendChild(i)}let e=h.createElement("div");ui(e,Ic+"text");let n=h.createElement("div");if(ui(n,Ic+"upnext"),ot(n,this.localize("Up Next")),e.appendChild(n),t.title){let i=h.createElement("div");ui(i,Ic+"title"),ot(i,t.title),e.appendChild(i)}i.appendChild(e),this.Zu=i,this.nc=n,this.el().appendChild(this.Zu)}}fu(){this.el().innerHTML="",this.Zu=void 0,this.nc=void 0}te(){this.nc&&ot(this.nc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-bar "+super.buildCSSClass()}dispose(){this.Gu.gn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.Zu=void 0,this.nc=void 0,this.ec=i,this.Gu=new $t(this.el(),e),this.Eu=!1,this.ic=10,this.on(t,"languagechange",this.te)}};f();var Dc="theo-upnext-panel-",$c=wu,Rc=Bo.getComponent("Component"),Uc=class extends Rc{get ru(){return this.Eu}set ru(t){this.Eu=t}get rc(){return this.hc}set rc(t){this.hc=t}get oc(){return this.ac}set oc(t){this.ac=t}ka(t){this.fu(),this.uc(t)}uc(t){if(t&&t.link&&t.image){let i=h.createElement("div");i.className=Dc+"content";let s=h.createElement("div");s.style.backgroundImage='url("'+D(t.image)+'")',s.className=Dc+"image",i.appendChild(s);let e=h.createElement("div");e.className=Dc+"text";let n=h.createElement("div");if(n.className=Dc+"upnext",ot(n,this.localize("Up Next")),e.appendChild(n),t.title){let i=h.createElement("div");i.className=Dc+"title",ot(i,t.title),e.appendChild(i)}i.appendChild(e),this.cc=h.createElement("div"),this.cc.className=Dc+"autoplay",this.cc.innerHTML=_u;let r=this.cc.querySelector("svg");r.onclick=()=>{this.ec.next()},r.tabIndex=0,r.onkeypress=t=>{13===t.which&&this.ec.next()},this.lc=n,this.dc=this.cc.querySelector("."+$c),i.appendChild(this.cc),this.el().appendChild(i)}}get fc(){return this.vc}set fc(t){this.vc=t,this.dc.style.strokeDashoffset=""+x.round(1e5*t)/1e5}fu(){this.el().innerHTML="",this.lc=void 0,this.dc=void 0}te(){this.lc&&ot(this.lc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-panel "+super.buildCSSClass()}dispose(){this.Gu.gn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.vc=0,this.ec=i,this.Gu=new $t(this.el(),e),this.Eu=!1,this.hc=10,this.ac=!0,this.on(t,"languagechange",this.te)}},Oc="theo-upnext-panel-showing",Vc="theo-upnext-bar-showing",Lc=2*x.PI*73,Hc=class t{get ga(){return this.Za}get mc(){return this.gc}get yc(){return this.bc}get kc(){return this.wc}set kc(t){this.wc=t,this.Iu.ka(t),this._c.ka(t),this.Ku.off("timeupdate",this.xc),this.Ku.off("ended",this.Cc),t&&(this.Ku.on("timeupdate",this.xc),this.Ku.on("ended",this.Cc))}Sc(){this.Iu.rc?this.jc=_t(this.Iu.rc):0===this.Iu.rc?this.jc=0:this.jc=10,0!==this.jc?(isFinite(this.jc)&&(this.Tc=!0),this.Iu.ru=!0,this.Nu(Oc),this.Tc&&(this.Iu.fc=Lc-Lc/this.jc,this.Mc=v(this.Ac,1e3))):this.Pc()}Ec(){this.Iu.ru=!1,this.Fu(Oc),this.Tc&&(m(this.Mc),this.Nc=1,this.Iu.fc=Lc)}Ic(){this._c.ru=!0,this.Nu(Vc)}Bc(){this._c.ru=!1,this.Fu(Vc)}Pc(){m(this.Mc),this.kc&&(s.location.href=this.kc.link)}Nu(t){this.Ku.el().classList.add(t)}Fu(t){this.Ku.el().classList.remove(t)}Fc(t,i){const s=t>=i&&!(this.Dc&&this.Dc.$c);this._c.ru&&!s?this.Bc():!this._c.ru&&s&&this.Ic()}Rc(t,i){this.Iu.ru&&t<i&&!this.Ku.ended()&&this.Ec()}static Uc(t,i){let s=_t(t);if(!j(s))return i-s;let e=(""+t).match(/^([1-9]?\d|100)%$/);if(e){return i*(1-C(e[1],10)/100)}}gn(){this.Mc&&m(this.Mc),this.Ku.getChild("upNextContainer").removeChild(this.Iu),this.Ku.getChild("upNextContainer").removeChild(this._c),this.Iu.dispose(),this._c.dispose()}constructor(i,s,e){this.wc=void 0,this.jc=10,this.Nc=1,this.Mc=void 0,this.Tc=!0,this.Ac=()=>{this.Nc!==this.jc?(this.Iu.fc-=Lc/this.jc,this.Nc+=1):this.Pc()},this.Cc=()=>{this.Iu.ru||this.Sc()},this.xc=()=>{let i=this.Ku.currentTime(),s=this.Ku.duration(),e=s?t.Uc(this._c.tc,s):void 0;void 0!==e&&this.Fc(i,e),this.Iu.oc&&this.Rc(i,s)},this.Za=function(t){return{get source(){return t.kc},set source(i){t.kc=i},get bar(){return t.mc},get panel(){return t.yc},next(){t.Pc()}}}(this),this._c=new Fc(i,this.Za,{},s),this.Iu=new Uc(i,this.Za,{},s),this.gc=function(t,i){return{get showing(){return i.ru},get offset(){return i.tc},set offset(t){i.tc=t},show(){t.Ic()},hide(){t.Bc()}}}(this,this._c),this.bc=function(t,i){return{get showing(){return i.ru},get countdownDuration(){return i.rc},set countdownDuration(t){i.rc=t},get showUpNextPanel(){return i.oc},set showUpNextPanel(t){i.oc=t},show(){t.Sc()},hide(){t.Ec()}}}(this,this.Iu),this.Ku=i,this.Dc=e,i.getChild("upNextContainer").addChild(this._c,{}),i.getChild("upNextContainer").addChild(this.Iu,{})}};Ri((function(t){return class extends t{ma(){let t=this.Oc;return vt(super.ma(),{get upnext(){return t.ga}})}gn(){this.Oc.gn(),super.gn()}constructor(t,i,s){super(t,i,s),this.Oc=new Hc(this.oo,this.Uu,this.Vc)}}})),f(),f();var zc=Bo.getComponent("Component"),qc=class extends zc{createEl(){let t=super.createEl("ul",{className:"theo-context-menu"}),i=h.createElement("li"),s=h.createElement("a"),e=h.createElement("div");s.className="theo-context-menu-a",i.appendChild(s),e.className="theo-context-menu-logo",e.innerHTML='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="507.262px" height="399.16px" viewBox="0 0.1 507.262 399.16" enable-background="new 0 0.1 507.262 399.16"\n\t xml:space="preserve" class=\'theo-context-menu-logo-svg\'>\n\t<g transform="matrix(1.90897, 0, 0, 1.90897, 212.4, 144.6)">\n\t\t<path fill="#FFFFFF" d="M-38.416-53.802C-53.351-38.867-60.82-20.814-60.82,0.353c0,21.253,7.466,39.392,22.404,54.413\n\t\t\tc6.83,6.658,13.827,11.778,20.996,15.363c5.122,2.561,10.583,4.397,16.388,5.507v1.024h-78.481\n\t\t\tc-21.168,0-31.752-10.584-31.752-31.752v-88.724c0-21.252,10.584-31.879,31.752-31.879h79.377v0.896\n\t\t\tc-6.145,1.196-11.95,3.116-17.411,5.762C-24.632-65.538-31.586-60.46-38.416-53.802"/>\n\t</g>\n\t<g transform="matrix(0.535073, 0, 0, 0.535073, 242.35, 104.7)">\n\t\t<path fill="#FFFFFF" d="M188.354,104.104c-32.941,23.472-75.492,49.679-127.641,78.61c-50.275,28.254-94.358,50.44-132.254,66.572l-41.989,15.616\n\t\t\tc-2.645-11.348-5.122-28.17-7.426-50.44c-5.205-44.383-7.809-93.375-7.809-146.975c0-49.079,3.538-94.947,10.622-137.631\n\t\t\tl10.249-49.034l44.551,14.978C-24.762-88.838,17.06-67.03,62.124-38.777c47.705,29.871,88.638,58.294,122.773,85.266\n\t\t\tc17.061,13.571,29.351,24.028,36.862,31.367L188.354,104.104"/>\n\t</g>\n\t<g transform="matrix(1.91028, 0, 0, 1.91028, 327.15, 144.6)">\n\t\t<path fill="#FFFFFF" d="M94.286-43.816v88.723c0,21.168-10.583,31.751-31.751,31.751h-80.018v-1.025\n\t\t\tc14.683-2.816,27.527-9.77,38.537-20.867c14.936-15.024,22.405-33.16,22.405-54.413c0-21.168-7.467-39.22-22.405-54.156\n\t\t\tC9.871-64.985-3.188-71.939-18.123-74.671v-1.024h80.658C83.702-75.696,94.286-65.069,94.286-43.816"/>\n\t</g>\n</svg>\n',s.appendChild(e);let n=h.createElement("div");return n.className="theo-context-version",ot(n,"Powered by THEOplayer 8.13.2"),s.appendChild(n),s.href="https://www.theoplayer.com/player-referral",s.target="Vu",t.appendChild(i),t}Lc(t){const i=t;i.preventDefault(),this.show(),this.el().style.left="0",this.el().style.top="0";let s=this.player().contentEl(),e=s.getClientRects(),n=e.length>0?e[0]:void 0,r=i.clientX-s.getBoundingClientRect().left,h=S(getComputedStyle(this.el()).fontSize);et(this.el(),r,n,h);let o=i.clientY-s.getBoundingClientRect().top;rt(this.el(),o,n,h),this.Hc()}zc(){this.hide(),this.clearTimeout(this.qc)}Hc(){this.qc=this.setTimeout(this.zc,4e3)}Wc(){this.clearTimeout(this.qc)}dispose(){this.zc(),this.off(this.player(),"contextmenu",this.Lc),this.el().removeEventListener("mousedown",Wc,!0),this.off(h,"mousedown",this.zc),this.off("mouseout",this.Hc),this.off("mouseover",this.Wc),super.dispose()}constructor(t,i){super(t,i),this.qc=0,this.on(this.player(),"contextmenu",this.Lc),this.el().addEventListener("mousedown",Wc,!0),this.on(h,"mousedown",this.zc),this.on("mouseout",this.Hc),this.on("mouseover",this.Wc),this.zc()}};function Wc(t){t.stopPropagation()}Oi((function(t){const i=new qc(t.oo,{});t.oo.addChild(i),t.oo.on("dispose",(()=>{t.oo.removeChild(i),i.dispose()}))})),f(),f(),f(),f();var Gc={Default:"","Monospaced Serif":V.Gc,"Proportional Serif":V.Xc,"Monospaced Sans-Serif":V.Jc,"Proportional Sans-Serif":V.Qc},Xc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},Jc=[50,75,100,150,200];function Qc(t){return{label:t+"%",value:t}}function Yc(t){return _.keys(t).map((i=>({label:i,value:t[i]})))}Jc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var Kc=Jc.map((function(t){return{label:t+"%",value:t+"%"}})),Zc=[25,50,75,100].map(Qc),tl=[0,25,50,75,100].map(Qc),il=Yc(Xc),sl=Yc(Gc),el=Yc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),nl=100,rl="#000000",hl="#FFFFFF",ol="#000000";f();var al=class extends tu{Yc(){let t=this.Fr.localize(this.Kc);ot(this.Zc.subMenu.menuHeader.el(),t),this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",ot(this.Br,t);let i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",ui(this.Zc.el(),"theo-subtitle-options-menu-item"),this.Zc.el().appendChild(this.Br),this.Zc.el().appendChild(i),i}tl(t){const i=this.jr(t);i&&this.il(i)}sl(){return this.br}Ar(t){this.nl(t.Tr)}il(t){for(let t of this.Cr.menuItems)t.selected(!1);t?(t.selected(!0),this.rl(t.Tr.label)):this.rl("Custom")}rl(t){this.hl=t,ot(this.ol,this.Fr.localize(t)),this.Zc.parentMenu.re()}Mr(t){let i=super.Mr(t);return ui(i.el(),"theo-subtitle-options-menu-item"),this.Nr(i),i}Nr(t){const i=this.Fr.localize(t.Tr.label);ot(t.el(),i);const s=this.Fr.localize("Set "+this.Kc+" to ")+i;t.el().setAttribute("aria-label",s)}Re(){this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.Zc=t,this.Fr=e,this.hl="",this.te=()=>{let t=this.Fr.localize(this.Kc);ot(this.Zc.subMenu.menuHeader.el(),t),ot(this.Br,t),this.rl(this.hl);for(const t of this.Sr)this.Nr(t)},this.Kc=i,this.nl=s.al,this.ol=this.Yc(),this.br=s.cl,this.Fr.on("languagechange",this.te)}};f();var ul=class t{static ll(t,i,s,e){if(void 0===t&&void 0===i)return;return Y(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.dl=i,this.fl=t=>{this.dl.fontFamily=t.value},this.vl=t=>{this.dl.fontSize=t.value},this.pl=i=>{this.ml=i.value,this.dl.fontColor=t.ll(this.gl,this.ml,hl,nl)},this.yl=i=>{this.gl=i.value,this.dl.fontColor=t.ll(this.gl,this.ml,hl,nl)},this.bl=i=>{this.kl=i.value,this.dl.backgroundColor=t.ll(this.kl,this.wl,rl,nl)},this._l=i=>{this.wl=i.value,this.dl.backgroundColor=t.ll(this.kl,this.wl,rl,nl)},this.xl=i=>{this.Cl=i.value,this.dl.windowColor=t.ll(this.Cl,this.Sl,ol,nl)},this.jl=i=>{this.Sl=i.value,this.dl.windowColor=t.ll(this.Cl,this.Sl,ol,nl)},this.Tl=t=>{this.dl.edgeStyle=t.value}}};f();var cl=class{Ml(t,i){const s=this.Al(t,i.sl());s&&i.tl(s)}Al(t,i){return z(i,(i=>i.value===t))}Pl(t,i,s){let e,n;if(void 0===t)e=this.Al(void 0,i.sl()),n=this.Al(void 0,s.sl());else if(t){let r=function(t){let i=J(t);i||(i=J(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=H(q(t),1));if(!i){let s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=H(q(Xc[s]),1)}return i}(t);if(r){let t=G(r),h=100*r.El;e=this.Al(t,i.sl()),n=this.Al(h,s.sl())}}e&&i.tl(e),n&&s.tl(n)}constructor(t,i){this.dl=t,this.Nl=i,this.Il=()=>{let t=this.dl.fontFamily;this.Ml(t,this.Nl["Font family"]);let i=this.dl.fontColor;this.Pl(i,this.Nl["Font color"],this.Nl["Font opacity"]);let s=this.dl.fontSize;this.Ml(s,this.Nl["Font size"]);let e=this.dl.backgroundColor;this.Pl(e,this.Nl["Background color"],this.Nl["Background opacity"]);let n=this.dl.windowColor;this.Pl(n,this.Nl["Window color"],this.Nl["Window opacity"]);let r=this.dl.edgeStyle;this.Ml(r,this.Nl["Character edge style"])},this.dl.addEventListener("change",this.Il),this.Il()}};var ll=class extends tu{Bl(){return{"Font family":{cl:dl(sl),al:this.Fl.fl},"Font color":{cl:dl(il),al:this.Fl.yl},"Font opacity":{cl:dl(Zc),al:this.Fl.pl},"Font size":{cl:dl(Kc),al:this.Fl.vl},"Background color":{cl:dl(il),al:this.Fl.bl},"Background opacity":{cl:dl(tl),al:this.Fl._l},"Window color":{cl:dl(il),al:this.Fl.xl},"Window opacity":{cl:dl(tl),al:this.Fl.jl},"Character edge style":{cl:dl(el),al:this.Fl.Tl}}}Dl(){this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",this.$l=h.createElement("span"),this.$l.className="theo-primary-color theo-settings-control-menu-item-value",this.Hr.el().appendChild(this.Br),this.Hr.el().appendChild(this.$l),this.te()}Mr(t){let i=this.Cr.addSubMenuItem();return i.Tr=t,this.Nl[t]=new al(i,t,this.Rl[t],this.Fr),i}Nr(t){}Ar(t){}Re(){this.Fr.off("languagechange",this.te),this.Ul.removeEventListener(["addtrack","removetrack"],this.Ol),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.Hr=t,this.Ul=i,this.Fr=e,this.Nl={},this.Ol=()=>{this.Ul.some((t=>Dt(t.kind)))?this.Hr.show():this.Hr.hide()},this.te=()=>{ot(this.Cr.menuHeader.el(),this.Fr.localize("Subtitle Options")),ot(this.Br,this.Fr.localize("Subtitle")),ot(this.$l,this.Fr.localize("Options")),this.Hr.el().setAttribute("aria-label",this.Fr.localize("Open the subtitle options menu"))},this.Fl=new ul(s),this.Rl=this.Bl(),this.br=_.keys(this.Rl),this.Dl(),this.Vl=new cl(s,this.Nl),this.Fr.on("languagechange",this.te),this.Ul.addEventListener(["addtrack","removetrack"],this.Ol),this.Ol()}};function dl(t){let i=[{label:"Default",value:void 0}];for(let s of t)"Default"!==s.label&&i.push(s);return i}Oi((function(t){const i=t.oo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new ll(s,t.nt.ga,t.Ll.ga,t.oo);t.oo.on("dispose",(()=>{i.removeMenuItem(s),s.dispose(),e.Re(),i.dispose()}))})),f(),f();var fl=Bo.getComponent("Component"),vl=class extends fl{buildCSSClass(){return"theo-ad-control-panel"}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}constructor(t,i){super(t,i),t.adControlBar=this}};vl.prototype.h=N({},fl.prototype.h,{children:[]}),Bo.registerComponent("AdControlPanel",vl),f(),f();var pl=Bo.getComponent("Component"),ml="theo-dai-countdown",gl=class extends pl{buildCSSClass(){return ml}createEl(t,i,s){const e=h.createElement("div");return e.className=ml,e}Hl(t,i){i.addEventListener("adbreakbegin",(()=>this.show())),i.addEventListener("adbreakend",(()=>this.hide())),t.addEventListener("timeupdate",this.te)}constructor(t,i,s){super(t,s),this.ta=t,this.Za=i,this.te=()=>{const t=this.Za.ads;t.playing&&t.currentAdBreak&&t.currentAds.length&&ot(this.contentEl(),function(t,i,s){const e=t.ads;let n="";const r=e.length;if(r>1){const t=e.indexOf(i)+1;n=s("Ad")+" "+t+"/"+r+". "}const h=x.ceil(t.maxRemainingDuration);return n+=s("The content will resume in {1} seconds.").replace("{1}",""+h),n}(t.currentAdBreak,t.currentAds[0],(t=>this.ta.localize(t))))},this.lo=t.el(),this.Hl(i,i.ads),this.on(t,"languagechange",this.te)}};f();var yl=Bo.getComponent("ClickableComponent"),bl=class extends yl{buildCSSClass(){return Kt}createEl(t,i,s){return this.h.ga.element.querySelector("."+Kt)}emitTapEvents(){}te(){ot(this.el(),this.localize("Learn more"))}constructor(t,i){super(t,i),ot(this.el(),t.localize("Learn more")),this.Za=i.ga,this.lo=t.el(),this.on(t,"languagechange",this.te)}};Oi((function(t){if(t.ga.ads&&t.zl){const i=t.oo,s=new gl(i,t.ga);i.adControlBar.addChild(s);if(t.ga.element.querySelector("."+Kt)){const s=new bl(i,{ga:t.ga});i.adControlBar.addChild(s)}}})),f(),f();var kl=Bo.getComponent("Component"),wl=["addtrack","removetrack","change"],_l=class extends(Ho(kl)){createEl(){let t=super.createEl();return this.qualityLabel=Bo.createEl("div",{className:"theo-quality-label-text"}),t.appendChild(this.qualityLabel),gi(this.qualityLabel),t}dispose(){this.qr&&(this.qr.removeEventListener("activequalitychanged",this.ql),this.qr=void 0),this.ws.videoTracks.removeEventListener(wl,this.nh),super.dispose()}constructor(t,i){super(t,i),this.qr=void 0,this.nh=()=>{const t=Qa(this.ws.videoTracks);t!==this.qr&&(this.qr&&this.qr.removeEventListener("activequalitychanged",this.ql),this.qr=t,t&&t.addEventListener("activequalitychanged",this.ql),this.ql())},this.ql=()=>{const t=this.qr&&this.qr.activeQuality;if(!this.qualityLabel||!t)return;const i=t.label?t.label:t.height?t.height+"p":void 0;i&&(ot(this.qualityLabel,i),this.addClass("theo-quality-label-show"),this.hideActiveQualityLabel())},this.hideActiveQualityLabel=()=>{this.resetTimeout(),this.startFadeOutID=this.setTimeout(this.fadeoutLabel,3750),this.removeLabelClassesID=this.setTimeout(this.hideLabel,4e3)},this.resetTimeout=()=>{this.startFadeOutID&&this.clearTimeout(this.startFadeOutID),this.removeLabelClassesID&&this.clearTimeout(this.removeLabelClassesID)},this.fadeoutLabel=()=>{this.addClass("theo-quality-label-fadeout")},this.hideLabel=()=>{this.removeClass("theo-quality-label-show"),this.removeClass("theo-quality-label-fadeout")},super.addClass("theo-quality-label"),this.ws.videoTracks&&(this.ws.videoTracks.addEventListener(wl,this.nh),this.nh())}};Bo.registerComponent("activeQualityLabel",_l),f(),f();var xl="theo-upcoming-ad-notification",Cl=["adbreakbegin","adbreakend","adadded","adloaded","adbegin","adend"],Sl=class extends(Ho(ga)){createEl(){const t=Bo.createEl("div",{className:xl});return this.notificationText=Bo.createEl("div",{className:xl+"text"}),t.appendChild(this.notificationText),t}Wl(){if(!this.ws.ads)return;const t=this.ws.ads.scheduledAdBreaks;let i,s=1/0;for(let e=0;e<t.length;e++){const n=t[e];let r=n.timeOffset;-1!==r&&r<s&&(s=r,i=n)}this.currentAdBreak=i,this.currentAdBreakValid=void 0!==i&&void 0!==i.ads&&i.ads.some((t=>"linear"===t.type))}Gl(){if(!this.ws.ads||this.ws.ads.playing||!this.currentAdBreak||!this.currentAdBreakValid||0===this.currentAdBreak.timeOffset)return void this.Xl();const t=this.ws.currentTime;if(this.currentAdBreak.timeOffset>t+10)return void this.Xl();const i=x.ceil(this.currentAdBreak.timeOffset-t);i<0?this.Xl():this.Jl(i)}Jl(t){this.Ql!==t&&(ot(this.notificationText,"Your video will be temporarily interrupted in 0:"+(t<10?"0"+t:t)),this.Ql=t,this.show())}Xl(){this.Ql=NaN,this.hide()}dispose(){var t;this.ws.removeEventListener("timeupdate",this.handleTimeUpdate),null==(t=this.ws.ads)||t.removeEventListener(Cl,this.handleAdEvent),this.currentAdBreak=void 0,super.dispose()}constructor(t,i){super(t,i),this.currentAdBreak=void 0,this.currentAdBreakValid=!1,this.Ql=NaN,this.handleTimeUpdate=()=>{this.Gl()},this.handleAdEvent=()=>{this.Wl(),this.Gl()},this.ws.ads&&(this.hide(),this.ws.addEventListener("timeupdate",this.handleTimeUpdate),this.ws.ads.addEventListener(Cl,this.handleAdEvent))}};Bo.registerComponent("upcomingAdNotificationText",Sl),f(),f();var jl=Bo.getComponent("Component");Bo.registerComponent("UplynkAdBreakBar",class extends jl{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",t}get Yl(){return this.h.adBreakProvider()}te(t,i){if(this.Yl&&this.Yl.endTime){const s=x.max(this.Yl.endTime-t,0);ot(i,"Content will resume in "+x.ceil(s)+"s"),this.show()}else this.hide()}constructor(t,i){super(t,i),this.Kl=()=>{this.te(this.player().currentTime(),this.el())},this.on(t,"timeupdate",this.Kl)}}),f();var Tl=Bo.getComponent("ClickableComponent");Bo.registerComponent("UplynkAdSkipButton",class extends Tl{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.Zl=h.createElement("span"),t.appendChild(this.Zl),this.te(t,this.Zl),t}handleClick(){this.h.skipCallback()}te(t,i){this.td<=Mt.ed.sd?(li(t,"theoplayer-ad-skip-countdown"),ui(t,"theoplayer-ad-skip-button"),ot(i,"Skip ads")):ot(i,"Skip ads in "+x.ceil(this.td)+"s")}get td(){return this.h.adBreak.startTime+this.h.adBreak.skipOffset-this.player().currentTime()}constructor(t,i){super(t,i),this.Kl=()=>{this.te(this.el(),this.Zl)},this.on(t,"timeupdate",this.Kl)}}),f(),f();var Ml=Bo.getComponent("Component"),Al=class extends Ml{buildCSSClass(){return"theo-verizonmedia-marker-bar theo-uplynk-marker-bar"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}};Bo.registerComponent("UplynkAdBreakMarkerBar",class extends Al{buildCSSClass(){return super.buildCSSClass()+" theo-verizonmedia-marker-bar-adbreak theo-uplynk-marker-bar-adbreak"}}),f(),f();var Pl=Bo.getComponent("Component"),El=class extends Pl{get startTime(){return this.h.startTime}get endTime(){return this.h.endTime}get seekable(){return this.player().seekable()}buildCSSClass(){return"theo-verizonmedia-marker theo-uplynk-marker"}createEl(t,i,s){const e=h.createElement("div");e.className=this.buildCSSClass();const n=this.seekable.start(0),r=this.seekable.end(this.seekable.length-1),o=x.max(this.startTime-n,0),a=void 0!==this.endTime?x.max(r-this.endTime,0):0,u=r-n;return e.style.left=o/u*100+"%",e.style.right=a/u*100+"%",e}constructor(t,i){super(t,i)}};Bo.registerComponent("UplynkAdBreakMarker",class extends El{buildCSSClass(){return super.buildCSSClass()+" theo-verizonmedia-marker-adbreak theo-uplynk-marker-adbreak"}}),f();Bo.registerComponent("UplynkAssetMarkerBar",class extends Al{buildCSSClass(){return super.buildCSSClass()+" theo-verizonmedia-marker-bar-asset theo-uplynk-marker-bar-asset"}}),f();Bo.registerComponent("UplynkAssetMarker",class extends El{buildCSSClass(){return super.buildCSSClass()+" theo-verizonmedia-marker-asset theo-uplynk-marker-asset"}}),f(),Vt();var Nl=Bo.getComponent("Component");Bo.registerComponent("UplynkContentNotificationBar",class extends Nl{buildCSSClass(){const t="theo-verizonmedia-content-notification-bar",i="theo-uplynk-content-notification-bar";return t+" "+i+(Rt.Ka||Rt.nd?" "+t+"-ios "+i+"-ios":"")}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}}),f();var Il=Bo.getComponent("Component");function Bl(t,i){var s;const e=null!=(s=t.uplynk)?s:t.verizonMedia;return Boolean(t&&void 0===e)||Boolean(t&&e&&void 0===e.ui)||Boolean(t&&e&&e.ui&&void 0===e.ui[i])||Boolean(t&&e&&e.ui&&!0===e.ui[i])}Bo.registerComponent("UplynkContentNotification",class extends Il{get rd(){return this.h.asset}buildCSSClass(){return"theo-verizonmedia-content-notification theo-uplynk-content-notification"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}fo(){const t=h.createElement("img");t.src=this.rd.posterUrl,t.className=this.buildCSSClass()+"-thumbnail",this.el().appendChild(t);const i=h.createElement("div");i.className=this.buildCSSClass()+"-description";const s=function(t){return"Next: "+t}(this.rd.description);ot(i,s),this.el().appendChild(i),this.od=h.createElement("div"),this.od.className=this.buildCSSClass()+"-countdown",ot(this.od,this.ad),this.el().appendChild(this.od)}get ad(){const t=x.min(10,this.ud);return"Starting in "+x.ceil(t)+" seconds"}get ud(){return x.max(0,this.rd.startTime-this.player().currentTime())}ld(){const t=this.ud;t>10||t<=0?this.hide():(ot(this.od,this.ad),this.show())}constructor(t,i){super(t,i),this.fo(),this.on(t,"timeupdate",this.ld),this.hide()}}),f(),Ri((function(t){return class extends t{get dd(){return this.oo.controlBar.progressControl.seekBar}ka(t){this.fd=!1,this.ga.removeEventListener("timeupdate",this.vd),this.oo.removeChild("UplynkAdBreakBar"),this.oo.removeChild("UplynkAdSkipButton"),this.dd.removeChild("UplynkAdBreakMarkerBar"),this.dd.removeChild("UplynkAssetMarkerBar"),this.oo.removeChild("UplynkContentNotificationBar"),super.ka(t)}pd(){if(!function(t){return Bl(t,"assetMarkers")}(this.md)||!this.fd)return;var t;const i=(null!=(t=this.ga.uplynk)?t:this.ga.verizonMedia).assets.map((t=>({name:"UplynkAssetMarker",startTime:t.startTime,endTime:t.endTime})));this.dd.removeChild("UplynkAssetMarkerBar"),this.dd.addChild("UplynkAssetMarkerBar",{children:i})}gd(){if(!function(t){return Bl(t,"contentNotification")}(this.md))return;var t;const i=(null!=(t=this.ga.uplynk)?t:this.ga.verizonMedia).assets.map((t=>({name:"UplynkContentNotification",asset:t})));this.oo.removeChild("UplynkContentNotificationBar"),this.oo.addChild("UplynkContentNotificationBar",{children:i})}gn(){var t;this.ga.removeEventListener("timeupdate",this.vd);const i=null!=(t=this.ga.uplynk)?t:this.ga.verizonMedia;null==i||i.ads.adBreaks.removeEventListener("addadbreak",this.yd),null==i||i.ads.adBreaks.removeEventListener("removeadbreak",this.bd),null==i||i.assets.removeEventListener("addasset",this.kd),null==i||i.assets.removeEventListener("removeasset",this.kd),this.ga.removeEventListener("loadeddata",this.wd),super.gn()}constructor(t,i,s){var e;super(t,i,s),this.fd=!1,this.wd=()=>{this.fd=!0,isFinite(this._d())||this.ga.addEventListener("timeupdate",this.vd),this.vd(),this.pd(),this.gd()},this.yd=t=>{t.adBreak.addEventListener("adbreakbegin",this.xd),t.adBreak.addEventListener("adbreakend",this.Cd),this.vd()},this.bd=t=>{t.adBreak.removeEventListener("adbreakbegin",this.xd),t.adBreak.removeEventListener("adbreakend",this.Cd),this.vd()},this.vd=()=>{if(!function(t){return Bl(t,"adBreakMarkers")}(this.md)||!this.fd)return;var t;const i=null!=(t=this.ga.uplynk)?t:this.ga.verizonMedia,s=null==i?void 0:i.ads.adBreaks.map((t=>({name:"UplynkAdBreakMarker",startTime:t.startTime,endTime:t.endTime})));this.dd.removeChild("UplynkAdBreakMarkerBar"),this.dd.addChild("UplynkAdBreakMarkerBar",{children:s})},this.xd=()=>{if(function(t){return Bl(t,"adNotification")}(this.md)){var t;const i=null!=(t=this.ga.uplynk)?t:this.ga.verizonMedia,s=i.ads.currentAdBreak;this.oo.addChild("UplynkAdBreakBar",{adBreakProvider:this.Sd}),-1!==s.skipOffset&&this.oo.addChild("UplynkAdSkipButton",{adBreak:s,skipCallback:i.ads.skip})}},this.Sd=()=>{var t;return(null!=(t=this.ga.uplynk)?t:this.ga.verizonMedia).ads.currentAdBreak},this.Cd=()=>{this.oo.removeChild("UplynkAdBreakBar"),this.oo.removeChild("UplynkAdSkipButton")},this.kd=()=>{this.pd(),this.gd()};const n=null!=(e=this.ga.uplynk)?e:this.ga.verizonMedia;null==n||n.ads.adBreaks.addEventListener("addadbreak",this.yd),null==n||n.ads.adBreaks.addEventListener("removeadbreak",this.bd),null==n||n.assets.addEventListener("addasset",this.kd),null==n||n.assets.addEventListener("removeasset",this.kd),this.ga.addEventListener("loadeddata",this.wd)}}}));export{gt as ChromelessPlayer,ct as ErrorCategory,at as ErrorCode,Hu as Player,Jt as cache,Ht as cast,wt as features,St as playerSuiteVersion,Tt as players,At as registerContentProtectionIntegration,bt as utils,xt as version,Bo as videojs};
|
|
40
|
+
var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,u=(a.location,a.navigator,a.setTimeout),v=a.clearTimeout,p=a.setInterval,m=a.clearInterval,g=a.Error,b=a.TypeError,k=a.SyntaxError,w=a.Object,_=a.Math,x=a.parseInt,C=a.parseFloat,S=a.isNaN,j=a.Uint8Array;a.Worker,a.WorkerGlobalScope,a.XMLHttpRequest;import{$ as T,$a as M,A,Aa as P,B as E,Ba as N,C as I,Ca as B,D as F,Da as D,E as $,Ea as R,F as U,Fa as O,G as V,Ga as L,H,Ha as q,I as z,Ia as W,J as G,Ja as X,K as J,Ka as Q,L as Y,La as K,M as Z,Ma as tt,N as it,Na as st,O as et,Oa as nt,P as rt,Pa as ht,Q as ot,Qa as at,R as ut,Ra as ct,S as lt,Sa as dt,T as ft,Ta as vt,U as pt,Ua as mt,V as gt,Va as yt,W as bt,Wa as kt,X as wt,Xa as _t,Y as xt,Ya as Ct,Z as St,Za as jt,_ as Tt,_a as Mt,a as At,aa as Pt,ab as Et,b as Nt,ba as It,bb as Bt,c as f,ca as Ft,cb as Dt,d as $t,da as Rt,db as Ut,e as Ot,ea as Vt,eb as Lt,f as Ht,fa as qt,fb as zt,g as Wt,ga as Gt,h as Xt,ha as Jt,i as Qt,ia as Yt,j as Kt,ja as Zt,k as ti,ka as ii,l as si,la as ei,m as ni,ma as ri,n as hi,na as oi,o as ai,oa as ui,p as ci,pa as li,q as di,qa as fi,r as vi,ra as pi,s as mi,sa as gi,t as yi,ta as bi,u as ki,ua as wi,v as _i,va as xi,w as Ci,wa as Si,x as ji,xa as Ti,y as Mi,ya as Ai,z as Pi,za as Ei}from"./THEOplayer.common.esm.js";f(),f(),f(),f();var Ni=[];function Ii(t){Ni.push(t)}var Bi=[];function Fi(t){Bi.push(t)}f(),f(),f(),f();var c=void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Di=void 0!==h?h:{createElement:function(){}};function $i(t,i){return i||(i=t.slice(0)),t.raw=i,t}var Ri=1;function Ui(){return Ri++}var Oi,Vi=w.prototype.toString,Li=function(t){return zi(t)?w.keys(t):[]};function Hi(t,i){Li(t).forEach((function(s){return i(t[s],s)}))}function qi(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),e=1;e<i;e++)s[e-1]=arguments[e];return w.assign?w.assign.apply(w,[t].concat(s)):(s.forEach((function(i){i&&Hi(i,(function(i,s){t[s]=i}))})),t)}function zi(t){return!!t&&"object"==typeof t}function Wi(t){return zi(t)&&"[object Object]"===Vi.call(t)&&t.constructor===w}var Gi=function(t,i,s){void 0===s&&(s=!!Ws&&Ws<11),"log"!==t&&i.unshift(t.toUpperCase()+":"),Oi.history.push(i),i.unshift("VIDEOJS:");var e=c.console&&c.console[t];e&&(s&&(i=i.map((function(t){if(zi(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(i){return String(t)}return String(t)})).join(" ")),e.apply?e[Array.isArray(i)?"apply":"call"](c.console,i):e(i))};(Oi=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];Gi("log",i)}).history=[],Oi.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Gi("error",i)},Oi.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Gi("warn",i)};var Xi=Oi,Ji="undefined"!=typeof globalThis?globalThis:void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Qi(t){return t.replace(/\n\r?\s*/g,"")}var Yi,Ki=function(t){for(var i="",s=0;s<arguments.length;s++)i+=Qi(t[s])+(arguments[s+1]||"");return i};function Zi(t){return"string"==typeof t&&/\S/.test(t)}function ts(t){if(/\s/.test(t))throw new g("class has illegal whitespace characters")}function is(){return Di===c.document&&void 0!==Di.createElement}function ss(t){return zi(t)&&1===t.nodeType}function es(t){return function(i,s){if(!Zi(i))return Di[t](null);Zi(s)&&(s=Di.querySelector(s));var e=ss(s)?s:Di;return e[t]&&e[t](i)}}function ns(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=Di.createElement(t);return w.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Xi.warn(Ki(Yi||(Yi=$i(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."])),t,s)),n.setAttribute(t,s)):"textContent"===t?rs(n,s):n[t]=s})),w.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&Cs(n,e),n}function rs(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function hs(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var os={},as="vdata"+(new Date).getTime();function us(t){var i=t[as];return i||(i=t[as]=Ui()),os[i]||(os[i]={}),os[i]}function cs(t){var i=t[as];return!!i&&!!w.getOwnPropertyNames(os[i]).length}function ls(t){var i=t[as];if(i){delete os[i];try{delete t[as]}catch(i){t.removeAttribute?t.removeAttribute(as):t[as]=null}}}function ds(t,i){return ts(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function fs(t,i){return t.classList?t.classList.add(i):ds(t,i)||(t.className=(t.className+" "+i).trim()),t}function vs(t,i){return t.classList?t.classList.remove(i):(ts(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function ps(t,i,s){var e=ds(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?fs(t,i):vs(t,i),t}function ms(t,i){w.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function gs(t){var i={};if(t&&t.attributes&&t.attributes.length>0)for(var s=t.attributes,e=s.length-1;e>=0;e--){var n=s[e].name,r=s[e].value;"boolean"!=typeof t[n]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+",")||(r=null!==r),i[n]=r}return i}function ys(t,i,s){t.setAttribute(i,s)}function bs(t,i){t.removeAttribute(i)}function ks(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=Di.documentElement,e=Di.body,n=s.clientLeft||e.clientLeft||0,r=c.pageXOffset||e.scrollLeft,h=i.left+r-n,o=s.clientTop||e.clientTop||0,a=c.pageYOffset||e.scrollTop,u=i.top+a-o;return{left:_.round(h),top:_.round(u)}}function ws(t,i){var s={},e=ks(t),n=t.offsetWidth,r=t.offsetHeight,h=e.top,o=e.left,a=i.pageY,u=i.pageX;return i.changedTouches&&(u=i.changedTouches[0].pageX,a=i.changedTouches[0].pageY),s.y=_.max(0,_.min(1,(h-a+r)/r)),s.x=_.max(0,_.min(1,(u-o)/n)),s}function _s(t){return zi(t)&&3===t.nodeType}function xs(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Cs(t,i){return function(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),ss(t)||_s(t)?t:"string"==typeof t&&/\S/.test(t)?Di.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function Ss(t,i){return Cs(xs(t),i)}var js,Ts=es("querySelector"),Ms=es("querySelectorAll"),As=c.navigator&&c.navigator.userAgent||"",Ps=/AppleWebKit\/([\d.]+)/i.exec(As),Es=Ps?C(Ps.pop()):null,Ns=/iPad/i.test(As),Is=/iPhone/i.test(As)&&!Ns,Bs=/iPod/i.test(As),Fs=Is||Ns||Bs,Ds=(js=As.match(/OS (\d+)_/i))&&js[1]?js[1]:null,$s=/Android/i.test(As),Rs=function(){var t=As.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&C(t[1]),s=t[2]&&C(t[2]);return i&&s?C(t[1]+"."+t[2]):i||null}(),Us=$s&&/webkit/i.test(As)&&Rs<2.3,Os=$s&&Rs<5&&Es<537,Vs=/Firefox/i.test(As),Ls=/Edge/i.test(As),Hs=!Ls&&/Chrome/i.test(As),qs=function(){var t=As.match(/Chrome\/(\d+)/);return t&&t[1]?C(t[1]):null}(),zs=/MSIE\s8\.0/.test(As),Ws=function(){var t=/MSIE\s(\d+)\.\d/.exec(As),i=t&&C(t[1]);return!i&&/Trident\/7.0/i.test(As)&&/rv:11.0/.test(As)&&(i=11),i}(),Gs=/Safari/i.test(As)&&!Hs&&!$s&&!Ls,Xs=Gs||Fs,Js=is()&&("ontouchstart"in c||c.DocumentTouch&&c.document instanceof c.DocumentTouch),Qs=is()&&"backgroundSize"in c.document.createElement("video").style,Ys=w.freeze({__proto__:null,IS_IPAD:Ns,IS_IPHONE:Is,IS_IPOD:Bs,IS_IOS:Fs,IOS_VERSION:Ds,IS_ANDROID:$s,ANDROID_VERSION:Rs,IS_OLD_ANDROID:Us,IS_NATIVE_ANDROID:Os,IS_FIREFOX:Vs,IS_EDGE:Ls,IS_CHROME:Hs,CHROME_VERSION:qs,IS_IE8:zs,IE_VERSION:Ws,IS_SAFARI:Gs,IS_ANY_SAFARI:Xs,TOUCH_ENABLED:Js,BACKGROUND_SIZE_SUPPORTED:Qs});function Ks(t,i){var s=us(t);0===s.handlers[i].length&&(delete s.handlers[i],t.removeEventListener?t.removeEventListener(i,s.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+i,s.dispatcher)),w.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===w.getOwnPropertyNames(s).length&&ls(t)}function Zs(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function te(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||c.event;for(var n in t={},e)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&"path"!==n&&("returnValue"===n&&e.preventDefault||(t[n]=e[n]));if(t.target||(t.target=t.srcElement||Di),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){e.preventDefault&&e.preventDefault(),t.returnValue=!1,e.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){e.stopPropagation&&e.stopPropagation(),t.cancelBubble=!0,e.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=s,t.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=s,null!==t.clientX&&void 0!==t.clientX){var r=Di.documentElement,h=Di.body;t.pageX=t.clientX+(r&&r.scrollLeft||h&&h.scrollLeft||0)-(r&&r.clientLeft||h&&h.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||h&&h.scrollTop||0)-(r&&r.clientTop||h&&h.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var ie=!1;!function(){try{var t=w.defineProperty({},"passive",{get:function(){ie=!0}});c.addEventListener("test",null,t)}catch(t){}}();var se=["touchstart","touchmove"];function ee(t,i,s){if(Array.isArray(i))return Zs(ee,t,i,s);var e=us(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=Ui()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=te(i);var n=e.handlers[i.type];if(n)for(var r=n.slice(0),h=0,o=r.length;h<o&&!i.isImmediatePropagationStopped();h++)try{r[h].call(t,i,s)}catch(t){Xi.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;ie&&se.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function ne(t,i,s){if(cs(t)){var e=us(t);if(e.handlers){if(Array.isArray(i))return Zs(ne,t,i,s);var n=function(i){e.handlers[i]=[],Ks(t,i)};if(i){var r=e.handlers[i];if(r)if(s){if(s.guid)for(var h=0;h<r.length;h++)r[h].guid===s.guid&&r.splice(h--,1);Ks(t,i)}else n(i)}else for(var o in e.handlers)n(o)}}}function re(t,i,s){var e=cs(t)?us(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=te(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)re.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=us(i.target);i.target[i.type]&&(r.disabled=!0,"function"==typeof i.target[i.type]&&i.target[i.type](),r.disabled=!1)}return!i.defaultPrevented}function he(t,i,s){if(Array.isArray(i))return Zs(he,t,i,s);var e=function e(){ne(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||Ui(),ee(t,i,e)}var oe,ae=!1,ue=function(){if(is()){var t=Di.getElementsByTagName("video"),i=Di.getElementsByTagName("audio"),s=[];if(t&&t.length>0)for(var e=0,n=t.length;e<n;e++)s.push(t[e]);if(i&&i.length>0)for(var r=0,h=i.length;r<h;r++)s.push(i[r]);if(s&&s.length>0)for(var o=0,a=s.length;o<a;o++){var u=s[o];if(!u||!u.getAttribute){ce(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&oe(u)}else ae||ce(1)}};function ce(t,i){i&&(oe=i),c.setTimeout(ue,t)}is()&&"complete"===Di.readyState?ae=!0:he(c,"load",(function(){ae=!0}));var le=function(t){var i=Di.createElement("style");return i.className=t,i},de=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},n=function(t,i,s){i.guid||(i.guid=Ui());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function fe(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function ve(){for(var t={},i=arguments.length,s=new Array(i),e=0;e<i;e++)s[e]=arguments[e];return s.forEach((function(i){i&&Hi(i,(function(i,s){Wi(i)?(Wi(t[s])||(t[s]={}),t[s]=ve(t[s],i)):t[s]=i}))})),t}var i=function(){function t(t,i,s){if(!t&&this.play?this.t=t=this:this.t=t,this.h=ve({},this.h),i=this.h=ve(this.h,i),this.o=i.id||i.el&&i.el.id,!this.o){var e=t&&t.id&&t.id()||"no_player";this.o=e+"u"+Ui()}this.l=i.name||null,i.el?this.v=i.el:!1!==i.createEl&&(this.v=this.createEl()),this.m=[],this.k={},this.C={},!1!==i.initChildren&&this.initChildren(),this.ready(s),!1!==i.reportTouchActivity&&this.enableTouchActivity()}var i=t.prototype;return i.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.m)for(var t=this.m.length-1;t>=0;t--)this.m[t].dispose&&this.m[t].dispose();this.m=null,this.k=null,this.C=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),ls(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return Xi.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=ve(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,s){return ns(t,i,s)},i.localize=function(t){var i=this.t.language&&this.t.language(),s=this.t.languages&&this.t.languages();if(!i||!s)return t;var e=s[i];if(e&&e[t])return e[t];var n=s[i.split("-")[0]];return n&&n[t]?n[t]:t},i.contentEl=function(){return this.S||this.v},i.id=function(){return this.o},i.name=function(){return this.l},i.children=function(){return this.m},i.getChildById=function(t){return this.k[t]},i.getChild=function(t){if(t)return t=fe(t),this.C[t]},i.addChild=function(i,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.m.length),"string"==typeof i){r=fe(i),s||(s={}),!0===s&&(Xi.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),s={});var h=s.componentClass||r;s.name=r;var o=t.getComponent(h);if(!o)throw new g("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.t||this,s)}else n=i;if(this.m.splice(e,0,n),"function"==typeof n.id&&(this.k[n.id()]=n),(r=r||n.name&&fe(n.name()))&&(this.C[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.m){for(var i=!1,s=this.m.length-1;s>=0;s--)if(this.m[s]===t){i=!0,this.m.splice(s,1);break}if(i){this.k[t.id()]=null,this.C[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,s=this.h.children;if(s){var e,n=this.h,r=t.getComponent("Tech");(e=Array.isArray(s)?s:w.keys(s)).concat(w.keys(this.h).filter((function(t){return!e.some((function(i){return"string"==typeof i?t===i:t===i.name}))}))).map((function(t){var e,n;return"string"==typeof t?n=s[e=t]||i.h[e]||{}:(e=t.name,n=t),{name:e,opts:n}})).filter((function(i){var s=t.getComponent(i.opts.componentClass||fe(i.name));return s&&!r.isTech(s)})).forEach((function(t){var s=t.name,e=t.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=i.h.playerOptions;var r=i.addChild(s,e);r&&(i[s]=r)}}))}},i.buildCSSClass=function(){return""},i.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))ee(this.v,t,n(this,i));else{var r=t,h=i,o=n(this,s),a=function(){return e.off(r,h,o)};a.guid=o.guid,this.on("dispose",a);var u=function(){return e.off("dispose",a)};u.guid=o.guid,t.nodeName?(ee(r,h,o),ee(r,"dispose",u)):"function"==typeof t.on&&(r.on(h,o),r.on("dispose",u))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))ne(this.v,t,i);else{var e=t,r=i,h=n(this,s);this.off("dispose",h),t.nodeName?(ne(e,r,h),ne(e,"dispose",h)):(e.off(r,h),e.off("dispose",h))}return this},i.one=function(t,i,s){var e=arguments,r=this;if("string"==typeof t||Array.isArray(t))he(this.v,t,n(this,i));else{var h=t,o=i,a=n(this,s),u=function t(){r.off(h,o,t),a.apply(null,e)};u.guid=a.guid,this.on(h,o,u)}return this},i.trigger=function(t,i){return re(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.j?i?t.call(this):this.setTimeout(t,1):(this.T=this.T||[],this.T.push(t))),this},i.triggerReady=function(){this.j=!0,this.setTimeout((function(){var t=this.T;this.T=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},i.$=function(t,i){return Ts(t,i||this.contentEl())},i.$$=function(t,i){return Ms(t,i||this.contentEl())},i.hasClass=function(t){return ds(this.v,t)},i.addClass=function(t){return fs(this.v,t),this},i.removeClass=function(t){return vs(this.v,t),this},i.toggleClass=function(t,i){return ps(this.v,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},i.setAttribute=function(t,i){return ys(this.v,t,i),this},i.removeAttribute=function(t){return bs(this.v,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.v.style[t]=i:this.v.style[t]="auto"===i?"":i+"px",s||this.trigger("resize"),this;if(!this.v)return 0;var e=this.v.style[t],n=e.indexOf("px");return x(-1!==n?e.slice(0,n):this.v["offset"+fe(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new g("currentDimension only accepts width or height value");if("function"==typeof c.getComputedStyle){var s=c.getComputedStyle(this.v);i=s.getPropertyValue(t)||s[t]}if(0===(i=C(i))){var e="offset"+fe(t);i=this.v[e]}return i},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.v.focus()},i.blur=function(){this.v.blur()},i.emitTapEvents=function(){var t,i=0,s=null;this.on("touchstart",(function(e){1===e.touches.length&&(s={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},i=(new Date).getTime(),t=!0)})),this.on("touchmove",(function(i){if(i.touches.length>1)t=!1;else if(s){var e=i.touches[0].pageX-s.pageX,n=i.touches[0].pageY-s.pageY;_.sqrt(e*e+n*n)>10&&(t=!1)}}));var e=function(){t=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",(function(e){(s=null,!0===t)&&((new Date).getTime()-i<200&&(e.preventDefault(),this.trigger("tap")))}))},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=n(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){i(),this.clearInterval(t),t=this.setInterval(i,250)}));var s=function(s){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",s),this.on("touchcancel",s)}},i.setTimeout=function(t,i){t=n(this,t);var s=c.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){c.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=n(this,t);var s=c.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){c.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,s){if(i){if(i=fe(i),t.M||(t.M={}),"Player"===i&&t.M[i]){var e=t.M[i];if(e.players&&w.keys(e.players).length>0&&w.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new g("Can not register Player component after player has been created")}return t.M[i]=s,s}},t.getComponent=function(i){if(i)return i=fe(i),t.M&&t.M[i]?t.M[i]:c&&c.videojs&&c.videojs[i]?(Xi.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),c.videojs[i]):void 0},t.extend=function(i){i=i||{},Xi.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=i.init||i.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=w.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();i.registerComponent("Component",i);var pe=function(){};function me(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ge(t,i){return(ge=w.setPrototypeOf?w.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function ye(t,i){t.prototype=w.create(i.prototype),t.prototype.constructor=t,ge(t,i)}function be(t,i,s,e){return void 0===e&&(Xi.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new g("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+i+") is greater than or equal to the maximum bound ("+s+").")}(t,e,s.length-1),s[e][i]}function ke(t){return void 0===t||0===t.length?{length:0,start:function(){throw new g("This TimeRanges object is empty")},end:function(){throw new g("This TimeRanges object is empty")}}:{length:t.length,start:be.bind(null,"start",0,t),end:be.bind(null,"end",1,t)}}function we(t,i){return Array.isArray(t)?ke(t):void 0===t||void 0===i?ke():ke([[t,i]])}function _e(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=we(0,0));for(var r=0;r<t.length;r++)s=t.start(r),(e=t.end(r))>i&&(e=i),n+=e-s;return n/i}pe.prototype.A={},pe.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},ee(this,t,i),this.addEventListener=s},pe.prototype.addEventListener=pe.prototype.on,pe.prototype.off=function(t,i){ne(this,t,i)},pe.prototype.removeEventListener=pe.prototype.off,pe.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},he(this,t,i),this.addEventListener=s},pe.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=te(t),this.A[i]&&this["on"+i]&&this["on"+i](t),re(this,t)},pe.prototype.dispatchEvent=pe.prototype.trigger;var xe,Ce,Se,je,Te={prefixed:!0},Me=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],Ae=Me[0];for(Ce=0;Ce<Me.length;Ce++)if(Me[Ce][1]in Di){xe=Me[Ce];break}if(xe){for(Se=0;Se<xe.length;Se++)Te[Ae[Se]]=xe[Se];Te.prefixed=xe[0]!==Ae[0]}function Pe(t){if(t instanceof Pe)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:zi(t)&&("number"==typeof t.code&&(this.code=t.code),qi(this,t)),this.message||(this.message=Pe.defaultMessages[this.code]||"")}for(Pe.prototype.code=0,Pe.prototype.message="",Pe.prototype.status=null,Pe.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Pe.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."},je=0;je<Pe.errorTypes.length;je++)Pe[Pe.errorTypes[je]]=je,Pe.prototype[Pe.errorTypes[je]]=je;var Ee=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var Ne=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(i,s,e){return t[s]&&(i[s]=t[s]),i}),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},Ie=function(t){var i=t.$$("track"),s=Array.prototype.map.call(i,(function(t){return t.track}));return Array.prototype.map.call(i,(function(t){var i=Ne(t.track);return t.src&&(i.src=t.src),i})).concat(Array.prototype.filter.call(t.textTracks(),(function(t){return-1===s.indexOf(t)})).map(Ne))},Be=function(t,i){return t.forEach((function(t){var s=i.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach((function(t){return s.addCue(t)}))})),i.textTracks()},Fe="vjs-modal-dialog",De=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).P=e.N=e.I=!1,e.closeable(!e.h.uncloseable),e.content(e.h.content),e.S=ns("div",{className:Fe+"-content"},{role:"document"}),e.B=ns("p",{className:Fe+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),rs(e.B,e.description()),e.v.appendChild(e.B),e.v.appendChild(e.S),e.on(i,"languagechange",e.handleLanguagechange),e}ye(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"F","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},s.buildCSSClass=function(){return Fe+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},s.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},s.label=function(){return this.h.label||this.localize("Modal Window")},s.description=function(){var t=this.h.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},s.open=function(){if(!this.P){var t=this.player();this.trigger("beforemodalopen"),this.P=!0,(this.h.fillAlways||!this.N&&!this.I)&&this.fill(),this.D=!t.paused(),this.h.pauseOnOpen&&this.D&&t.pause(),this.closeable()&&this.on(this.v.ownerDocument,"keydown",n(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.N=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.P},s.close=function(){if(this.P){var t=this.player();this.trigger("beforemodalclose"),this.P=!1,this.D&&this.h.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.v.ownerDocument,"keydown",n(this,this.handleKeyPress)),t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.h.temporary&&this.dispose()}return this},s.closeable=function(t){if("boolean"==typeof t){var i=this.R=!!t,s=this.getChild("closeButton");if(i&&!s){var e=this.S;this.S=this.v,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.S=e,this.on(s,"close",this.close)}!i&&s&&(this.off(s,"close",this.close),this.removeChild(s),s.dispose())}return this.R},s.fill=function(){return this.fillWith(this.content())},s.fillWith=function(t){var i=this.contentEl(),s=i.parentNode,e=i.nextSibling;return this.trigger("beforemodalfill"),this.I=!0,s.removeChild(i),this.empty(),Ss(i,t),this.trigger("modalfill"),e?s.insertBefore(i,e):s.appendChild(i),this},s.empty=function(){return this.trigger("beforemodalempty"),xs(this.contentEl()),this.trigger("modalempty"),this},s.content=function(t){return void 0!==t&&(this.U=t),this.U},s.handleLanguagechange=function(){this.v.setAttribute("aria-label",this.label()),rs(this.B,this.description()),this.opened()?this.fill():(this.N||this.I)&&(this.N=!1,this.I=!1,this.empty())},i}(i);De.prototype.h={pauseOnOpen:!0,temporary:!0},i.registerComponent("ModalDialog",De);var $e=function(){function t(i){var s=this;if(zs)for(var e in s=Di.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.O.call(s,i),w.defineProperty(s,"length",{get:function(){return this.V}}),zs)return s}var i=t.prototype;return i.O=function(t){var i=this.length||0,s=0,e=t.length;this.L=t,this.V=t.length;var n=function(t){""+t in this||w.defineProperty(this,""+t,{get:function(){return this.L[t]}})};if(i<e)for(s=i;s<e;s++)n.call(this,s)},i.getCueById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},t}(),Re={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Ue={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Oe={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Ve={disabled:"disabled",hidden:"hidden",showing:"showing"},Le=function(t){function i(s){var e;void 0===s&&(s={});var n=me(e=t.call(this)||this);if(zs)for(var r in n=Di.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",Ui()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){w.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||me(e)}return ye(i,t),i}(pe),He=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=Di.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=Di.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),Di.body.appendChild(e));for(var r={},h=0;h<i.length;h++)r[i[h]]=s[i[h]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),n&&Di.body.removeChild(e),r},qe=function(t){var i=c.location,s=He(t);return(":"===s.protocol?i.protocol:s.protocol)+s.host!==i.protocol+i.host},ze={exports:{}};void 0!==s?ze.exports=s:void 0!==Ji?ze.exports=Ji:"undefined"!=typeof self?ze.exports=self:ze.exports={};var We=function(t){var i=Ge.call(t);return"[object Function]"===i||"function"==typeof t&&"[object RegExp]"!==i||void 0!==s&&(t===s.setTimeout||t===s.alert||t===s.confirm||t===s.prompt)},Ge=w.prototype.toString;var Xe,Je,Qe,Ye,Ke,Ze,tn,sn,en,nn,rn,hn,on=Array.prototype.slice,an=w.prototype.toString,un=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==an.call(i))throw new b("Function.prototype.bind called on incompatible "+i);for(var s,e=on.call(arguments,1),n=_.max(0,i.length-e.length),r=[],h=0;h<n;h++)r.push("$"+h);if(s=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var n=i.apply(this,e.concat(on.call(arguments)));return w(n)===n?n:this}return i.apply(t,e.concat(on.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},cn=Function.prototype.bind||un,ln=w.prototype.toString,dn=function(t){var i=ln.call(t),s="[object Arguments]"===i;return s||(s="[object Array]"!==i&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===ln.call(t.callee)),s};w.keys||(Je=w.prototype.hasOwnProperty,Qe=w.prototype.toString,Ye=dn,Ke=w.prototype.propertyIsEnumerable,Ze=!Ke.call({toString:null},"toString"),tn=Ke.call((function(){}),"prototype"),sn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],en=function(t){var i=t.constructor;return i&&i.prototype===t},nn={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},rn=function(){if(void 0===s)return!1;for(var t in s)try{if(!nn["$"+t]&&Je.call(s,t)&&null!==s[t]&&"object"==typeof s[t])try{en(s[t])}catch(t){return!0}}catch(t){return!0}return!1}(),hn=function(t){if(void 0===s||!rn)return en(t);try{return en(t)}catch(t){return!1}},Xe=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===Qe.call(t),e=Ye(t),n=i&&"[object String]"===Qe.call(t),r=[];if(!i&&!s&&!e)throw new b("Object.keys called on a non-object");var h=tn&&s;if(n&&t.length>0&&!Je.call(t,0))for(var o=0;o<t.length;++o)r.push(String(o));if(e&&t.length>0)for(var a=0;a<t.length;++a)r.push(String(a));else for(var u in t)h&&"prototype"===u||!Je.call(t,u)||r.push(String(u));if(Ze)for(var c=hn(t),l=0;l<sn.length;++l)c&&"constructor"===sn[l]||!Je.call(t,sn[l])||r.push(sn[l]);return r});var fn=Xe,vn=Array.prototype.slice,pn=dn,mn=w.keys,gn=mn?function(t){return mn(t)}:fn,yn=w.keys;gn.shim=function(){if(w.keys){var t=function(){var t=w.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(w.keys=function(t){return pn(t)?yn(vn.call(t)):yn(t)})}else w.keys=gn;return w.keys||gn};var bn=gn,kn="function"==typeof At&&"symbol"==typeof At("foo"),wn=w.prototype.toString,_n=Array.prototype.concat,xn=w.defineProperty,Cn=xn&&function(){var t={};try{for(var i in xn(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),Sn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===wn.call(t)}(e)&&e())&&(Cn?xn(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},jn=function(t,i){var s=arguments.length>2?arguments[2]:{},e=bn(i);kn&&(e=_n.call(e,w.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)Sn(t,e[n],i[e[n]],s[e[n]])};jn.supportsDescriptors=!!Cn;var e,Tn=jn,Mn=w.getOwnPropertyDescriptor?function(){return w.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new b},An="function"==typeof At&&"symbol"==typeof Nt,Pn=w.getPrototypeOf||function(t){return t.__proto__},En=void 0===j?e:Pn(j),Nn={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?e:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":An?Pn([][Nt]()):e,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":e,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":e,"$ %AsyncGenerator%":e,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":e,"$ %AsyncIteratorPrototype%":e,"$ %Atomics%":"undefined"==typeof Atomics?e:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?e:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?e:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":g,"$ %ErrorPrototype%":g.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?e:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?e:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?e:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?e:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":e,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":e,"$ %Int8Array%":"undefined"==typeof Int8Array?e:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?e:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?e:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?e:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?e:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?e:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":S,"$ %IteratorPrototype%":An?Pn(Pn([][Nt]())):e,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?e:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&An?Pn((new Map)[Nt]()):e,"$ %MapPrototype%":"undefined"==typeof Map?e:Map.prototype,"$ %Math%":_,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":w,"$ %ObjectPrototype%":w.prototype,"$ %ObjProto_toString%":w.prototype.toString,"$ %ObjProto_valueOf%":w.prototype.valueOf,"$ %parseFloat%":C,"$ %parseInt%":x,"$ %Promise%":"undefined"==typeof Promise?e:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?e:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?e:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?e:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?e:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?e:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?e:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?e:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?e:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&An?Pn((new Set)[Nt]()):e,"$ %SetPrototype%":"undefined"==typeof Set?e:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?e:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":An?Pn(""[Nt]()):e,"$ %StringPrototype%":String.prototype,"$ %Symbol%":An?At:e,"$ %SymbolPrototype%":An?At.prototype:e,"$ %SyntaxError%":k,"$ %SyntaxErrorPrototype%":k.prototype,"$ %ThrowTypeError%":Mn,"$ %TypedArray%":En,"$ %TypedArrayPrototype%":En?En.prototype:e,"$ %TypeError%":b,"$ %TypeErrorPrototype%":b.prototype,"$ %Uint8Array%":void 0===j?e:j,"$ %Uint8ArrayPrototype%":void 0===j?e:j.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?e:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?e:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?e:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?e:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?e:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?e:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?e:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?e:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?e:WeakSet.prototype},In=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new b('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in Nn))throw new k("intrinsic "+t+" does not exist!");if(void 0===Nn[s]&&!i)throw new b("intrinsic "+t+" exists, but is not available. Please file an issue!");return Nn[s]},Bn=cn.call(Function.call,w.prototype.hasOwnProperty),Fn=In,Dn=Fn("%TypeError%"),$n=Fn("%SyntaxError%"),Rn=Bn,Un={"Property Descriptor":function(t,i){if("Object"!==t.Type(i))return!1;var s={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var e in i)if(Rn(i,e)&&!s[e])return!1;var n=Rn(i,"[[Value]]"),r=Rn(i,"[[Get]]")||Rn(i,"[[Set]]");if(n&&r)throw new Dn("Property Descriptors may not be both accessor and data descriptors");return!0}},On=Number.isNaN||function(t){return t!=t},Vn=Number.isNaN||function(t){return t!=t},Ln=Number.isFinite||function(t){return"number"==typeof t&&!Vn(t)&&t!==1/0&&t!==-1/0},Hn=Function.prototype.toString,qn=/^\s*class\b/,zn=function(t){try{var i=Hn.call(t);return qn.test(i)}catch(t){return!1}},Wn=w.prototype.toString,Gn="function"==typeof At&&"symbol"==typeof At.toStringTag,Xn=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(Gn)return function(t){try{return!zn(t)&&(Hn.call(t),!0)}catch(t){return!1}}(t);if(zn(t))return!1;var i=Wn.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},Jn=w.prototype.toString,Qn=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},Yn=Xn,Kn=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===Jn.call(t)?String:Number)===String||i===Number){var s,e,n=i===String?["toString","valueOf"]:["valueOf","toString"];for(e=0;e<n.length;++e)if(Yn(t[n[e]])&&(s=t[n[e]](),Qn(s)))return s;throw new b("No default value")}throw new b("invalid [[DefaultValue]] hint supplied")},Zn=In,tr=Zn("%Object%"),ir=Zn("%TypeError%"),sr=Zn("%String%"),er=function(t,i,s,e){var n=Un[i];if("function"!=typeof n)throw new $n("unknown record type: "+i);if(!n(t,e))throw new Dn(s+" must be a "+i);console.log(n(t,e),e)},nr=On,rr=Ln,hr=function(t){return t>=0?1:-1},or=function(t,i){var s=t%i;return _.floor(s>=0?s:s+i)},ar=Bn,ur={ToPrimitive:function(t){return Qn(t)?t:arguments.length>1?Kn(t,arguments[1]):Kn(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return nr(i)?0:0!==i&&rr(i)?hr(i)*_.floor(_.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(nr(i)||0===i||!rr(i))return 0;var s=hr(i)*_.floor(_.abs(i));return or(s,65536)},ToString:function(t){return sr(t)},ToObject:function(t){return this.CheckObjectCoercible(t),tr(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new ir(i||"Cannot call method on "+t);return t},IsCallable:Xn,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:nr(t)&&nr(i)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var s in t)if(ar(t,s)&&!i[s])return!1;var e=ar(t,"[[Value]]"),n=ar(t,"[[Get]]")||ar(t,"[[Set]]");if(e&&n)throw new ir("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(er(this,"Property Descriptor","Desc",t),!(!ar(t,"[[Get]]")&&!ar(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(er(this,"Property Descriptor","Desc",t),!(!ar(t,"[[Value]]")&&!ar(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(er(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(er(this,"Property Descriptor","Desc",t),this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new ir("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new ir("ToPropertyDescriptor requires an object");var i={};if(ar(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),ar(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),ar(t,"value")&&(i["[[Value]]"]=t.value),ar(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),ar(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new b("getter must be a function");i["[[Get]]"]=s}if(ar(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new ir("setter must be a function");i["[[Set]]"]=e}if((ar(i,"[[Get]]")||ar(i,"[[Set]]"))&&(ar(i,"[[Value]]")||ar(i,"[[Writable]]")))throw new ir("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},cr=cn.call(Function.call,String.prototype.replace),lr=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,dr=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,fr=function(){var t=ur.ToString(ur.CheckObjectCoercible(this));return cr(cr(t,lr,""),dr,"")},vr=fr,pr=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:vr},mr=Tn,gr=pr,yr=Tn,br=fr,kr=pr,wr=function(){var t=gr();return mr(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},_r=cn.call(Function.call,kr());yr(_r,{getPolyfill:kr,implementation:br,shim:wr});var xr=_r,Cr=Xn,Sr=w.prototype.toString,jr=w.prototype.hasOwnProperty,Tr=xr,Mr=function(t,i,s){if(!Cr(i))throw new b("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===Sr.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)jr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e):"string"==typeof t?function(t,i,s){for(var e=0,n=t.length;e<n;e++)null==s?i(t.charAt(e),e,t):i.call(s,t.charAt(e),e,t)}(t,i,e):function(t,i,s){for(var e in t)jr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Ar=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)Pr.call(s,e)&&(t[e]=s[e])}return t},Pr=w.prototype.hasOwnProperty;var Er=ze.exports,Nr=We,Ir=function(t){if(!t)return{};var i={};return Mr(Tr(t).split("\n"),(function(t){var s=t.indexOf(":"),e=Tr(t.slice(0,s)).toLowerCase(),n=Tr(t.slice(s+1));void 0===i[e]?i[e]=n:!function(t){return"[object Array]"===w.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},Br=Ar,Fr=$r;function Dr(t,i,s){var e=t;return Nr(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=Br(i,{uri:t}),e.callback=s,e}function $r(t,i,s){return Rr(i=Dr(t,i,s))}function Rr(t){if(void 0===t.callback)throw new g("callback argument missing");var i=!1,s=function(s,e,n){i||(i=!0,t.callback(s,e,n))};function e(){var t=void 0;if(t=c.response?c.response:c.responseText||function(t){if("document"===t.responseType)return t.responseXML;var i=204===t.status&&t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!i)return t.responseXML;return null}(c),b)try{t=JSON.parse(t)}catch(t){}return t}var n={body:void 0,headers:{},statusCode:0,method:f,url:d,rawRequest:c};function r(t){return v(l),t instanceof g||(t=new g(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;v(l),i=t.useXDR&&void 0===c.status?200:1223===c.status?204:c.status;var r=n,h=null;return 0!==i?(r={body:e(),statusCode:i,method:f,headers:{},url:d,rawRequest:c},c.getAllResponseHeaders&&(r.headers=Ir(c.getAllResponseHeaders()))):h=new g("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,c=t.xhr||null;c||(c=t.cors||t.useXDR?new $r.XDomainRequest:new $r.XMLHttpRequest);var l,d=c.url=t.uri||t.url,f=c.method=t.method||"GET",p=t.body||t.data||null,m=c.headers=t.headers||{},y=!!t.sync,b=!1;if("json"in t&&(b=!0,m.accept||m.Accept||(m.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(m["content-type"]||m["Content-Type"]||(m["Content-Type"]="application/json"),p=JSON.stringify(t.json))),c.onreadystatechange=function(){4===c.readyState&&h()},c.onload=h,c.onerror=r,c.onprogress=function(){},c.ontimeout=r,c.open(f,d,!y,t.username,t.password),y||(c.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(l=u((function(){a=!0,c.abort("timeout");var t=new g("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}),t.timeout)),c.setRequestHeader)for(o in m)m.hasOwnProperty(o)&&c.setRequestHeader(o,m[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new g("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(c.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(c),c.send(p),c}$r.XMLHttpRequest=Er.XMLHttpRequest||function(){},$r.XDomainRequest="withCredentials"in new $r.XMLHttpRequest?$r.XMLHttpRequest:Er.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){$r["delete"===t?"del":t]=function(i,s,e){return(s=Dr(i,s,e)).method=t.toUpperCase(),Rr(s)}}));var Ur=function(t,i){var s=new c.WebVTT.Parser(c,c.vttjs,c.WebVTT.StringDecoder()),e=[];s.oncue=function(t){i.addCue(t)},s.onparsingerror=function(t){e.push(t)},s.onflush=function(){i.trigger({type:"loadeddata",target:i})},s.parse(t),e.length>0&&(c.console&&c.console.groupCollapsed&&c.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach((function(t){return Xi.error(t)})),c.console&&c.console.groupEnd&&c.console.groupEnd()),s.flush()},Or=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new g("A tech was not provided.");var r=ve(s,{kind:Oe[s.kind]||"subtitles",language:s.language||s.srclang||""}),h=Ve[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(h="hidden");var a=e=t.call(this,r)||this;if(a.H=r.tech,zs)for(var u in i.prototype)"constructor"!==u&&(a[u]=i.prototype[u]);a.L=[],a.q=[];var l=new $e(a.L),d=new $e(a.q),f=!1,v=n(a,(function(){this.activeCues,f&&(this.trigger("cuechange"),f=!1)}));return"disabled"!==h&&a.H.ready((function(){a.H.on("timeupdate",v)}),!0),w.defineProperty(a,"default",{get:function(){return o},set:function(){}}),w.defineProperty(a,"mode",{get:function(){return h},set:function(t){var i=this;Ve[t]&&("showing"===(h=t)&&this.H.ready((function(){i.H.on("timeupdate",v)}),!0),this.trigger("modechange"))}}),w.defineProperty(a,"cues",{get:function(){return this.W?l:null},set:function(){}}),w.defineProperty(a,"activeCues",{get:function(){if(!this.W)return null;if(0===this.cues.length)return d;for(var t=this.H.currentTime(),i=[],s=0,e=this.cues.length;s<e;s++){var n=this.cues[s];(n.startTime<=t&&n.endTime>=t||n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t)&&i.push(n)}if(f=!1,i.length!==this.q.length)f=!0;else for(var r=0;r<i.length;r++)-1===this.q.indexOf(i[r])&&(f=!0);return this.q=i,d.O(this.q),d},set:function(){}}),r.src?(a.src=r.src,function(t,i){var s={uri:t},e=qe(t);e&&(s.cors=e),Fr(s,n(this,(function(t,s,e){if(t)return Xi.error(t,s);if(i.W=!0,"function"!=typeof c.WebVTT){if(i.H){var n=function(){return Ur(e,i)};i.H.on("vttjsloaded",n),i.H.on("vttjserror",(function(){Xi.error("vttjs failed to load, stopping trying to process "+i.src),i.H.off("vttjsloaded",n)}))}}else Ur(e,i)})))}(r.src,a)):a.W=!0,a||me(e)}ye(i,t);var s=i.prototype;return s.addCue=function(t){var i=t;if(c.vttjs&&!(t instanceof c.vttjs.VTTCue)){for(var s in i=new c.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)s in i||(i[s]=t[s]);i.id=t.id,i.G=t}var e=this.H.textTracks();if(e)for(var n=0;n<e.length;n++)e[n]!==this&&e[n].removeCue(i);this.L.push(i),this.cues.O(this.L)},s.removeCue=function(t){for(var i=this.L.length;i--;){var s=this.L[i];if(s===t||s.G&&s.G===t){this.L.splice(i,1),this.cues.O(this.L);break}}},i}(Le);Or.prototype.A={cuechange:"cuechange"};var Vr=function(t){function i(s){var e,n;void 0===s&&(s={});var r=me(e=t.call(this)||this);if(zs)for(var h in r=Di.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new Or(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,w.defineProperty(r,"readyState",{get:function(){return n}}),w.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),zs?r||me(e):e}return ye(i,t),i}(pe);Vr.prototype.A={load:"load"},Vr.NONE=0,Vr.LOADING=1,Vr.LOADED=2,Vr.ERROR=3;var Lr,Hr=function(){function t(i){void 0===i&&(i=[]);var s=this;if(zs)for(var e in s=Di.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.X=[],w.defineProperty(s,"length",{get:function(){return this.X.length}});for(var n=0,r=i.length;n<r;n++)s.J(i[n]);if(zs)return s}var i=t.prototype;return i.J=function(t){var i=this.X.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.X[i]}}),-1===this.X.indexOf(t)&&this.X.push(t)},i.Y=function(t){for(var i,s=0,e=this.X.length;s<e;s++)if(t===this.X[s].track){i=this.X[s];break}return i},i.K=function(t){for(var i=0,s=this.X.length;i<s;i++)if(t===this.X[i]){this.X.splice(i,1);break}},t}(),qr=function(t){function i(s,e){var n;if(void 0===s&&(s=[]),void 0===e&&(e=null),n=t.call(this)||this,!e&&(e=me(n),zs))for(var r in e=Di.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.Z=[],w.defineProperty(e,"length",{get:function(){return this.Z.length}});for(var h=0;h<s.length;h++)e.tt(s[h]);return e||me(n)}ye(i,t);var s=i.prototype;return s.tt=function(t){var i=this.Z.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.Z[i]}}),-1===this.Z.indexOf(t)&&(this.Z.push(t),this.trigger({track:t,type:"addtrack"}))},s.it=function(t){for(var i,s=0,e=this.length;s<e;s++)if(this[s]===t){(i=this[s]).off&&i.off(),this.Z.splice(s,1);break}i&&this.trigger({track:i,type:"removetrack"})},s.getTrackById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},i}(pe);for(Lr in qr.prototype.A={change:"change",addtrack:"addtrack",removetrack:"removetrack"},qr.prototype.A)qr.prototype["on"+Lr]=null;var zr=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),zs){for(var r in n=Di.createElement("custom"),qr.prototype)"constructor"!==r&&(n[r]=qr.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||me(e)}return ye(i,t),i.prototype.tt=function(i){t.prototype.tt.call(this,i),i.addEventListener("modechange",n(this,(function(){this.trigger("change")})))},i}(qr),Wr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},Gr=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].selected){Wr(s,s[r]);break}if(zs){for(var h in n=Di.createElement("custom"),qr.prototype)"constructor"!==h&&(n[h]=qr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,w.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||me(e)}ye(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.selected&&Wr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.st||(s.st=!0,Wr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(qr),Xr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},Jr=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].enabled){Xr(s,s[r]);break}if(zs){for(var h in n=Di.createElement("custom"),qr.prototype)"constructor"!==h&&(n[h]=qr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,n||me(e)}ye(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&Xr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.st||(s.st=!0,Xr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(qr),Qr=void 0;var Yr=function(t){function i(i,s){var e;return void 0===i&&(i={}),void 0===s&&(s=function(){}),i.reportTouchActivity=!1,(e=t.call(this,null,i,s)||this).et=!1,e.on("playing",(function(){this.et=!0})),e.on("loadstart",(function(){this.et=!1})),e.nt=i.textTracks,e.rt=i.videoTracks,e.ht=i.audioTracks,e.featuresProgressEvents||e.manualProgressOn(),e.featuresTimeupdateEvents||e.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===i["native"+t+"Tracks"]&&(e["featuresNative"+t+"Tracks"]=!1)})),!1===i.nativeCaptions&&(e.featuresNativeTextTracks=!1),e.featuresNativeTextTracks||e.emulateTextTracks(),e.ot=new zr,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}ye(i,t);var s=i.prototype;return s.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},s.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},s.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(n(this,(function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()})),500)},s.onDurationChange=function(t){this.ct=this.duration()},s.buffered=function(){return we(0,0)},s.bufferedPercent=function(){return _e(this.buffered(),this.ct)},s.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},s.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},s.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},s.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},s.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},s.clearTracks=function(t){var i=this;(t=[].concat(t)).forEach((function(t){for(var s=i[t+"Tracks"]()||[],e=s.length;e--;){var n=s[e];"text"===t&&i.removeRemoteTextTrack(n),s.it(n)}}))},s.cleanupAutoTextTracks=function(){for(var t=this.ot||[],i=t.length;i--;){var s=t[i];this.removeRemoteTextTrack(s)}},s.reset=function(){},s.error=function(t){return void 0!==t&&(this.lt=new Pe(t),this.trigger("error")),this.lt},s.played=function(){return this.et?we(0,0):we()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=n(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",n(this,(function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)}))))},s.initTrackListeners=function(){var t=this;["video","audio"].forEach((function(i){var s=function(){t.trigger(i+"trackchange")},e=t[i+"Tracks"]();e.addEventListener("removetrack",s),e.addEventListener("addtrack",s),t.on("dispose",(function(){e.removeEventListener("removetrack",s),e.removeEventListener("addtrack",s)}))}))},s.dt=function(){var t=this;if(!c.WebVTT)if(Di.body.contains(this.el())){if(!this.h["vtt.js"]&&Wi(Qr)&&w.keys(Qr).length>0)return void this.trigger("vttjsloaded");var i=Di.createElement("script");i.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){i.onload=null,i.onerror=null})),c.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.dt)},s.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var s=this.remoteTextTracks(),e=function(t){return i.tt(t.track)},n=function(t){return i.it(t.track)};s.on("addtrack",e),s.on("removetrack",n),this.dt();var r=function(){return t.trigger("texttrackchange")},h=function(){r();for(var t=0;t<i.length;t++){var s=i[t];s.removeEventListener("cuechange",r),"showing"===s.mode&&s.addEventListener("cuechange",r)}};h(),i.addEventListener("change",h),i.addEventListener("addtrack",h),i.addEventListener("removetrack",h),this.on("dispose",(function(){s.off("addtrack",e),s.off("removetrack",n),i.removeEventListener("change",h),i.removeEventListener("addtrack",h),i.removeEventListener("removetrack",h);for(var t=0;t<i.length;t++){i[t].removeEventListener("cuechange",r)}}))}},s.videoTracks=function(){return this.rt=this.rt||new Gr,this.rt},s.audioTracks=function(){return this.ht=this.ht||new Jr,this.ht},s.textTracks=function(){return this.nt=this.nt||new zr,this.nt},s.remoteTextTracks=function(){return this.ft=this.ft||new zr,this.ft},s.remoteTextTrackEls=function(){return this.vt=this.vt||new Hr,this.vt},s.addTextTrack=function(t,i,s){if(!t)throw new g("TextTrack kind is required but was not provided");return function(t,i,s,e,n){void 0===n&&(n={});var r=t.textTracks();n.kind=i,s&&(n.label=s),e&&(n.language=e),n.tech=t;var h=new Or(n);return r.tt(h),h}(this,t,i,s)},s.createRemoteTextTrack=function(t){var i=ve(t,{tech:this});return new Vr(i)},s.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(Xi.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().J(s),this.remoteTextTracks().tt(s.track),!0!==i&&this.ot.tt(s.track),s},s.removeRemoteTextTrack=function(t){var i=this.remoteTextTrackEls().Y(t);this.remoteTextTrackEls().K(i),this.remoteTextTracks().it(t),this.ot.it(t)},s.getVideoPlaybackQuality=function(){return{}},s.setPoster=function(){},s.playsinline=function(){},s.setPlaysinline=function(){},s.canPlayType=function(){return""},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,s){if(i.gt||(i.gt={}),!i.isTech(s))throw new g("Tech "+t+" must be a Tech");return i.gt[t]=s,s},i.getTech=function(t){return i.gt&&i.gt[t]?i.gt[t]:c&&c.videojs&&c.videojs[t]?(Xi.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),c.videojs[t]):void 0},i}(i);Yr.prototype.nt,Yr.prototype.ht,Yr.prototype.rt,Yr.prototype.featuresVolumeControl=!0,Yr.prototype.featuresFullscreenResize=!1,Yr.prototype.featuresPlaybackRate=!1,Yr.prototype.featuresProgressEvents=!1,Yr.prototype.featuresTimeupdateEvents=!1,Yr.prototype.featuresNativeTextTracks=!1,Yr.withSourceHandlers=function(t){t.registerSourceHandler=function(i,s){var e=t.sourceHandlers;e||(e=t.sourceHandlers=[]),void 0===s&&(s=e.length),e.splice(s,0,i)},t.canPlayType=function(i){for(var s,e=t.sourceHandlers||[],n=0;n<e.length;n++)if(s=e[n].canPlayType(i))return s;return""},t.selectSourceHandler=function(i,s){for(var e=t.sourceHandlers||[],n=0;n<e.length;n++)if(e[n].canHandleSource(i,s))return e[n];return null},t.canPlaySource=function(i,s){var e=t.selectSourceHandler(i,s);return e?e.canHandleSource(i,s):""};["seekable","duration"].forEach((function(t){var i=this[t];"function"==typeof i&&(this[t]=function(){return this.yt&&this.yt[t]?this.yt[t].apply(this.yt,arguments):i.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(i){var s=t.selectSourceHandler(i,this.h);return s||(t.nativeSourceHandler?s=t.nativeSourceHandler:Xi.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),s!==t.nativeSourceHandler&&(this.bt=i,this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.one(this.v,"loadstart",t.prototype.kt)),this.yt=s.handleSource(i,this,this.h),this.on("dispose",this.disposeSourceHandler),this},t.prototype.kt=function(){this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.wt=function(){this.disposeSourceHandler(),this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.disposeSourceHandler=function(){this.bt&&(this.clearTracks(["audio","video"]),this.bt=null),this.cleanupAutoTextTracks(),this.yt&&(this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.yt.dispose&&this.yt.dispose(),this.yt=null)}},i.registerComponent("Tech",Yr),i.registerComponent("MediaTechController",Yr),Yr.registerTech("Tech",Yr);var Kr=function(t){function s(s,e,n){var r;if(r=t.call(this,s,e,n)||this,e.playerOptions.sources&&0!==e.playerOptions.sources.length)s.src(e.playerOptions.sources);else for(var h=0,o=e.playerOptions.techOrder;h<o.length;h++){var a=fe(o[h]),u=Yr.getTech(a);if(a||(u=i.getComponent(a)),u&&u.isSupported()){s._t(a);break}}return r}return ye(s,t),s}(i);i.registerComponent("MediaLoader",Kr);var Zr=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).emitTapEvents(),e.on(i,"languagechange",e.handleLanguagechange),e.enable(),e}ye(i,t);var s=i.prototype;return s.createEl=function(i,s,e){void 0===i&&(i="div"),void 0===s&&(s={}),void 0===e&&(e={}),s=qi({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&Xi.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=qi({role:"button","aria-live":"polite"},e),this.xt=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.Ct=ns("span",{className:"vjs-control-text"}),t&&t.appendChild(this.Ct),this.controlText(this.St,t),this.Ct},s.controlText=function(t,i){if(void 0===i&&(i=this.el()),void 0===t)return this.St||"Need Text";var s=this.localize(t);return this.St=t,this.Ct.innerHTML=s,this.nonIconControl||i.setAttribute("title",s),this},s.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},s.enable=function(){return this.removeClass("vjs-disabled"),this.v.setAttribute("aria-disabled","false"),void 0!==this.xt&&this.v.setAttribute("tabIndex",this.xt),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this},s.disable=function(){return this.addClass("vjs-disabled"),this.v.setAttribute("aria-disabled","true"),void 0!==this.xt&&this.v.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this},s.handleLanguagechange=function(){this.controlText(this.St)},s.handleClick=function(t){},s.handleFocus=function(t){ee(Di,"keydown",n(this,this.handleKeyPress))},s.handleKeyPress=function(i){32===i.which||13===i.which?(i.preventDefault(),this.handleClick(i)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,i)},s.handleBlur=function(t){ne(Di,"keydown",n(this,this.handleKeyPress))},i}(i);i.registerComponent("ClickableComponent",Zr);var th=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",n(me(e),e.update)),e}ye(i,t);var s=i.prototype;return s.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},s.createEl=function(){var t=ns("div",{className:"vjs-poster",tabIndex:-1});return Qs||(this.jt=ns("img"),t.appendChild(this.jt)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.jt)this.jt.src=t;else{var i="";t&&(i='url("'+t+'")'),this.v.style.backgroundImage=i}},s.handleClick=function(t){this.t.controls()&&(this.t.paused()?this.t.play():this.t.pause())},i}(Zr);i.registerComponent("PosterImage",th);var ih="#222",sh={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 eh(t,i){return"rgba("+x(t[1]+t[1],16)+","+x(t[2]+t[2],16)+","+x(t[3]+t[3],16)+","+i+")"}function nh(t,i,s){try{t.style[i]=s}catch(t){return}}var rh=function(t){function i(i,s,e){var r;return r=t.call(this,i,s,e)||this,i.on("loadstart",n(me(r),r.toggleDisplay)),i.on("texttrackchange",n(me(r),r.updateDisplay)),i.ready(n(me(r),(function(){if(i.H&&i.H.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",n(this,this.updateDisplay));for(var t=this.h.playerOptions.tracks||[],s=0;s<t.length;s++)this.t.addRemoteTextTrack(t[s],!0);var e,r,h={captions:1,subtitles:1},o=this.t.textTracks();if(o){for(var a=0;a<o.length;a++){var u=o[a];u.default&&("descriptions"!==u.kind||e?u.kind in h&&!r&&(r=u):e=u)}r?r.mode="showing":e&&(e.mode="showing")}}}))),r}ye(i,t);var s=i.prototype;return s.toggleDisplay=function(){this.t.H&&this.t.H.featuresNativeTextTracks?this.hide():this.show()},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},s.clearDisplay=function(){"function"==typeof c.WebVTT&&c.WebVTT.processCues(c,[],this.v)},s.updateDisplay=function(){var t=this.t.textTracks();if(this.clearDisplay(),t){for(var i=null,s=null,e=t.length;e--;){var n=t[e];"showing"===n.mode&&("descriptions"===n.kind?i=n:s=n)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i))}},s.updateForTrack=function(t){if("function"==typeof c.WebVTT&&t.activeCues){for(var i=this.t.textTrackSettings.getValues(),s=[],e=0;e<t.activeCues.length;e++)s.push(t.activeCues[e]);c.WebVTT.processCues(c,s,this.v);for(var n=s.length;n--;){var r=s[n];if(r){var h=r.displayState;if(i.color&&(h.firstChild.style.color=i.color),i.textOpacity&&nh(h.firstChild,"color",eh(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(h.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&nh(h.firstChild,"backgroundColor",eh(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?nh(h,"backgroundColor",eh(i.windowColor,i.windowOpacity)):h.style.backgroundColor=i.windowColor),i.edgeStyle&&("dropshadow"===i.edgeStyle?h.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+ih:"raised"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+ih:"depressed"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+ih:"uniform"===i.edgeStyle&&(h.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+ih)),i.fontPercent&&1!==i.fontPercent){var o=c.parseFloat(h.style.fontSize);h.style.fontSize=o*i.fontPercent+"px",h.style.height="auto",h.style.top="auto",h.style.bottom="2px"}i.fontFamily&&"default"!==i.fontFamily&&("small-caps"===i.fontFamily?h.firstChild.style.fontVariant="small-caps":h.firstChild.style.fontFamily=sh[i.fontFamily])}}}},i}(i);i.registerComponent("TextTrackDisplay",rh);var hh=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(i);i.registerComponent("LoadingSpinner",hh);var oh=function(t){function s(){return t.apply(this,arguments)||this}ye(s,t);var e=s.prototype;return e.createEl=function(t,s,e){void 0===t&&(t="button"),void 0===s&&(s={}),void 0===e&&(e={}),s=qi({className:this.buildCSSClass()},s),"button"!==t&&(Xi.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),s=qi({tabIndex:0},s),e=qi({role:"button"},e)),e=qi({type:"button","aria-live":"polite"},e);var n=i.prototype.createEl.call(this,t,s,e);return this.createControlTextEl(n),n},e.addChild=function(t,s){void 0===s&&(s={});var e=this.constructor.name;return Xi.warn("Adding an actionable (user controllable) child to a Button ("+e+") is not supported; use a ClickableComponent instead."),i.prototype.addChild.call(this,t,s)},e.enable=function(){t.prototype.enable.call(this),this.v.removeAttribute("disabled")},e.disable=function(){t.prototype.disable.call(this),this.v.setAttribute("disabled","disabled")},e.handleKeyPress=function(i){32!==i.which&&13!==i.which&&t.prototype.handleKeyPress.call(this,i)},s}(Zr);i.registerComponent("Button",oh);var ah=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Tt=!1,e.on("mousedown",e.handleMouseDown),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this;if(this.Tt&&t.clientX&&t.clientY)this.t.play();else{var s=this.t.getChild("controlBar"),e=s&&s.getChild("playToggle");this.one(this.t,"play",(function(){e?e.focus():i.t.focus()})),this.t.play()}},s.handleKeyPress=function(i){this.Tt=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Tt=!0},i}(oh);ah.prototype.St="Play Video",i.registerComponent("BigPlayButton",ah);var uh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},i}(oh);i.registerComponent("CloseButton",uh);var ch=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"play",e.handlePlay),e.on(i,"pause",e.handlePause),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.paused()?this.t.play():this.t.pause()},s.handlePlay=function(t){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},s.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i}(oh);function lh(t,i){void 0===i&&(i=t),t=t<0?0:t;var s=_.floor(t%60),e=_.floor(t/60%60),n=_.floor(t/3600),r=_.floor(i/60%60),h=_.floor(i/3600);return(S(t)||t===1/0)&&(n=e=s="-"),(n=n>0||h>0?n+":":"")+(e=((n||r>=10)&&e<10?"0"+e:e)+":")+(s=s<10?"0"+s:s)}ch.prototype.St="Play",i.registerComponent("PlayToggle",ch);var dh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"languagechange",e.updateContent),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00'},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),s=this.localize("Current Time"),e=lh(i,this.t.duration());e!==this.Mt&&(this.Mt=e,this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(i);i.registerComponent("CurrentTimeDisplay",dh);var fh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"durationchange",e.updateContent),e.on(i,"timeupdate",e.updateContent),e.on(i,"loadedmetadata",e.updateContent),e.on(i,"languagechange",e.updateContent),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> 0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.duration();if(i&&this.ct!==i){this.ct=i;var s=this.localize("Duration Time"),e=lh(i);this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(i);i.registerComponent("DurationDisplay",fh);var vh=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},i}(i);i.registerComponent("TimeDivider",vh);var ph=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"durationchange",e.updateContent),e.on(i,"languagechange",e.updateContent),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Remaining Time")+"</span> -0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){if(this.t.duration()){var i=this.localize("Remaining Time"),s=lh(this.t.remainingTime());s!==this.Mt&&(this.Mt=s,this.S.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(i);i.registerComponent("RemainingTimeDisplay",ph);var mh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateShowing(),e.on(e.player(),"durationchange",e.updateShowing),e.on(e.player(),"languagechange",e.handleLanguagechange),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.S=ns("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.Ct=ns("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.At=Di.createTextNode(this.localize("LIVE")),this.S.appendChild(this.Ct),this.S.appendChild(this.At),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.Ct.innerHTML=this.localize("Stream Type"),this.At.innerHTML=this.localize("LIVE")},i}(i);i.registerComponent("LiveDisplay",mh);var gh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).bar=e.getChild(e.h.barName),e.vertical(!!e.h.vertical),e.on("mousedown",e.handleMouseDown),e.on("touchstart",e.handleMouseDown),e.on("focus",e.handleFocus),e.on("blur",e.handleBlur),e.on("click",e.handleClick),e.on(i,"controlsvisible",e.update),e.on(i,e.playerEvent,e.update),e}ye(i,t);var s=i.prototype;return s.createEl=function(i,s,e){return void 0===s&&(s={}),void 0===e&&(e={}),s.className=s.className+" vjs-slider",s=qi({tabIndex:0},s),e=qi({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),t.prototype.createEl.call(this,i,s,e)},s.handleMouseDown=function(t){var i=this.bar.v.ownerDocument;t.preventDefault(),Di.body.focus(),Di.onselectstart=function(){return!1},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)},s.handleMouseMove=function(t){},s.handleMouseUp=function(){var t=this.bar.v.ownerDocument;Di.onselectstart=function(){return!0},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()},s.update=function(){if(this.v){var t=this.getPercent(),i=this.bar;if(i){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var s=(100*t).toFixed(2)+"%";this.vertical()?i.el().style.height=s:i.el().style.width=s}}},s.calculateDistance=function(t){var i=ws(this.v,t);return this.vertical()?i.y:i.x},s.handleFocus=function(){this.on(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},s.handleBlur=function(){this.off(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},s.vertical=function(t){return void 0===t?this.Pt||!1:(this.Pt=!!t,this.Pt?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(i);function yh(t,i){if(!t||!i)return"";if("function"==typeof c.getComputedStyle){var s=c.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}i.registerComponent("Slider",gh);var bh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Et=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Nt=ns("span",{innerHTML:this.localize("Loaded")}),this.It=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Nt),this.Ct.appendChild(this.It),i.appendChild(this.Ct),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.Et,r=function(t,i){var s=t/i||0;return 100*(s>=1?1:s)+"%"};this.v.style.width=r(e,s);for(var h=0;h<i.length;h++){var o=i.start(h),a=i.end(h),u=n[h];u||(u=this.v.appendChild(ns()),n[h]=u),u.style.left=r(o,e),u.style.width=r(a-o,e)}for(var c=n.length;c>i.length;c--)this.v.removeChild(n[c-1]);n.length=i.length},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Loaded")},i}(i);i.registerComponent("LoadProgressBar",bh);var kh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(me(e),e.updateDataAttr)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&e.addClass("vjs-keep-tooltips-inside"),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"});return this.Bt=ns("span",{innerHTML:this.localize("Progress")}),this.Ft=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Bt),this.Ct.appendChild(this.Ft),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",lh(i,this.t.duration()))},s.handleLanguagechange=function(){this.Bt.innerHTML=this.localize("Progress")},i}(i);i.registerComponent("PlayProgressBar",kh);var wh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(me(e),e.updateDataAttr)),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar"});return this.tooltip=ns("div",{className:"vjs-time-tooltip"}),this.Bt=ns("span",{innerHTML:this.localize("Progress")}),this.Ft=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Bt),this.Ct.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=lh(this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),this.t.duration());this.v.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},s.handleLanguagechange=function(){this.Bt.innerHTML=this.localize("Progress")},i}(i);i.registerComponent("TooltipProgressBar",wh);var _h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateProgress),e.on(i,"ended",e.updateProgress),i.ready(n(me(e),e.updateProgress)),s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltipProgressBar=e.addChild("TooltipProgressBar")),e}ye(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},s.updateProgress=function(t){if(this.updateAriaAttributes(this.v),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.v),this.tooltipProgressBar.v.style.width=this.bar.v.style.width;var i=C(yh(this.player().el(),"width")),s=C(yh(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=_.floor(i-s/2)+"px",e.minWidth=_.ceil(s/2)+"px",e.right="-"+s/2+"px"}},s.updateAriaAttributes=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",lh(i,this.t.duration()))},s.getPercent=function(){var t=this.t.currentTime()/this.t.duration();return t>=1?1:t},s.handleMouseDown=function(i){this.t.scrubbing(!0),this.videoWasPlaying=!this.t.paused(),this.t.pause(),t.prototype.handleMouseDown.call(this,i)},s.handleMouseMove=function(t){var i=this.calculateDistance(t)*this.t.duration();i===this.t.duration()&&(i-=.1),this.t.currentTime(i)},s.handleMouseUp=function(i){t.prototype.handleMouseUp.call(this,i),this.t.scrubbing(!1),this.videoWasPlaying&&this.t.play()},s.stepForward=function(){this.t.currentTime(this.t.currentTime()+5)},s.stepBack=function(){this.t.currentTime(this.t.currentTime()-5)},i}(gh);_h.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},_h.prototype.playerEvent="timeupdate",i.registerComponent("SeekBar",_h);var xh=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltip=ns("div",{className:"vjs-time-tooltip"}),e.el().appendChild(e.tooltip),e.addClass("vjs-keep-tooltips-inside")),e.update(0,0),i.on("ready",(function(){e.on(i.controlBar.progressControl.el(),"mousemove",function(t,i){var s=Date.now();return function(){var e=Date.now();e-s>=i&&(t.apply(void 0,arguments),s=e)}}(n(me(e),e.handleMouseMove),25))})),e}ye(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},s.handleMouseMove=function(t){var i=this.t.duration(),s=this.calculateDistance(t)*i,e=t.pageX-ks(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=lh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Dt(i)+1,n=C(yh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return ws(this.el().parentNode,t).x},s.Dt=function(t){if(!this.keepTooltipsInside)return t;var i=C(yh(this.player().el(),"width")),s=C(yh(this.tooltip,"width"))/2,e=t;return t<s?e=_.ceil(s):t>i-s&&(e=_.floor(i-s)),e},i}(i);i.registerComponent("MouseTimeDisplay",xh);var Ch=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(i);Ch.prototype.h={children:["seekBar"]},i.registerComponent("ProgressControl",Ch);var Sh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},s.handleFullscreenChange=function(t){this.t.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},s.handleClick=function(t){this.t.isFullscreen()?this.t.exitFullscreen():this.t.requestFullscreen()},i}(oh);Sh.prototype.St="Fullscreen",i.registerComponent("FullscreenToggle",Sh);var jh=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},i}(i);i.registerComponent("VolumeLevel",jh);var Th=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(n(me(e),e.updateARIAAttributes)),e}ye(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},s.handleMouseMove=function(t){this.checkMuted(),this.t.volume(this.calculateDistance(t))},s.checkMuted=function(){this.t.muted()&&this.t.muted(!1)},s.getPercent=function(){return this.t.muted()?0:this.t.volume()},s.stepForward=function(){this.checkMuted(),this.t.volume(this.t.volume()+.1)},s.stepBack=function(){this.checkMuted(),this.t.volume(this.t.volume()-.1)},s.updateARIAAttributes=function(t){var i=(100*this.t.volume()).toFixed(2);this.v.setAttribute("aria-valuenow",i),this.v.setAttribute("aria-valuetext",i+"%")},i}(gh);Th.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Th.prototype.playerEvent="volumechange",i.registerComponent("VolumeBar",Th);var Mh=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(i);Mh.prototype.h={children:["volumeBar"]},i.registerComponent("VolumeControl",Mh);var Ah=function(t){function i(){return t.apply(this,arguments)||this}ye(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=ns(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),ee(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(i);i.registerComponent("Popup",Ah);var Ph=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}ye(i,t);var s=i.prototype;return s.update=function(){var t=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=t,this.addChild(t),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},s.createPopup=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},i}(Zr);i.registerComponent("PopupButton",Ph);var Eh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.update),i.H&&!1===i.H.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(i,"loadstart",(function(){this.update(),!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.muted(!this.t.muted())},s.update=function(t){var i=this.t.volume(),s=3;this.t.muted()?s=0:i<.33?s=1:i<.67&&(s=2);var e=this.t.muted()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e);for(var n=0;n<4;n++)vs(this.v,"vjs-vol-"+n);fs(this.v,"vjs-vol-"+s)},i}(oh);Eh.prototype.St="Mute",i.registerComponent("MuteToggle",Eh);var Nh=function(t){function i(i,s){var e;function n(){i.H&&!1===i.H.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}return void 0===s&&(s={}),void 0===s.inline&&(s.inline=!0),void 0===s.vertical&&(s.inline?s.vertical=!1:s.vertical=!0),s.volumeBar=s.volumeBar||{},s.volumeBar.vertical=!!s.vertical,(e=t.call(this,i,s)||this).on(i,"volumechange",e.volumeUpdate),e.on(i,"loadstart",e.volumeUpdate),n.call(me(e)),e.on(i,"loadstart",n),e.on(e.volumeBar,["slideractive","focus"],(function(){this.addClass("vjs-slider-active")})),e.on(e.volumeBar,["sliderinactive","blur"],(function(){this.removeClass("vjs-slider-active")})),e.on(e.volumeBar,["focus"],(function(){this.addClass("vjs-lock-showing")})),e.on(e.volumeBar,["blur"],(function(){this.removeClass("vjs-lock-showing")})),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){var i="";return i=this.h.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+t.prototype.buildCSSClass.call(this)+" "+i},s.createPopup=function(){var t=new Ah(this.t,{contentElType:"div"}),i=new Th(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Eh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],n(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Ph);Nh.prototype.volumeUpdate=Eh.prototype.update,Nh.prototype.St="Mute",i.registerComponent("VolumeMenuButton",Nh);var Ih=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}ye(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=ns(i,{className:"vjs-menu-content"}),this.S.setAttribute("role","menu");var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.setAttribute("role","presentation"),s.appendChild(this.S),ee(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},s.stepForward=function(){var t=0;void 0!==this.$t&&(t=this.$t+1),this.focus(t)},s.stepBack=function(){var t=0;void 0!==this.$t&&(t=this.$t-1),this.focus(t)},s.focus=function(t){void 0===t&&(t=0);var i=this.children().slice();i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className)&&i.shift(),i.length>0&&(t<0?t=0:t>=i.length&&(t=i.length-1),this.$t=t,i[t].v.focus())},i}(i);i.registerComponent("Menu",Ih);var Bh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e.Rt=!0,e.v.setAttribute("aria-haspopup","true"),e.v.setAttribute("role","menuitem"),e.on("keydown",e.handleSubmenuKeyPress),e}ye(i,t);var s=i.prototype;return s.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.Ut=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Ot?this.hide():this.show()},s.createMenu=function(){var t=new Ih(this.t);if(this.Ot=0,this.h.title){var i=ns("li",{className:"vjs-menu-title",innerHTML:fe(this.h.title),tabIndex:-1});this.Ot+=1,t.m.unshift(i),hs(i,t.contentEl())}if(this.items=this.createItems(),this.items)for(var s=0;s<this.items.length;s++)t.addItem(this.items[s]);return t},s.createItems=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",n(this,(function(t){this.unpressButton(),this.v.blur()}))),this.Ut?this.unpressButton():this.pressButton()},s.handleKeyPress=function(i){27===i.which||9===i.which?(this.Ut&&this.unpressButton(),9!==i.which&&i.preventDefault()):38===i.which||40===i.which?this.Ut||(this.pressButton(),i.preventDefault()):t.prototype.handleKeyPress.call(this,i)},s.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.Ut&&this.unpressButton(),9!==t.which&&t.preventDefault())},s.pressButton=function(){this.Rt&&(this.Ut=!0,this.menu.lockShowing(),this.v.setAttribute("aria-expanded","true"),this.menu.focus())},s.unpressButton=function(){this.Rt&&(this.Ut=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.v.focus())},s.disable=function(){return this.Ut=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.Rt=!1,t.prototype.disable.call(this)},s.enable=function(){return this.Rt=!0,t.prototype.enable.call(this)},i}(Zr);i.registerComponent("MenuButton",Bh);var Fh=function(t){function i(i,s){var e,r=s.tracks;if((e=t.call(this,i,s)||this).items.length<=1&&e.hide(),!r)return me(e);var h=n(me(e),e.update);return r.addEventListener("removetrack",h),r.addEventListener("addtrack",h),e.t.on("dispose",(function(){r.removeEventListener("removetrack",h),r.removeEventListener("addtrack",h)})),e}return ye(i,t),i}(Bh);i.registerComponent("TrackButton",Fh);var Dh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).selectable=s.selectable,e.selected(s.selected),e.selectable?e.v.setAttribute("role","menuitemcheckbox"):e.v.setAttribute("role","menuitem"),e}ye(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",qi({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Vt=Di.createTextNode(this.localize(this.h.label)),n.appendChild(this.Vt),n},s.handleClick=function(t){this.selected(!0)},s.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.v.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.v.setAttribute("aria-checked","false"),this.controlText("")))},s.handleLanguagechange=function(){t.prototype.handleLanguagechange.call(this),this.Vt.innerHTML=this.localize(this.h.label)},i}(Zr);i.registerComponent("MenuItem",Dh);var $h=function(t){function i(i,s){var e,r,h=s.track,o=i.textTracks();if(s.label=h.label||h.language||"Unknown",s.selected=h.default||"showing"===h.mode,(e=t.call(this,i,s)||this).track=h,o){var a=n(me(e),e.handleTracksChange);i.on(["loadstart","texttrackchange"],a),o.addEventListener("change",a),e.on("dispose",(function(){o.removeEventListener("change",a)}))}o&&void 0===o.onchange&&e.on(["tap","click"],(function(){if("object"!=typeof c.Event)try{r=new c.Event("change")}catch(t){}r||(r=Di.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(r)}));return e}ye(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.track.kind,e=this.t.textTracks();if(t.prototype.handleClick.call(this,i),e)for(var n=0;n<e.length;n++){var r=e[n];r.kind===s&&(r===this.track?"showing"!==r.mode&&(r.mode="showing"):"disabled"!==r.mode&&(r.mode="disabled"))}},s.handleTracksChange=function(t){this.selected("showing"===this.track.mode)},i}(Dh);i.registerComponent("TextTrackMenuItem",$h);var Rh=function(t){function i(i,s){var e;return s.track={player:i,kind:s.kind,label:s.kind+" off",default:!1,mode:"disabled"},s.selectable=!0,(e=t.call(this,i,s)||this).selected(!0),e}return ye(i,t),i.prototype.handleTracksChange=function(t){for(var i=this.player().textTracks(),s=!0,e=0,n=i.length;e<n;e++){var r=i[e];if(r.kind===this.track.kind&&"showing"===r.mode){s=!1;break}}this.selected(s)},i}($h);i.registerComponent("OffTextTrackMenuItem",Rh);var Uh=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return ye(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new Rh(this.t,{kind:this.Lt})),this.Ot+=1;var i=this.t.textTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];e.kind===this.Lt&&t.push(new $h(this.t,{track:e,selectable:!0}))}return t},i}(Fh);i.registerComponent("TextTrackButton",Uh);var Oh=function(t){function i(i,s){var e,r=s.track,h=s.cue,o=i.currentTime();return s.selectable=!0,s.label=h.text,s.selected=h.startTime<=o&&o<h.endTime,(e=t.call(this,i,s)||this).track=r,e.cue=h,r.addEventListener("cuechange",n(me(e),e.update)),e}ye(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.t.currentTime(this.cue.startTime),this.update(this.cue.startTime)},s.update=function(t){var i=this.cue,s=this.t.currentTime();this.selected(i.startTime<=s&&s<i.endTime)},i}(Dh);i.registerComponent("ChaptersTrackMenuItem",Oh);var Vh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Chapters Menu"),n}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},s.update=function(i){this.Ht&&(!i||"addtrack"!==i.type&&"removetrack"!==i.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},s.setTrack=function(t){if(this.Ht!==t){if(this.qt||(this.qt=this.update.bind(this)),this.Ht){var i=this.t.remoteTextTrackEls().Y(this.Ht);i&&i.removeEventListener("load",this.qt),this.Ht=null}if(this.Ht=t,this.Ht){this.Ht.mode="hidden";var s=this.t.remoteTextTrackEls().Y(this.Ht);s&&s.addEventListener("load",this.qt)}}},s.findChaptersTrack=function(){for(var t=this.t.textTracks()||[],i=t.length-1;i>=0;i--){var s=t[i];if(s.kind===this.Lt)return s}},s.getMenuCaption=function(){return this.Ht&&this.Ht.label?this.Ht.label:this.localize(fe(this.Lt))},s.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.Ht)return t;var i=this.Ht.cues;if(!i)return t;for(var s=0,e=i.length;s<e;s++){var n=i[s],r=new Oh(this.t,{track:this.Ht,cue:n});t.push(r)}return t},i}(Uh);Vh.prototype.Lt="chapters",Vh.prototype.St="Chapters",i.registerComponent("ChaptersButton",Vh);var Lh=function(t){function i(i,s,e){var r;(r=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Descriptions Menu");var h=i.textTracks();if(h){var o=n(me(r),r.handleTracksChange);h.addEventListener("change",o),r.on("dispose",(function(){h.removeEventListener("change",o)}))}return r}ye(i,t);var s=i.prototype;return s.handleTracksChange=function(t){for(var i=this.player().textTracks(),s=!1,e=0,n=i.length;e<n;e++){var r=i[e];if(r.kind!==this.Lt&&"showing"===r.mode){s=!0;break}}s?this.disable():this.enable()},s.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},i}(Uh);Lh.prototype.Lt="descriptions",Lh.prototype.St="Descriptions",i.registerComponent("DescriptionsButton",Lh);var Hh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Subtitles Menu"),n}return ye(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(Uh);Hh.prototype.Lt="subtitles",Hh.prototype.St="Subtitles",i.registerComponent("SubtitlesButton",Hh);var qh=function(t){function i(i,s){var e;return s.track={player:i,kind:s.kind,label:s.kind+" settings",selectable:!1,default:!1,mode:"disabled"},s.selectable=!1,(e=t.call(this,i,s)||this).addClass("vjs-texttrack-settings"),e.controlText(", opens "+s.kind+" settings dialog"),e}return ye(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").v.focus()},i}($h);i.registerComponent("CaptionSettingsMenuItem",qh);var zh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Captions Menu"),n}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(){var i=[];return this.player().H&&this.player().H.featuresNativeTextTracks||(i.push(new qh(this.t,{kind:this.Lt})),this.Ot+=1),t.prototype.createItems.call(this,i)},i}(Uh);zh.prototype.Lt="captions",zh.prototype.St="Captions",i.registerComponent("CaptionsButton",zh);var Wh=function(t){function i(i,s){var e,r=s.track,h=i.audioTracks();if(s.label=r.label||r.language||"Unknown",s.selected=r.enabled,(e=t.call(this,i,s)||this).track=r,h){var o=n(me(e),e.handleTracksChange);h.addEventListener("change",o),e.on("dispose",(function(){h.removeEventListener("change",o)}))}return e}ye(i,t);var s=i.prototype;return s.handleClick=function(i){var s=this.t.audioTracks();if(t.prototype.handleClick.call(this,i),s)for(var e=0;e<s.length;e++){var n=s[e];n.enabled=n===this.track}},s.handleTracksChange=function(t){this.selected(this.track.enabled)},i}(Dh);i.registerComponent("AudioTrackMenuItem",Wh);var Gh=function(t){function i(i,s){var e;return void 0===s&&(s={}),s.tracks=i.audioTracks&&i.audioTracks(),(e=t.call(this,i,s)||this).v.setAttribute("aria-label","Audio Menu"),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(t){void 0===t&&(t=[]),this.Ot=1;var i=this.t.audioTracks&&this.t.audioTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];t.push(new Wh(this.t,{track:e,selectable:!0}))}return t},i}(Fh);Gh.prototype.St="Audio Track",i.registerComponent("AudioTrackButton",Gh);var Xh=function(t){function i(i,s){var e,n=s.rate,r=C(n,10);return s.label=n,s.selected=1===r,s.selectable=!0,(e=t.call(this,i,s)||this).label=n,e.rate=r,e.on(i,"ratechange",e.update),e}ye(i,t);var s=i.prototype;return s.handleClick=function(i){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},s.update=function(t){this.selected(this.player().playbackRate()===this.rate)},i}(Dh);Xh.prototype.contentElType="button",i.registerComponent("PlaybackRateMenuItem",Xh);var Jh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateVisibility(),e.updateLabel(),e.on(i,"loadstart",e.updateVisibility),e.on(i,"ratechange",e.updateLabel),e}ye(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Vt=ns("div",{className:"vjs-playback-rate-value",innerHTML:1}),i.appendChild(this.Vt),i},s.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},s.createMenu=function(){var t=new Ih(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new Xh(this.player(),{rate:i[s]+"x"}));return t},s.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},s.handleClick=function(t){for(var i=this.player().playbackRate(),s=this.playbackRates(),e=s[0],n=0;n<s.length;n++)if(s[n]>i){e=s[n];break}this.player().playbackRate(e)},s.playbackRates=function(){return this.h.playbackRates||this.h.playerOptions&&this.h.playerOptions.playbackRates},s.playbackRateSupported=function(){return this.player().H&&this.player().H.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},s.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},s.updateLabel=function(t){this.playbackRateSupported()&&(this.Vt.innerHTML=this.player().playbackRate()+"x")},i}(Bh);Jh.prototype.St="Playback Rate",i.registerComponent("PlaybackRateMenuButton",Jh);var Qh=function(t){function i(){return t.apply(this,arguments)||this}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},i}(i);i.registerComponent("Spacer",Qh);var Yh=function(t){function i(){return t.apply(this,arguments)||this}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},s.createEl=function(){var i=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return i.innerHTML=" ",i},i}(Qh);i.registerComponent("CustomControlSpacer",Yh);var Kh=function(t){function i(){return t.apply(this,arguments)||this}return ye(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(i);Kh.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},i.registerComponent("ControlBar",Kh);var Zh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}ye(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},s.content=function(){var t=this.player().error();return t?this.localize(t.message):""},i}(De);Zh.prototype.h=ve(De.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),i.registerComponent("ErrorDisplay",Zh);var to="vjs-text-track-settings",io=["#000","Black"],so=["#00F","Blue"],eo=["#0FF","Cyan"],no=["#0F0","Green"],ro=["#F0F","Magenta"],ho=["#F00","Red"],oo=["#FFF","White"],ao=["#FF0","Yellow"],uo=["1","Opaque"],co=["0.5","Semi-Transparent"],lo=["0","Transparent"],fo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[io,oo,ho,no,so,ao,ro,eo]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[uo,co,lo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[oo,io,ho,no,so,ao,ro,eo]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[uo,co]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[lo,co,uo]}};function vo(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}fo.windowColor.options=fo.backgroundColor.options;var po,mo=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=n(me(e),e.updateDisplay),void 0===s.persistTextTrackSettings&&(e.h.persistTextTrackSettings=e.h.playerOptions.persistTextTrackSettings),e.on(e.$(".vjs-done-button"),"click",(function(){e.saveSettings(),e.hide()})),e.on(e.$(".vjs-default-button"),"click",(function(){e.setDefaults(),e.updateDisplay()})),Hi(fo,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.h.persistTextTrackSettings&&e.restoreSettings(),e}ye(i,t);var s=i.prototype;return s.zt=function(t){var i=this,s=fo[t],e=s.id.replace("%s",this.o);return[ns("label",{className:"vjs-label",textContent:s.label},{for:e}),ns("select",{id:e},void 0,s.options.map((function(t){return ns("option",{textContent:i.localize(t[1]),value:t[0]})})))]},s.Wt=function(){var t=ns("legend",{textContent:this.localize("Text")}),i=this.zt("color"),s=ns("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.zt("textOpacity"));return ns("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Gt=function(){var t=ns("legend",{textContent:this.localize("Background")}),i=this.zt("backgroundColor"),s=ns("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.zt("backgroundOpacity"));return ns("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=ns("legend",{textContent:this.localize("Window")}),i=this.zt("windowColor"),s=ns("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.zt("windowOpacity"));return ns("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return ns("div",{className:"vjs-tracksettings-colors"},void 0,[this.Wt(),this.Gt(),this.Xt()])},s.Qt=function(){var t=ns("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.zt("fontPercent")),i=ns("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.zt("edgeStyle")),s=ns("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.zt("fontFamily"));return ns("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Yt=function(){var t=ns("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=ns("button",{className:"vjs-done-button",textContent:"Done"});return ns("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=ns("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=ns("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=ns("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=ns("div",void 0,{role:"document"},[i,s,t]);return ns("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},s.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),Li(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(fo,(function(i,s,e){var n=function(t,i){return vo(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i}),{})},s.setValues=function(t){var i=this;Hi(fo,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(vo(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},s.setDefaults=function(){var t=this;Hi(fo,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},s.restoreSettings=function(){var t;try{t=JSON.parse(c.localStorage.getItem(to))}catch(t){Xi.warn(t)}t&&this.setValues(t)},s.saveSettings=function(){if(this.h.persistTextTrackSettings){var t=this.getValues();try{w.keys(t).length?c.localStorage.setItem(to,JSON.stringify(t)):c.localStorage.removeItem(to)}catch(t){Xi.warn(t)}}},s.updateDisplay=function(){var t=this.t.getChild("textTrackDisplay");t&&t.updateDisplay()},i}(i);i.registerComponent("TextTrackSettings",mo);var go,yo=function(t){function i(i,s){var e;e=t.call(this,i,s)||this;var r=i.source,h=!1;if(r&&(e.v.currentSrc!==r.src||i.tag&&3===i.tag.Kt)?e.setSource(r):e.Zt(e.v),e.v.hasChildNodes()){for(var o=e.v.childNodes,a=o.length,u=[];a--;){var c=o[a];"track"===c.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().J(c),e.remoteTextTracks().tt(c.track),h||e.v.hasAttribute("crossorigin")||!qe(c.src)||(h=!0)):u.push(c))}for(var l=0;l<u.length;l++)e.v.removeChild(u[l])}return["audio","video"].forEach((function(t){var i=e.el()[t+"Tracks"],s=e[t+"Tracks"](),n=fe(t);e["featuresNative"+n+"Tracks"]&&i&&i.addEventListener&&(e["handle"+n+"ti"]=function(t){s.trigger({type:"change",target:s,currentTarget:s,srcElement:s})},e["handle"+n+"ii"]=function(t){return s.addTrack(t.track)},e["handle"+n+"si"]=function(t){return s.removeTrack(t.track)},i.addEventListener("change",e["handle"+n+"ti"]),i.addEventListener("addtrack",e["handle"+n+"ii"]),i.addEventListener("removetrack",e["handle"+n+"si"]),e["removeOld"+n+"ei"]=function(t){return e.ni(s,i)},e.on("loadstart",e["removeOld"+n+"ei"]))})),e.featuresNativeTextTracks&&(h&&Xi.warn(Ki(po||(po=$i(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."])))),e.ri=n(me(e),e.handleTextTrackChange),e.hi=n(me(e),e.handleTextTrackAdd),e.oi=n(me(e),e.handleTextTrackRemove),e.ai()),e.ci(),(Js||Is||Os)&&!0===i.nativeControlsForTouch&&e.setControls(!0),e.di(),e.triggerReady(),e}ye(i,t);var s=i.prototype;return s.dispose=function(){var s=this;["audio","video","text"].forEach((function(t){var i=fe(t),e=s.v[t+"Tracks"];e&&e.removeEventListener&&(e.removeEventListener("change",s["handle"+i+"ti"]),e.removeEventListener("addtrack",s["handle"+i+"ii"]),e.removeEventListener("removetrack",s["handle"+i+"si"])),e&&s.off("loadstart",s["removeOld"+i+"ei"])})),i.disposeMediaElement(this.v),t.prototype.dispose.call(this)},s.ci=function(){var t,i=this.textTracks(),s=function(){t=[];for(var s=0;s<i.length;s++){var e=i[s];"metadata"===e.kind&&t.push({track:e,storedMode:e.mode})}};s(),i.addEventListener("change",s);var e=function s(){for(var e=0;e<t.length;e++){var n=t[e];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}i.removeEventListener("change",s)};this.on("webkitbeginfullscreen",(function(){i.removeEventListener("change",s),i.removeEventListener("change",e),i.addEventListener("change",e)})),this.on("webkitendfullscreen",(function(){i.removeEventListener("change",s),i.addEventListener("change",s),i.removeEventListener("change",e)}))},s.createEl=function(){var t=this.h.tag;if(!t||!this.h.playerElIngest&&!this.movingMediaElementInDOM){if(t){var s=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(s,t),i.disposeMediaElement(t),t=s}else{t=Di.createElement("video");var e=ve({},this.h.tag&&gs(this.h.tag));Js&&!0===this.h.nativeControlsForTouch||delete e.controls,ms(t,qi(e,{id:this.h.techId,class:"vjs-tech"}))}t.playerId=this.h.playerId}void 0!==this.h.preload&&ys(t,"preload",this.h.preload);for(var n=["loop","muted","playsinline","autoplay"],r=n.length-1;r>=0;r--){var h=n[r],o=this.h[h];void 0!==o&&(o?ys(t,h,h):bs(t,h),t[h]=o)}return t},s.Zt=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var i=!1,s=function(){i=!0};this.on("loadstart",s);var e=function(){i||this.trigger("loadstart")};return this.on("loadedmetadata",e),void this.ready((function(){this.off("loadstart",s),this.off("loadedmetadata",e),i||this.trigger("loadstart")}))}var n=["loadstart"];n.push("loadedmetadata"),t.readyState>=2&&n.push("loadeddata"),t.readyState>=3&&n.push("canplay"),t.readyState>=4&&n.push("canplaythrough"),this.ready((function(){n.forEach((function(t){this.trigger(t)}),this)}))}},s.ai=function(){var t=this.el().textTracks;if(t){for(var i=0;i<t.length;i++)this.textTracks().tt(t[i]);t.addEventListener&&(t.addEventListener("change",this.ri),t.addEventListener("addtrack",this.hi),t.addEventListener("removetrack",this.oi)),this.on("loadstart",this.fi)}},s.handleTextTrackChange=function(t){var i=this.textTracks();this.textTracks().trigger({type:"change",target:i,currentTarget:i,srcElement:i})},s.handleTextTrackAdd=function(t){this.textTracks().tt(t.track)},s.handleTextTrackRemove=function(t){this.textTracks().it(t.track)},s.ni=function(t,i){var s=[];if(i){for(var e=0;e<t.length;e++){for(var n=t[e],r=!1,h=0;h<i.length;h++)if(i[h]===n){r=!0;break}r||s.push(n)}for(var o=0;o<s.length;o++){var a=s[o];t.it(a)}}},s.fi=function(t){var i=this.textTracks(),s=this.el().textTracks;this.ni(i,s)},s.play=function(){var t=this.v.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))},s.setCurrentTime=function(t){try{this.v.currentTime=t}catch(t){Xi(t,"Video is not ready. (Video.js)")}},s.duration=function(){var t=this;if(this.v.duration===1/0&&$s&&Hs&&0===this.v.currentTime){return this.on("timeupdate",(function i(){t.v.currentTime>0&&(t.v.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))})),NaN}return this.v.duration||NaN},s.width=function(){return this.v.offsetWidth},s.height=function(){return this.v.offsetHeight},s.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.v){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},s=function(){"webkitPresentationMode"in this.v&&"picture-in-picture"!==this.v.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",s),this.on("dispose",(function(){t.off("webkitbeginfullscreen",s),t.off("webkitendfullscreen",i)}))}},s.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var t=c.navigator&&c.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},s.enterFullScreen=function(){var t=this.v;t.paused&&t.networkState<=t.HAVE_METADATA?(this.v.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},s.exitFullScreen=function(){this.v.webkitExitFullScreen()},s.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},s.reset=function(){i.resetMediaElement(this.v)},s.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},s.setControls=function(t){this.v.controls=!!t},s.addTextTrack=function(i,s,e){return this.featuresNativeTextTracks?this.v.addTextTrack(i,s,e):t.prototype.addTextTrack.call(this,i,s,e)},s.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var s=Di.createElement("track");return i.kind&&(s.kind=i.kind),i.label&&(s.label=i.label),(i.language||i.srclang)&&(s.srclang=i.language||i.srclang),i.default&&(s.default=i.default),i.id&&(s.id=i.id),i.src&&(s.src=i.src),s},s.addRemoteTextTrack=function(i,s){var e=t.prototype.addRemoteTextTrack.call(this,i,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},s.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)i!==s[e]&&i!==s[e].track||this.el().removeChild(s[e])},s.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),c.performance&&"function"==typeof c.performance.now?t.creationTime=c.performance.now():c.performance&&c.performance.timing&&"number"==typeof c.performance.timing.navigationStart&&(t.creationTime=c.Date.now()-c.performance.timing.navigationStart),t},i}(Yr);is()&&(yo.TEST_VID=Di.createElement("video"),(go=Di.createElement("track")).kind="captions",go.srclang="en",go.label="English",yo.TEST_VID.appendChild(go)),yo.isSupported=function(){try{yo.TEST_VID.volume=.5}catch(t){return!1}return!(!yo.TEST_VID||!yo.TEST_VID.canPlayType)},yo.canControlVolume=function(){try{var t=yo.TEST_VID.volume;return yo.TEST_VID.volume=t/2+.1,t!==yo.TEST_VID.volume}catch(t){return!1}},yo.canControlPlaybackRate=function(){if($s&&Hs&&qs<58)return!1;try{var t=yo.TEST_VID.playbackRate;return yo.TEST_VID.playbackRate=t/2+.1,t!==yo.TEST_VID.playbackRate}catch(t){return!1}},yo.supportsNativeTextTracks=function(){return Xs},yo.supportsNativeVideoTracks=function(){return!(!yo.TEST_VID||!yo.TEST_VID.videoTracks)},yo.supportsNativeAudioTracks=function(){return!(!yo.TEST_VID||!yo.TEST_VID.audioTracks)},yo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],yo.prototype.featuresVolumeControl=yo.canControlVolume(),yo.prototype.featuresPlaybackRate=yo.canControlPlaybackRate(),yo.prototype.movingMediaElementInDOM=!Fs,yo.prototype.featuresFullscreenResize=!0,yo.prototype.featuresProgressEvents=!0,yo.prototype.featuresTimeupdateEvents=!0,yo.prototype.featuresNativeTextTracks=yo.supportsNativeTextTracks(),yo.prototype.featuresNativeVideoTracks=yo.supportsNativeVideoTracks(),yo.prototype.featuresNativeAudioTracks=yo.supportsNativeAudioTracks();var bo=yo.TEST_VID&&yo.TEST_VID.constructor.prototype.canPlayType,ko=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,wo=/^video\/mp4/i;yo.patchCanPlayType=function(){Rs>=4&&!Vs?yo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&ko.test(t)?"maybe":bo.call(this,t)}:Us&&(yo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&wo.test(t)?"maybe":bo.call(this,t)})},yo.unpatchCanPlayType=function(){var t=yo.TEST_VID.constructor.prototype.canPlayType;return yo.TEST_VID.constructor.prototype.canPlayType=bo,t},yo.patchCanPlayType(),yo.disposeMediaElement=function(t){if(t){var i=t.nodeName.toLowerCase();if("video"===i||"audio"===i){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}}},yo.resetMediaElement=function(t){if(t){for(var i=t.querySelectorAll("source"),s=i.length;s--;)t.removeChild(i[s]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){yo.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){yo.prototype["set"+fe(t)]=function(i){this.v[t]=i,i?this.v.setAttribute(t,t):this.v.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){yo.prototype[t]=function(){return this.v[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){yo.prototype["set"+fe(t)]=function(i){this.v[t]=i}})),["pause","load"].forEach((function(t){yo.prototype[t]=function(){return this.v[t]()}})),Yr.withSourceHandlers(yo),yo.nativeSourceHandler={},yo.nativeSourceHandler.canPlayType=function(t){try{return yo.TEST_VID.canPlayType(t)}catch(t){return""}},yo.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return yo.nativeSourceHandler.canPlayType(t.type);if(t.src){var s=function(t){if("string"==typeof t){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(t);if(i)return i.pop().toLowerCase()}return""}(t.src);return yo.nativeSourceHandler.canPlayType("video/"+s)}return""},yo.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},yo.nativeSourceHandler.dispose=function(){},yo.registerSourceHandler(yo.nativeSourceHandler),i.registerComponent("Html5",yo),Yr.registerTech("Html5",yo);var _o=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],xo=function(t){function s(i,e,n){var r;if(i.id=i.id||["vjs_video",Ui()].join("_"),(e=qi(s.getTagSettings(i),e)).initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof i.closest){var h=i.closest("[lang]");h&&(e.language=h.getAttribute("lang"))}else for(var o=i;o&&1===o.nodeType;){if(gs(o).hasOwnProperty("lang")){e.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=t.call(this,null,e,n)||this).h||!r.h.techOrder||!r.h.techOrder.length)throw new g("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=i,r.tagAttributes=i&&gs(i),r.language(r.h.language),e.languages){var a={};w.getOwnPropertyNames(e.languages).forEach((function(t){a[t.toLowerCase()]=e.languages[t]})),r.vi=a}else r.vi=s.prototype.h.languages;r.pi={},r.mi=e.poster||"",r.gi=!!e.controls,i.controls=!1,r.yi=!1,r.v=r.createEl();var u=ve(r.h);if(e.plugins){var c=e.plugins;w.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):Xi.error("Unable to find plugin:",t)}),me(r))}r.h.playerOptions=u,r.initChildren(),r.isAudio("audio"===i.nodeName.toLowerCase()),r.controls()?r.addClass("vjs-controls-enabled"):r.addClass("vjs-controls-disabled"),r.v.setAttribute("role","region"),r.isAudio()?r.v.setAttribute("aria-label","audio player"):r.v.setAttribute("aria-label","video player"),r.isAudio()&&r.addClass("vjs-audio"),r.bi()&&r.addClass("vjs-no-flex"),Fs||r.addClass("vjs-workinghover"),s.players[r.o]=me(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.ki(),r.on("fullscreenchange",r.wi),r.on("stageclick",r._i),r}ye(s,t);var e=s.prototype;return e.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.xi&&this.xi.parentNode&&this.xi.parentNode.removeChild(this.xi),s.players[this.o]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.v&&this.v.player&&(this.v.player=null),this.H&&this.H.dispose(),t.prototype.dispose.call(this)},e.createEl=function(){var i,s=this.tag,e=this.Ci=s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player");i=this.v=e?s.parentNode:t.prototype.createEl.call(this,"div"),s.setAttribute("tabindex","-1"),s.removeAttribute("width"),s.removeAttribute("height");var n=gs(s);if(w.getOwnPropertyNames(n).forEach((function(t){"class"===t?i.className+=" "+n[t]:i.setAttribute(t,n[t])})),s.playerId=s.id,s.id+="Si",s.className="vjs-tech",s.player=i.player=this,this.addClass("vjs-paused"),!0!==c.VIDEOJS_NO_DYNAMIC_STYLE){this.xi=le("vjs-styles-dimensions");var r=Ts(".vjs-styles-defaults"),h=Ts("head");h.insertBefore(this.xi,r?r.nextSibling:h.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var o=s.getElementsByTagName("a"),a=0;a<o.length;a++){var u=o.item(a);fs(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return s.Kt=s.networkState,s.parentNode&&!e&&s.parentNode.insertBefore(i,s),hs(s,i),this.m.unshift(s),this.v=i,i},e.width=function(t){return this.dimension("width",t)},e.height=function(t){return this.dimension("height",t)},e.dimension=function(t,i){var s="width"===t?"ji":"Ti";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=C(i);if(S(e))return Xi.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Mi(),this},e.fluid=function(t){if(void 0===t)return!!this.Ai;this.Ai=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Mi()},e.aspectRatio=function(t){if(void 0===t)return this.Pi;if(!/^\d+\:\d+$/.test(t))throw new g("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Pi=t,this.fluid(!0),this.Mi()},e.Mi=function(){if(!0!==c.VIDEOJS_NO_DYNAMIC_STYLE){var t,i,s,e=(void 0!==this.Pi&&"auto"!==this.Pi?this.Pi:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.ji?this.ji:void 0!==this.Ti?this.Ti/n:this.videoWidth()||300,i=void 0!==this.Ti?this.Ti:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),de(this.xi,"\n ."+s+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*n+"%;\n }\n ")}else{var r="number"==typeof this.ji?this.ji:this.h.width,h="number"==typeof this.Ti?this.Ti:this.h.height,o=this.H&&this.H.el();o&&(r>=0&&(o.width=r),h>=0&&(o.height=h))}},e._t=function(t,s){var e=this;this.H&&this.Ei(),"Html5"!==t&&this.tag&&(Yr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Ni=t,this.j=!1;var r=qi({source:s,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Ii",videoTracks:this.rt,textTracks:this.nt,audioTracks:this.ht,autoplay:this.h.autoplay,playsinline:this.h.playsinline,preload:this.h.preload,loop:this.h.loop,muted:this.h.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Ci||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(r.tag=this.tag),s&&(this.Bi=s.type,s.src===this.pi.src&&this.pi.currentTime>0&&(r.startTime=this.pi.currentTime),this.pi.sources=null,this.pi.source=s,this.pi.src=s.src);var h=Yr.getTech(t);h||(h=i.getComponent(t)),this.H=new h(r),this.H.ready(n(this,this.Fi),!0),Be(this.Di||[],this.H),_o.forEach((function(t){e.on(e.H,t,e["handleTech"+fe(t)+"_"])})),this.on(this.H,"loadstart",this.$i),this.on(this.H,"waiting",this.Ri),this.on(this.H,"canplay",this.Ui),this.on(this.H,"canplaythrough",this.Oi),this.on(this.H,"playing",this.Vi),this.on(this.H,"ended",this.Li),this.on(this.H,"seeking",this.Hi),this.on(this.H,"seeked",this.qi),this.on(this.H,"play",this.zi),this.on(this.H,"firstplay",this.Wi),this.on(this.H,"pause",this.Gi),this.on(this.H,"durationchange",this.Xi),this.on(this.H,"fullscreenchange",this.Ji),this.on(this.H,"error",this.Qi),this.on(this.H,"loadedmetadata",this.Mi),this.on(this.H,"resize",this.Mi),this.on(this.H,"posterchange",this.Yi),this.on(this.H,"textdata",this.Ki),this.usingNativeControls(this.Zi("controls")),this.controls()&&!this.usingNativeControls()&&this.ts(),this.H.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||hs(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},e.Ei=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.Di=Ie(this.H),this.j=!1,this.H.dispose(),this.H=!1},e.tech=function(t){if(t&&t.IWillNotUseThisInPlugins)return this.H;var i="\n Please make sure that you are not using this inside of a plugin.\n To disable this alert and error, please pass in an object with\n `IWillNotUseThisInPlugins` to the `tech` method. See\n https://github.com/videojs/video.js/issues/2617 for more info.\n ";throw c.alert(i),new g(i)},e.ts=function(){this.ss(),this.on(this.H,"mousedown",this.es),this.on(this.H,"touchstart",this.ns),this.on(this.H,"touchmove",this.rs),this.on(this.H,"touchend",this.hs),this.on(this.H,"tap",this.os)},e.ss=function(){this.off(this.H,"tap",this.os),this.off(this.H,"touchstart",this.ns),this.off(this.H,"touchmove",this.rs),this.off(this.H,"touchend",this.hs),this.off(this.H,"mousedown",this.es)},e.Fi=function(){if(this.triggerReady(),this.pi.volume&&this.us("setVolume",this.pi.volume),this.Yi(),this.Xi(),(this.src()||this.currentSrc())&&this.tag&&this.h.autoplay&&this.paused()){try{delete this.tag.poster}catch(t){Xi("deleting tag.poster throws in some browsers",t)}this.play()}},e.$i=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},e.hasStarted=function(t){return void 0!==t?(this.et!==t&&(this.et=t,t?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.et},e.zi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},e.Ri=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},e.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},e.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},e.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},e.Hi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},e.qi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},e.Wi=function(){this.h.starttime&&(Xi.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.h.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},e.Gi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},e.Li=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},e.Xi=function(){this.duration(this.Zi("duration"))},e.es=function(t){0===t.button&&this.controls()&&(void 0!==this.h&&void 0!==this.h.userActions&&void 0!==this.h.userActions.click&&!1===this.h.userActions.click||(void 0!==this.h&&void 0!==this.h.userActions&&"function"==typeof this.h.userActions.click?this.h.userActions.click.call(this,t):this.paused()?this.play():this.pause()))},e.os=function(){this.userActive(!this.userActive())},e.ns=function(){this.userWasActive=this.userActive()},e.rs=function(){this.userWasActive&&this.reportUserActivity()},e.hs=function(t){t.cancelable&&t.preventDefault()},e.wi=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},e._i=function(){this.reportUserActivity()},e.Ji=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},e.Qi=function(){var t=this.H.error();this.error(t)},e.Ki=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},e.getCache=function(){return this.pi},e.us=function(t,i){if(this.H&&!this.H.j)this.H.ready((function(){this[t](i)}),!0);else try{this.H&&this.H[t](i)}catch(t){throw Xi(t),t}},e.Zi=function(t){if(this.H&&this.H.j)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?Xi("Video.js: "+t+" method not defined for "+this.Ni+" playback technology.",i):"TypeError"===i.name?(Xi("Video.js: "+t+" unavailable on "+this.Ni+" playback technology element.",i),this.H.j=!1):Xi(i),i}},e.play=function(){return this.src()||this.currentSrc()?this.us("play"):this.H.one("loadstart",(function(){this.play()})),this},e.pause=function(){return this.us("pause"),this},e.paused=function(){return!1!==this.Zi("paused")},e.scrubbing=function(t){return void 0!==t?(this.yi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.yi},e.currentTime=function(t){return void 0!==t?(this.us("setCurrentTime",t),this):(this.pi.currentTime=this.Zi("currentTime")||0,this.pi.currentTime)},e.duration=function(t){return void 0===t?void 0!==this.pi.duration?this.pi.duration:NaN:((t=C(t))<0&&(t=1/0),t!==this.pi.duration&&(this.pi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},e.remainingTime=function(){return this.duration()-this.currentTime()},e.buffered=function(){var t=this.Zi("buffered");return t&&t.length||(t=we(0,0)),t},e.bufferedPercent=function(){return _e(this.buffered(),this.duration())},e.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},e.volume=function(t){var i;return void 0!==t?(i=_.max(0,_.min(1,C(t))),this.pi.volume=i,this.us("setVolume",i),this):(i=C(this.Zi("volume")),S(i)?1:i)},e.muted=function(t){return void 0!==t?(this.us("setMuted",t),this):this.Zi("muted")||!1},e.supportsFullScreen=function(){return this.Zi("supportsFullScreen")||!1},e.isFullscreen=function(t){return void 0!==t?(this.cs=!!t,this):!!this.cs},e.requestFullscreen=function(t){var i,s=Te;return this.isFullscreen(!0),s.requestFullscreen?(ee(Di,s.fullscreenchange,n(this,(function t(i){this.isFullscreen(Di[s.fullscreenElement]),!1===this.isFullscreen()&&ne(Di,s.fullscreenchange,t),this.trigger("fullscreenchange")}))),s.prefixed||(i=this.h.fullscreenOptions,void 0!==t&&(i=t)),this.v[s.requestFullscreen](i)):this.H.supportsFullScreen()?this.us("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},e.exitFullscreen=function(){var t=Te;return this.isFullscreen(!1),t.requestFullscreen?Di[t.exitFullscreen]():this.H.supportsFullScreen()?this.us("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},e.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=Di.documentElement.style.overflow,ee(Di,"keydown",n(this,this.fullWindowOnEscKey)),Di.documentElement.style.overflow="hidden",fs(Di.body,"vjs-full-window"),this.trigger("enterFullWindow")},e.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},e.exitFullWindow=function(){this.isFullWindow=!1,ne(Di,"keydown",this.fullWindowOnEscKey),Di.documentElement.style.overflow=this.docOrigOverflow,vs(Di.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.canPlayType=function(t){for(var s,e=0,n=this.h.techOrder;e<n.length;e++){var r=fe(n[e]),h=Yr.getTech(r);if(h||(h=i.getComponent(r)),h){if(h.isSupported()&&(s=h.canPlayType(t)))return s}else Xi.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},e.selectSource=function(t){var s,e=this,n=this.h.techOrder.map(fe).map((function(t){return[t,Yr.getTech(t)||i.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(Xi.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),r=function(t,i,s){var e;return t.some((function(t){return i.some((function(i){if(e=s(t,i))return!0}))})),e},h=function(t,i){var s=t[0];if(t[1].canPlaySource(i,e.h[s.toLowerCase()]))return{source:i,tech:s}};return(this.h.sourceOrder?r(t,n,(s=h,function(t,i){return s(i,t)})):r(n,t,h))||!1},e.src=function(t){if(void 0===t)return this.Zi("src");var s=Yr.getTech(this.Ni);return s||(s=i.getComponent(this.Ni)),Array.isArray(t)?this.ls(t):"string"==typeof t?this.src({src:t}):t instanceof w&&(t.type&&!s.canPlaySource(t,this.h[this.Ni.toLowerCase()])?this.ls([t]):(this.pi.sources=null,this.pi.source=t,this.pi.src=t.src,this.Bi=t.type||"",this.ready((function(){s.prototype.hasOwnProperty("setSource")?this.us("setSource",t):this.us("src",t.src),"auto"===this.h.preload&&this.load(),this.h.autoplay&&this.play()}),!0))),this},e.ls=function(t){var i=this.selectSource(t);i?(i.tech===this.Ni?this.src(i.source):this._t(i.tech,i.source),this.pi.sources=t):(this.setTimeout((function(){this.error({code:4,message:this.localize(this.h.notSupportedMessage)})}),0),this.triggerReady())},e.load=function(){return this.us("load"),this},e.reset=function(){return this._t(fe(this.h.techOrder[0]),null),this.us("reset"),this},e.currentSources=function(){var t=this.currentSource(),i=[];return 0!==w.keys(t).length&&i.push(t),this.pi.sources||i},e.currentSource=function(){var t={},i=this.currentSrc();return i&&(t.src=i),this.pi.source||t},e.currentSrc=function(){return this.Zi("currentSrc")||this.pi.src||""},e.currentType=function(){return this.Bi||""},e.preload=function(t){return void 0!==t?(this.us("setPreload",t),this.h.preload=t,this):this.Zi("preload")},e.autoplay=function(t){return void 0!==t?(this.us("setAutoplay",t),this.h.autoplay=t,this):this.Zi("autoplay",t)},e.playsinline=function(t){return void 0!==t?(this.us("setPlaysinline",t),this.h.playsinline=t,this):this.Zi("playsinline")},e.loop=function(t){return void 0!==t?(this.us("setLoop",t),this.h.loop=t,this):this.Zi("loop")},e.poster=function(t){return void 0===t?this.mi:(t||(t=""),this.mi=t,this.us("setPoster",t),this.trigger("posterchange"),this)},e.Yi=function(){!this.mi&&this.H&&this.H.poster&&(this.mi=this.H.poster()||"",this.trigger("posterchange"))},e.controls=function(t){return void 0!==t?(t=!!t,this.gi!==t&&(this.gi=t,this.usingNativeControls()&&this.us("setControls",t),t?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.ts()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.ss())),this):!!this.gi},e.usingNativeControls=function(t){return void 0!==t?(t=!!t,this.ds!==t&&(this.ds=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.ds},e.error=function(t){return void 0===t?this.lt||null:null===t?(this.lt=t,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close(),this):(this.lt=new Pe(t),this.addClass("vjs-error"),Xi.error("(CODE:"+this.lt.code+" "+Pe.errorTypes[this.lt.code]+")",this.lt.message,this.lt),this.trigger("error"),this)},e.reportUserActivity=function(t){this.fs=!0},e.userActive=function(t){return void 0!==t?((t=!!t)!==this.vs&&(this.vs=t,t?(this.fs=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.fs=!1,this.H&&this.H.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.vs},e.ki=function(){var t,i,s,e,r=n(this,this.reportUserActivity);this.on("mousedown",(function(){r(),this.clearInterval(t),t=this.setInterval(r,250)})),this.on("mousemove",(function(t){t.screenX===i&&t.screenY===s||(i=t.screenX,s=t.screenY,r())})),this.on("mouseup",(function(i){r(),this.clearInterval(t)})),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.fs){this.fs=!1,this.userActive(!0),this.clearTimeout(e);var t=this.h.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.fs||this.userActive(!1)}),t))}}),250)},e.playbackRate=function(t){return void 0!==t?(this.us("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.Zi("playbackRate"):1},e.isAudio=function(t){return void 0!==t?(this.ps=!!t,this):!!this.ps},e.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new Gr,this.rt)},e.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new Jr,this.ht)},e.textTracks=function(){if(this.H)return this.H.textTracks()},e.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},e.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},e.addTextTrack=function(t,i,s){if(this.H)return this.H.addTextTrack(t,i,s)},e.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},e.removeRemoteTextTrack=function(t){var i=(void 0===t?{}:t).track,s=void 0===i?arguments[0]:i;if(this.H)return this.H.removeRemoteTextTrack(s)},e.getVideoPlaybackQuality=function(){return this.Zi("getVideoPlaybackQuality")},e.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},e.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},e.language=function(t){return void 0===t?this.gs:(this.gs!==String(t).toLowerCase()&&(this.gs=String(t).toLowerCase(),void 0!==this.v&&this.trigger("languagechange")),this)},e.languages=function(){return ve(s.prototype.h.languages,this.vi)},e.toJSON=function(){var t=ve(this.h),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=ve(e)).player=void 0,t.tracks[s]=e}return t},e.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new De(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},s.getTagSettings=function(t){var i={sources:[],tracks:[]},s=gs(t),e=s["data-setup"];if(ds(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=Ee(e||"{}"),r=n[0],h=n[1];r&&Xi.error(r),qi(s,h)}if(qi(i,s),t.hasChildNodes())for(var o=t.childNodes,a=0,u=o.length;a<u;a++){var c=o[a],l=c.nodeName.toLowerCase();"source"===l?i.sources.push(gs(c)):"track"===l&&i.tracks.push(gs(c))}return i},e.bi=function(){var t=Di.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},s}(i);xo.players={};var Co=c.navigator;xo.prototype.h={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:Co&&(Co.languages&&Co.languages[0]||Co.userLanguage||Co.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreenOptions:{navigationUI:"hide"}},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){xo.prototype[t]=function(){return this.Zi(t)}})),_o.forEach((function(t){xo.prototype["handleTech"+fe(t)+"_"]=function(){return this.trigger(t)}})),i.registerComponent("Player",xo);var So,jo,To=function(t){function i(s){var e;void 0===s&&(s={});var n=ve(s,{kind:Ue[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(zs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.defineProperty(r,"enabled",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("enabledchange"))}}),n.enabled&&(r.enabled=n.enabled),r.W=!0,r||me(e)}return ye(i,t),i}(Le),Mo=function(t){function i(s){var e;void 0===s&&(s={});var n=ve(s,{kind:Re[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(zs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.defineProperty(r,"selected",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("selectedchange"))}}),n.selected&&(r.selected=n.selected),r||me(e)}return ye(i,t),i}(Le);function Ao(t,s,e){var n;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),Ao.getPlayers()[t])return s&&Xi.warn('Player "'+t+'" is already initialised. Options will not be applied.'),e&&Ao.getPlayers()[t].ready(e),Ao.getPlayers()[t];n=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),Di.getElementById(t)}(t)}else n=t;if(!n||!n.nodeName)throw new b("The element or ID supplied is not valid. (videojs)");if(n.player||xo.players[n.playerId])return n.player||xo.players[n.playerId];s=s||{},Ao.hooks("beforesetup").forEach((function(t){var i=t(n,ve(s));zi(i)&&!Array.isArray(i)?s=ve(s,i):Xi.error("please return an object in beforesetup hooks")}));var r=new(i.getComponent("Player"))(n,s,e);return Ao.hooks("setup").forEach((function(t){return t(r)})),r}"undefined"==typeof HTMLVideoElement&&is()&&(Di.createElement("video"),Di.createElement("audio"),Di.createElement("track")),Ao.ys={},Ao.hooks=function(t,i){return Ao.ys[t]=Ao.ys[t]||[],i&&(Ao.ys[t]=Ao.ys[t].concat(i)),Ao.ys[t]},Ao.hook=function(t,i){Ao.hooks(t,i)},Ao.removeHook=function(t,i){var s=Ao.hooks(t).indexOf(i);return!(s<=-1)&&(Ao.ys[t]=Ao.ys[t].slice(),Ao.ys[t].splice(s,1),!0)},!0!==c.VIDEOJS_NO_DYNAMIC_STYLE&&is()&&((So=Ts(".vjs-styles-defaults"))||(So=le("vjs-styles-defaults"),(jo=Ts("head"))&&jo.insertBefore(So,jo.firstChild),de(So,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),ce(1,Ao),Ao.VERSION="5.20.6-opentelly.14",Ao.options=xo.prototype.h,Ao.getPlayers=function(){return xo.players},Ao.players=xo.players,Ao.getComponent=i.getComponent,Ao.registerComponent=function(t,s){Yr.isTech(s)&&Xi.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),i.registerComponent.call(i,t,s)},Ao.getTech=Yr.getTech,Ao.registerTech=Yr.registerTech,Ao.browser=Ys,Ao.TOUCH_ENABLED=Js,Ao.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in zi(i)?("function"==typeof i.init&&(Xi.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==w.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new b("Super expression must either be null or a function, not "+typeof i);t.prototype=w.create(i&&i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i&&(t.bs=i)}(s,t),e)e.hasOwnProperty(n)&&(s.prototype[n]=e[n]);return s},Ao.mergeOptions=ve,Ao.bind=n,Ao.plugin=function(t,i){xo.prototype[t]=i},Ao.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),Ao.options.languages=ve(Ao.options.languages,((s={})[t]=i,s)),Ao.options.languages[t]},Ao.log=Xi,Ao.createTimeRange=Ao.createTimeRanges=we,Ao.formatTime=lh,Ao.parseUrl=He,Ao.isCrossOrigin=qe,Ao.EventTarget=pe,Ao.on=ee,Ao.one=he,Ao.off=ne,Ao.trigger=re,Ao.xhr=Fr,Ao.TextTrack=Or,Ao.AudioTrack=To,Ao.VideoTrack=Mo,Ao.isEl=ss,Ao.isTextNode=_s,Ao.createEl=ns,Ao.hasClass=ds,Ao.addClass=fs,Ao.removeClass=vs,Ao.toggleClass=ps,Ao.setAttributes=ms,Ao.getAttributes=gs,Ao.emptyEl=xs,Ao.appendContent=Cs,Ao.insertContent=Ss,Ao.computedStyle=yh,f(),f();var Po=10;function Eo(t){const i=t.duration;if(S(i)){var s;const i=null==(s=t.source)?void 0:s.streamType;return"live"===i||"dvr"===i}return i===1/0}function No(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Io(t){const i=Do(t);return Eo(t)?i.end(i.length-1):i.start(0)}function Bo(t){return Do(t).start(0)}function Fo(t){const i=Do(t);return i.end(i.length-1)-i.start(0)}function Do(t){const i=t.seekable;if(i&&i.length)return i;let s=t.duration;return s=isFinite(s)?s:0,new qt([0,s]).ks()}function $o(t,i){void 0===i&&(i=t);let s=t<0?"-":"";t=_.abs(t);let e=_.floor(t%60),n=_.floor(t/60%60),r=_.floor(t/3600);const h=_.floor(i/60%60),o=_.floor(i/3600);return(S(t)||t===1/0)&&(r=n=e="-"),r=+r>0||o>0?r+":":"",n=((r||h>=10)&&+n<10?"0"+n:n)+":",e=+e<10?"0"+e:e,s+r+n+e}function Ro(t){return class extends t{get ws(){var t;return null!=(t=this._s)?t:this._s=Uo(this.player())}dispose(){this._s=void 0,super.dispose()}constructor(...t){super(...t),this._s=void 0}}}function Uo(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function Oo(t){const i=Uo(t),s=()=>{const s=No(t);t.toggleClass("theo-at-live",function(t,i){if(Eo(t)){let s=t.seekable;return 0===s.length||s.end(s.length-1)-i<Po}return!1}(i,s)),t.toggleClass("vjs-live",Eo(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===M(t.duration,t.seekable,null==(i=t.source)?void 0:i.streamType)}(i))};t.on("emptied",s),t.on("timeupdate",s),t.on("durationchange",s)}f(),f();var Vo="theo-ad-playing",Lo="theo-dai-ad-playing";function Ho(t,i,s){t.toggleClass(Vo,i),t.toggleClass(Lo,i&&s)}function qo(){this.userActive(!1)}f(),f(),f();var zo=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}},Wo=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],Go=Ao.getTech("Tech"),Xo=Ao.getTech("Html5"),Jo=class extends Go{xs(){var t;for(const t of Wo)this.ws.addEventListener(t,this.Cs);this.ws.addEventListener("error",this.Ss),this.ws.addEventListener("contentprotectionerror",this.Ss),this.ws.addEventListener("sourcechange",this.js),this.ws.addEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.addEventListener(Ti.MODE_CHANGE,this.Ms),this.ws.textTracks.addEventListener("addtrack",this.As),this.ws.textTracks.addEventListener("removetrack",this.Ps),this.ws.textTracks.addEventListener("change",this.Es),this.ws.audioTracks.addEventListener("addtrack",this.Ns),this.ws.audioTracks.addEventListener("removetrack",this.Is),this.ws.audioTracks.addEventListener("change",this.Bs)}Fs(){var t;for(const t of Wo)this.ws.removeEventListener(t,this.Cs);this.ws.removeEventListener("error",this.Ss),this.ws.removeEventListener("contentprotectionerror",this.Ss),this.ws.removeEventListener("sourcechange",this.js),this.ws.removeEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.removeEventListener(Ti.MODE_CHANGE,this.Ms),this.ws.textTracks.removeEventListener("addtrack",this.As),this.ws.textTracks.removeEventListener("removetrack",this.Ps),this.ws.textTracks.removeEventListener("change",this.Es),this.ws.audioTracks.removeEventListener("addtrack",this.Ns),this.ws.audioTracks.removeEventListener("removetrack",this.Is),this.ws.audioTracks.removeEventListener("change",this.Bs)}Ds(t){this.trigger(new zo(t,this))}createEl(){let t=this.h,i=t.player;if(!i)throw new g(this.localize('Missing required tech option "player"'));let s=i.element;return Ao.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.ws}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.ws.buffered}played(){return this.ws.played}reset(){this.ws.stop()}play(){this.ws.play()}pause(){this.ws.pause()}paused(){return this.ws.paused}currentTime(){return this.ws.currentTime}setCurrentTime(t){this.ws.currentTime=t}duration(){return this.ws.duration}volume(){return this.ws.volume}setVolume(t){this.ws.volume=t}muted(){return this.ws.muted}setMuted(t){this.ws.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.ws.src)return this.ws.src;if(this.ws.source){if(!ui(this.ws.source.ads))return this.ws.source.ads[0].sources;if(zt(this.ws.source))return"This source is managed by the Uplynk integration extension.";if(Lt(this.ws.source))return"This source is managed by the DAI integration extension.";if(Gt(this.ws.source))return"This source is managed by Millicast."}}}setSrc(t){return this.setSource({src:t})}setSource(t){this.lt=null,this.trigger("error")}currentSrc(){return this.ws.src}load(){this.setPreload("auto")}preload(){return this.ws.preload}setPreload(t){this.ws.preload=t}autoplay(){return this.ws.autoplay}setAutoplay(t){this.ws.autoplay=!!t}seeking(){return this.ws.seeking}seekable(){return this.ws.seekable}ended(){return this.ws.ended}playbackRate(){return this.ws.playbackRate}setPlaybackRate(t){this.ws.playbackRate=t}readyState(){return this.ws.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.ws.videoHeight}videoWidth(){return this.ws.videoWidth}supportsFullScreen(){return this.ws.presentation.supportsMode(Zt.FULLSCREEN)}enterFullScreen(){this.ws.presentation.requestMode(Zt.FULLSCREEN)}exitFullScreen(){this.ws.presentation.requestMode(Zt.INLINE)}$s(){let t=this.ws.ads;if(t&&t.playing)return!0;let i=this.ws.vr;return!(!i||i.state===Bt.Rs)}initTextTrackListeners(){return this.on("touchend",(t=>{this.$s()&&(t.preventDefault=()=>{})})),super.initTextTrackListeners()}Zt(){if(!this.src())return;const t=this.readyState();if(0===t){let t=!1,i=()=>{t=!0};this.on("loadstart",i);let s=()=>{t||this.trigger("loadstart")};return this.on("loadedmetadata",s),void this.ready((()=>{this.off("loadstart",i),this.off("loadedmetadata",s),t||this.trigger("loadstart")}))}let i=["loadstart"];i.push("loadedmetadata"),t>=2&&i.push("loadeddata"),t>=3&&i.push("canplay"),t>=4&&i.push("canplaythrough"),this.ready((()=>{for(const t of i)this.trigger(t)}))}dispose(){this.Fs(),this.ws=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return Ci}constructor(t={},i){super(t,i),this.Cs=t=>this.Ds(t),this.Us=!1,this.js=()=>{void 0===this.ws.errorObject&&(this.Ds(new Jt(this.ws.currentTime,this.ws.readyState)),this.Ds(new N),this.Ds(new Yt(this.ws.duration)))},this.Ts=()=>{this.Ds(new It(this.ws.currentTime))},this.As=t=>{this.textTracks().tt(t.track)},this.Ns=t=>{this.audioTracks().tt(t.track)},this.Ps=t=>{this.textTracks().it(t.track)},this.Is=t=>{this.audioTracks().it(t.track)},this.Es=()=>{let t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Bs=()=>{let t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Ms=()=>{if(!this.supportsFullScreen())return;let t=this.Us,i=this.ws.presentation.currentMode===Zt.FULLSCREEN;t!==i&&(this.Us=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ss=()=>{const t=this.ws.errorObject,i=t&>(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.ws=this.h.player,this.xs();const s=!this.paused();s&&this.pause(),t.preload&&this.setPreload(t.preload),t.autoplay&&this.setAutoplay(t.autoplay),t.muted&&this.setMuted(t.muted),t.source?this.setSrc(t.source):this.Zt(),s&&this.ready((()=>this.play())),this.triggerReady()}};Jo.prototype.featuresFullscreenResize=Xo.prototype.featuresFullscreenResize,Jo.prototype.featuresPlaybackRate=Xo.prototype.featuresPlaybackRate,Jo.prototype.featuresProgressEvents=!0,Jo.prototype.featuresTimeupdateEvents=!0,Jo.prototype.featuresNativeTextTracks=!0,Ao.registerTech("THEOplayer",Jo),f(),f(),f(),f();var Qo=class{constructor(t){this.Os=t=>{si(this.Vs,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.Ls=t=>{ni(this.Vs,"theo-mobile-button-hover")},this.Hs=t=>{this.Vs.blur()},this.Vs=t,t.addEventListener("touchstart",this.Os),t.addEventListener("touchend",this.Ls),t.addEventListener("focusin",this.Hs)}};f(),f(),f(),f();var Yo=Ao.getComponent("Menu"),Ko=class extends(Ro(Yo)){get qs(){return this.player().el()}zs(){si(this.qs,"theo-menu-opened")}Ws(){ni(this.qs,"theo-menu-opened")}constructor(t,i){super(t,i)}};f();var Zo=Ao.getComponent("MenuItem"),ta=class extends(Ro(Zo)){get parentMenu(){return this.Gs}buildCSSClass(){return"theo-menu-item vjs-menu-item"}createEl(){let t=super.createEl("li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){this.Xs||(this.parentMenu.Js(this),"tap"!==t.type&&"keydown"!==t.type||(this.Xs=!0,this.trigger("click"),this.Xs=!1))}dispose(){vi.Ys.Qs&&(this.el().removeEventListener("touchstart",this.Os),this.el().removeEventListener("touchend",this.Ls)),super.dispose()}constructor(t,i,s){super(t,Mi({selectable:!0},i)),this.Xs=!1,this.Os=t=>{si(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.Ls=t=>{ni(this.el(),"theo-mobile-menu-item-hover")},this.Gs=s,vi.Ys.Qs&&(this.el().addEventListener("touchstart",this.Os),this.el().addEventListener("touchend",this.Ls))}};f();var ia=Ao.getComponent("ClickableComponent"),sa=class extends ia{get parentMenu(){return this.Gs}get Ks(){return this.Zs}set Ks(t){this.Zs=t,this.el().setAttribute("tabindex",this.Ks?"0":"-1"),this.te()}buildCSSClass(){return"theo-primary-background theo-menu-header"}createEl(){let t=super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){!this.Xs&&this.Ks&&(this.Gs.ie(),"tap"===t.type&&(this.Xs=!0,this.trigger("click"),this.Xs=!1))}te(){this.Ks?this.el().setAttribute("aria-label",this.localize("Go back to the previous menu")):this.el().setAttribute("aria-label","")}constructor(t,i,s){super(t,i),this.Xs=!1,this.Zs=!1,this.Gs=s,this.on(t,"languagechange",this.te)}},ea=class extends Ko{get menuHeader(){return this.se}get menuItems(){return this.children()}addMenuItem(t){t=Mi({playerOptions:this.h.playerOptions},t);let i=new ta(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=Mi({playerOptions:this.h.playerOptions},t);let i=this.ee(this.player(),t);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}removeMenuItem(t){this.removeChild(t),this.trigger("menuchange")}buildCSSClass(){return"theo-menu vjs-menu"}zs(){super.zs(),s.removeEventListener("resize",this.ne),s.addEventListener("resize",this.ne),this.show()}re(){let t=this.he();if(!t)return;let i=t.getClientRects();vi.Ys.Qs?this.oe(t,i):this.ae(t,i)}he(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ae(t,i){}oe(t,i){}Ws(){s.removeEventListener("resize",this.ne),super.Ws(),this.hide(),vi.Ys.Qs&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=this.contentEl();si(i,"theo-menu-content");let s=new sa(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.se=s,t}Js(t){}show(){return this.re(),super.show()}dispose(){this.se&&this.se.dispose(),super.dispose()}constructor(t,i){super(t,i),this.ne=()=>this.re(),this.ue=this.player().el(),this.hide(),this.on("menuchange",this.re)}},na=class extends ea{get ce(){return this.le}set ce(t){this.le&&this.le.de(this),this.le=t,t&&t.fe(this)}ve(t){this.ce.pe(t,"replace")}me(t){t.ce.pe(this,"restore")}ge(){ni(this.ye,"vjs-hidden"),this.ye.style.opacity="1",super.show()}be(){si(this.ye,"vjs-hidden")}zs(){this.ce&&this.ce.zs(),super.zs()}Ws(){this.ce&&this.ce.Ws(),super.Ws(),si(this.ye,"vjs-hidden")}he(){if(this.ce&&this.ce.ke)return this.ce.ke.ye}ae(t,i){if(i.length>0){let t=i[0].height,s=i[0].width;this.le.we.style.height=t+"px",this.le.we.style.width=s+"px"}super.ae(t,i)}constructor(t,i){super(t,i)}};f();var ra=class{get we(){return this.Vs}get ke(){return this._e}fe(t){t.be(),this.Vs.appendChild(t.ye)}de(t){this.Vs.removeChild(t.ye)}pe(t,i){if(t==this._e)return;let s=this._e;if(this._e=t,this._e.ge(),this.ke.focus(),vi.Ys.Qs)s.be();else{const t="translateX(100%)",e="translateX(-100%)",n=gi("transform");s.ye.style.opacity="0",s.ye.style[n]="replace"===i?e:t,this._e.ye.style.opacity="1",this._e.ye.style[n]="",u((()=>{s.be(),s.ye.style[n]=""}),300)}}zs(){this.xe(),this._e.ge(),this.Ce()}Ws(){this.xe(),this._e.be(),this.Se.be(),this._e=this.Se,this.Ce()}Ce(){li((()=>{ni(this.Vs,"theo-no-transition"),ni(this._e.ye,"theo-no-transition")}))}xe(){si(this.Vs,"theo-no-transition"),si(this._e.ye,"theo-no-transition")}constructor(t){this.Se=this._e=t,this.Vs=h.createElement("div"),this.Vs.className="theo-tertiary-background theo-menu-animation-container",this.Vs.appendChild(this.Se.ye),this.ue=this._e.player().el()}};f(),f();var ha=class extends na{get ye(){return this.el()}get parentMenu(){return this.je}ee(t,i){let s=new oa(t,i,this);return s.subMenu.ce=this.ce,s}ie(){this.Te()}Js(t){super.Js(t),this.Te()}Te(){this.parentMenu.me(this)}buildCSSClass(){return"theo-submenu "+(this.Me?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Me=!0;let i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Me=!1,this.je=s,this.menuHeader.Ks=!0}},oa=class extends ta{get subMenu(){return this.Ae}handleClick(t){this.parentMenu.ve(this.subMenu)}constructor(t,i,s){super(t,Mi({selectable:!1},i),s),this.Ae=new ha(t,i,s)}},aa=class extends na{get menuButton(){return this.Pe}createEl(){let t=Ao.createEl("div",{className:this.buildCSSClass()});return this.Ee=super.createEl(),this.Ee.className=super.buildCSSClass(),si(this.Ee,"theo-menu-content-animatable"),t.appendChild(this.Ee),this.ce=new ra(this),t.appendChild(this.ce.we),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}ee(t,i){let s=new oa(t,i,this);return s.subMenu.ce=this.ce,s}ae(t,i){super.ae(t,i);let s=this.ue.getClientRects(),e=s.length>0?s[0]:void 0,n=C(getComputedStyle(this.el()).fontSize);X(this.el(),this.Pe.el(),e,n)}get ye(){return this.Ee}ie(){this.Pe.closeMenu()}dispose(){this.Ne||(this.Ne=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ne=!1,this.Pe=s}};f();var ua=class{set Ie(t){this.Be.innerHTML=this.Fe.localize(t),this.De(),this.$e(),ci(this.Fe.el())}get Ie(){return this.Be.textContent||""}Re(){this.Fe.off("mouseover",this.$e),this.Fe.off("mouseout",this.De),this.Fe.off("dispose",this.Ue),Qt(this.Be)}constructor(t,i){this.$e=()=>{ni(this.Be,"vjs-hidden");let t=this.Fe.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=C(getComputedStyle(this.Be).fontSize);X(this.Be,this.Fe.el(),i,s)},this.De=()=>{si(this.Be,"vjs-hidden")},this.Ue=()=>this.Re(),this.Fe=t,ci(t.el()),di(t.el()),this.Be=h.createElement("span"),this.Be.innerHTML=this.Fe.localize(i),this.Be.className="theo-button-tooltip vjs-hidden",this.Be.setAttribute("aria-hidden","true"),this.Fe.el().appendChild(this.Be),this.Fe.on("mouseover",this.$e),this.Fe.on("mouseout",this.De),this.Fe.on("dispose",this.Ue)}},ca=Ao.getComponent("Button"),la=class extends(Ro(ca)){get Oe(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.Ve}isMenuOpen(){return this.Le}openMenu(){this.He&&!this.Le&&(this.Ve.zs(),this.el().setAttribute("aria-expanded","true"),this.Le=!0,this.Ve.focus())}closeMenu(){this.He&&this.Le&&(this.Ve.Ws(),this.el().setAttribute("aria-expanded","false"),this.Le=!1)}set minimumMenuItems(t){this.qe=t,this.ze()}buildCSSClass(){return"theo-controlbar-button vjs-menu-button vjs-menu-button-popup "+super.buildCSSClass()}createEl(t,i,s){return super.createEl("button",{},{"aria-live":"off"})}handleClick(){this.Le?this.closeMenu():this.openMenu()}enable(){return this.He=!0,super.enable()}disable(){return this.closeMenu(),this.He=!1,super.disable()}te(){this.Be.Ie=this.controlText()}dispose(){this.player().removeChild(this.Ve),this.Ve.dispose(),this.Be.Re(),this.ws.removeEventListener("seeking",this.We),super.dispose()}constructor(t,i){super(t,i),this.Le=!1,this.qe=1,this.He=!0,this.Ge=t=>{let i=this.el().contains(t.target),s=this.Ve.el().contains(t.target),e=!1;var n;vi.Ys.Qs&&this.Oe&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.Le||(e&&t.preventDefault(),this.closeMenu())},this.Xe=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.We=()=>{this.Le&&this.closeMenu()},this.ze=()=>{this.Ve.menuItems.length>=this.qe?this.show():(this.closeMenu(),this.hide())},this.Ve=new aa(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.Ve),this.Be=new ua(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),vi.Ys.Je?(this.on(h,"touchend",this.Ge),new Qo(this.el())):(this.on(h,"click",this.Ge),this.on(h,"keydown",this.Xe),xi&&this.on(h,xi.Qe,this.closeMenu)),this.ws.addEventListener("seeking",this.We),this.on(this.Ve,"menuchange",this.ze),this.on(t,"languagechange",this.te),this.ze()}},da=Ao.getComponent("Component"),fa=class extends(Ao.getComponent("ControlBar")){addMenuButton(t){t=Mi({playerOptions:this.h.playerOptions},t);let i=new la(this.player(),t);return this.addChild(i),i}removeMenuButton(t){this.removeChild(t)}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-secondary-color vjs-control-bar "+super.buildCSSClass()}constructor(t,i){super(t,i),this.addChild("THEOControlBarShadow",void 0,0)}};Ao.registerComponent("THEOControlBarShadow",class extends da{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}}),f(),f();var va=Ao.getComponent("VolumeBar"),pa=class extends va{handleFocus(t){super.handleFocus(t),this.Ye.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.Ye.removeClass("focus-within")}constructor(t,i){super(t,i),this.Ye=i.Ke}};f();var ma=Ao.getComponent("VolumeControl"),ga=class extends ma{constructor(t,i){super(t,i),this.Ze=new pa(t,{Ke:this}),this.addChild(this.Ze)}};ga.prototype.h=Mi({},ma.prototype.h,{children:[]}),Ao.registerComponent("VolumeControl",ga);var ya=class extends(Ro(fa)){tn(){this.sn(this.nn())}rn(){0===this.hn&&(this.hn=u(this.an,100))}un(t){"opacity"===t.propertyName&&(0!==this.hn&&(v(this.hn),this.hn=0),this.sn(!0))}cn(t){"opacity"===t.propertyName&&(this.nn()||this.sn(!1))}nn(){return"0"!==s.getComputedStyle(this.el()).opacity}sn(t){this.ln!==t&&(this.ln=t,t?this.dn():this.ws.textTrackStyle.marginBottom=void 0)}dn(){const t=this.el().getBoundingClientRect().height;this.ws.textTrackStyle.marginBottom!==t&&(this.ws.textTrackStyle.marginBottom=t)}dispose(){v(this.hn),this.hn=0,this.vn.fn(fi.pn,this.mn),this.vn.gn(),super.dispose()}constructor(t,i){super(t,i),this.ln=!1,this.hn=0,this.an=()=>{0!==this.hn&&(this.hn=0,this.sn(this.nn()))},this.mn=()=>{this.ln&&this.dn()},this.on(t,"ready",this.tn),this.on(t,"pause",this.tn),this.on(t,"useractive",this.tn),this.on(t,"firstplay",this.rn),this.on(t,"play",this.rn),this.on(t,"userinactive",this.rn),this.on("transitionstart",this.un),this.on("transitionend",this.cn),this.vn=new bi(this.el()),this.vn.yn(fi.pn,this.mn),this.vn.bn(!0)}};ya.prototype.h=Mi({},fa.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),Ao.registerComponent("ControlBar",ya),f();var ba=class extends fa{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};ba.prototype.h=Mi({},fa.prototype.h,{children:[]}),Ao.registerComponent("TopControlBar",ba),f();var ka=Ao.getComponent("CurrentTimeDisplay"),wa=class extends(Ro(ka)){updateContent(){const t=No(this.player()),i=this.ws,s=Bo(i),e=this.localize("Current Time"),n=$o(_.max(0,t-s),Fo(i));n!==this.Mt&&(this.Mt=n,this.contentEl().innerHTML='<span class="vjs-control-text">'+e+"</span> "+n)}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}};Ao.registerComponent("CurrentTimeDisplay",wa),f();var _a=Ao.getComponent("DurationDisplay"),xa=class extends(Ro(_a)){updateContent(){const t=this.ws,i=S(t.duration)?NaN:Fo(t),s=t.clip.endTime-t.clip.startTime,e=_.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=$o(e);this.S.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}dispose(){var t;null==(t=this.ws)||t.clip.removeEventListener("change",this.kn),super.dispose()}constructor(t,i){var s;super(t,i),this.kn=()=>this.updateContent(),this.off(t,"durationchange",this.updateContent),this.on(t,"durationchange",this.updateContent),this.off(t,"timeupdate",this.updateContent),this.on(t,"timeupdate",this.updateContent),this.off(t,"emptied",this.updateContent),this.on(t,"emptied",this.updateContent),null==(s=this.ws)||s.clip.addEventListener("change",this.kn)}};Ao.registerComponent("DurationDisplay",xa),f();var Ca=Ao.getComponent("Button"),Sa=class extends(Ro(Ca)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){let t=super.createEl("button",{},{"aria-live":"off"});return this.wn=Ao.createEl("span",{className:"theo-live-control-indicator"}),Kt(t,this.wn),t}createControlTextEl(t){let i=super.createControlTextEl(t);return Ao.removeClass(i,"vjs-control-text"),Ao.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.ws;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Io(i)),t.play()}}_n(){Eo(this.ws)?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this._n(),this.on(t,"emptied",this._n),this.on(t,"durationchange",this._n),vi.Ys.Je&&new Qo(this.el())}};Ao.registerComponent("LiveDisplay",Sa),f();var ja=Ao.getComponent("LoadingSpinner");Ao.registerComponent("LoadingSpinner",class extends ja{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=Ao.createEl("div",{className:"theo-loading-spinner-rotator"}),s=Ao.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=Ao.createEl("div",{className:"theo-loading-spinner-circle-right"});return i.appendChild(s),i.appendChild(e),t.appendChild(i),t}constructor(t,i){super(t,i)}}),f();var Ta=Ao.getComponent("LoadProgressBar"),Ma=class extends(Ro(Ta)){update(){let t=this.ws,i=qt.xn(Do(t)),s=i.Cn(0),e=qt.xn(t.buffered).Sn(i),n=i.jn(0)-s,r=e.V&&e.jn(e.V-1)||0;r=_.max(0,r-s);let o=this.el(),a=this.Tn;o.style.width=Aa(r,n);for(let t=0;t<e.V;t++){let i=e.Cn(t),n=e.jn(t),u=a[t];u||(u=h.createElement("div"),a.push(u),o.appendChild(u)),u.style.left=Aa(i-s,r),u.style.width=Aa(n-i,r)}for(let t=a.length;t>e.V;t--)o.removeChild(a[t-1]);a.length=e.V}constructor(t,i){super(t,i),this.Tn=[],this.on(t,"emptied",this.update)}};function Aa(t,i){let s=t/i||0;return 100*(s>=1?1:s)+"%"}Ao.registerComponent("LoadProgressBar",Ma),f();var Pa=Ao.getComponent("MouseTimeDisplay"),Ea=class extends(Ro(Pa)){handleMouseMove(t){let i=t,s=this.ws,e=Bo(s)+this.calculateDistance(i)*Fo(s),n=i.pageX-W(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){let i=t,s=this.ws,e=Bo(s)+this.calculateDistance(i)*Fo(s),n=i.touches[0].pageX-W(this.el().parentNode).left;this.update(e,n+"px")}createEl(){let t=super.createEl();return this.Mn=Ao.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.An=t;let s=this.Pn(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(tt(this.Mn,s),this.En())}En(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){let t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=C(getComputedStyle(t).fontSize);X(this.tooltip,this.el(),s,e)}}Pn(t){const i=this.ws,s=t-Io(i);return $o(Eo(i)?_.min(s,0):s,Fo(i))}dispose(){var t;this.ws.removeEventListener("dimensionchange",this.Nn),null==(t=this.ws.presentation)||t.removeEventListener(Ti.MODE_CHANGE,this.Nn),super.dispose()}constructor(t,i){var s;(super(t,i),this.An=NaN,this.Nn=()=>{let t=No(this.player());const i=this.ws;let s=(t-Bo(i))/Fo(i)||0;s=ki(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(Ao.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.Mn)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),$t.Qs)&&(this.on(t,"firstplay",this.Nn),this.on(t,"play",this.Nn),this.on(t,"seeking",this.Nn),this.on(t,"seeked",this.Nn),this.on(t,"timeupdate",this.Nn),this.ws.addEventListener("dimensionchange",this.Nn),null==(s=this.ws.presentation)||s.addEventListener(Ti.MODE_CHANGE,this.Nn),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",yi((t=>this.handleTouchMove(t)),25)),this.Nn()})))}};Ao.registerComponent("MouseTimeDisplay",Ea),f();var Na=Ao.getComponent("PlayProgressBar"),Ia=class extends(Ro(Na)){updateDataAttr(){let t=No(this.player());this.el().setAttribute("data-current-time",this.Pn(t))}Pn(t){let i=this.ws;return $o(t-Io(i),Fo(i))}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-play-progress vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}};Ao.registerComponent("PlayProgressBar",Ia),f();var Ba=Ao.getComponent("RemainingTimeDisplay"),Fa=class extends(Ro(Ba)){updateContent(){const t=this.ws,i=Fo(t);if(i){const s=Do(t).end(0),e=this.localize("Remaining Time"),n=$o(_.max(0,s-this.player().currentTime()),i);n!==this.Mt&&(this.Mt=n,this.contentEl().innerHTML='<span class="vjs-control-text">'+e+"</span> -"+n)}}constructor(t,i){super(t,i),this.on(t,"timeupdate",this.updateContent),this.on(t,"emptied",this.updateContent)}};Ao.registerComponent("RemainingTimeDisplay",Fa),f(),f();var Da=class{get ws(){return this._s||(this._s=this.In.tech({IWillNotUseThisInPlugins:!0}).theoplayer()),this._s}Bn(t){if(t.kind!==St.Fn)return;if(0===this.ws.seekable.length)return;this.Dn=t;const i=t.cues.slice();this.Rn.$n(i);for(let t=0;t<i.length;t++){let s=i[t],e=i[t+1],n=!e||s.endTime!==e.startTime,r=new $a(s,this.ws,n);this.Un.push(r),this.On.appendChild(r.we)}t.addEventListener("cuechange",this.Vn),this.Vn()}Ln(){this.ws.addEventListener("loadedmetadata",this.Hn),this.ws.addEventListener("loadeddata",this.Hn),this.ws.addEventListener("sourcechange",this.Hn),this.ws.textTracks.addEventListener("addtrack",this.qn),this.ws.textTracks.addEventListener("removetrack",this.zn),this.ws.textTracks.addEventListener("change",this.Hn)}Wn(){this.ws.removeEventListener("loadedmetadata",this.Hn),this.ws.removeEventListener("loadeddata",this.Hn),this.ws.removeEventListener("sourcechange",this.Hn),this.ws.textTracks.removeEventListener("addtrack",this.qn),this.ws.textTracks.removeEventListener("removetrack",this.zn),this.ws.textTracks.removeEventListener("change",this.Hn)}Gn(){if(!(this.ws.readyState<Pt.Xn))for(let t of this.ws.textTracks)if(t.kind===St.Fn&&t.mode===xt.Jn&&t.cues.length>0&&t.readyState!==bt.ERROR)return t}Qn(t){this.Rn.Yn(t)}Kn(){this.Rn.ge()}Zn(){this.Rn.be()}tr(){for(let t of this.Un)t.Re();this.Rn.tr(),this.Un=[],this.ir=void 0,this.Dn&&this.Dn.removeEventListener("cuechange",this.Vn),this.Dn=void 0}Re(){this.Wn(),this.sr.removeEventListener("mousemove",this.er),this.sr.removeEventListener("mouseenter",this.nr),this.sr.removeEventListener("mouseleave",this.rr),this.tr(),this.Rn.Re(),this._s=void 0}constructor(t,i){this.In=i,this.Un=[],this._s=void 0,this.qn=t=>{let i=t.track;i.kind===St.Fn&&(i.addEventListener("addcue",this.Hn),i.addEventListener("removecue",this.Hn),i.addEventListener("readystatechange",this.Hn)),this.Hn()},this.zn=t=>{let i=t.track;i.kind===St.Fn&&(i.removeEventListener("addcue",this.Hn),i.removeEventListener("removecue",this.Hn),i.removeEventListener("readystatechange",this.Hn)),this.Hn()},this.er=t=>{let i=this.ws,s=function(t,i){let s,e,n=W(t),r=t.offsetWidth,h=t.offsetHeight,o=n.top,a=n.left;!function(t){return void 0!==t.changedTouches}(i)?(e=i.pageX,s=i.pageY):(e=i.changedTouches[0].pageX,s=i.changedTouches[0].pageY);let u=ki((o-s+h)/h,0,1),c=ki((e-a)/r,0,1);return{x:c,y:u}}(this.On,t),e=Bo(i)+s.x*Fo(i);e===i.duration&&(e-=.1),this.Qn(e)},this.rr=()=>{this.Rn.be()},this.nr=()=>{this.Rn.ge()},this.Hn=()=>{let t=this.Gn();t!==this.Dn&&(this.tr(),t&&this.Bn(t))},this.Vn=()=>{var t,i,s;const e=null==(i=this.Dn)||null==(t=i.activeCues)?void 0:t[0],n=$(this.Un,(t=>t.hr===e));n!==this.ir&&(null==(s=this.ir)||s.ar(),this.ir=n,null==n||n.ur())},this.sr=t,this.Rn=new Ra,this.In.contentEl().appendChild(this.Rn.we),this.On=h.createElement("div"),si(this.On,"theoplayer-chapterbar"),this.sr.appendChild(this.On),this.sr.addEventListener("mousemove",this.er),this.sr.addEventListener("mouseenter",this.nr),this.sr.addEventListener("mouseleave",this.rr),this.Ln()}},$a=class{get we(){return this.Vs}ur(){si(this.Vs,"theoplayer-chapter-indicator-active")}ar(){ni(this.Vs,"theoplayer-chapter-indicator-active")}cr(t,i){let s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1)-s,n=this.hr.startTime,r=this.hr.endTime-n,o=h.createElement("div");si(o,"theoplayer-chapter-indicator");let a=h.createElement("div");si(a,"theoplayer-chapter-indicator-highlight"),o.appendChild(a),i&&si(o,"theoplayer-chapter-indicator-discontinuous");let u=_.min(n/e*100,100),c=100-u,l=_.min(r/e*100,c);return o.style.width=l+"%",o.style.left=u+"%",o}Re(){Qt(this.Vs)}constructor(t,i,s){this.hr=t,this.Vs=this.cr(i,s)}},Ra=class{be(){this.lr--,0===this.lr&&ni(this.we,"theoplayer-chapter-hovering")}$n(t){this.dr=t||[],this.dr.length>0&&(this.we.style.display="")}pr(t){tt(this.mr,t.content)}tr(){this.dr=[],tt(this.mr,""),this.we.style.display="none"}ge(){this.lr++,this.lr>0&&si(this.we,"theoplayer-chapter-hovering")}Yn(t){for(let i of this.dr)if(Ua(i,t)){this.pr(i);break}}Re(){Qt(this.we)}constructor(){this.dr=[],this.lr=0,this.we=h.createElement("div"),si(this.we,"theoplayer-chaptertitle"),this.we.style.display="none",this.mr=h.createElement("p"),this.we.appendChild(this.mr)}};function Ua(t,i){return new qt([t.startTime,t.endTime]).gr(i)}var Oa=Ao.getComponent("SeekBar"),Va=class extends(Ro(Oa)){updateAriaAttributes(t){const i=No(this.player()),s=this.ws;t.setAttribute("aria-valuenow",(100*this.yr(i)).toFixed(2)),t.setAttribute("aria-valuetext",$o(i-Io(s),Fo(s)))}getPercent(){return this.yr(this.player().currentTime())}handleMouseMove(t){if(this.ws&&this.ws.ads&&this.ws.ads.playing)return;const i=this.ws;let s=Bo(i)+this.calculateDistance(t)*Fo(i);s>=i.duration&&(s=i.duration-.1),this.On.Qn(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.On.Kn(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.On.Zn(),super.handleMouseUp(t)}yr(t){let i=this.ws,s=(t-Bo(i))/Fo(i);return ki(s,0,1)}dispose(){this.On.Re(),H(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.On=new Da(this.el(),t)}};Ao.registerComponent("SeekBar",Va),f();var La=Ao.getComponent("ProgressControl");vi.Ys.Qs&&Ao.registerComponent("ProgressControl",class extends La{createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(t){this.seekBar.handleMouseMove(t)}handleMouseDown(t){this.seekBar.handleMouseDown(t)}constructor(t,i){super(t,i),this.on(this,"touchmove",this.handleMouseMove),this.on("touchstart",this.handleMouseDown),this.seekBar.off(["touchmove","touchstart"])}}),f();var Ha=Ao.getComponent("TooltipProgressBar"),qa=class extends(Ro(Ha)){updateDataAttr(){let t=No(this.player()),i=this.Pn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}Pn(t){const i=this.ws;return $o(t-Io(i),Fo(i))}createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-tooltip-progress-bar vjs-slider-bar "+super.buildCSSClass()}constructor(t,i){super(t,i)}};function za(t){for(const i of t)if(i.enabled)return i}function Wa(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:Ga(t),description:Xa(t),hd:!!t.height&&t.height>=720}}function Ga(t){return t.height?t.height+"p":t.bandwidth?Xa(t):""}function Xa(t){return t.bandwidth?t.bandwidth>1e7?(t.bandwidth/1e6).toFixed(0)+"Mbps":t.bandwidth>1e6?(t.bandwidth/1e6).toFixed(1)+"Mbps":(t.bandwidth/1e3).toFixed(0)+"kbps":""}Ao.registerComponent("TooltipProgressBar",qa),f(),f(),f(),f(),f();var Ja=class{get br(){return this.kr}set br(t){let i=this.kr;for(let s=i.length-1;s>=0;s--){let e=i[s];V(t,e)||this.wr(e)}for(let i of t)this._r(i);this.Cr.re()}get Sr(){return this.Cr.menuItems}jr(t){let i=this.Sr;if(i)for(let s of i)if(s.Tr===t)return s}Mr(t){let i=this.Cr.addMenuItem();return i.Tr=t,i.on("click",(()=>this.Ar(i))),i.el().setAttribute("role","menuitemradio"),i}Pr(t){t.dispose()}Er(t){return!0}_r(t){if(this.Er(t)){V(this.kr,t)||this.kr.push(t);let i=this.jr(t)||this.Mr(t);return this.Nr(i),i}this.wr(t)}wr(t){let i=this.jr(t);i&&(this.Cr.removeMenuItem(i),this.Pr(i)),U(this.kr,t)}Re(){const t=[];for(let i of this.kr)t.push(i);for(let i of t)this.wr(i);H(t)}constructor(t){this.kr=[],this.Cr=t}},Qa=class extends Ja{Ir(){return this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",tt(this.Br,this.Fr.localize("Quality")),this.Br}Dr(){return this.$r=h.createElement("span"),this.$r.className="theo-settings-control-menu-quality-automatic",tt(this.$r,this.Fr.localize("Automatic")),this.$r}Rr(){return this.Ur=h.createElement("span"),tt(this.Ur,this.Fr.localize("Automatic")),this.Ur}Or(){return this.Vr=h.createElement("span"),this.Vr.className="theo-primary-color theo-settings-control-menu-item-hd-label",tt(this.Vr,this.Fr.localize("HD")),this.Vr}Lr(){let t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.$r),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Ur),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Vr),this.Hr.el().appendChild(this.Br),this.Hr.el().appendChild(t),this.Hr.el().setAttribute("aria-label",this.Fr.localize("Open the video quality settings menu"))}qr(){let t=this.zr,i=t&&eu(t.targetQuality),s=t&&t.activeQuality,e=Wa(this.Wr(i||s))||{name:this.Fr.localize("Automatic")};tt(this.Ur,e.name),hi(this.$r,"vjs-hidden",!!i),hi(this.Vr,"vjs-hidden",!e.hd)}Nr(t){let i=Wa(t.Tr)||{name:this.Fr.localize("Automatic")},s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.Fr.localize("HD")+"</span>"),i.description&&(s+='<span class="theo-settings-control-submenu-item-alternate-value">'+i.description+"</span>"),t.el().innerHTML=s,t.el().setAttribute("aria-label",this.Fr.localize("Set video quality to ")+i.name),t.Tr?t.selected(t.Tr===this.Gr):t.selected(!this.Gr)}Ar(t){this.zr&&(this.zr.targetQuality=t.Tr&&t.Tr.videoQualities)}Wr(t,i){const s=i||this.br;for(let i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Re(){this._s.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Xr),this.Fr.off("languagechange",this.te),this.zr&&(this.zr.removeEventListener("activequalitychanged",this.Jr),this.zr.removeEventListener("targetqualitychanged",this.Qr),this.zr.removeEventListener("update",this.Yr)),super.Re()}constructor(t,i,s){super(t.subMenu),this.zr=void 0,this.Gr=void 0,this.Xr=()=>{let t=za(this._s.videoTracks);if(t===this.zr)return;let i=[];if(this.zr&&(this.zr.removeEventListener("activequalitychanged",this.Jr),this.zr.removeEventListener("targetqualitychanged",this.Qr),this.zr.removeEventListener("update",this.Yr)),this.zr=t,t){t.addEventListener("activequalitychanged",this.Jr),t.addEventListener("targetqualitychanged",this.Qr),t.addEventListener("update",this.Yr);const s=Ka(iu(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.br=i,this.Qr(),this.Jr()},this.Yr=t=>{const i=t.track;if(i!==this.zr)return;const s=Ka(iu(i.qualities.filter((t=>t.available)))),e=i&&eu(i.targetQuality);let n;this.Gr=this.Wr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.br=n,this.qr()},this.Jr=()=>{this._r(void 0),this.qr()},this.Qr=()=>{let t=za(this._s.videoTracks),i=t&&eu(t.targetQuality),s=this.Wr(i),e=this.Gr;s!==e&&(this.Gr=s,s&&e||this._r(void 0),e&&V(this.br,e)&&this._r(e),i&&this._r(s),this.qr())},this.te=()=>{tt(this.Cr.menuHeader.el(),this.Fr.localize("Quality")),tt(this.Br,this.Fr.localize("Quality")),tt(this.$r,this.Fr.localize("Automatic")),tt(this.Ur,this.Fr.localize("Automatic")),tt(this.Vr,this.Fr.localize("HD")),this.Hr.el().setAttribute("aria-label",this.Fr.localize("Open the video quality settings menu"));for(const t of this.Sr)this.Nr(t);this.qr()},this.Hr=t,this._s=i,this.Fr=s,this.Br=this.Ir(),this.$r=this.Dr(),this.Ur=this.Rr(),this.Vr=this.Or(),this.Lr(),tt(this.Cr.menuHeader.el(),this.Fr.localize("Quality")),this.br=[void 0],this._s.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Xr),this.Fr.on("languagechange",this.te),this.Xr()}},Ya=class{get height(){return this.Kr[0].height}get bandwidth(){return this.Kr[0].bandwidth}get videoQualities(){return this.Kr}get label(){return this.Kr[0].label}add(t){this.Kr.push(t)}constructor(t){this.Kr=t}};function Ka(t){let i=[];for(let s of t){let t=s,e=!1;for(let s of i)if(su(s,t)){s.add(t),e=!0;break}e||i.push(new Ya([t]))}return i}function Za(t,i){return t&&i?F(t,i):I.Zr}function tu(t,i){return t===i?I.Zr:Za(t.height,i.height)||Za(t.width,i.width)||Za(t.bandwidth,i.bandwidth)}function iu(t){return E(t,tu).reverse()}function su(t,i){return t.label&&i.label&&t.label===i.label||ut(Wa(t),Wa(i))}function eu(t){return Ht(t)?1===t.length?t[0]:void 0:t}function nu(t){return 1===t?"Normal":""+_.round(100*t)/100}f();var ru=class extends Ja{Ir(){return this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",tt(this.Br,this.Fr.localize("Speed")),this.Br}Lr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Hr.el().appendChild(this.Br),this.Hr.el().appendChild(t),this.Hr.el().setAttribute("aria-label",this.Fr.localize("Open the video speed settings menu")),t}Mr(t){let i=super.Mr(t);return this.Nr(i),i}Nr(t){const i=t.Tr,s=this.Fr.localize(nu(i));tt(t.el(),s),t.el().setAttribute("aria-label",this.Fr.localize("Set video speed to ")+s),t.selected(t.Tr===this._s.playbackRate)}Ar(t){this._s.playbackRate=t.Tr}Re(){this._s.removeEventListener("ratechange",this.th),this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.ih=void 0,this.th=()=>{this.ih&&this._r(this.ih);let t=this._s.playbackRate;this.ih=t,tt(this.sh,this.Fr.localize(nu(t))),t&&this._r(t)},this.te=()=>{tt(this.Cr.menuHeader.el(),this.Fr.localize("Speed")),tt(this.Br,this.Fr.localize("Speed")),this.Hr.el().setAttribute("aria-label",this.Fr.localize("Open the video speed settings menu"));for(const t of this.Sr)this.Nr(t);this.th()},this.Hr=t,this._s=i,this.Fr=s,this.Br=this.Ir(),this.sh=this.Lr(),tt(this.Cr.menuHeader.el(),this.Fr.localize("Speed")),this.br=e,this._s.addEventListener("ratechange",this.th),this.Fr.on("languagechange",this.te),this.th()}};Ao.registerComponent("SettingsButton",class extends la{createEl(){let t=super.createEl();return this.eh=Ao.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),tt(this.eh,this.localize("HD")),t.appendChild(this.eh),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}te(){super.te(),tt(this.eh,this.localize("HD")),tt(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.zr&&(this.zr.removeEventListener("activequalitychanged",this.Jr),this.zr=void 0),this.ws.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.nh),this.rh.Re(),this.hh.Re(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.zr=void 0,this.nh=()=>{let t=za(this.ws.videoTracks);t!==this.zr&&(this.zr&&this.zr.removeEventListener("activequalitychanged",this.Jr),this.zr=t,t&&t.addEventListener("activequalitychanged",this.Jr),this.Jr())},this.Jr=()=>{var t;const i=null==(t=this.zr)?void 0:t.activeQuality,s=!!(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},si(this.menu.el(),"theo-settings-control-menu"),tt(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Be.Ie=this.controlText(),this.oh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.rh=new Qa(this.oh,this.ws,t);let n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.ah=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.hh=new ru(this.ah,this.ws,t,n),this.ws.videoTracks.addEventListener(["addtrack","removetrack","change"],this.nh),this.nh()}}),f(),f(),f();var hu=class extends Ja{uh(t){let i=t.label;if(i)return i;let s=t.language;if(s){let t=Ct(s);if(t)return t.lh}return s||""}dh(){this.br=this.fh}Re(){this.fh.removeEventListener("addtrack",this.ph),this.fh.removeEventListener("removetrack",this.mh),this.fh.removeEventListener("change",this.gh),super.Re()}constructor(t,i){super(t),this.ph=t=>{const i=t.track;this._r(i),i.addEventListener("update",this.yh)},this.mh=t=>{const i=t.track;this.wr(i),i.removeEventListener("update",this.yh)},this.gh=t=>this.dh(),this.yh=()=>{for(const t of this.br)this._r(t)},this.fh=i,this.fh.addEventListener("addtrack",this.ph),this.fh.addEventListener("removetrack",this.mh),this.fh.addEventListener("change",this.gh),this.dh()}},ou=class extends hu{Nr(t){let i=t.Tr,s=this.Fr.localize(this.uh(i));tt(t.el(),s),t.el().setAttribute("aria-label",this.Fr.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Ar(t){let i=t.Tr;for(let t of this.ws.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Re(){this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.audioTracks),this.te=()=>{tt(this.Cr.menuHeader.el(),this.Fr.localize("Language"));for(const t of this.Sr)this.Nr(t)},this.ws=i,this.Fr=s,tt(this.Cr.menuHeader.el(),this.Fr.localize("Language")),this.Fr.on("languagechange",this.te)}};Ao.registerComponent("audioTrackButton",class extends la{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.bh.Re(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.bh=new ou(this.menu,this.ws,t),this.controlText("Language"),this.Be.Ie=this.controlText()}}),f(),f();var au=class extends hu{Er(t){return!!super.Er(t)&&(!t.forced&&T(t.kind))}Mr(t){let i=super.Mr(t);si(i.el(),"theo-text-track-menu-item");let s=h.createElement("span");i.kh=s;let e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.wh=e;let n=t=>this._h(t,i);i.xh=n,e.addEventListener("click",n);let r=h.createElement("div");return r.className="theo-text-track-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),i}Nr(t){let i=t,s=i.Tr,e=this.Fr.localize(this.uh(s));tt(i.kh,e),i.el().setAttribute("aria-label",this.Fr.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===xt.Jn)}Pr(t){let i=t;i.wh.removeEventListener("click",i.xh),super.Pr(t)}Ar(t){let i=t.Tr;for(let t of this.ws.textTracks)t!==i&&Tt(t.kind,i.kind)&&(t.mode=xt.Ch);i.mode!==xt.Jn?i.mode=xt.Jn:i.mode=xt.Ch}_h(t,i){t.stopImmediatePropagation(),this.Ar(i)}Re(){this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.textTracks),this.te=()=>{tt(this.Cr.menuHeader.el(),this.Fr.localize("Subtitles"));for(const t of this.Sr)this.Nr(t)},this.ws=i,this.Fr=s,tt(this.Cr.menuHeader.el(),s.localize("Subtitles")),this.Fr.on("languagechange",this.te)}};Ao.registerComponent("subtitlesButton",class extends la{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.bh.Re(),super.dispose()}constructor(t,i){super(t,i),this.bh=new au(this.menu,this.ws,t),this.controlText("Subtitles"),this.Be.Ie=this.controlText()}}),f();var uu=Ao.getComponent("playToggle"),cu=class extends(Ro(uu)){handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Be.Ie=this.controlText()}handlePause(t){this.ws.ended||(super.handlePause(t),this.controlText("Play"),this.Be.Ie=this.controlText())}te(){this.Be.Ie=this.controlText()}dispose(){this.Be.Re(),this.ws.removeEventListener("ended",this.Sh),super.dispose()}constructor(t,i){super(t,i),this.Sh=()=>{this.controlText("Replay"),this.Be.Ie=this.controlText()},this.controlText("Play"),this.Be=new ua(this,this.controlText()),this.ws.addEventListener("ended",this.Sh),this.on(t,"languagechange",this.te),vi.Ys.Je&&new Qo(this.el())}};Ao.registerComponent("playToggle",cu),f();var lu=Ao.getComponent("fullscreenToggle"),du=class extends(Ro(lu)){handleClick(t){this.ws.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.Be.Ie=this.controlText()}dispose(){this.Be.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Be=new ua(this,this.controlText()),vi.Ys.Je&&new Qo(this.el()),this.on(t,"languagechange",this.updateContent)}};Ao.registerComponent("fullscreenToggle",du),f();var fu=Ao.getComponent("muteToggle"),vu=class extends(Ro(fu)){handleClick(t){this.ws.muted&&!this.ws.paused&&this.ws.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.te()}te(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Be.Ie=this.controlText()}dispose(){this.Be.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Be=new ua(this,this.controlText()),vi.Ys.Je&&new Qo(this.el()),this.on(t,"languagechange",this.te),_i&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};Ao.registerComponent("muteToggle",vu),f();var pu=Ao.getComponent("BigPlayButton"),mu="theo-play-svg-circle",gu='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150" fill="currentColor">\n <circle cx="75" cy="75" r="73" fill="#000" fill-opacity="0.2"></circle>\n <circle cx="75" cy="75" r="73" class="'+mu+'" stroke-width="4" stroke="currentColor" fill="none" transform="rotate(-90,75,75)"></circle>\n <g transform="translate(85,75) scale(0.5625) translate(-75,-75)">\n <path d="m 123.89639,85.432 c -12.865,9.167 -29.482997,19.402 -49.848997,30.7 -19.634,11.035 -36.851,19.7 -51.65,26 l -16.3990002,6.099 c -1.033,-4.433 -2,-11.002 -2.9,-19.7 -2.033,-17.333 -3.04999998,-36.466 -3.04999998,-57.399 0,-19.167 1.38199998,-37.081 4.14799998,-53.75 l 4.0019995,-19.1499994 17.3990007,5.849 c 15.068,5.9999994 31.401,14.5169994 49,25.5509994 18.631,11.666 34.616997,22.766 47.948997,33.3 6.663,5.3 11.463,9.383 14.396,12.25 l -13.046,10.25"></path>\n </g>\n</svg>',yu=class extends(Ro(pu)){createEl(){let t=super.createEl(),i=Ao.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML=gu,t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t),void 0!==this.ws.vr&&"unavailable"!==this.ws.vr.state&&(this.ws.vr.useDeviceMotionControls=!0)}};Ao.registerComponent("BigPlayButton",yu),f();var bu=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;Ao.registerComponent("MouseTimeDisplay",class extends Ea{jh(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Th&&(this.Th=i,this.Mh=i.src?vi.Ah(i.src).href:void 0,this.Th.addEventListener(["addcue","removecue"],this.Ph),this.Eh())}Nh(t){t.track===this.Th&&this.Ih()}createEl(){const t=super.createEl();return this.Bh=Ao.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Fh=Ao.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Dh(t)}Dh(t){let i;if(this.Th&&this.Th.cues){let s=function(t,i){let s=t[0];for(let e of t)if(e.startTime<=i)s=e;else if(i>=e.endTime)return s;return s}(this.Th.cues,t);i=s&&s.content}if(i===this.$h)return;if(this.$h=i,Ao.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",!!i),!i)return void this.Rh();const s=i.match(bu);if(s){let[,t,i,e,n,r]=s;t=this.Uh(t);const h={Oh:+i,Vh:+e,ji:+n,Ti:+r};this.Lh(t,h)}else{const t=this.Uh(i);this.Lh(t)}}Eh(){S(this.An)||this.Dh(this.An)}Uh(t){return this.Th&&this.Mh?vi.Ah(t,this.Mh).href:t}Lh(t,i){this.Bh&&(this.Bh.src!==t?(this.Bh.onload=()=>{this.Hh(i)},this.Bh.src="",this.Bh.src=t):this.Hh(i))}Hh(t){if(!this.Fh||!this.Bh)return;const i=this.Fh.getContext("2d");i&&(null!=t||(t={Oh:0,Vh:0,ji:this.Bh.naturalWidth,Ti:this.Bh.naturalHeight}),this.Fh.width=t.ji,this.Fh.height=t.Ti,i.drawImage(this.Bh,t.Oh,t.Vh,t.ji,t.Ti,0,0,t.ji,t.Ti),this.qh(this.Fh))}qh(t){this.zh||(Kt(this.tooltip,t),this.zh=t),this.En()}Rh(){this.zh&&(this.tooltip.removeChild(this.zh),this.zh=void 0,this.En())}Ih(){void 0!==this.Th&&(this.Th.removeEventListener(["addcue","removecue"],this.Ph),this.Th=void 0),this.Mh=void 0,this.Rh(),this.$h=void 0}dispose(){this.Ih(),super.dispose()}constructor(t,i){super(t,i),this.zh=void 0,this.Th=void 0,this.Mh=void 0,this.Wh=t=>this.jh(t),this.Gh=t=>this.Nh(t),this.Ph=t=>this.Eh(),this.showThumbnails=()=>{this.zh&&this.zh.hidden&&(this.zh.hidden=!1,this.En())},this.hideThumbnails=()=>{!this.zh||this.zh.hidden||this.player().scrubbing()||(this.zh.hidden=!0,this.En())},this.on(this.player().textTracks(),"addtrack",this.Wh),this.on(this.player().textTracks(),"removetrack",this.Gh),$t.Qs&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}}),f();var ku=Ao.getComponent("VolumeLevel");Ao.registerComponent("VolumeLevel",class extends ku{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}}),f(),f();var wu=Ao.getComponent("Component"),_u=class extends wu{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};_u.prototype.h=Mi({},_u.prototype.h,{children:[]}),Ao.registerComponent("controlBarMenuContainer",_u);var xu=Ao.getComponent("Player"),Cu=class extends xu{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),Qt(i),this.Ci&&s&&(e?s.insertBefore(t,e):s.appendChild(t)),h.body.removeEventListener("keydown",this.handleKeyPress),h.body.removeEventListener("click",this.handleClick)}constructor(t,i,s){super(t,i,s),this.handleKeyPress=t=>{9===t.which&&this.addClass("theo-probably-keyboard-focus")},this.handleClick=t=>{0===t.x&&0===t.y||this.removeClass("theo-probably-keyboard-focus")},h.body.addEventListener("keydown",this.handleKeyPress),h.body.addEventListener("click",this.handleClick)}};Cu.prototype.h=Mi({},xu.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),Ao.registerComponent("Player",Cu),f(),f();var Su=Ao.getComponent("Player"),ju=Su.prototype.es;Su.prototype.es=function(t){if(!(this.H&&this.H.$s&&this.H.$s()))return ju.call(this,t)};var Tu=Su.prototype.createEl;function Mu(t,i,e,n){let r=Mi({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},e);r.controlBar=Mi({progressControl:{keepTooltipsInside:!0}},r.controlBar);let h=r.techOrder||(r.techOrder=[]);-1===h.indexOf("THEOplayer")&&h.unshift("THEOplayer"),(r.theoplayer||(r.theoplayer={})).player=t,e&&Wt(e.language)&&(r.languages=Mi({},r.languages,{[_t]:e.language}),r.language=_t),i.setAttribute("data-vjs-player","");let o=i.getAttribute("style"),a=Ao(t.element,r,n);return a.ready((()=>{Oo(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===jt.Xh;Ho(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.uplynk){var s;const e=i=>{const s="adbreakbegin"===i.type;Ho(t,s,!1)};null==(s=i.uplynk)||s.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",e),t.adBreak.addEventListener("adbreakend",e)}))}i.addEventListener("sourcechange",(()=>{Ho(t,!1,!1)}))}}(a,t),function(t){t.on("mouseleave",qo)}(a)})),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),vi.Ys.Qs&&(si(i,"theo-mobile"),function(t){let i=s.outerHeight,e=s.outerWidth,n=i>e;n?(ni(t,"theo-mobile-landscape"),si(t,"theo-mobile-portrait")):(ni(t,"theo-mobile-portrait"),si(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",(()=>{ti(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(a),a}Su.prototype.createEl=function(){let t=Tu.call(this),i=Ao.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t},f(),f(),f(),f();var Au=Ao.getComponent("Button");var Pu="THEOPiPCloseButton";Ao.registerComponent(Pu,class extends Au{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.Qh.Jh()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.Qh)}(i))throw new g("Invalid Picture-in-picture options.");this.Qh=i.Qh}});var Eu=class extends J{get Yh(){return this.Kh}get Zh(){return this.t.cs()}io(){this.t.yn(Z.so,this.eo),this.no||this.t.yn(Z.ro,this.ho),this.t.oo.on("languagechange",this.te)}ao(){var t;return"theo-pip-"+(null!=(t=this.uo)?t:"bottom-right")}co(t){let i=this.lo;i&&!this.Zh&&(this.do||this.fo(),this.vo(),si(i,"theo-pip"),si(i,this.ao()),this.Kh=!0,this.po=t,this.mo=!1,this.yo(new Ai(Zt.PICTURE_IN_PICTURE)))}bo(t){let i=this.lo;i&&(this.ko(),ni(i,"theo-pip"),ni(i,this.ao()),this.Kh=!1,this.mo=t,this.wo=this.po,this.po=!1,this.yo(new Ai(Zt.INLINE)))}fo(){if(!this.do){let t=this.t.oo;t.addChild(Pu,{Qh:this});let i=h.createElement("div");i.className="theo-pip-overlay",this._o=h.createElement("div"),this._o.className="theo-pip-overlay-text",tt(this._o,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this._o),Kt(t.el(),i),this.xo=i,this.do=!0}}Co(){this.So&&!this.jo&&this.t.To&&(this.Mo=this.t.To.Ao(st,this.Po),this.jo=!0)}Eo(){this.Mo&&this.t.To&&(this.t.To.No(this.Mo),this.jo=!1)}vo(){let t=this.t.oo.contentEl(),i=t.getBoundingClientRect(),s=h.documentElement.clientWidth,e=h.documentElement.clientHeight;t.style.top=i.top+"px",t.style.bottom=e-i.bottom+"px",t.style.right=s-i.right+"px",t.style.left=i.left+"px",t.style.width=i.width+"px",t.style.height=i.height+"px",t.style.position="fixed"}ko(){let t=this.t.oo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}Io(){ni(this.lo,"theo-pip"),this.Yh&&this.uo&&ni(this.lo,"theo-pip-"+this.uo),this.xo&&(Qt(this.xo),this.xo=void 0)}gn(){this.Io(),this.Eo(),this.Bo(),this.t.fn(Z.so,this.eo),this.t.fn(Z.ro,this.ho),this.t.oo.off("languagechange",this.te),this.t=void 0}constructor(t,i,s){super(),this.Fo=!1,this.Kh=!1,this.mo=!1,this.po=!1,this.do=!1,this.jo=!1,this.wo=!1,this.eo=()=>{this.Fo=!0,this.So&&!this.Yh&&this.Mo&&this.Do&&this.Mo.$o<=this.Do&&this.co(!1)},this.ho=()=>{this.no||(this.Fo=!1,this.Jh(),this.bo(!1))},this.te=()=>{if(this._o){const t=this.t.oo;tt(this._o,t.localize("Video playing in Picture-in-Picture mode"))}},this.Po=t=>{!this.po&&this.So&&(S(t)||(this.Do&&t<=this.Do||this.wo?this.Kh||this.mo||this.co(!1):this.Kh?this.bo(!1):this.mo=!1))},this.Do=i.visibility,this.uo=i.position,this.no=i.retainPresentationModeOnSourceChange,this.So=void 0!==this.Do,this.t=t,this.lo=t.Ro,this.Jh=s,this.io()}},Nu=class extends P{Uo(){let t=super.Uo();return t===Zt.INLINE&&this.Oo.Yh?Zt.PICTURE_IN_PICTURE:t}Vo(t){return t===Zt.PICTURE_IN_PICTURE||super.Vo(t)}Lo(t){this.Ho=this.qo,t===Zt.FULLSCREEN||t===Zt.NATIVE_PICTURE_IN_PICTURE?this.Oo.Eo():this.Oo.Co(),super.Lo(t)}zo(t){super.zo(t),t===Zt.PICTURE_IN_PICTURE?G(this.Go.Wo((t=>this.Xo(t)))):t===Zt.FULLSCREEN?this.Oo.bo(!1):this.Oo.bo(!0)}async Xo(t){z(t),await Promise.all([this.Jo(),this.Qo.bo()]).catch(mi),z(t),this.Oo.co(!this.Yo),this.yo(new Ai(this.qo)),this.Yo=!1,this.Ko=!1}wi(){this.Ko||(this.Oo.Yh&&this.Zo.cs?this.Lo(Zt.FULLSCREEN):this.Ho!==Zt.PICTURE_IN_PICTURE||this.Zo.cs?super.wi():(this.Yo=!0,this.Lo(Zt.PICTURE_IN_PICTURE)))}gn(){super.gn(),this.Oo.gn(),this.ta.fn(Z.so,this.ia),this.ta=void 0}constructor(t,i,s,e){super(i,s),this.Ho=Zt.INLINE,this.Yo=!1,this.Jh=()=>{this.qo===Zt.PICTURE_IN_PICTURE&&this.Lo(Zt.INLINE)},this.sa=t=>{this.Ko||(this.qo!==Zt.PICTURE_IN_PICTURE||this.Oo.Yh?this.qo!==Zt.PICTURE_IN_PICTURE&&this.Oo.Yh&&(this.Yo=!0,this.Lo(Zt.PICTURE_IN_PICTURE)):this.Lo(Zt.INLINE))},this.ia=()=>{this.Uo()!==Zt.PICTURE_IN_PICTURE&&this.Uo()!==Zt.INLINE||this.Oo.Co(),this.ta.fn(Z.so,this.ia)},this.ta=t,this.Oo=new Eu(t,e.pip,this.Jh),this.Oo.yn(Ti.MODE_CHANGE,this.sa),this.ta.yn(Z.so,this.ia)}};f();var Iu,Bu=class extends J{get ea(){return Si.na(this.oo.el())||this.oo.supportsFullScreen()}get cs(){return this.oo.isFullscreen()||this.ra}co(){this.oo.requestFullscreen()}bo(){this.oo.exitFullscreen(),this.ha.bo()}gn(){this.Bo(),this.oo.off("fullscreenchange",this.oa),this.ha.fn(ri.aa,this.oa),this.ha.fn(ri.ua,this.Ds),this.oo.isFullWindow&&this.oo.exitFullscreen()}constructor(t,i){super(),this.Us=!1,this.ra=!1,this.ca=!1,this.oa=()=>{if(this.ca)return;const t=this.Us,i=this.cs;t!==i&&(this.Us=i,this.yo(new wi))},this.la=()=>{this.ra=this.ha.cs,this.oa()},this.da=()=>{this.ca||(this.oo.isFullWindow&&this.oo.supportsFullScreen()||this.ra&&!this.oo.supportsFullScreen())&&(this.ca=!0,this.oo.exitFullscreen(),this.oo.requestFullscreen(),this.ca=!1,this.oa())},this.oo=t,this.ha=i,this.oo.on("fullscreenchange",this.oa),this.ha.yn(ri.aa,this.la),this.ha.yn(ri.fa,this.da),this.ha.yn(ri.ua,this.Ds),this.oa()}};function Fu(t){return class extends t{get To(){return this.va}cs(){return this.pa.Uo()===Zt.FULLSCREEN}ma(){return function(t,i){let s=w.create(t);const e=i.oo;return ot(s,{get controls(){return e.controls()},set controls(t){e.controls(ft(t))},get presentation(){return i.pa.ga},get presentationMode(){return i.pa.Uo()},set presentationMode(t){const s=ei(t);s&&i.pa.Lo(s)},get ui(){return e},get visibility(){return i.To.ga}})}(this.ya,this)}gn(){super.gn(),this.pa.gn(),this.ba.gn(),this.oo.dispose(),this.va.gn()}ka(t){this.oo.src(""),super.ka(t)}constructor(t,i,s){super(i,s),this.Ro=t,this.va=new nt(t),this.ya=super.ma(),w.defineProperty(this.ya,"constructor",{value:ct}),this.oo=Mu(this.ya,this.Ro,s.ui),this.ba=new Bu(this.oo,this.wa),this.pa=new Nu(this,this.ba,this.xa._a(),s),this.pa.yn(Ti.MODE_CHANGE,this.Ds)}}}function Du(t){return(t=t||{}).position=function(t){switch(t){case"top-left":case"top-right":case"bottom-left":case"bottom-right":return t;default:return}}(t.position),t.visibility=function(t){if(Ot(t)&&!S(t))return ki(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=ft(t.retainPresentationModeOnSourceChange),t}function $u(){return Iu||(Iu=function(t){let i=t;for(const t of Ni)i=t(i);return i}(Iu=Fu(at()))),Iu}function Ru(t,i){const s=function(t){const i=ii(t);return i.ui=i.ui||{},void 0!==(null==t?void 0:t.width)&&void 0===i.ui.width&&(i.ui.width=t.width),void 0!==(null==t?void 0:t.height)&&void 0===i.ui.height&&(i.ui.height=t.height),void 0!==(null==t?void 0:t.fluid)&&void 0===i.ui.fluid&&(i.ui.fluid=t.fluid),i.pip=Du(i.pip),i}(i),e=h.createElement("div");ai(e),t.appendChild(e);const n=new($u())(t,e,s);n.Ca=n;let r=n.ga;return n.Sa(),n.ja(ht),w.defineProperty(r,"constructor",{value:Ru}),r=rt(r),Vt(n),function(t){for(const i of Bi)i(t)}(n),r}f(),f(),f(),f(),f();var Uu="theo-cast-",Ou=Ao.getComponent("Button"),Vu=class extends(Ro(Ou)){get Ta(){throw new g("Ma")}get Aa(){return this.h.Aa}get Pa(){return this.h.Pa}buildCSSClass(){return Uu+"button theo-"+this.Pa+"-button theo-controlbar-button "+super.buildCSSClass()}createEl(t,i,s){const e=super.createEl(),n=h.createElement("div");n.className="theo-button-icon-blur";const r=h.createElement("div");return r.className=Uu+"svg-container",r.innerHTML=this.Aa,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.Ea===oi.AVAILABLE)null==(i=this.Ta)||i.start();else if(this.Ea===oi.CONNECTED||this.Ea===oi.CONNECTING){var s;null==(s=this.Ta)||s.stop()}}Na(t){ni(this.lo,"theo-"+this.Pa+"-"+this.Ea),this.Ea=t,si(this.lo,"theo-"+this.Pa+"-"+this.Ea),this.te()}te(){this.Ia(this.Ea),this.Be.Ie=this.controlText()}Ia(t){t===oi.CONNECTED?this.controlText("Stop Casting"):t===oi.AVAILABLE?this.controlText("Start Casting"):t===oi.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.lo=t.el(),this.Ea=oi.UNAVAILABLE,this.controlText("Unavailable"),this.Be=new ua(this,this.controlText()),null==(s=this.Ta)||s.addEventListener("statechange",(t=>{const i=t;this.Na(i.state)})),vi.Ys.Je&&(this.Ba=new Qo(this.el())),this.Na(this.Ta?this.Ta.state:oi.UNAVAILABLE),this.on(t,"languagechange",this.te)}},Lu=0;function Hu(){const t='\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" fill="currentColor">\n <defs>\n <clipPath id="theo-chromecast-rings-mask-'+Lu+'">\n <path d="M0-36h44V0H0z"/>\n </clipPath>\n </defs>\n <path class="theo-chromecast-outer" d="M2 10a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H28v-4h14V10H6v6H2z"/>\n <path class="theo-chromecast-inner" d="M10 14h28v20H26.74A26 26 0 0 0 10 17.26z"/>\n <g class="theo-chromecast-rings" fill="none" stroke="currentColor" stroke-width="4" transform="translate(2 42)" clip-path="url(#theo-chromecast-rings-mask-'+Lu+')">\n <circle stroke="none" cx="0" cy="0" r="30" />\n <circle class="theo-chromecast-ring theo-chromecast-ring1" stroke-width="6" cx="0" cy="0" r="3" />\n <circle class="theo-chromecast-ring theo-chromecast-ring2" cx="0" cy="0" r="12" />\n <circle class="theo-chromecast-ring theo-chromecast-ring3" cx="0" cy="0" r="20"/>\n <path class="theo-chromecast-ring theo-chromecast-ring4" stroke-linecap="round" d="M0-20A20 20 0 0 1 20 0" />\n </g>\n </svg>';return Lu++,t}Ao.registerComponent("chromecastButton",class extends Vu{get Ta(){var t;return null==(t=this.ws.cast)?void 0:t.chromecast}constructor(t,i){super(t,Mi({},i,{Pa:"chromecast",Aa:Hu()}))}}),f();var qu="theo-chromecast-",zu=Ao.getComponent("Component"),Wu=class t extends(Ro(zu)){buildCSSClass(){return qu+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();si(i,qu+"overlay");const s=Ao.createEl("div",{className:qu+"status-icon",innerHTML:t.ICON_SVG}),e=Ao.createEl("div",{className:qu+"status-info"});tt(e,"Playing on");const n=Ao.createEl("div",{className:qu+"status-title"}),r=Ao.createEl("div",{className:qu+"status"});return this.mr=n,r.appendChild(s),r.appendChild(e),r.appendChild(n),i.appendChild(r),i}dispose(){var t;null==(t=this.Fa)||t.removeEventListener("statechange",this.update),this.Fa=void 0,this.ws.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.Fa?(this.mr&&tt(this.mr,this.Fa.receiverName||""),this.Fa.state===oi.CONNECTED?this.show():this.hide()):this.hide()},this.Fa=null==(s=this.ws.cast)?void 0:s.chromecast,null==(e=this.Fa)||e.addEventListener("statechange",this.update),this.ws.addEventListener("play",this.update),this.update()}};Wu.ICON_SVG='\n<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" fill="currentColor">\n <path d="M7 24v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H11v1.63c3.96 1.28 7.09 4.41 8.37 8.37H25V13zM7 16v2a9 9 0 0 1 9 9h2c0-6.08-4.93-11-11-11zm20-7H9c-1.1 0-2 .9-2 2v3h2v-3h18v14h-7v2h7c1.1 0 2-.9 2-2V11c0-1.1-.9-2-2-2z"/>\n</svg>',Ao.registerComponent("chromecastOverlay",Wu),f(),f();Ao.registerComponent("airplayButton",class extends Vu{dispose(){var t,i;null==(t=this.ws.ads)||t.removeEventListener("adbreakbegin",this.Da),null==(i=this.ws.ads)||i.removeEventListener("adbreakend",this.$a),this.ws.removeEventListener("currentsourcechange",this.$a),super.dispose()}get Ta(){var t;return null==(t=this.ws.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,Mi({},i,{Pa:"airplay",Aa:'\n<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24">\n <path class="theo-cast-inner" d="M5 7h14v8H5z"/>\n <path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/>\n</svg>'})),this.$a=()=>{this.enable()},this.Da=()=>{this.disable()},null==(s=this.ws.ads)||s.addEventListener("adbreakbegin",this.Da),null==(e=this.ws.ads)||e.addEventListener("adbreakend",this.$a),this.ws.addEventListener("currentsourcechange",this.$a)}}),f(),f(),f();var Gu=Ao.getComponent("Button"),Xu=class extends(Ro(Gu)){buildCSSClass(){return"theo-vr-button theo-controlbar-button "+super.buildCSSClass()}handleClick(){this.ws.vr.stereo=!this.ws.vr.stereo,this.te()}_n(){this.ws.vr&&this.ws.vr.state!==Bt.Rs?(this.show(),this.ws.vr.canPresentVR?(this.enable(),this.te()):(this.disable(),this.controlText("No VR capable device found"),this.Ra.Ie=this.controlText())):this.hide()}te(){var t;this.controlText((null==(t=this.ws.vr)?void 0:t.stereo)?"Stop watching in VR":"Watch in VR"),this.Ra.Ie=this.controlText()}dispose(){var t;null==(t=this.ws.vr)||t.removeEventListener("statechange",this.Ua),super.dispose()}constructor(t,i){var s;super(t,i),this.Ua=()=>this._n(),this.controlText("Watch in VR"),this.Ra=new ua(this,this.controlText()),null==(s=this.ws.vr)||s.addEventListener("statechange",this.Ua),this._n(),vi.Ys.Je&&new Qo(this.el()),this.on(t,"languagechange",this.te)}};Ao.registerComponent("vrButton",Xu),f();var Ju=Ao.getComponent("Component"),Qu=class extends Ju{createEl(){let t=super.createEl("div",{className:this.buildCSSClass()}),i=Ao.createEl("div",{className:"theo-360-fov"});return t.appendChild(i),this.Oa=i,t}buildCSSClass(){return"theo-360-compass "+super.buildCSSClass()}_n(){this.ws.vr.state===Bt.Rs?this.hide():this.show()}Va(){let t=-this.ws.vr.direction.yaw+40;this.Oa.style[gi("transform")]="scale(0.875) rotate("+t+"deg) skew("+"-10deg)"}dispose(){this.ws.vr.removeEventListener("statechange",this.Ua),this.ws.vr.removeEventListener("directionchange",this.La),super.dispose()}constructor(t,i,s){super(t,i),this.Ua=()=>this._n(),this.La=()=>this.Va(),this.ws=s,this.ws.vr.addEventListener("statechange",this.Ua),this.ws.vr.addEventListener("directionchange",this.La),this._n(),this.Va()}};f();var Yu=_.pow(2,31)-1,Ku=Ao.getComponent("Component"),Zu=class extends Ku{Ha(){this.ws.vr.state===Bt.qa?this.za():this.Wa()}za(){if(this.Ga)return;this.Ga=!0;let t=this.ws.element;this.Xa=t.style.zIndex||"",t.style.zIndex=""+Yu,this.Ja=this.player().isFullscreen(),this.player().requestFullscreen()}Wa(){if(!this.Ga)return;this.Ga=!1,this.ws.element.style.zIndex=this.Xa,this.Ja?this.player().requestFullscreen():this.player().exitFullscreen()}dispose(){this.Wa(),this.ws.vr.removeEventListener("statechange",this.Qa),super.dispose()}constructor(t,i,s){super(t,i),this.Ga=!1,this.Ja=!1,this.Xa="",this.Qa=()=>this.Ha(),this.ws=s,this.ws.vr.addEventListener("statechange",this.Qa),this.Ha()}};Fi((function(t){let i=t.ga;if(!i.vr)return;let s=t.oo,e=new Qu(s,{},i);if(t.yn(Z.ro,(()=>{var i;s.removeChild(e);let n=null==(i=t.Ya())?void 0:i.vr;void 0===n||n.nativeVR||s.addChild(e)})),$t.Ka){let t=new Zu(s,{},i);s.addChild(t)}})),f(),f(),f();var tc=class extends Y{constructor(){super("relatedchange")}},ic=["relatedchange"],sc=class extends J{get ga(){return this.Za||(this.Za=function(t){let i,s={get sources(){return t.tu},set sources(i){t.tu=i},addEventListener(t,s){i.yn(t,s)},removeEventListener(t,s){i.fn(t,s)}};return i=new Ei(ic,!0,s),i.iu(t),s}(this)),this.Za}get tu(){return this.su}set tu(t){this.su=function(t){return t.filter((t=>t&&(Xt(t.link)||lt(t,["source"]))))}(t),t.length>this.su.length&&console.warn("One or more of the configured related content sources are invalid. Check if they have a source or a link."),this.yo(new tc)}gn(){this.Bo(),this.su=[]}constructor(...t){super(...t),this.su=[]}};Rt((function(t){return class extends t{ma(){const t=this.eu;return ot(super.ma(),{get related(){return t.ga}})}gn(){this.eu.gn(),super.gn()}constructor(t,i){super(t,i),this.eu=new sc}}}),Ft.nu),f(),f();var ec=Ao.getComponent("Button"),nc=class extends ec{buildCSSClass(){return"vjs-icon-view-grid theo-related-button "+super.buildCSSClass()}handleClick(){this.hu.ru?this.hu.be():this.hu.ge()}te(){this.Be.Ie=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.lo=t.el(),this.hu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText(this.localize("Related content")),this.Be=new ua(this,this.controlText()),this.on(t,"languagechange",this.te)}};f(),f();var rc=Ao.getComponent("Button"),hc=class extends rc{buildCSSClass(){return"theo-secondary-background theo-close-button"}handleClick(){this.ou.hide()}constructor(t,i){super(t),this.ou=i}},oc=(()=>{let t=h.createElement("div");return t.className="theo-related-grid-tile",t.innerHTML='<a class="theo-related-grid-tile-content"><div class="theo-related-grid-tile-image"></div><span class="theo-related-grid-tile-title theo-primary-border theo-tertiary-background"></span><span class="theo-related-grid-tile-duration"></span></a>',t})();function ac(t,i,s){let e=oc.cloneNode(!0),n=e.querySelector(".theo-related-grid-tile-content");lt(s,["source"])?(n.style.cursor="pointer",n.addEventListener("click",(()=>{t.source=s.source,i.be()}))):Xt(s.link)&&n.setAttribute("href",s.link);let r=e.querySelector(".theo-related-grid-tile-image");r.style.backgroundImage='url("'+A(s.image)+'")',r.removeAttribute("id");let h=e.querySelector(".theo-related-grid-tile-title");s.title?(tt(h,s.title),h.removeAttribute("id")):Qt(h);let o=e.querySelector(".theo-related-grid-tile-duration");return s.duration?(tt(o,s.duration),o.removeAttribute("id")):Qt(o),e}var uc=[15,12,9,8,6,4,3,2,1];var cc=class{get au(){return"theo-"+this.uu+"-item-grid"}cu(){this.lu.focus()}du(t){this.fu(),function(t){if(t.length)for(let i of uc)if(t.length>=i){t.length=i;break}}(t),this.vu(t.length);for(let i of t){let t=ac(this.pu.ga,this.mu,i);this.gu.appendChild(t)}}fu(){this.gu.innerHTML=""}yu(){let t=h.createElement("div");t.className="theo-overlay-panel";const i=h.createElement("div");return i.className="theo-related-grid",this.bu.className="theo-related",this.lu.controlText("Close Related Content"),this.ku.appendChild(this.bu),this.bu.appendChild(t),t.appendChild(this.lu.el()),t.appendChild(i),i}vu(t){ni(this.gu,this.au),this.uu=t,si(this.gu,this.au)}gn(){Qt(this.bu),this.wu.gn(),this._u.gn(),this.lu.dispose(),this.pu=void 0}constructor(t,i,s,e,n){this.pu=t,this.xu=i,this.mu=s,this.ku=e,this.uu=12,this.Cu=t=>{this.gu.style.width=t.width+"px"},this.bu=h.createElement("div"),this.lu=new hc(this.xu,{hide:()=>{this.mu.be()}}),this.gu=this.yu(),this._u=new lc(n),this._u.yn(fi.pn,this.Cu),this.wu=new Mt(this.gu,this._u),this.vu(12)}},lc=class extends J{get Su(){return this.ju||0}get Tu(){return this.Mu.Tu}gn(){this.Bo(),this.Mu.fn(fi.pn,this.Au)}constructor(t){super(),this.Mu=t,this.Au=t=>{let i=t.width;if(9*(t.width/16)>t.height){i=16*(t.height/9)}this.ju=i,this.yo(new pi(this.Su,t.height))},this.Mu.yn(fi.pn,this.Au)}};f();var dc=class extends Y{constructor(){super("show")}};f();var fc=class extends Y{constructor(){super("hide")}},vc="theo-related-available",pc="theo-related-showing",mc=[...ic,"show","hide"],gc=class extends J{get ga(){return this.Za||(this.Za=function(t){let i;const s={get sources(){return t.tu},set sources(i){t.tu=i},get showing(){return t.ru},show(){t.ge()},hide(){t.be()},addEventListener(t,s){i.yn(t,s)},removeEventListener(t,s){i.fn(t,s)}};return i=new Ei(mc,!0,s),i.iu(t),s}(this)),this.Za}get tu(){return this.Pu.tu}set tu(t){this.Pu.tu=t}get ru(){return this.Eu}ge(){let t=this.Eu;this.Eu=!0,this.Nu(pc),this.Iu.cu(),this.xu.paused()?this.Bu=!0:this.xu.pause(),t!==this.Eu&&this.yo(new dc)}be(){let t=this.Eu;this.Eu=!1,this.Fu(pc),this.Du.focus(),this.Bu||this.xu.play(),this.Bu=!1,t!==this.Eu&&this.yo(new fc)}Nu(t){this.xu.el().classList.add(t)}Fu(t){this.xu.el().classList.remove(t)}gn(){this.Bo(),this.Iu.gn()}constructor(t,i,s,e){super(),this.Eu=!1,this.Bu=!1,this.$u=t=>{const i=this.tu;this.Iu.du(i),i.length?(this.Nu(vc),this.Du.show()):(this.Fu(vc),this.Du.hide()),this.yo(t)},this.Pu=i,this.Pu.yn("relatedchange",this.$u),this.xu=s,this.Iu=new cc(t,this.xu,this,s.contentEl(),e),this.Du=new nc(s,this,{})}};Ii((function(t){return class extends t{ma(){const t=this.Ru;return ot(super.ma(),{get related(){return t.ga}})}gn(){this.Ru.gn(),super.gn()}constructor(t,i,s){super(t,i,s),this.Ru=new gc(this,this.eu,this.oo,this.Uu)}}})),f(),f(),f();var yc=Ao.getComponent("Button"),bc=class extends yc{buildCSSClass(){return"vjs-icon-share theo-social-button "+super.buildCSSClass()}handleClick(){this.Ou.showing?this.Ou.hide():this.Ou.show()}te(){this.Be.Ie=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.lo=t.el(),this.Ou=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText("Share Video"),this.Be=new ua(this,this.controlText()),this.on(t,"languagechange",this.te)}};function kc(t,i,s){switch(i){case"iconurl":return function(t,i){let s=h.createElement("a");var e;s.className="theo-social-iconurl",s.title=null!=(e=t.label)?e:"",s.target="Vu",s.href=i;const n=h.createElement("img");var r,o;return n.src=null!=(r=t.icon)?r:"",n.alt=null!=(o=t.label)?o:"",n.width=25,n.height=25,s.appendChild(n),s}(t,s);case"text":return function(t){let i=h.createElement("div");if(i.className="theo-social-text",t.label){let s=h.createElement("h5");s.className="theo-primary-background theo-social-label",tt(s,t.label),i.appendChild(s)}let s=h.createElement("p");var e;return s.className="theo-social-content-container theo-tertiary-background",s.tabIndex=0,tt(s,null!=(e=t.text)?e:""),i.appendChild(s),i}(t);case"texturl":return function(t,i){let s=h.createElement("div");if(s.className="theo-social-texturl",t.label){let i=h.createElement("h5");i.className="theo-primary-background theo-social-label",tt(i,t.label),s.appendChild(i)}let e=h.createElement("div");e.className="theo-social-content-container theo-tertiary-background";let n=h.createElement("a");return n.target="Vu",n.href=i,tt(n,i),e.appendChild(n),s.appendChild(e),s}(t,s)}}f();var wc="<URL>";var _c=class{get we(){return this.bu}Lu(t){this.fu();for(let i of t)this.Hu(i)}cu(){this.lu.focus()}Hu(t){let i=function(t,i){return t.src?Pi(t.src,wc)?t.src.replace(wc,i):t.src:i}(t,this.mu.qu),s=function(t){if(t)return t.icon?"iconurl":t.text?"text":"texturl"}(t),e=kc(t,s,i);e&&("iconurl"===s?this.zu.appendChild(e):this.Wu.appendChild(e))}fu(){this.zu.innerHTML="",this.Wu.innerHTML=""}gn(){Qt(this.bu),this.Gu.gn()}constructor(t,i,s,e){this.ta=t,this.mu=i,this.ku=s,this.Xu=e;const n=h.createElement("div");n.className="theo-overlay-panel",this.lu=new hc(this.ta,this.mu.ga),this.lu.controlText("Close Share"),this.Iu=h.createElement("div"),this.Iu.className="theo-social-container",this.bu=h.createElement("div"),this.bu.className="theo-social",this.zu=h.createElement("div"),this.zu.className="theo-social-icon-container",this.Wu=h.createElement("div"),this.Wu.className="theo-social-text-container",this.ku.appendChild(this.bu),this.bu.appendChild(n),this.Iu.appendChild(this.zu),this.Iu.appendChild(this.Wu),n.appendChild(this.lu.el()),n.appendChild(this.Iu),this.Gu=new Mt(this.bu,this.Xu)}},xc="theo-social-available",Cc="theo-social-showing",Sc=class{get ga(){return this.Za}get ru(){return this.Eu}get Ju(){return this.Qu}set Ju(t){this.Qu=t,this.Iu.Lu(t),t.length?(this.Nu(xc),this.Du.show()):(this.Fu(xc),this.Du.hide())}get qu(){return this.Yu||ji()}set qu(t){this.Yu=t}ge(){this.Eu=!0,this.Nu(Cc),this.Iu.cu(),this.Ku.paused()?this.Bu=!0:this.Ku.pause()}be(){this.Eu=!1,this.Fu(Cc),this.Du.focus(),this.Bu||this.Ku.play(),this.Bu=!1}Nu(t){this.Ku.el().classList.add(t)}Fu(t){this.Ku.el().classList.remove(t)}gn(){this.Du.dispose(),this.Iu.gn()}constructor(t,i){this.Eu=!1,this.Qu=[],this.Bu=!1,this.Za=function(t){return{get showing(){return t.ru},get items(){return t.Ju},set items(i){t.Ju=i},get url(){return t.qu},set url(i){t.qu=i},show(){t.ge()},hide(){t.be()}}}(this),this.Ku=t,this.Iu=new _c(this.Ku,this,t.contentEl(),i),this.Du=new bc(t,this.Za,{})}};Ii((function(t){return class extends t{ma(){let t=this.Ou;return ot(super.ma(),{get social(){return t.ga}})}constructor(t,i,s){super(t,i,s),this.Ou=new Sc(this.oo,this.Uu)}}})),f(),f();var jc=Ao.getComponent("Component"),Tc=class extends jc{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-upnext-container "+super.buildCSSClass()}};Tc.prototype.h=Mi({},Tc.prototype.h,{children:[]}),Ao.registerComponent("upNextContainer",Tc),f(),f();var Mc="theo-upnext-bar-",Ac=Ao.getComponent("Component"),Pc=class extends Ac{get ru(){return this.Eu}set ru(t){this.Eu=t,this.Zu&&(this.Zu.tabIndex=t?0:-1)}get tc(){return this.ic}set tc(t){this.ic=t}ka(t){this.fu(),this.sc(t)}sc(t){if(t&&t.link&&t.image){const i=h.createElement("div");si(i,Mc+"content"),i.onclick=()=>{this.ec.next()},i.onkeypress=t=>{13===t.which&&this.ec.next()};let s=h.createElement("div");if(s.style.backgroundImage='url("'+A(t.image)+'")',si(s,Mc+"image"),i.appendChild(s),t.duration){let i=h.createElement("span");si(i,Mc+"duration"),i.innerHTML=""+t.duration,s.appendChild(i)}let e=h.createElement("div");si(e,Mc+"text");let n=h.createElement("div");if(si(n,Mc+"upnext"),tt(n,this.localize("Up Next")),e.appendChild(n),t.title){let i=h.createElement("div");si(i,Mc+"title"),tt(i,t.title),e.appendChild(i)}i.appendChild(e),this.Zu=i,this.nc=n,this.el().appendChild(this.Zu)}}fu(){this.el().innerHTML="",this.Zu=void 0,this.nc=void 0}te(){this.nc&&tt(this.nc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-bar "+super.buildCSSClass()}dispose(){this.Gu.gn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.Zu=void 0,this.nc=void 0,this.ec=i,this.Gu=new Mt(this.el(),e),this.Eu=!1,this.ic=10,this.on(t,"languagechange",this.te)}};f();var Ec="theo-upnext-panel-",Nc=mu,Ic=Ao.getComponent("Component"),Bc=class extends Ic{get ru(){return this.Eu}set ru(t){this.Eu=t}get rc(){return this.hc}set rc(t){this.hc=t}get oc(){return this.ac}set oc(t){this.ac=t}ka(t){this.fu(),this.uc(t)}uc(t){if(t&&t.link&&t.image){let i=h.createElement("div");i.className=Ec+"content";let s=h.createElement("div");s.style.backgroundImage='url("'+A(t.image)+'")',s.className=Ec+"image",i.appendChild(s);let e=h.createElement("div");e.className=Ec+"text";let n=h.createElement("div");if(n.className=Ec+"upnext",tt(n,this.localize("Up Next")),e.appendChild(n),t.title){let i=h.createElement("div");i.className=Ec+"title",tt(i,t.title),e.appendChild(i)}i.appendChild(e),this.cc=h.createElement("div"),this.cc.className=Ec+"autoplay",this.cc.innerHTML=gu;let r=this.cc.querySelector("svg");r.onclick=()=>{this.ec.next()},r.tabIndex=0,r.onkeypress=t=>{13===t.which&&this.ec.next()},this.lc=n,this.dc=this.cc.querySelector("."+Nc),i.appendChild(this.cc),this.el().appendChild(i)}}get fc(){return this.vc}set fc(t){this.vc=t,this.dc.style.strokeDashoffset=""+_.round(1e5*t)/1e5}fu(){this.el().innerHTML="",this.lc=void 0,this.dc=void 0}te(){this.lc&&tt(this.lc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-panel "+super.buildCSSClass()}dispose(){this.Gu.gn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.vc=0,this.ec=i,this.Gu=new Mt(this.el(),e),this.Eu=!1,this.hc=10,this.ac=!0,this.on(t,"languagechange",this.te)}},Fc="theo-upnext-panel-showing",Dc="theo-upnext-bar-showing",$c=2*_.PI*73,Rc=class t{get ga(){return this.Za}get mc(){return this.gc}get yc(){return this.bc}get kc(){return this.wc}set kc(t){this.wc=t,this.Iu.ka(t),this._c.ka(t),this.Ku.off("timeupdate",this.xc),this.Ku.off("ended",this.Cc),t&&(this.Ku.on("timeupdate",this.xc),this.Ku.on("ended",this.Cc))}Sc(){this.Iu.rc?this.jc=pt(this.Iu.rc):0===this.Iu.rc?this.jc=0:this.jc=10,0!==this.jc?(isFinite(this.jc)&&(this.Tc=!0),this.Iu.ru=!0,this.Nu(Fc),this.Tc&&(this.Iu.fc=$c-$c/this.jc,this.Mc=p(this.Ac,1e3))):this.Pc()}Ec(){this.Iu.ru=!1,this.Fu(Fc),this.Tc&&(m(this.Mc),this.Nc=1,this.Iu.fc=$c)}Ic(){this._c.ru=!0,this.Nu(Dc)}Bc(){this._c.ru=!1,this.Fu(Dc)}Pc(){m(this.Mc),this.kc&&(s.location.href=this.kc.link)}Nu(t){this.Ku.el().classList.add(t)}Fu(t){this.Ku.el().classList.remove(t)}Fc(t,i){const s=t>=i&&!(this.Dc&&this.Dc.$c);this._c.ru&&!s?this.Bc():!this._c.ru&&s&&this.Ic()}Rc(t,i){this.Iu.ru&&t<i&&!this.Ku.ended()&&this.Ec()}static Uc(t,i){let s=pt(t);if(!S(s))return i-s;let e=(""+t).match(/^([1-9]?\d|100)%$/);if(e){return i*(1-x(e[1],10)/100)}}gn(){this.Mc&&m(this.Mc),this.Ku.getChild("upNextContainer").removeChild(this.Iu),this.Ku.getChild("upNextContainer").removeChild(this._c),this.Iu.dispose(),this._c.dispose()}constructor(i,s,e){this.wc=void 0,this.jc=10,this.Nc=1,this.Mc=void 0,this.Tc=!0,this.Ac=()=>{this.Nc!==this.jc?(this.Iu.fc-=$c/this.jc,this.Nc+=1):this.Pc()},this.Cc=()=>{this.Iu.ru||this.Sc()},this.xc=()=>{let i=this.Ku.currentTime(),s=this.Ku.duration(),e=s?t.Uc(this._c.tc,s):void 0;void 0!==e&&this.Fc(i,e),this.Iu.oc&&this.Rc(i,s)},this.Za=function(t){return{get source(){return t.kc},set source(i){t.kc=i},get bar(){return t.mc},get panel(){return t.yc},next(){t.Pc()}}}(this),this._c=new Pc(i,this.Za,{},s),this.Iu=new Bc(i,this.Za,{},s),this.gc=function(t,i){return{get showing(){return i.ru},get offset(){return i.tc},set offset(t){i.tc=t},show(){t.Ic()},hide(){t.Bc()}}}(this,this._c),this.bc=function(t,i){return{get showing(){return i.ru},get countdownDuration(){return i.rc},set countdownDuration(t){i.rc=t},get showUpNextPanel(){return i.oc},set showUpNextPanel(t){i.oc=t},show(){t.Sc()},hide(){t.Ec()}}}(this,this.Iu),this.Ku=i,this.Dc=e,i.getChild("upNextContainer").addChild(this._c,{}),i.getChild("upNextContainer").addChild(this.Iu,{})}};Ii((function(t){return class extends t{ma(){let t=this.Oc;return ot(super.ma(),{get upnext(){return t.ga}})}gn(){this.Oc.gn(),super.gn()}constructor(t,i,s){super(t,i,s),this.Oc=new Rc(this.oo,this.Uu,this.Vc)}}})),f(),f();var Uc=Ao.getComponent("Component"),Oc=class extends Uc{createEl(){let t=super.createEl("ul",{className:"theo-context-menu"}),i=h.createElement("li"),s=h.createElement("a"),e=h.createElement("div");s.className="theo-context-menu-a",i.appendChild(s),e.className="theo-context-menu-logo",e.innerHTML='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="507.262px" height="399.16px" viewBox="0 0.1 507.262 399.16" enable-background="new 0 0.1 507.262 399.16"\n\t xml:space="preserve" class=\'theo-context-menu-logo-svg\'>\n\t<g transform="matrix(1.90897, 0, 0, 1.90897, 212.4, 144.6)">\n\t\t<path fill="#FFFFFF" d="M-38.416-53.802C-53.351-38.867-60.82-20.814-60.82,0.353c0,21.253,7.466,39.392,22.404,54.413\n\t\t\tc6.83,6.658,13.827,11.778,20.996,15.363c5.122,2.561,10.583,4.397,16.388,5.507v1.024h-78.481\n\t\t\tc-21.168,0-31.752-10.584-31.752-31.752v-88.724c0-21.252,10.584-31.879,31.752-31.879h79.377v0.896\n\t\t\tc-6.145,1.196-11.95,3.116-17.411,5.762C-24.632-65.538-31.586-60.46-38.416-53.802"/>\n\t</g>\n\t<g transform="matrix(0.535073, 0, 0, 0.535073, 242.35, 104.7)">\n\t\t<path fill="#FFFFFF" d="M188.354,104.104c-32.941,23.472-75.492,49.679-127.641,78.61c-50.275,28.254-94.358,50.44-132.254,66.572l-41.989,15.616\n\t\t\tc-2.645-11.348-5.122-28.17-7.426-50.44c-5.205-44.383-7.809-93.375-7.809-146.975c0-49.079,3.538-94.947,10.622-137.631\n\t\t\tl10.249-49.034l44.551,14.978C-24.762-88.838,17.06-67.03,62.124-38.777c47.705,29.871,88.638,58.294,122.773,85.266\n\t\t\tc17.061,13.571,29.351,24.028,36.862,31.367L188.354,104.104"/>\n\t</g>\n\t<g transform="matrix(1.91028, 0, 0, 1.91028, 327.15, 144.6)">\n\t\t<path fill="#FFFFFF" d="M94.286-43.816v88.723c0,21.168-10.583,31.751-31.751,31.751h-80.018v-1.025\n\t\t\tc14.683-2.816,27.527-9.77,38.537-20.867c14.936-15.024,22.405-33.16,22.405-54.413c0-21.168-7.467-39.22-22.405-54.156\n\t\t\tC9.871-64.985-3.188-71.939-18.123-74.671v-1.024h80.658C83.702-75.696,94.286-65.069,94.286-43.816"/>\n\t</g>\n</svg>\n',s.appendChild(e);let n=h.createElement("div");return n.className="theo-context-version",tt(n,"Powered by THEOplayer 9.0.0"),s.appendChild(n),s.href="https://www.theoplayer.com/player-referral",s.target="Vu",t.appendChild(i),t}Lc(t){const i=t;i.preventDefault(),this.show(),this.el().style.left="0",this.el().style.top="0";let s=this.player().contentEl(),e=s.getClientRects(),n=e.length>0?e[0]:void 0,r=i.clientX-s.getBoundingClientRect().left,h=C(getComputedStyle(this.el()).fontSize);Q(this.el(),r,n,h);let o=i.clientY-s.getBoundingClientRect().top;K(this.el(),o,n,h),this.Hc()}qc(){this.hide(),this.clearTimeout(this.zc)}Hc(){this.zc=this.setTimeout(this.qc,4e3)}Wc(){this.clearTimeout(this.zc)}dispose(){this.qc(),this.off(this.player(),"contextmenu",this.Lc),this.el().removeEventListener("mousedown",Vc,!0),this.off(h,"mousedown",this.qc),this.off("mouseout",this.Hc),this.off("mouseover",this.Wc),super.dispose()}constructor(t,i){super(t,i),this.zc=0,this.on(this.player(),"contextmenu",this.Lc),this.el().addEventListener("mousedown",Vc,!0),this.on(h,"mousedown",this.qc),this.on("mouseout",this.Hc),this.on("mouseover",this.Wc),this.qc()}};function Vc(t){t.stopPropagation()}Fi((function(t){const i=new Oc(t.oo,{});t.oo.addChild(i),t.oo.on("dispose",(()=>{t.oo.removeChild(i),i.dispose()}))})),f(),f(),f(),f();var Lc={Default:"","Monospaced Serif":B.Gc,"Proportional Serif":B.Xc,"Monospaced Sans-Serif":B.Jc,"Proportional Sans-Serif":B.Qc},Hc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},qc=[50,75,100,150,200];function zc(t){return{label:t+"%",value:t}}function Wc(t){return w.keys(t).map((i=>({label:i,value:t[i]})))}qc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var Gc=qc.map((function(t){return{label:t+"%",value:t+"%"}})),Xc=[25,50,75,100].map(zc),Jc=[0,25,50,75,100].map(zc),Qc=Wc(Hc),Yc=Wc(Lc),Kc=Wc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Zc=100,tl="#000000",il="#FFFFFF",sl="#000000";f();var el=class extends Ja{Yc(){let t=this.Fr.localize(this.Kc);tt(this.Zc.subMenu.menuHeader.el(),t),this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",tt(this.Br,t);let i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",si(this.Zc.el(),"theo-subtitle-options-menu-item"),this.Zc.el().appendChild(this.Br),this.Zc.el().appendChild(i),i}tl(t){const i=this.jr(t);i&&this.il(i)}sl(){return this.br}Ar(t){this.nl(t.Tr)}il(t){for(let t of this.Cr.menuItems)t.selected(!1);t?(t.selected(!0),this.rl(t.Tr.label)):this.rl("Custom")}rl(t){this.hl=t,tt(this.ol,this.Fr.localize(t)),this.Zc.parentMenu.re()}Mr(t){let i=super.Mr(t);return si(i.el(),"theo-subtitle-options-menu-item"),this.Nr(i),i}Nr(t){const i=this.Fr.localize(t.Tr.label);tt(t.el(),i);const s=this.Fr.localize("Set "+this.Kc+" to ")+i;t.el().setAttribute("aria-label",s)}Re(){this.Fr.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.Zc=t,this.Fr=e,this.hl="",this.te=()=>{let t=this.Fr.localize(this.Kc);tt(this.Zc.subMenu.menuHeader.el(),t),tt(this.Br,t),this.rl(this.hl);for(const t of this.Sr)this.Nr(t)},this.Kc=i,this.nl=s.al,this.ol=this.Yc(),this.br=s.cl,this.Fr.on("languagechange",this.te)}};f();var nl=class t{static ll(t,i,s,e){if(void 0===t&&void 0===i)return;return q(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.dl=i,this.fl=t=>{this.dl.fontFamily=t.value},this.vl=t=>{this.dl.fontSize=t.value},this.pl=i=>{this.ml=i.value,this.dl.fontColor=t.ll(this.gl,this.ml,il,Zc)},this.yl=i=>{this.gl=i.value,this.dl.fontColor=t.ll(this.gl,this.ml,il,Zc)},this.bl=i=>{this.kl=i.value,this.dl.backgroundColor=t.ll(this.kl,this.wl,tl,Zc)},this._l=i=>{this.wl=i.value,this.dl.backgroundColor=t.ll(this.kl,this.wl,tl,Zc)},this.xl=i=>{this.Cl=i.value,this.dl.windowColor=t.ll(this.Cl,this.Sl,sl,Zc)},this.jl=i=>{this.Sl=i.value,this.dl.windowColor=t.ll(this.Cl,this.Sl,sl,Zc)},this.Tl=t=>{this.dl.edgeStyle=t.value}}};f();var rl=class{Ml(t,i){const s=this.Al(t,i.sl());s&&i.tl(s)}Al(t,i){return $(i,(i=>i.value===t))}Pl(t,i,s){let e,n;if(void 0===t)e=this.Al(void 0,i.sl()),n=this.Al(void 0,s.sl());else if(t){let r=function(t){let i=L(t);i||(i=L(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=D(R(t),1));if(!i){let s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=D(R(Hc[s]),1)}return i}(t);if(r){let t=O(r),h=100*r.El;e=this.Al(t,i.sl()),n=this.Al(h,s.sl())}}e&&i.tl(e),n&&s.tl(n)}constructor(t,i){this.dl=t,this.Nl=i,this.Il=()=>{let t=this.dl.fontFamily;this.Ml(t,this.Nl["Font family"]);let i=this.dl.fontColor;this.Pl(i,this.Nl["Font color"],this.Nl["Font opacity"]);let s=this.dl.fontSize;this.Ml(s,this.Nl["Font size"]);let e=this.dl.backgroundColor;this.Pl(e,this.Nl["Background color"],this.Nl["Background opacity"]);let n=this.dl.windowColor;this.Pl(n,this.Nl["Window color"],this.Nl["Window opacity"]);let r=this.dl.edgeStyle;this.Ml(r,this.Nl["Character edge style"])},this.dl.addEventListener("change",this.Il),this.Il()}};var hl=class extends Ja{Bl(){return{"Font family":{cl:ol(Yc),al:this.Fl.fl},"Font color":{cl:ol(Qc),al:this.Fl.yl},"Font opacity":{cl:ol(Xc),al:this.Fl.pl},"Font size":{cl:ol(Gc),al:this.Fl.vl},"Background color":{cl:ol(Qc),al:this.Fl.bl},"Background opacity":{cl:ol(Jc),al:this.Fl._l},"Window color":{cl:ol(Qc),al:this.Fl.xl},"Window opacity":{cl:ol(Jc),al:this.Fl.jl},"Character edge style":{cl:ol(Kc),al:this.Fl.Tl}}}Dl(){this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",this.$l=h.createElement("span"),this.$l.className="theo-primary-color theo-settings-control-menu-item-value",this.Hr.el().appendChild(this.Br),this.Hr.el().appendChild(this.$l),this.te()}Mr(t){let i=this.Cr.addSubMenuItem();return i.Tr=t,this.Nl[t]=new el(i,t,this.Rl[t],this.Fr),i}Nr(t){}Ar(t){}Re(){this.Fr.off("languagechange",this.te),this.Ul.removeEventListener(["addtrack","removetrack"],this.Ol),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.Hr=t,this.Ul=i,this.Fr=e,this.Nl={},this.Ol=()=>{this.Ul.some((t=>T(t.kind)))?this.Hr.show():this.Hr.hide()},this.te=()=>{tt(this.Cr.menuHeader.el(),this.Fr.localize("Subtitle Options")),tt(this.Br,this.Fr.localize("Subtitle")),tt(this.$l,this.Fr.localize("Options")),this.Hr.el().setAttribute("aria-label",this.Fr.localize("Open the subtitle options menu"))},this.Fl=new nl(s),this.Rl=this.Bl(),this.br=w.keys(this.Rl),this.Dl(),this.Vl=new rl(s,this.Nl),this.Fr.on("languagechange",this.te),this.Ul.addEventListener(["addtrack","removetrack"],this.Ol),this.Ol()}};function ol(t){let i=[{label:"Default",value:void 0}];for(let s of t)"Default"!==s.label&&i.push(s);return i}Fi((function(t){const i=t.oo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new hl(s,t.nt.ga,t.Ll.ga,t.oo);t.oo.on("dispose",(()=>{i.removeMenuItem(s),s.dispose(),e.Re(),i.dispose()}))})),f(),f();var al=Ao.getComponent("Component"),ul=class extends al{buildCSSClass(){return"theo-ad-control-panel"}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}constructor(t,i){super(t,i),t.adControlBar=this}};ul.prototype.h=Mi({},al.prototype.h,{children:[]}),Ao.registerComponent("AdControlPanel",ul),f(),f();var cl=Ao.getComponent("Component"),ll="theo-dai-countdown",dl=class extends cl{buildCSSClass(){return ll}createEl(t,i,s){const e=h.createElement("div");return e.className=ll,e}Hl(t,i){i.addEventListener("adbreakbegin",(()=>this.show())),i.addEventListener("adbreakend",(()=>this.hide())),t.addEventListener("timeupdate",this.te)}constructor(t,i,s){super(t,s),this.ta=t,this.Za=i,this.te=()=>{const t=this.Za.ads;t.playing&&t.currentAdBreak&&t.currentAds.length&&tt(this.contentEl(),function(t,i,s){const e=t.ads;let n="";const r=e.length;if(r>1){const t=e.indexOf(i)+1;n=s("Ad")+" "+t+"/"+r+". "}const h=_.ceil(t.maxRemainingDuration);return n+=s("The content will resume in {1} seconds.").replace("{1}",""+h),n}(t.currentAdBreak,t.currentAds[0],(t=>this.ta.localize(t))))},this.lo=t.el(),this.Hl(i,i.ads),this.on(t,"languagechange",this.te)}};f();var fl=Ao.getComponent("ClickableComponent"),vl=class extends fl{buildCSSClass(){return Ut}createEl(t,i,s){return this.h.ga.element.querySelector("."+Ut)}emitTapEvents(){}te(){tt(this.el(),this.localize("Learn more"))}constructor(t,i){super(t,i),tt(this.el(),t.localize("Learn more")),this.Za=i.ga,this.lo=t.el(),this.on(t,"languagechange",this.te)}};Fi((function(t){if(t.ga.ads&&t.ql){const i=t.oo,s=new dl(i,t.ga);i.adControlBar.addChild(s);if(t.ga.element.querySelector("."+Ut)){const s=new vl(i,{ga:t.ga});i.adControlBar.addChild(s)}}})),f(),f();var pl=Ao.getComponent("Component"),ml=["addtrack","removetrack","change"],gl=class extends(Ro(pl)){createEl(){let t=super.createEl();return this.qualityLabel=Ao.createEl("div",{className:"theo-quality-label-text"}),t.appendChild(this.qualityLabel),ci(this.qualityLabel),t}dispose(){this.zr&&(this.zr.removeEventListener("activequalitychanged",this.zl),this.zr=void 0),this.ws.videoTracks.removeEventListener(ml,this.nh),super.dispose()}constructor(t,i){super(t,i),this.zr=void 0,this.nh=()=>{const t=za(this.ws.videoTracks);t!==this.zr&&(this.zr&&this.zr.removeEventListener("activequalitychanged",this.zl),this.zr=t,t&&t.addEventListener("activequalitychanged",this.zl),this.zl())},this.zl=()=>{const t=this.zr&&this.zr.activeQuality;if(!this.qualityLabel||!t)return;const i=t.label?t.label:t.height?t.height+"p":void 0;i&&(tt(this.qualityLabel,i),this.addClass("theo-quality-label-show"),this.hideActiveQualityLabel())},this.hideActiveQualityLabel=()=>{this.resetTimeout(),this.startFadeOutID=this.setTimeout(this.fadeoutLabel,3750),this.removeLabelClassesID=this.setTimeout(this.hideLabel,4e3)},this.resetTimeout=()=>{this.startFadeOutID&&this.clearTimeout(this.startFadeOutID),this.removeLabelClassesID&&this.clearTimeout(this.removeLabelClassesID)},this.fadeoutLabel=()=>{this.addClass("theo-quality-label-fadeout")},this.hideLabel=()=>{this.removeClass("theo-quality-label-show"),this.removeClass("theo-quality-label-fadeout")},super.addClass("theo-quality-label"),this.ws.videoTracks&&(this.ws.videoTracks.addEventListener(ml,this.nh),this.nh())}};Ao.registerComponent("activeQualityLabel",gl),f(),f();var yl="theo-upcoming-ad-notification",bl=["adbreakbegin","adbreakend","adadded","adloaded","adbegin","adend"],kl=class extends(Ro(da)){createEl(){const t=Ao.createEl("div",{className:yl});return this.notificationText=Ao.createEl("div",{className:yl+"text"}),t.appendChild(this.notificationText),t}Wl(){if(!this.ws.ads)return;const t=this.ws.ads.scheduledAdBreaks;let i,s=1/0;for(let e=0;e<t.length;e++){const n=t[e];let r=n.timeOffset;-1!==r&&r<s&&(s=r,i=n)}this.currentAdBreak=i,this.currentAdBreakValid=void 0!==i&&void 0!==i.ads&&i.ads.some((t=>"linear"===t.type))}Gl(){if(!this.ws.ads||this.ws.ads.playing||!this.currentAdBreak||!this.currentAdBreakValid||0===this.currentAdBreak.timeOffset)return void this.Xl();const t=this.ws.currentTime;if(this.currentAdBreak.timeOffset>t+10)return void this.Xl();const i=_.ceil(this.currentAdBreak.timeOffset-t);i<0?this.Xl():this.Jl(i)}Jl(t){this.Ql!==t&&(tt(this.notificationText,"Your video will be temporarily interrupted in 0:"+(t<10?"0"+t:t)),this.Ql=t,this.show())}Xl(){this.Ql=NaN,this.hide()}dispose(){var t;this.ws.removeEventListener("timeupdate",this.handleTimeUpdate),null==(t=this.ws.ads)||t.removeEventListener(bl,this.handleAdEvent),this.currentAdBreak=void 0,super.dispose()}constructor(t,i){super(t,i),this.currentAdBreak=void 0,this.currentAdBreakValid=!1,this.Ql=NaN,this.handleTimeUpdate=()=>{this.Gl()},this.handleAdEvent=()=>{this.Wl(),this.Gl()},this.ws.ads&&(this.hide(),this.ws.addEventListener("timeupdate",this.handleTimeUpdate),this.ws.ads.addEventListener(bl,this.handleAdEvent))}};Ao.registerComponent("upcomingAdNotificationText",kl),f(),f();var wl=Ao.getComponent("Component");Ao.registerComponent("UplynkAdBreakBar",class extends wl{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",t}get Yl(){return this.h.adBreakProvider()}te(t,i){if(this.Yl&&this.Yl.endTime){const s=_.max(this.Yl.endTime-t,0);tt(i,"Content will resume in "+_.ceil(s)+"s"),this.show()}else this.hide()}constructor(t,i){super(t,i),this.Kl=()=>{this.te(this.player().currentTime(),this.el())},this.on(t,"timeupdate",this.Kl)}}),f();var _l=Ao.getComponent("ClickableComponent");Ao.registerComponent("UplynkAdSkipButton",class extends _l{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.Zl=h.createElement("span"),t.appendChild(this.Zl),this.te(t,this.Zl),t}handleClick(){this.h.skipCallback()}te(t,i){this.td<=wt.ed.sd?(ni(t,"theoplayer-ad-skip-countdown"),si(t,"theoplayer-ad-skip-button"),tt(i,"Skip ads")):tt(i,"Skip ads in "+_.ceil(this.td)+"s")}get td(){return this.h.adBreak.startTime+this.h.adBreak.skipOffset-this.player().currentTime()}constructor(t,i){super(t,i),this.Kl=()=>{this.te(this.el(),this.Zl)},this.on(t,"timeupdate",this.Kl)}}),f(),f();var xl=Ao.getComponent("Component"),Cl=class extends xl{buildCSSClass(){return"theo-uplynk-marker-bar"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}};Ao.registerComponent("UplynkAdBreakMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-adbreak"}}),f(),f();var Sl=Ao.getComponent("Component"),jl=class extends Sl{get startTime(){return this.h.startTime}get endTime(){return this.h.endTime}get seekable(){return this.player().seekable()}buildCSSClass(){return"theo-uplynk-marker"}createEl(t,i,s){const e=h.createElement("div");e.className=this.buildCSSClass();const n=this.seekable.start(0),r=this.seekable.end(this.seekable.length-1),o=_.max(this.startTime-n,0),a=void 0!==this.endTime?_.max(r-this.endTime,0):0,u=r-n;return e.style.left=o/u*100+"%",e.style.right=a/u*100+"%",e}constructor(t,i){super(t,i)}};Ao.registerComponent("UplynkAdBreakMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-adbreak"}}),f();Ao.registerComponent("UplynkAssetMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-asset"}}),f();Ao.registerComponent("UplynkAssetMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-asset"}}),f();var Tl=Ao.getComponent("Component");Ao.registerComponent("UplynkContentNotificationBar",class extends Tl{buildCSSClass(){const t="theo-uplynk-content-notification-bar";return t+($t.Ka||$t.nd?" "+t+"-ios":"")}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}}),f();var Ml=Ao.getComponent("Component");function Al(t,i){const s=t.uplynk;return Boolean(t&&void 0===s)||Boolean(t&&s&&void 0===s.ui)||Boolean(t&&s&&s.ui&&void 0===s.ui[i])||Boolean(t&&s&&s.ui&&!0===s.ui[i])}Ao.registerComponent("UplynkContentNotification",class extends Ml{get rd(){return this.h.asset}buildCSSClass(){return"theo-uplynk-content-notification"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}fo(){const t=h.createElement("img");t.src=this.rd.posterUrl,t.className=this.buildCSSClass()+"-thumbnail",this.el().appendChild(t);const i=h.createElement("div");i.className=this.buildCSSClass()+"-description";const s=function(t){return"Next: "+t}(this.rd.description);tt(i,s),this.el().appendChild(i),this.od=h.createElement("div"),this.od.className=this.buildCSSClass()+"-countdown",tt(this.od,this.ad),this.el().appendChild(this.od)}get ad(){const t=_.min(10,this.ud);return"Starting in "+_.ceil(t)+" seconds"}get ud(){return _.max(0,this.rd.startTime-this.player().currentTime())}ld(){const t=this.ud;t>10||t<=0?this.hide():(tt(this.od,this.ad),this.show())}constructor(t,i){super(t,i),this.fo(),this.on(t,"timeupdate",this.ld),this.hide()}}),f(),Ii((function(t){return class extends t{get dd(){return this.oo.controlBar.progressControl.seekBar}ka(t){this.fd=!1,this.ga.removeEventListener("timeupdate",this.vd),this.oo.removeChild("UplynkAdBreakBar"),this.oo.removeChild("UplynkAdSkipButton"),this.dd.removeChild("UplynkAdBreakMarkerBar"),this.dd.removeChild("UplynkAssetMarkerBar"),this.oo.removeChild("UplynkContentNotificationBar"),super.ka(t)}pd(){if(!function(t){return Al(t,"assetMarkers")}(this.md)||!this.fd)return;const t=this.ga.uplynk.assets.map((t=>({name:"UplynkAssetMarker",startTime:t.startTime,endTime:t.endTime})));this.dd.removeChild("UplynkAssetMarkerBar"),this.dd.addChild("UplynkAssetMarkerBar",{children:t})}gd(){if(!function(t){return Al(t,"contentNotification")}(this.md))return;const t=this.ga.uplynk.assets.map((t=>({name:"UplynkContentNotification",asset:t})));this.oo.removeChild("UplynkContentNotificationBar"),this.oo.addChild("UplynkContentNotificationBar",{children:t})}gn(){this.ga.removeEventListener("timeupdate",this.vd);const t=this.ga.uplynk;null==t||t.ads.adBreaks.removeEventListener("addadbreak",this.yd),null==t||t.ads.adBreaks.removeEventListener("removeadbreak",this.bd),null==t||t.assets.removeEventListener("addasset",this.kd),null==t||t.assets.removeEventListener("removeasset",this.kd),this.ga.removeEventListener("loadeddata",this.wd),super.gn()}constructor(t,i,s){super(t,i,s),this.fd=!1,this.wd=()=>{this.fd=!0,isFinite(this._d())||this.ga.addEventListener("timeupdate",this.vd),this.vd(),this.pd(),this.gd()},this.yd=t=>{t.adBreak.addEventListener("adbreakbegin",this.xd),t.adBreak.addEventListener("adbreakend",this.Cd),this.vd()},this.bd=t=>{t.adBreak.removeEventListener("adbreakbegin",this.xd),t.adBreak.removeEventListener("adbreakend",this.Cd),this.vd()},this.vd=()=>{if(!function(t){return Al(t,"adBreakMarkers")}(this.md)||!this.fd)return;const t=this.ga.uplynk,i=null==t?void 0:t.ads.adBreaks.map((t=>({name:"UplynkAdBreakMarker",startTime:t.startTime,endTime:t.endTime})));this.dd.removeChild("UplynkAdBreakMarkerBar"),this.dd.addChild("UplynkAdBreakMarkerBar",{children:i})},this.xd=()=>{if(function(t){return Al(t,"adNotification")}(this.md)){const t=this.ga.uplynk,i=t.ads.currentAdBreak;this.oo.addChild("UplynkAdBreakBar",{adBreakProvider:this.Sd}),-1!==i.skipOffset&&this.oo.addChild("UplynkAdSkipButton",{adBreak:i,skipCallback:t.ads.skip})}},this.Sd=()=>this.ga.uplynk.ads.currentAdBreak,this.Cd=()=>{this.oo.removeChild("UplynkAdBreakBar"),this.oo.removeChild("UplynkAdSkipButton")},this.kd=()=>{this.pd(),this.gd()};const e=this.ga.uplynk;null==e||e.ads.adBreaks.addEventListener("addadbreak",this.yd),null==e||e.ads.adBreaks.addEventListener("removeadbreak",this.bd),null==e||e.assets.addEventListener("addasset",this.kd),null==e||e.assets.addEventListener("removeasset",this.kd),this.ga.addEventListener("loadeddata",this.wd)}}}));export{ct as ChromelessPlayer,et as ErrorCategory,it as ErrorCode,Ru as Player,Dt as cache,Et as cast,vt as features,yt as players,kt as registerContentProtectionIntegration,dt as utils,mt as version,Ao as videojs};
|