@theoplayer/extended 8.8.3 → 8.10.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 +1 -1
- package/THEOplayer.chromeless.esm.js +3 -3
- package/THEOplayer.chromeless.js +3 -3
- package/THEOplayer.common.d.ts +18 -3
- package/THEOplayer.common.esm.js +3 -3
- package/THEOplayer.d.ts +1 -1
- 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 +30 -0
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: 8.
|
|
38
|
-
Created: 2025-01-
|
|
37
|
+
Version: 8.10.0
|
|
38
|
+
Created: 2025-01-29T16:11:24.204Z
|
|
39
39
|
*/
|
|
40
|
-
var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==a?a:"undefined"!=typeof global?global:this,a=s.window,h=s.document,u=(s.location,s.navigator,s.setTimeout),c=s.clearTimeout,d=(s.setInterval,s.clearInterval,s.Error),v=s.TypeError,m=s.SyntaxError,g=s.Object,w=s.Math,k=s.parseInt,_=s.parseFloat,j=s.isNaN,x=s.Uint8Array;s.Worker,s.WorkerGlobalScope,s.XMLHttpRequest;import{$ as S,$a as T,A as C,Aa as M,Ab as P,B as A,Ba as I,C as E,Ca as D,D as N,Da as F,E as B,Ea as $,F as R,Fa as O,G as V,Ga as U,H as L,Ha as H,I as z,Ia as W,J as q,Ja as G,K as X,Ka as J,L as Q,La as Y,M as K,Ma as Z,N as tt,Na as it,O as st,Oa as et,P as nt,Pa as rt,Q as ht,Qa as ot,R as at,Ra as ut,S as ct,Sa as lt,T as ft,Ta as dt,U as vt,Ua as pt,V as mt,Va as gt,W as yt,Wa as bt,X as wt,Xa as kt,Y as _t,Ya as jt,Z as xt,Za as St,_ as Tt,_a as Ct,a as Mt,aa as Pt,ab as At,b as It,ba as Et,bb as Dt,c as Nt,ca as Ft,cb as Bt,d as $t,da as Rt,db as Ot,e as Vt,ea as Ut,eb as Lt,f as Ht,fa as zt,fb as Wt,g as qt,ga as Gt,gb as Xt,h as Jt,ha as Qt,hb as r,i as Yt,ia as Kt,ib as Zt,j as ti,ja as ii,jb as si,k as ei,ka as ni,kb as ri,l as hi,la as oi,lb as ai,m as ui,ma as ci,mb as li,n as fi,na as di,nb as vi,o as pi,oa as mi,ob as gi,p as yi,pa as bi,pb as wi,q as ki,qa as _i,qb as ji,r as xi,ra as Si,rb as Ti,s as Ci,sa as Mi,sb as Pi,t as Ai,ta as Ii,tb as Ei,u as Di,ua as Ni,ub as Fi,v as Bi,va as $i,vb as Ri,w as Oi,wa as Vi,wb as Ui,x as Li,xa as Hi,xb as zi,y as Wi,ya as qi,yb as Gi,z as Xi,za as Ji,zb as Qi}from"./THEOplayer.common.esm.js";var Yi=[];var Ki=[];var Zi=void 0!==a?a:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ts=void 0!==h?h:{createElement:function(){}};function is(t,i){return i||(i=t.slice(0)),t.raw=i,t}var ss=1;function es(){return ss++}var ns,rs=g.prototype.toString,hs=function(t){return us(t)?g.keys(t):[]};function os(t,i){hs(t).forEach((function(s){return i(t[s],s)}))}function as(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 g.assign?g.assign.apply(g,[t].concat(s)):(s.forEach((function(i){i&&os(i,(function(i,s){t[s]=i}))})),t)}function us(t){return!!t&&"object"==typeof t}function cs(t){return us(t)&&"[object Object]"===rs.call(t)&&t.constructor===g}var ls=function(t,i,s){void 0===s&&(s=!!ue&&ue<11),"log"!==t&&i.unshift(t.toUpperCase()+":"),ns.history.push(i),i.unshift("VIDEOJS:");var e=Zi.console&&Zi.console[t];e&&(s&&(i=i.map((function(t){if(us(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"](Zi.console,i):e(i))};(ns=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];ls("log",i)}).history=[],ns.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return ls("error",i)},ns.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return ls("warn",i)};var fs=ns,ds="undefined"!=typeof globalThis?globalThis:void 0!==a?a:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function vs(t){return t.replace(/\n\r?\s*/g,"")}var ps,ms=function(t){for(var i="",s=0;s<arguments.length;s++)i+=vs(t[s])+(arguments[s+1]||"");return i};function gs(t){return"string"==typeof t&&/\S/.test(t)}function ys(t){if(/\s/.test(t))throw new d("class has illegal whitespace characters")}function bs(){return ts===Zi.document&&void 0!==ts.createElement}function ws(t){return us(t)&&1===t.nodeType}function ks(t){return function(i,s){if(!gs(i))return ts[t](null);gs(s)&&(s=ts.querySelector(s));var e=ws(s)?s:ts;return e[t]&&e[t](i)}}function _s(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=ts.createElement(t);return g.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(fs.warn(ms(ps||(ps=is(["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?js(n,s):n[t]=s})),g.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&Ls(n,e),n}function js(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function xs(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var Ss={},Ts="vdata"+(new Date).getTime();function Cs(t){var i=t[Ts];return i||(i=t[Ts]=es()),Ss[i]||(Ss[i]={}),Ss[i]}function Ms(t){var i=t[Ts];return!!i&&!!g.getOwnPropertyNames(Ss[i]).length}function Ps(t){var i=t[Ts];if(i){delete Ss[i];try{delete t[Ts]}catch(i){t.removeAttribute?t.removeAttribute(Ts):t[Ts]=null}}}function As(t,i){return ys(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function Is(t,i){return t.classList?t.classList.add(i):As(t,i)||(t.className=(t.className+" "+i).trim()),t}function Es(t,i){return t.classList?t.classList.remove(i):(ys(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function Ds(t,i,s){var e=As(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?Is(t,i):Es(t,i),t}function Ns(t,i){g.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function Fs(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 Bs(t,i,s){t.setAttribute(i,s)}function $s(t,i){t.removeAttribute(i)}function Rs(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=ts.documentElement,e=ts.body,n=s.clientLeft||e.clientLeft||0,r=Zi.pageXOffset||e.scrollLeft,h=i.left+r-n,o=s.clientTop||e.clientTop||0,a=Zi.pageYOffset||e.scrollTop,u=i.top+a-o;return{left:w.round(h),top:w.round(u)}}function Os(t,i){var s={},e=Rs(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=w.max(0,w.min(1,(h-a+r)/r)),s.x=w.max(0,w.min(1,(u-o)/n)),s}function Vs(t){return us(t)&&3===t.nodeType}function Us(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Ls(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()),ws(t)||Vs(t)?t:"string"==typeof t&&/\S/.test(t)?ts.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function Hs(t,i){return Ls(Us(t),i)}var n,zs=ks("querySelector"),Ws=ks("querySelectorAll"),qs=Zi.navigator&&Zi.navigator.userAgent||"",Gs=/AppleWebKit\/([\d.]+)/i.exec(qs),Xs=Gs?_(Gs.pop()):null,Js=/iPad/i.test(qs),Qs=/iPhone/i.test(qs)&&!Js,Ys=/iPod/i.test(qs),Ks=Qs||Js||Ys,Zs=(n=qs.match(/OS (\d+)_/i))&&n[1]?n[1]:null,te=/Android/i.test(qs),ie=function(){var t=qs.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&_(t[1]),s=t[2]&&_(t[2]);return i&&s?_(t[1]+"."+t[2]):i||null}(),se=te&&/webkit/i.test(qs)&&ie<2.3,ee=te&&ie<5&&Xs<537,ne=/Firefox/i.test(qs),re=/Edge/i.test(qs),he=!re&&/Chrome/i.test(qs),oe=function(){var t=qs.match(/Chrome\/(\d+)/);return t&&t[1]?_(t[1]):null}(),ae=/MSIE\s8\.0/.test(qs),ue=function(){var t=/MSIE\s(\d+)\.\d/.exec(qs),i=t&&_(t[1]);return!i&&/Trident\/7.0/i.test(qs)&&/rv:11.0/.test(qs)&&(i=11),i}(),ce=/Safari/i.test(qs)&&!he&&!te&&!re,le=ce||Ks,fe=bs()&&("ontouchstart"in Zi||Zi.DocumentTouch&&Zi.document instanceof Zi.DocumentTouch),de=bs()&&"backgroundSize"in Zi.document.createElement("video").style,ve=g.freeze({__proto__:null,IS_IPAD:Js,IS_IPHONE:Qs,IS_IPOD:Ys,IS_IOS:Ks,IOS_VERSION:Zs,IS_ANDROID:te,ANDROID_VERSION:ie,IS_OLD_ANDROID:se,IS_NATIVE_ANDROID:ee,IS_FIREFOX:ne,IS_EDGE:re,IS_CHROME:he,CHROME_VERSION:oe,IS_IE8:ae,IE_VERSION:ue,IS_SAFARI:ce,IS_ANY_SAFARI:le,TOUCH_ENABLED:fe,BACKGROUND_SIZE_SUPPORTED:de});function pe(t,i){var s=Cs(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)),g.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===g.getOwnPropertyNames(s).length&&Ps(t)}function me(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function ge(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||Zi.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||ts),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=ts.documentElement,h=ts.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 ye=!1;!function(){try{var t=g.defineProperty({},"passive",{get:function(){ye=!0}});Zi.addEventListener("test",null,t)}catch(t){}}();var be=["touchstart","touchmove"];function we(t,i,s){if(Array.isArray(i))return me(we,t,i,s);var e=Cs(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=es()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=ge(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){fs.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;ye&&be.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function ke(t,i,s){if(Ms(t)){var e=Cs(t);if(e.handlers){if(Array.isArray(i))return me(ke,t,i,s);var n=function(i){e.handlers[i]=[],pe(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);pe(t,i)}else n(i)}else for(var o in e.handlers)n(o)}}}function _e(t,i,s){var e=Ms(t)?Cs(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=ge(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)_e.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=Cs(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 je(t,i,s){if(Array.isArray(i))return me(je,t,i,s);var e=function e(){ke(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||es(),we(t,i,e)}var xe,Se=!1,Te=function(){if(bs()){var t=ts.getElementsByTagName("video"),i=ts.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")&&xe(u)}else Se||Ce(1)}};function Ce(t,i){i&&(xe=i),Zi.setTimeout(Te,t)}bs()&&"complete"===ts.readyState?Se=!0:je(Zi,"load",(function(){Se=!0}));var Me=function(t){var i=ts.createElement("style");return i.className=t,i},Pe=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},Ae=function(t,i,s){i.guid||(i.guid=es());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function Ie(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function Ee(){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&&os(i,(function(i,s){cs(i)?(cs(t[s])||(t[s]={}),t[s]=Ee(t[s],i)):t[s]=i}))})),t}var De=function(){function t(t,i,s){if(!t&&this.play?this.t=t=this:this.t=t,this.h=Ee({},this.h),i=this.h=Ee(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"+es()}this.l=i.name||null,i.el?this.v=i.el:!1!==i.createEl&&(this.v=this.createEl()),this.m=[],this.k={},this.j={},!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.j=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),Ps(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return fs.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=Ee(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,s){return _s(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=Ie(t),this.j[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=Ie(i),s||(s={}),!0===s&&(fs.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 d("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&&Ie(n.name()))&&(this.j[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.j[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:g.keys(s)).concat(g.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||Ie(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))we(this.v,t,Ae(this,i));else{var n=t,r=i,h=Ae(this,s),o=function(){return e.off(n,r,h)};o.guid=h.guid,this.on("dispose",o);var a=function(){return e.off("dispose",o)};a.guid=h.guid,t.nodeName?(we(n,r,h),we(n,"dispose",a)):"function"==typeof t.on&&(n.on(r,h),n.on("dispose",a))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))ke(this.v,t,i);else{var e=t,n=i,r=Ae(this,s);this.off("dispose",r),t.nodeName?(ke(e,n,r),ke(e,"dispose",r)):(e.off(n,r),e.off("dispose",r))}return this},i.one=function(t,i,s){var e=arguments,n=this;if("string"==typeof t||Array.isArray(t))je(this.v,t,Ae(this,i));else{var r=t,h=i,o=Ae(this,s),a=function t(){n.off(r,h,t),o.apply(null,e)};a.guid=o.guid,this.on(r,h,a)}return this},i.trigger=function(t,i){return _e(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.T?i?t.call(this):this.setTimeout(t,1):(this.C=this.C||[],this.C.push(t))),this},i.triggerReady=function(){this.T=!0,this.setTimeout((function(){var t=this.C;this.C=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},i.$=function(t,i){return zs(t,i||this.contentEl())},i.$$=function(t,i){return Ws(t,i||this.contentEl())},i.hasClass=function(t){return As(this.v,t)},i.addClass=function(t){return Is(this.v,t),this},i.removeClass=function(t){return Es(this.v,t),this},i.toggleClass=function(t,i){return Ds(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 Bs(this.v,t,i),this},i.removeAttribute=function(t){return $s(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 k(-1!==n?e.slice(0,n):this.v["offset"+Ie(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new d("currentDimension only accepts width or height value");if("function"==typeof Zi.getComputedStyle){var s=Zi.getComputedStyle(this.v);i=s.getPropertyValue(t)||s[t]}if(0===(i=_(i))){var e="offset"+Ie(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;w.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=Ae(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=Ae(this,t);var s=Zi.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){Zi.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=Ae(this,t);var s=Zi.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){Zi.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=Ie(i),t.M||(t.M={}),"Player"===i&&t.M[i]){var e=t.M[i];if(e.players&&g.keys(e.players).length>0&&g.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new d("Can not register Player component after player has been created")}return t.M[i]=s,s}},t.getComponent=function(i){if(i)return i=Ie(i),t.M&&t.M[i]?t.M[i]:Zi&&Zi.videojs&&Zi.videojs[i]?(fs.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),Zi.videojs[i]):void 0},t.extend=function(i){i=i||{},fs.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=g.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();De.registerComponent("Component",De);var Ne=function(){};function Fe(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Be(t,i){return(Be=g.setPrototypeOf?g.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function y(t,i){t.prototype=g.create(i.prototype),t.prototype.constructor=t,Be(t,i)}function $e(t,i,s,e){return void 0===e&&(fs.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new d("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 Re(t){return void 0===t||0===t.length?{length:0,start:function(){throw new d("This TimeRanges object is empty")},end:function(){throw new d("This TimeRanges object is empty")}}:{length:t.length,start:$e.bind(null,"start",0,t),end:$e.bind(null,"end",1,t)}}function Oe(t,i){return Array.isArray(t)?Re(t):void 0===t||void 0===i?Re():Re([[t,i]])}function Ve(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=Oe(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}Ne.prototype.P={},Ne.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},we(this,t,i),this.addEventListener=s},Ne.prototype.addEventListener=Ne.prototype.on,Ne.prototype.off=function(t,i){ke(this,t,i)},Ne.prototype.removeEventListener=Ne.prototype.off,Ne.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},je(this,t,i),this.addEventListener=s},Ne.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=ge(t),this.P[i]&&this["on"+i]&&this["on"+i](t),_e(this,t)},Ne.prototype.dispatchEvent=Ne.prototype.trigger;var Ue,Le,He,ze,We={prefixed:!0},qe=[["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"]],Ge=qe[0];for(Le=0;Le<qe.length;Le++)if(qe[Le][1]in ts){Ue=qe[Le];break}if(Ue){for(He=0;He<Ue.length;He++)We[Ge[He]]=Ue[He];We.prefixed=Ue[0]!==Ge[0]}function Xe(t){if(t instanceof Xe)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:us(t)&&("number"==typeof t.code&&(this.code=t.code),as(this,t)),this.message||(this.message=Xe.defaultMessages[this.code]||"")}for(Xe.prototype.code=0,Xe.prototype.message="",Xe.prototype.status=null,Xe.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Xe.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."},ze=0;ze<Xe.errorTypes.length;ze++)Xe[Xe.errorTypes[ze]]=ze,Xe.prototype[Xe.errorTypes[ze]]=ze;var Je=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var Qe=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}}))})},Ye=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=Qe(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(Qe))},Ke=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()},Ze="vjs-modal-dialog",tn=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).A=e.I=e.D=!1,e.closeable(!e.h.uncloseable),e.content(e.h.content),e.S=_s("div",{className:Ze+"-content"},{role:"document"}),e.N=_s("p",{className:Ze+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),js(e.N,e.description()),e.v.appendChild(e.N),e.v.appendChild(e.S),e.on(i,"languagechange",e.handleLanguagechange),e}y(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 Ze+" 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.A){var t=this.player();this.trigger("beforemodalopen"),this.A=!0,(this.h.fillAlways||!this.I&&!this.D)&&this.fill(),this.B=!t.paused(),this.h.pauseOnOpen&&this.B&&t.pause(),this.closeable()&&this.on(this.v.ownerDocument,"keydown",Ae(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.I=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.A},s.close=function(){if(this.A){var t=this.player();this.trigger("beforemodalclose"),this.A=!1,this.B&&this.h.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.v.ownerDocument,"keydown",Ae(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.D=!0,s.removeChild(i),this.empty(),Hs(i,t),this.trigger("modalfill"),e?s.insertBefore(i,e):s.appendChild(i),this},s.empty=function(){return this.trigger("beforemodalempty"),Us(this.contentEl()),this.trigger("modalempty"),this},s.content=function(t){return void 0!==t&&(this.O=t),this.O},s.handleLanguagechange=function(){this.v.setAttribute("aria-label",this.label()),js(this.N,this.description()),this.opened()?this.fill():(this.I||this.D)&&(this.I=!1,this.D=!1,this.empty())},i}(De);tn.prototype.h={pauseOnOpen:!0,temporary:!0},De.registerComponent("ModalDialog",tn);var sn=function(){function t(i){var s=this;if(ae)for(var e in s=ts.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.V.call(s,i),g.defineProperty(s,"length",{get:function(){return this.U}}),ae)return s}var i=t.prototype;return i.V=function(t){var i=this.length||0,s=0,e=t.length;this.L=t,this.U=t.length;var n=function(t){""+t in this||g.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}(),en={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},nn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},rn={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},hn={disabled:"disabled",hidden:"hidden",showing:"showing"},on=function(t){function i(s){var e;void 0===s&&(s={});var n=Fe(e=t.call(this)||this);if(ae)for(var r in n=ts.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",es()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){g.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||Fe(e)}return y(i,t),i}(Ne),an=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=ts.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=ts.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),ts.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&&ts.body.removeChild(e),r},un=function(t){var i=Zi.location,s=an(t);return(":"===s.protocol?i.protocol:s.protocol)+s.host!==i.protocol+i.host},cn={exports:{}};void 0!==a?cn.exports=a:void 0!==ds?cn.exports=ds:"undefined"!=typeof self?cn.exports=self:cn.exports={};var ln=function(t){var i=fn.call(t);return"[object Function]"===i||"function"==typeof t&&"[object RegExp]"!==i||void 0!==a&&(t===a.setTimeout||t===a.alert||t===a.confirm||t===a.prompt)},fn=g.prototype.toString;var dn,vn,pn,mn,gn,yn,bn,wn,kn,_n,jn,xn,Sn=Array.prototype.slice,Tn=g.prototype.toString,Cn=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==Tn.call(i))throw new v("Function.prototype.bind called on incompatible "+i);for(var s,e=Sn.call(arguments,1),n=w.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(Sn.call(arguments)));return g(n)===n?n:this}return i.apply(t,e.concat(Sn.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},Mn=Function.prototype.bind||Cn,Pn=g.prototype.toString,An=function(t){var i=Pn.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]"===Pn.call(t.callee)),s};g.keys||(vn=g.prototype.hasOwnProperty,pn=g.prototype.toString,mn=An,gn=g.prototype.propertyIsEnumerable,yn=!gn.call({toString:null},"toString"),bn=gn.call((function(){}),"prototype"),wn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],kn=function(t){var i=t.constructor;return i&&i.prototype===t},_n={$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},jn=function(){if(void 0===a)return!1;for(var t in a)try{if(!_n["$"+t]&&vn.call(a,t)&&null!==a[t]&&"object"==typeof a[t])try{kn(a[t])}catch(t){return!0}}catch(t){return!0}return!1}(),xn=function(t){if(void 0===a||!jn)return kn(t);try{return kn(t)}catch(t){return!1}},dn=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===pn.call(t),e=mn(t),n=i&&"[object String]"===pn.call(t),r=[];if(!i&&!s&&!e)throw new v("Object.keys called on a non-object");var h=bn&&s;if(n&&t.length>0&&!vn.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||!vn.call(t,u)||r.push(String(u));if(yn)for(var c=xn(t),l=0;l<wn.length;++l)c&&"constructor"===wn[l]||!vn.call(t,wn[l])||r.push(wn[l]);return r});var In=dn,En=Array.prototype.slice,Dn=An,Nn=g.keys,Fn=Nn?function(t){return Nn(t)}:In,Bn=g.keys;Fn.shim=function(){if(g.keys){var t=function(){var t=g.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(g.keys=function(t){return Dn(t)?Bn(En.call(t)):Bn(t)})}else g.keys=Fn;return g.keys||Fn};var $n=Fn,Rn="function"==typeof Mt&&"symbol"==typeof Mt("foo"),On=g.prototype.toString,Vn=Array.prototype.concat,Un=g.defineProperty,Ln=Un&&function(){var t={};try{for(var i in Un(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),Hn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===On.call(t)}(e)&&e())&&(Ln?Un(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},zn=function(t,i){var s=arguments.length>2?arguments[2]:{},e=$n(i);Rn&&(e=Vn.call(e,g.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)Hn(t,e[n],i[e[n]],s[e[n]])};zn.supportsDescriptors=!!Ln;var Wn,qn=zn,Gn=g.getOwnPropertyDescriptor?function(){return g.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new v},Xn="function"==typeof Mt&&"symbol"==typeof It,Jn=g.getPrototypeOf||function(t){return t.__proto__},Qn=void 0===x?Wn:Jn(x),Yn={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?Wn:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?Wn:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Xn?Jn([][It]()):Wn,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":Wn,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":Wn,"$ %AsyncGenerator%":Wn,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":Wn,"$ %AsyncIteratorPrototype%":Wn,"$ %Atomics%":"undefined"==typeof Atomics?Wn:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?Wn:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?Wn:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":d,"$ %ErrorPrototype%":d.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?Wn:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?Wn:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?Wn:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?Wn:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":Wn,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":Wn,"$ %Int8Array%":"undefined"==typeof Int8Array?Wn:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?Wn:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?Wn:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?Wn:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?Wn:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?Wn:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":j,"$ %IteratorPrototype%":Xn?Jn(Jn([][It]())):Wn,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?Wn:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Xn?Jn((new Map)[It]()):Wn,"$ %MapPrototype%":"undefined"==typeof Map?Wn:Map.prototype,"$ %Math%":w,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":g,"$ %ObjectPrototype%":g.prototype,"$ %ObjProto_toString%":g.prototype.toString,"$ %ObjProto_valueOf%":g.prototype.valueOf,"$ %parseFloat%":_,"$ %parseInt%":k,"$ %Promise%":"undefined"==typeof Promise?Wn:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?Wn:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?Wn:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?Wn:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?Wn:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?Wn:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?Wn:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?Wn:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?Wn:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Xn?Jn((new Set)[It]()):Wn,"$ %SetPrototype%":"undefined"==typeof Set?Wn:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Wn:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?Wn:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Xn?Jn(""[It]()):Wn,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Xn?Mt:Wn,"$ %SymbolPrototype%":Xn?Mt.prototype:Wn,"$ %SyntaxError%":m,"$ %SyntaxErrorPrototype%":m.prototype,"$ %ThrowTypeError%":Gn,"$ %TypedArray%":Qn,"$ %TypedArrayPrototype%":Qn?Qn.prototype:Wn,"$ %TypeError%":v,"$ %TypeErrorPrototype%":v.prototype,"$ %Uint8Array%":void 0===x?Wn:x,"$ %Uint8ArrayPrototype%":void 0===x?Wn:x.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Wn:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?Wn:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?Wn:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?Wn:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?Wn:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?Wn:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?Wn:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?Wn:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?Wn:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?Wn:WeakSet.prototype},Kn=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new v('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in Yn))throw new m("intrinsic "+t+" does not exist!");if(void 0===Yn[s]&&!i)throw new v("intrinsic "+t+" exists, but is not available. Please file an issue!");return Yn[s]},Zn=Mn.call(Function.call,g.prototype.hasOwnProperty),tr=Kn,ir=tr("%TypeError%"),sr=tr("%SyntaxError%"),er=Zn,nr={"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(er(i,e)&&!s[e])return!1;var n=er(i,"[[Value]]"),r=er(i,"[[Get]]")||er(i,"[[Set]]");if(n&&r)throw new ir("Property Descriptors may not be both accessor and data descriptors");return!0}},rr=Number.isNaN||function(t){return t!=t},hr=Number.isNaN||function(t){return t!=t},or=Number.isFinite||function(t){return"number"==typeof t&&!hr(t)&&t!==1/0&&t!==-1/0},ar=Function.prototype.toString,ur=/^\s*class\b/,cr=function(t){try{var i=ar.call(t);return ur.test(i)}catch(t){return!1}},lr=g.prototype.toString,fr="function"==typeof Mt&&"symbol"==typeof Mt.toStringTag,dr=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(fr)return function(t){try{return!cr(t)&&(ar.call(t),!0)}catch(t){return!1}}(t);if(cr(t))return!1;var i=lr.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},vr=g.prototype.toString,pr=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},mr=dr,gr=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===vr.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(mr(t[n[e]])&&(s=t[n[e]](),pr(s)))return s;throw new v("No default value")}throw new v("invalid [[DefaultValue]] hint supplied")},yr=Kn,br=yr("%Object%"),wr=yr("%TypeError%"),kr=yr("%String%"),_r=function(t,i,s,e){var n=nr[i];if("function"!=typeof n)throw new sr("unknown record type: "+i);if(!n(t,e))throw new ir(s+" must be a "+i);console.log(n(t,e),e)},jr=rr,xr=or,Sr=function(t){return t>=0?1:-1},Tr=function(t,i){var s=t%i;return w.floor(s>=0?s:s+i)},Cr=Zn,Mr={ToPrimitive:function(t){return pr(t)?t:arguments.length>1?gr(t,arguments[1]):gr(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return jr(i)?0:0!==i&&xr(i)?Sr(i)*w.floor(w.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(jr(i)||0===i||!xr(i))return 0;var s=Sr(i)*w.floor(w.abs(i));return Tr(s,65536)},ToString:function(t){return kr(t)},ToObject:function(t){return this.CheckObjectCoercible(t),br(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new wr(i||"Cannot call method on "+t);return t},IsCallable:dr,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:jr(t)&&jr(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(Cr(t,s)&&!i[s])return!1;var e=Cr(t,"[[Value]]"),n=Cr(t,"[[Get]]")||Cr(t,"[[Set]]");if(e&&n)throw new wr("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(_r(this,"Property Descriptor","Desc",t),!(!Cr(t,"[[Get]]")&&!Cr(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(_r(this,"Property Descriptor","Desc",t),!(!Cr(t,"[[Value]]")&&!Cr(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(_r(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(_r(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 wr("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new wr("ToPropertyDescriptor requires an object");var i={};if(Cr(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),Cr(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),Cr(t,"value")&&(i["[[Value]]"]=t.value),Cr(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),Cr(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new v("getter must be a function");i["[[Get]]"]=s}if(Cr(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new wr("setter must be a function");i["[[Set]]"]=e}if((Cr(i,"[[Get]]")||Cr(i,"[[Set]]"))&&(Cr(i,"[[Value]]")||Cr(i,"[[Writable]]")))throw new wr("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},Pr=Mn.call(Function.call,String.prototype.replace),Ar=/^[\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]+/,Ir=/[\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]+$/,Er=function(){var t=Mr.ToString(Mr.CheckObjectCoercible(this));return Pr(Pr(t,Ar,""),Ir,"")},Dr=Er,Nr=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:Dr},Fr=qn,Br=Nr,$r=qn,Rr=Er,Or=Nr,Vr=function(){var t=Br();return Fr(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},Ur=Mn.call(Function.call,Or());$r(Ur,{getPolyfill:Or,implementation:Rr,shim:Vr});var Lr=Ur,Hr=dr,zr=g.prototype.toString,Wr=g.prototype.hasOwnProperty,qr=Lr,Gr=function(t,i,s){if(!Hr(i))throw new v("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===zr.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)Wr.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)Wr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Xr=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)Jr.call(s,e)&&(t[e]=s[e])}return t},Jr=g.prototype.hasOwnProperty;var Qr=cn.exports,Yr=ln,Kr=function(t){if(!t)return{};var i={};return Gr(qr(t).split("\n"),(function(t){var s=t.indexOf(":"),e=qr(t.slice(0,s)).toLowerCase(),n=qr(t.slice(s+1));void 0===i[e]?i[e]=n:!function(t){return"[object Array]"===g.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},Zr=Xr,th=sh;function ih(t,i,s){var e=t;return Yr(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=Zr(i,{uri:t}),e.callback=s,e}function sh(t,i,s){return eh(i=ih(t,i,s))}function eh(t){if(void 0===t.callback)throw new d("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),b)try{t=JSON.parse(t)}catch(t){}return t}var n={body:void 0,headers:{},statusCode:0,method:p,url:v,rawRequest:l};function r(t){return c(f),t instanceof d||(t=new d(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;c(f),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:p,headers:{},url:v,rawRequest:l},l.getAllResponseHeaders&&(r.headers=Kr(l.getAllResponseHeaders()))):h=new d("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,l=t.xhr||null;l||(l=t.cors||t.useXDR?new sh.XDomainRequest:new sh.XMLHttpRequest);var f,v=l.url=t.uri||t.url,p=l.method=t.method||"GET",m=t.body||t.data||null,g=l.headers=t.headers||{},y=!!t.sync,b=!1;if("json"in t&&(b=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),m=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(p,v,!y,t.username,t.password),y||(l.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(f=u((function(){a=!0,l.abort("timeout");var t=new d("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}),t.timeout)),l.setRequestHeader)for(o in g)g.hasOwnProperty(o)&&l.setRequestHeader(o,g[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new d("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(m),l}sh.XMLHttpRequest=Qr.XMLHttpRequest||function(){},sh.XDomainRequest="withCredentials"in new sh.XMLHttpRequest?sh.XMLHttpRequest:Qr.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){sh["delete"===t?"del":t]=function(i,s,e){return(s=ih(i,s,e)).method=t.toUpperCase(),eh(s)}}));var nh=function(t,i){var s=new Zi.WebVTT.Parser(Zi,Zi.vttjs,Zi.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&&(Zi.console&&Zi.console.groupCollapsed&&Zi.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach((function(t){return fs.error(t)})),Zi.console&&Zi.console.groupEnd&&Zi.console.groupEnd()),s.flush()},rh=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new d("A tech was not provided.");var n=Ee(s,{kind:rn[s.kind]||"subtitles",language:s.language||s.srclang||""}),r=hn[n.mode]||"disabled",h=n.default;"metadata"!==n.kind&&"chapters"!==n.kind||(r="hidden");var o=e=t.call(this,n)||this;if(o.H=n.tech,ae)for(var a in i.prototype)"constructor"!==a&&(o[a]=i.prototype[a]);o.L=[],o.W=[];var u=new sn(o.L),c=new sn(o.W),l=!1,f=Ae(o,(function(){this.activeCues,l&&(this.trigger("cuechange"),l=!1)}));return"disabled"!==r&&o.H.ready((function(){o.H.on("timeupdate",f)}),!0),g.defineProperty(o,"default",{get:function(){return h},set:function(){}}),g.defineProperty(o,"mode",{get:function(){return r},set:function(t){var i=this;hn[t]&&("showing"===(r=t)&&this.H.ready((function(){i.H.on("timeupdate",f)}),!0),this.trigger("modechange"))}}),g.defineProperty(o,"cues",{get:function(){return this.q?u:null},set:function(){}}),g.defineProperty(o,"activeCues",{get:function(){if(!this.q)return null;if(0===this.cues.length)return c;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(l=!1,i.length!==this.W.length)l=!0;else for(var r=0;r<i.length;r++)-1===this.W.indexOf(i[r])&&(l=!0);return this.W=i,c.V(this.W),c},set:function(){}}),n.src?(o.src=n.src,function(t,i){var s={uri:t},e=un(t);e&&(s.cors=e),th(s,Ae(this,(function(t,s,e){if(t)return fs.error(t,s);if(i.q=!0,"function"!=typeof Zi.WebVTT){if(i.H){var n=function(){return nh(e,i)};i.H.on("vttjsloaded",n),i.H.on("vttjserror",(function(){fs.error("vttjs failed to load, stopping trying to process "+i.src),i.H.off("vttjsloaded",n)}))}}else nh(e,i)})))}(n.src,o)):o.q=!0,o||Fe(e)}y(i,t);var s=i.prototype;return s.addCue=function(t){var i=t;if(Zi.vttjs&&!(t instanceof Zi.vttjs.VTTCue)){for(var s in i=new Zi.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.V(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.V(this.L);break}}},i}(on);rh.prototype.P={cuechange:"cuechange"};var hh=function(t){function i(s){var e,n;void 0===s&&(s={});var r=Fe(e=t.call(this)||this);if(ae)for(var h in r=ts.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new rh(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,g.defineProperty(r,"readyState",{get:function(){return n}}),g.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),ae?r||Fe(e):e}return y(i,t),i}(Ne);hh.prototype.P={load:"load"},hh.NONE=0,hh.LOADING=1,hh.LOADED=2,hh.ERROR=3;var oh,ah=function(){function t(i){void 0===i&&(i=[]);var s=this;if(ae)for(var e in s=ts.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.X=[],g.defineProperty(s,"length",{get:function(){return this.X.length}});for(var n=0,r=i.length;n<r;n++)s.J(i[n]);if(ae)return s}var i=t.prototype;return i.J=function(t){var i=this.X.length;""+i in this||g.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}(),uh=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=Fe(n),ae))for(var r in e=ts.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.Z=[],g.defineProperty(e,"length",{get:function(){return this.Z.length}});for(var h=0;h<s.length;h++)e.tt(s[h]);return e||Fe(n)}y(i,t);var s=i.prototype;return s.tt=function(t){var i=this.Z.length;""+i in this||g.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}(Ne);for(oh in uh.prototype.P={change:"change",addtrack:"addtrack",removetrack:"removetrack"},uh.prototype.P)uh.prototype["on"+oh]=null;var ch=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),ae){for(var r in n=ts.createElement("custom"),uh.prototype)"constructor"!==r&&(n[r]=uh.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||Fe(e)}return y(i,t),i.prototype.tt=function(i){t.prototype.tt.call(this,i),i.addEventListener("modechange",Ae(this,(function(){this.trigger("change")})))},i}(uh),lh=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},fh=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){lh(s,s[r]);break}if(ae){for(var h in n=ts.createElement("custom"),uh.prototype)"constructor"!==h&&(n[h]=uh.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,g.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||Fe(e)}y(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.selected&&lh(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.st||(s.st=!0,lh(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}(uh),dh=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},vh=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){dh(s,s[r]);break}if(ae){for(var h in n=ts.createElement("custom"),uh.prototype)"constructor"!==h&&(n[h]=uh.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||Fe(e)}y(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&dh(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.st||(s.st=!0,dh(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}(uh),ph=void 0;var mh=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 ch,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}y(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(Ae(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 Oe(0,0)},s.bufferedPercent=function(){return Ve(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 Xe(t),this.trigger("error")),this.lt},s.played=function(){return this.et?Oe(0,0):Oe()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=Ae(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",Ae(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.ft=function(){var t=this;if(!Zi.WebVTT)if(ts.body.contains(this.el())){if(!this.h["vtt.js"]&&cs(ph)&&g.keys(ph).length>0)return void this.trigger("vttjsloaded");var i=ts.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})),Zi.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.ft)},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.ft();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 fh,this.rt},s.audioTracks=function(){return this.ht=this.ht||new vh,this.ht},s.textTracks=function(){return this.nt=this.nt||new ch,this.nt},s.remoteTextTracks=function(){return this.dt=this.dt||new ch,this.dt},s.remoteTextTrackEls=function(){return this.vt=this.vt||new ah,this.vt},s.addTextTrack=function(t,i,s){if(!t)throw new d("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 rh(n);return r.tt(h),h}(this,t,i,s)},s.createRemoteTextTrack=function(t){var i=Ee(t,{tech:this});return new hh(i)},s.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(fs.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 d("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]:Zi&&Zi.videojs&&Zi.videojs[t]?(fs.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),Zi.videojs[t]):void 0},i}(De);mh.prototype.nt,mh.prototype.ht,mh.prototype.rt,mh.prototype.featuresVolumeControl=!0,mh.prototype.featuresFullscreenResize=!1,mh.prototype.featuresPlaybackRate=!1,mh.prototype.featuresProgressEvents=!1,mh.prototype.featuresTimeupdateEvents=!1,mh.prototype.featuresNativeTextTracks=!1,mh.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:fs.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.wt),this.off(this.v,"loadstart",t.prototype.kt),this.one(this.v,"loadstart",t.prototype.wt)),this.yt=s.handleSource(i,this,this.h),this.on("dispose",this.disposeSourceHandler),this},t.prototype.wt=function(){this.one(this.v,"loadstart",t.prototype.kt)},t.prototype.kt=function(){this.disposeSourceHandler(),this.one(this.v,"loadstart",t.prototype.kt)},t.prototype.disposeSourceHandler=function(){this.bt&&(this.clearTracks(["audio","video"]),this.bt=null),this.cleanupAutoTextTracks(),this.yt&&(this.off(this.v,"loadstart",t.prototype.wt),this.off(this.v,"loadstart",t.prototype.kt),this.yt.dispose&&this.yt.dispose(),this.yt=null)}},De.registerComponent("Tech",mh),De.registerComponent("MediaTechController",mh),mh.registerTech("Tech",mh);var gh=function(t){function i(i,s,e){var n;if(n=t.call(this,i,s,e)||this,s.playerOptions.sources&&0!==s.playerOptions.sources.length)i.src(s.playerOptions.sources);else for(var r=0,h=s.playerOptions.techOrder;r<h.length;r++){var o=Ie(h[r]),a=mh.getTech(o);if(o||(a=De.getComponent(o)),a&&a.isSupported()){i._t(o);break}}return n}return y(i,t),i}(De);De.registerComponent("MediaLoader",gh);var yh=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}y(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=as({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&fs.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=as({role:"button","aria-live":"polite"},e),this.jt=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.xt=_s("span",{className:"vjs-control-text"}),t&&t.appendChild(this.xt),this.controlText(this.St,t),this.xt},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.xt.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.jt&&this.v.setAttribute("tabIndex",this.jt),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.jt&&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){we(ts,"keydown",Ae(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){ke(ts,"keydown",Ae(this,this.handleKeyPress))},i}(De);De.registerComponent("ClickableComponent",yh);var bh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",Ae(Fe(e),e.update)),e}y(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=_s("div",{className:"vjs-poster",tabIndex:-1});return de||(this.Tt=_s("img"),t.appendChild(this.Tt)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.Tt)this.Tt.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}(yh);De.registerComponent("PosterImage",bh);var wh="#222",kh={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 _h(t,i){return"rgba("+k(t[1]+t[1],16)+","+k(t[2]+t[2],16)+","+k(t[3]+t[3],16)+","+i+")"}function jh(t,i,s){try{t.style[i]=s}catch(t){return}}var xh=function(t){function i(i,s,e){var n;return n=t.call(this,i,s,e)||this,i.on("loadstart",Ae(Fe(n),n.toggleDisplay)),i.on("texttrackchange",Ae(Fe(n),n.updateDisplay)),i.ready(Ae(Fe(n),(function(){if(i.H&&i.H.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",Ae(this,this.updateDisplay));for(var t=this.h.playerOptions.tracks||[],s=0;s<t.length;s++)this.t.addRemoteTextTrack(t[s],!0);var e,n,r={captions:1,subtitles:1},h=this.t.textTracks();if(h){for(var o=0;o<h.length;o++){var a=h[o];a.default&&("descriptions"!==a.kind||e?a.kind in r&&!n&&(n=a):e=a)}n?n.mode="showing":e&&(e.mode="showing")}}}))),n}y(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 Zi.WebVTT&&Zi.WebVTT.processCues(Zi,[],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 Zi.WebVTT&&t.activeCues){for(var i=this.t.textTrackSettings.getValues(),s=[],e=0;e<t.activeCues.length;e++)s.push(t.activeCues[e]);Zi.WebVTT.processCues(Zi,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&&jh(h.firstChild,"color",_h(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(h.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&jh(h.firstChild,"backgroundColor",_h(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?jh(h,"backgroundColor",_h(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 "+wh:"raised"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+wh:"depressed"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+wh:"uniform"===i.edgeStyle&&(h.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+wh)),i.fontPercent&&1!==i.fontPercent){var o=Zi.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=kh[i.fontFamily])}}}},i}(De);De.registerComponent("TextTrackDisplay",xh);var Sh=function(t){function i(){return t.apply(this,arguments)||this}return y(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(De);De.registerComponent("LoadingSpinner",Sh);var Th=function(t){function i(){return t.apply(this,arguments)||this}y(i,t);var s=i.prototype;return s.createEl=function(t,i,s){void 0===t&&(t="button"),void 0===i&&(i={}),void 0===s&&(s={}),i=as({className:this.buildCSSClass()},i),"button"!==t&&(fs.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),i=as({tabIndex:0},i),s=as({role:"button"},s)),s=as({type:"button","aria-live":"polite"},s);var e=De.prototype.createEl.call(this,t,i,s);return this.createControlTextEl(e),e},s.addChild=function(t,i){void 0===i&&(i={});var s=this.constructor.name;return fs.warn("Adding an actionable (user controllable) child to a Button ("+s+") is not supported; use a ClickableComponent instead."),De.prototype.addChild.call(this,t,i)},s.enable=function(){t.prototype.enable.call(this),this.v.removeAttribute("disabled")},s.disable=function(){t.prototype.disable.call(this),this.v.setAttribute("disabled","disabled")},s.handleKeyPress=function(i){32!==i.which&&13!==i.which&&t.prototype.handleKeyPress.call(this,i)},i}(yh);De.registerComponent("Button",Th);var Ch=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Ct=!1,e.on("mousedown",e.handleMouseDown),e}y(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this;if(this.Ct&&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.Ct=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Ct=!0},i}(Th);Ch.prototype.St="Play Video",De.registerComponent("BigPlayButton",Ch);var Mh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}y(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}(Th);De.registerComponent("CloseButton",Mh);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}y(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}(Th);function Ah(t,i){void 0===i&&(i=t),t=t<0?0:t;var s=w.floor(t%60),e=w.floor(t/60%60),n=w.floor(t/3600),r=w.floor(i/60%60),h=w.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",De.registerComponent("PlayToggle",Ph);var Ih=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}y(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=_s("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=Ah(i,this.t.duration());e!==this.Mt&&(this.Mt=e,this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(De);De.registerComponent("CurrentTimeDisplay",Ih);var Eh=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}y(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=_s("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=Ah(i);this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(De);De.registerComponent("DurationDisplay",Eh);var Dh=function(t){function i(){return t.apply(this,arguments)||this}return y(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}(De);De.registerComponent("TimeDivider",Dh);var Nh=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}y(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=_s("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=Ah(this.t.remainingTime());s!==this.Mt&&(this.Mt=s,this.S.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(De);De.registerComponent("RemainingTimeDisplay",Nh);var Fh=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}y(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=_s("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.xt=_s("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.Pt=ts.createTextNode(this.localize("LIVE")),this.S.appendChild(this.xt),this.S.appendChild(this.Pt),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.xt.innerHTML=this.localize("Stream Type"),this.Pt.innerHTML=this.localize("LIVE")},i}(De);De.registerComponent("LiveDisplay",Fh);var Bh=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}y(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=as({tabIndex:0},s),e=as({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(),ts.body.focus(),ts.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;ts.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=Os(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.At||!1:(this.At=!!t,this.At?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(De);function $h(t,i){if(!t||!i)return"";if("function"==typeof Zi.getComputedStyle){var s=Zi.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}De.registerComponent("Slider",Bh);var Rh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).It=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}y(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Et=_s("span",{innerHTML:this.localize("Loaded")}),this.Dt=ts.createTextNode(": 0%"),this.xt=_s("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Et),this.xt.appendChild(this.Dt),i.appendChild(this.xt),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.It,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(_s()),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.Et.innerHTML=this.localize("Loaded")},i}(De);De.registerComponent("LoadProgressBar",Rh);var Oh=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(Ae(Fe(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}y(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.Nt=_s("span",{innerHTML:this.localize("Progress")}),this.Ft=ts.createTextNode(": 0%"),this.xt=_s("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Nt),this.xt.appendChild(this.Ft),i.appendChild(this.xt),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",Ah(i,this.t.duration()))},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Progress")},i}(De);De.registerComponent("PlayProgressBar",Oh);var Vh=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(Ae(Fe(e),e.updateDataAttr)),e}y(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=_s("div",{className:"vjs-time-tooltip"}),this.Nt=_s("span",{innerHTML:this.localize("Progress")}),this.Ft=ts.createTextNode(": 0%"),this.xt=_s("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Nt),this.xt.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.xt),i},s.updateDataAttr=function(t){var i=Ah(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.Nt.innerHTML=this.localize("Progress")},i}(De);De.registerComponent("TooltipProgressBar",Vh);var Uh=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(Ae(Fe(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}y(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=_($h(this.player().el(),"width")),s=_($h(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=w.floor(i-s/2)+"px",e.minWidth=w.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",Ah(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}(Bh);Uh.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},Uh.prototype.playerEvent="timeupdate",De.registerComponent("SeekBar",Uh);var Lh=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=_s("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)}}(Ae(Fe(e),e.handleMouseMove),25))})),e}y(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-Rs(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=Ah(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Bt(i)+1,n=_($h(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return Os(this.el().parentNode,t).x},s.Bt=function(t){if(!this.keepTooltipsInside)return t;var i=_($h(this.player().el(),"width")),s=_($h(this.tooltip,"width"))/2,e=t;return t<s?e=w.ceil(s):t>i-s&&(e=w.floor(i-s)),e},i}(De);De.registerComponent("MouseTimeDisplay",Lh);var Hh=function(t){function i(){return t.apply(this,arguments)||this}return y(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(De);Hh.prototype.h={children:["seekBar"]},De.registerComponent("ProgressControl",Hh);var zh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}y(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}(Th);zh.prototype.St="Fullscreen",De.registerComponent("FullscreenToggle",zh);var Wh=function(t){function i(){return t.apply(this,arguments)||this}return y(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}(De);De.registerComponent("VolumeLevel",Wh);var qh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(Ae(Fe(e),e.updateARIAAttributes)),e}y(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}(Bh);qh.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},qh.prototype.playerEvent="volumechange",De.registerComponent("VolumeBar",qh);var Gh=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 y(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(De);Gh.prototype.h={children:["volumeBar"]},De.registerComponent("VolumeControl",Gh);var Xh=function(t){function i(){return t.apply(this,arguments)||this}y(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",Ae(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=_s(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),we(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(De);De.registerComponent("Popup",Xh);var Jh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}y(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}(yh);De.registerComponent("PopupButton",Jh);var Qh=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}y(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++)Es(this.v,"vjs-vol-"+n);Is(this.v,"vjs-vol-"+s)},i}(Th);Qh.prototype.St="Mute",De.registerComponent("MuteToggle",Qh);var Yh=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(Fe(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}y(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 Xh(this.t,{contentElType:"div"}),i=new qh(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Qh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],Ae(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],Ae(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],Ae(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Jh);Yh.prototype.volumeUpdate=Qh.prototype.update,Yh.prototype.St="Mute",De.registerComponent("VolumeMenuButton",Yh);var Kh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}y(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",Ae(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=_s(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),we(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}(De);De.registerComponent("Menu",Kh);var Zh=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}y(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.Ot=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Vt?this.hide():this.show()},s.createMenu=function(){var t=new Kh(this.t);if(this.Vt=0,this.h.title){var i=_s("li",{className:"vjs-menu-title",innerHTML:Ie(this.h.title),tabIndex:-1});this.Vt+=1,t.m.unshift(i),xs(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",Ae(this,(function(t){this.unpressButton(),this.v.blur()}))),this.Ot?this.unpressButton():this.pressButton()},s.handleKeyPress=function(i){27===i.which||9===i.which?(this.Ot&&this.unpressButton(),9!==i.which&&i.preventDefault()):38===i.which||40===i.which?this.Ot||(this.pressButton(),i.preventDefault()):t.prototype.handleKeyPress.call(this,i)},s.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.Ot&&this.unpressButton(),9!==t.which&&t.preventDefault())},s.pressButton=function(){this.Rt&&(this.Ot=!0,this.menu.lockShowing(),this.v.setAttribute("aria-expanded","true"),this.menu.focus())},s.unpressButton=function(){this.Rt&&(this.Ot=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.v.focus())},s.disable=function(){return this.Ot=!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}(yh);De.registerComponent("MenuButton",Zh);var to=function(t){function i(i,s){var e,n=s.tracks;if((e=t.call(this,i,s)||this).items.length<=1&&e.hide(),!n)return Fe(e);var r=Ae(Fe(e),e.update);return n.addEventListener("removetrack",r),n.addEventListener("addtrack",r),e.t.on("dispose",(function(){n.removeEventListener("removetrack",r),n.removeEventListener("addtrack",r)})),e}return y(i,t),i}(Zh);De.registerComponent("TrackButton",to);var io=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}y(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",as({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Ut=ts.createTextNode(this.localize(this.h.label)),n.appendChild(this.Ut),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.Ut.innerHTML=this.localize(this.h.label)},i}(yh);De.registerComponent("MenuItem",io);var so=function(t){function i(i,s){var e,n,r=s.track,h=i.textTracks();if(s.label=r.label||r.language||"Unknown",s.selected=r.default||"showing"===r.mode,(e=t.call(this,i,s)||this).track=r,h){var o=Ae(Fe(e),e.handleTracksChange);i.on(["loadstart","texttrackchange"],o),h.addEventListener("change",o),e.on("dispose",(function(){h.removeEventListener("change",o)}))}h&&void 0===h.onchange&&e.on(["tap","click"],(function(){if("object"!=typeof Zi.Event)try{n=new Zi.Event("change")}catch(t){}n||(n=ts.createEvent("Event")).initEvent("change",!0,!0),h.dispatchEvent(n)}));return e}y(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}(io);De.registerComponent("TextTrackMenuItem",so);var eo=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 y(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}(so);De.registerComponent("OffTextTrackMenuItem",eo);var no=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return y(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new eo(this.t,{kind:this.Lt})),this.Vt+=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 so(this.t,{track:e,selectable:!0}))}return t},i}(to);De.registerComponent("TextTrackButton",no);var ro=function(t){function i(i,s){var e,n=s.track,r=s.cue,h=i.currentTime();return s.selectable=!0,s.label=r.text,s.selected=r.startTime<=h&&h<r.endTime,(e=t.call(this,i,s)||this).track=n,e.cue=r,n.addEventListener("cuechange",Ae(Fe(e),e.update)),e}y(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}(io);De.registerComponent("ChaptersTrackMenuItem",ro);var ho=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}y(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(Ie(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 ro(this.t,{track:this.Ht,cue:n});t.push(r)}return t},i}(no);ho.prototype.Lt="chapters",ho.prototype.St="Chapters",De.registerComponent("ChaptersButton",ho);var oo=function(t){function i(i,s,e){var n;(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Descriptions Menu");var r=i.textTracks();if(r){var h=Ae(Fe(n),n.handleTracksChange);r.addEventListener("change",h),n.on("dispose",(function(){r.removeEventListener("change",h)}))}return n}y(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}(no);oo.prototype.Lt="descriptions",oo.prototype.St="Descriptions",De.registerComponent("DescriptionsButton",oo);var ao=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 y(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(no);ao.prototype.Lt="subtitles",ao.prototype.St="Subtitles",De.registerComponent("SubtitlesButton",ao);var uo=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 y(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").v.focus()},i}(so);De.registerComponent("CaptionSettingsMenuItem",uo);var co=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}y(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 uo(this.t,{kind:this.Lt})),this.Vt+=1),t.prototype.createItems.call(this,i)},i}(no);co.prototype.Lt="captions",co.prototype.St="Captions",De.registerComponent("CaptionsButton",co);var lo=function(t){function i(i,s){var e,n=s.track,r=i.audioTracks();if(s.label=n.label||n.language||"Unknown",s.selected=n.enabled,(e=t.call(this,i,s)||this).track=n,r){var h=Ae(Fe(e),e.handleTracksChange);r.addEventListener("change",h),e.on("dispose",(function(){r.removeEventListener("change",h)}))}return e}y(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}(io);De.registerComponent("AudioTrackMenuItem",lo);var fo=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}y(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.Vt=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 lo(this.t,{track:e,selectable:!0}))}return t},i}(to);fo.prototype.St="Audio Track",De.registerComponent("AudioTrackButton",fo);var vo=function(t){function i(i,s){var e,n=s.rate,r=_(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}y(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}(io);vo.prototype.contentElType="button",De.registerComponent("PlaybackRateMenuItem",vo);var po=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}y(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Ut=_s("div",{className:"vjs-playback-rate-value",innerHTML:1}),i.appendChild(this.Ut),i},s.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},s.createMenu=function(){var t=new Kh(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new vo(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.Ut.innerHTML=this.player().playbackRate()+"x")},i}(Zh);po.prototype.St="Playback Rate",De.registerComponent("PlaybackRateMenuButton",po);var mo=function(t){function i(){return t.apply(this,arguments)||this}y(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}(De);De.registerComponent("Spacer",mo);var go=function(t){function i(){return t.apply(this,arguments)||this}y(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}(mo);De.registerComponent("CustomControlSpacer",go);var yo=function(t){function i(){return t.apply(this,arguments)||this}return y(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(De);yo.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},De.registerComponent("ControlBar",yo);var bo=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}y(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}(tn);bo.prototype.h=Ee(tn.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),De.registerComponent("ErrorDisplay",bo);var wo="vjs-text-track-settings",ko=["#000","Black"],_o=["#00F","Blue"],jo=["#0FF","Cyan"],xo=["#0F0","Green"],So=["#F0F","Magenta"],To=["#F00","Red"],Co=["#FFF","White"],Mo=["#FF0","Yellow"],Po=["1","Opaque"],Ao=["0.5","Semi-Transparent"],Io=["0","Transparent"],Eo={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[ko,Co,To,xo,_o,Mo,So,jo]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Po,Ao,Io]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Co,ko,To,xo,_o,Mo,So,jo]},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,Ao]},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:[Io,Ao,Po]}};function Do(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}Eo.windowColor.options=Eo.backgroundColor.options;var No,Fo=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=Ae(Fe(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()})),os(Eo,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.h.persistTextTrackSettings&&e.restoreSettings(),e}y(i,t);var s=i.prototype;return s.Wt=function(t){var i=this,s=Eo[t],e=s.id.replace("%s",this.o);return[_s("label",{className:"vjs-label",textContent:s.label},{for:e}),_s("select",{id:e},void 0,s.options.map((function(t){return _s("option",{textContent:i.localize(t[1]),value:t[0]})})))]},s.qt=function(){var t=_s("legend",{textContent:this.localize("Text")}),i=this.Wt("color"),s=_s("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.Wt("textOpacity"));return _s("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Gt=function(){var t=_s("legend",{textContent:this.localize("Background")}),i=this.Wt("backgroundColor"),s=_s("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.Wt("backgroundOpacity"));return _s("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=_s("legend",{textContent:this.localize("Window")}),i=this.Wt("windowColor"),s=_s("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.Wt("windowOpacity"));return _s("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return _s("div",{className:"vjs-tracksettings-colors"},void 0,[this.qt(),this.Gt(),this.Xt()])},s.Qt=function(){var t=_s("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.Wt("fontPercent")),i=_s("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.Wt("edgeStyle")),s=_s("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.Wt("fontFamily"));return _s("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Yt=function(){var t=_s("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=_s("button",{className:"vjs-done-button",textContent:"Done"});return _s("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=_s("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=_s("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=_s("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=_s("div",void 0,{role:"document"},[i,s,t]);return _s("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),hs(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(Eo,(function(i,s,e){var n=function(t,i){return Do(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;os(Eo,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(Do(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},s.setDefaults=function(){var t=this;os(Eo,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},s.restoreSettings=function(){var t;try{t=JSON.parse(Zi.localStorage.getItem(wo))}catch(t){fs.warn(t)}t&&this.setValues(t)},s.saveSettings=function(){if(this.h.persistTextTrackSettings){var t=this.getValues();try{g.keys(t).length?Zi.localStorage.setItem(wo,JSON.stringify(t)):Zi.localStorage.removeItem(wo)}catch(t){fs.warn(t)}}},s.updateDisplay=function(){var t=this.t.getChild("textTrackDisplay");t&&t.updateDisplay()},i}(De);De.registerComponent("TextTrackSettings",Fo);var Bo,e=function(t){function i(i,s){var e;e=t.call(this,i,s)||this;var n=i.source,r=!1;if(n&&(e.v.currentSrc!==n.src||i.tag&&3===i.tag.Kt)?e.setSource(n):e.Zt(e.v),e.v.hasChildNodes()){for(var h=e.v.childNodes,o=h.length,a=[];o--;){var u=h[o];"track"===u.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().J(u),e.remoteTextTracks().tt(u.track),r||e.v.hasAttribute("crossorigin")||!un(u.src)||(r=!0)):a.push(u))}for(var c=0;c<a.length;c++)e.v.removeChild(a[c])}return["audio","video"].forEach((function(t){var i=e.el()[t+"Tracks"],s=e[t+"Tracks"](),n=Ie(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&&(r&&fs.warn(ms(No||(No=is(["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=Ae(Fe(e),e.handleTextTrackChange),e.hi=Ae(Fe(e),e.handleTextTrackAdd),e.oi=Ae(Fe(e),e.handleTextTrackRemove),e.ai()),e.ci(),(fe||Qs||ee)&&!0===i.nativeControlsForTouch&&e.setControls(!0),e.fi(),e.triggerReady(),e}y(i,t);var s=i.prototype;return s.dispose=function(){var s=this;["audio","video","text"].forEach((function(t){var i=Ie(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=ts.createElement("video");var e=Ee({},this.h.tag&&Fs(this.h.tag));fe&&!0===this.h.nativeControlsForTouch||delete e.controls,Ns(t,as(e,{id:this.h.techId,class:"vjs-tech"}))}t.playerId=this.h.playerId}void 0!==this.h.preload&&Bs(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?Bs(t,h,h):$s(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.di)}},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.di=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){fs(t,"Video is not ready. (Video.js)")}},s.duration=function(){var t=this;if(this.v.duration===1/0&&te&&he&&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.fi=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=Zi.navigator&&Zi.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=ts.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),Zi.performance&&"function"==typeof Zi.performance.now?t.creationTime=Zi.performance.now():Zi.performance&&Zi.performance.timing&&"number"==typeof Zi.performance.timing.navigationStart&&(t.creationTime=Zi.Date.now()-Zi.performance.timing.navigationStart),t},i}(mh);bs()&&(e.TEST_VID=ts.createElement("video"),(Bo=ts.createElement("track")).kind="captions",Bo.srclang="en",Bo.label="English",e.TEST_VID.appendChild(Bo)),e.isSupported=function(){try{e.TEST_VID.volume=.5}catch(t){return!1}return!(!e.TEST_VID||!e.TEST_VID.canPlayType)},e.canControlVolume=function(){try{var t=e.TEST_VID.volume;return e.TEST_VID.volume=t/2+.1,t!==e.TEST_VID.volume}catch(t){return!1}},e.canControlPlaybackRate=function(){if(te&&he&&oe<58)return!1;try{var t=e.TEST_VID.playbackRate;return e.TEST_VID.playbackRate=t/2+.1,t!==e.TEST_VID.playbackRate}catch(t){return!1}},e.supportsNativeTextTracks=function(){return le},e.supportsNativeVideoTracks=function(){return!(!e.TEST_VID||!e.TEST_VID.videoTracks)},e.supportsNativeAudioTracks=function(){return!(!e.TEST_VID||!e.TEST_VID.audioTracks)},e.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],e.prototype.featuresVolumeControl=e.canControlVolume(),e.prototype.featuresPlaybackRate=e.canControlPlaybackRate(),e.prototype.movingMediaElementInDOM=!Ks,e.prototype.featuresFullscreenResize=!0,e.prototype.featuresProgressEvents=!0,e.prototype.featuresTimeupdateEvents=!0,e.prototype.featuresNativeTextTracks=e.supportsNativeTextTracks(),e.prototype.featuresNativeVideoTracks=e.supportsNativeVideoTracks(),e.prototype.featuresNativeAudioTracks=e.supportsNativeAudioTracks();var $o=e.TEST_VID&&e.TEST_VID.constructor.prototype.canPlayType,Ro=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Oo=/^video\/mp4/i;e.patchCanPlayType=function(){ie>=4&&!ne?e.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Ro.test(t)?"maybe":$o.call(this,t)}:se&&(e.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Oo.test(t)?"maybe":$o.call(this,t)})},e.unpatchCanPlayType=function(){var t=e.TEST_VID.constructor.prototype.canPlayType;return e.TEST_VID.constructor.prototype.canPlayType=$o,t},e.patchCanPlayType(),e.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){}}()}}},e.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){e.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){e.prototype["set"+Ie(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){e.prototype[t]=function(){return this.v[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){e.prototype["set"+Ie(t)]=function(i){this.v[t]=i}})),["pause","load"].forEach((function(t){e.prototype[t]=function(){return this.v[t]()}})),mh.withSourceHandlers(e),e.nativeSourceHandler={},e.nativeSourceHandler.canPlayType=function(t){try{return e.TEST_VID.canPlayType(t)}catch(t){return""}},e.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return e.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 e.nativeSourceHandler.canPlayType("video/"+s)}return""},e.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},e.nativeSourceHandler.dispose=function(){},e.registerSourceHandler(e.nativeSourceHandler),De.registerComponent("Html5",e),mh.registerTech("Html5",e);var Vo=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],Uo=function(t){function i(s,e,n){var r;if(s.id=s.id||["vjs_video",es()].join("_"),(e=as(i.getTagSettings(s),e)).initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof s.closest){var h=s.closest("[lang]");h&&(e.language=h.getAttribute("lang"))}else for(var o=s;o&&1===o.nodeType;){if(Fs(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 d("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=s,r.tagAttributes=s&&Fs(s),r.language(r.h.language),e.languages){var a={};g.getOwnPropertyNames(e.languages).forEach((function(t){a[t.toLowerCase()]=e.languages[t]})),r.vi=a}else r.vi=i.prototype.h.languages;r.pi={},r.mi=e.poster||"",r.gi=!!e.controls,s.controls=!1,r.yi=!1,r.v=r.createEl();var u=Ee(r.h);if(e.plugins){var c=e.plugins;g.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):fs.error("Unable to find plugin:",t)}),Fe(r))}r.h.playerOptions=u,r.initChildren(),r.isAudio("audio"===s.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"),Ks||r.addClass("vjs-workinghover"),i.players[r.o]=Fe(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.wi(),r.on("fullscreenchange",r.ki),r.on("stageclick",r._i),r}y(i,t);var s=i.prototype;return s.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.ji&&this.ji.parentNode&&this.ji.parentNode.removeChild(this.ji),i.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)},s.createEl=function(){var i,s=this.tag,e=this.xi=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=Fs(s);if(g.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!==Zi.VIDEOJS_NO_DYNAMIC_STYLE){this.ji=Me("vjs-styles-dimensions");var r=zs(".vjs-styles-defaults"),h=zs("head");h.insertBefore(this.ji,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);Is(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return s.Kt=s.networkState,s.parentNode&&!e&&s.parentNode.insertBefore(i,s),xs(s,i),this.m.unshift(s),this.v=i,i},s.width=function(t){return this.dimension("width",t)},s.height=function(t){return this.dimension("height",t)},s.dimension=function(t,i){var s="width"===t?"Ti":"Ci";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=_(i);if(j(e))return fs.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Mi(),this},s.fluid=function(t){if(void 0===t)return!!this.Pi;this.Pi=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Mi()},s.aspectRatio=function(t){if(void 0===t)return this.Ai;if(!/^\d+\:\d+$/.test(t))throw new d("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Ai=t,this.fluid(!0),this.Mi()},s.Mi=function(){if(!0!==Zi.VIDEOJS_NO_DYNAMIC_STYLE){var t,i,s,e=(void 0!==this.Ai&&"auto"!==this.Ai?this.Ai:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.Ti?this.Ti:void 0!==this.Ci?this.Ci/n:this.videoWidth()||300,i=void 0!==this.Ci?this.Ci:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),Pe(this.ji,"\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.Ti?this.Ti:this.h.width,h="number"==typeof this.Ci?this.Ci:this.h.height,o=this.H&&this.H.el();o&&(r>=0&&(o.width=r),h>=0&&(o.height=h))}},s._t=function(t,i){var s=this;this.H&&this.Ii(),"Html5"!==t&&this.tag&&(mh.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Ei=t,this.T=!1;var e=as({source:i,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Di",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.xi||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(e.tag=this.tag),i&&(this.Ni=i.type,i.src===this.pi.src&&this.pi.currentTime>0&&(e.startTime=this.pi.currentTime),this.pi.sources=null,this.pi.source=i,this.pi.src=i.src);var n=mh.getTech(t);n||(n=De.getComponent(t)),this.H=new n(e),this.H.ready(Ae(this,this.Fi),!0),Ke(this.Bi||[],this.H),Vo.forEach((function(t){s.on(s.H,t,s["handleTech"+Ie(t)+"_"])})),this.on(this.H,"loadstart",this.$i),this.on(this.H,"waiting",this.Ri),this.on(this.H,"canplay",this.Oi),this.on(this.H,"canplaythrough",this.Vi),this.on(this.H,"playing",this.Ui),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.Wi),this.on(this.H,"firstplay",this.qi),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||xs(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},s.Ii=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.Bi=Ye(this.H),this.T=!1,this.H.dispose(),this.H=!1},s.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 Zi.alert(i),new d(i)},s.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)},s.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)},s.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){fs("deleting tag.poster throws in some browsers",t)}this.play()}},s.$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"))},s.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},s.Wi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},s.Ri=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},s.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},s.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},s.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},s.Hi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},s.zi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},s.qi=function(){this.h.starttime&&(fs.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")},s.Gi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},s.Li=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},s.Xi=function(){this.duration(this.Zi("duration"))},s.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()))},s.os=function(){this.userActive(!this.userActive())},s.ns=function(){this.userWasActive=this.userActive()},s.rs=function(){this.userWasActive&&this.reportUserActivity()},s.hs=function(t){t.cancelable&&t.preventDefault()},s.ki=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},s._i=function(){this.reportUserActivity()},s.Ji=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},s.Qi=function(){var t=this.H.error();this.error(t)},s.Ki=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},s.getCache=function(){return this.pi},s.us=function(t,i){if(this.H&&!this.H.T)this.H.ready((function(){this[t](i)}),!0);else try{this.H&&this.H[t](i)}catch(t){throw fs(t),t}},s.Zi=function(t){if(this.H&&this.H.T)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?fs("Video.js: "+t+" method not defined for "+this.Ei+" playback technology.",i):"TypeError"===i.name?(fs("Video.js: "+t+" unavailable on "+this.Ei+" playback technology element.",i),this.H.T=!1):fs(i),i}},s.play=function(){return this.src()||this.currentSrc()?this.us("play"):this.H.one("loadstart",(function(){this.play()})),this},s.pause=function(){return this.us("pause"),this},s.paused=function(){return!1!==this.Zi("paused")},s.scrubbing=function(t){return void 0!==t?(this.yi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.yi},s.currentTime=function(t){return void 0!==t?(this.us("setCurrentTime",t),this):(this.pi.currentTime=this.Zi("currentTime")||0,this.pi.currentTime)},s.duration=function(t){return void 0===t?void 0!==this.pi.duration?this.pi.duration:NaN:((t=_(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)},s.remainingTime=function(){return this.duration()-this.currentTime()},s.buffered=function(){var t=this.Zi("buffered");return t&&t.length||(t=Oe(0,0)),t},s.bufferedPercent=function(){return Ve(this.buffered(),this.duration())},s.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},s.volume=function(t){var i;return void 0!==t?(i=w.max(0,w.min(1,_(t))),this.pi.volume=i,this.us("setVolume",i),this):(i=_(this.Zi("volume")),j(i)?1:i)},s.muted=function(t){return void 0!==t?(this.us("setMuted",t),this):this.Zi("muted")||!1},s.supportsFullScreen=function(){return this.Zi("supportsFullScreen")||!1},s.isFullscreen=function(t){return void 0!==t?(this.cs=!!t,this):!!this.cs},s.requestFullscreen=function(t){var i,s=We;return this.isFullscreen(!0),s.requestFullscreen?(we(ts,s.fullscreenchange,Ae(this,(function t(i){this.isFullscreen(ts[s.fullscreenElement]),!1===this.isFullscreen()&&ke(ts,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},s.exitFullscreen=function(){var t=We;return this.isFullscreen(!1),t.requestFullscreen?ts[t.exitFullscreen]():this.H.supportsFullScreen()?this.us("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},s.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=ts.documentElement.style.overflow,we(ts,"keydown",Ae(this,this.fullWindowOnEscKey)),ts.documentElement.style.overflow="hidden",Is(ts.body,"vjs-full-window"),this.trigger("enterFullWindow")},s.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},s.exitFullWindow=function(){this.isFullWindow=!1,ke(ts,"keydown",this.fullWindowOnEscKey),ts.documentElement.style.overflow=this.docOrigOverflow,Es(ts.body,"vjs-full-window"),this.trigger("exitFullWindow")},s.canPlayType=function(t){for(var i,s=0,e=this.h.techOrder;s<e.length;s++){var n=Ie(e[s]),r=mh.getTech(n);if(r||(r=De.getComponent(n)),r){if(r.isSupported()&&(i=r.canPlayType(t)))return i}else fs.error('The "'+n+'" tech is undefined. Skipped browser support check for that tech.')}return""},s.selectSource=function(t){var i,s=this,e=this.h.techOrder.map(Ie).map((function(t){return[t,mh.getTech(t)||De.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(fs.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),n=function(t,i,s){var e;return t.some((function(t){return i.some((function(i){if(e=s(t,i))return!0}))})),e},r=function(t,i){var e=t[0];if(t[1].canPlaySource(i,s.h[e.toLowerCase()]))return{source:i,tech:e}};return(this.h.sourceOrder?n(t,e,(i=r,function(t,s){return i(s,t)})):n(e,t,r))||!1},s.src=function(t){if(void 0===t)return this.Zi("src");var i=mh.getTech(this.Ei);return i||(i=De.getComponent(this.Ei)),Array.isArray(t)?this.ls(t):"string"==typeof t?this.src({src:t}):t instanceof g&&(t.type&&!i.canPlaySource(t,this.h[this.Ei.toLowerCase()])?this.ls([t]):(this.pi.sources=null,this.pi.source=t,this.pi.src=t.src,this.Ni=t.type||"",this.ready((function(){i.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},s.ls=function(t){var i=this.selectSource(t);i?(i.tech===this.Ei?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())},s.load=function(){return this.us("load"),this},s.reset=function(){return this._t(Ie(this.h.techOrder[0]),null),this.us("reset"),this},s.currentSources=function(){var t=this.currentSource(),i=[];return 0!==g.keys(t).length&&i.push(t),this.pi.sources||i},s.currentSource=function(){var t={},i=this.currentSrc();return i&&(t.src=i),this.pi.source||t},s.currentSrc=function(){return this.Zi("currentSrc")||this.pi.src||""},s.currentType=function(){return this.Ni||""},s.preload=function(t){return void 0!==t?(this.us("setPreload",t),this.h.preload=t,this):this.Zi("preload")},s.autoplay=function(t){return void 0!==t?(this.us("setAutoplay",t),this.h.autoplay=t,this):this.Zi("autoplay",t)},s.playsinline=function(t){return void 0!==t?(this.us("setPlaysinline",t),this.h.playsinline=t,this):this.Zi("playsinline")},s.loop=function(t){return void 0!==t?(this.us("setLoop",t),this.h.loop=t,this):this.Zi("loop")},s.poster=function(t){return void 0===t?this.mi:(t||(t=""),this.mi=t,this.us("setPoster",t),this.trigger("posterchange"),this)},s.Yi=function(){!this.mi&&this.H&&this.H.poster&&(this.mi=this.H.poster()||"",this.trigger("posterchange"))},s.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},s.usingNativeControls=function(t){return void 0!==t?(t=!!t,this.fs!==t&&(this.fs=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.fs},s.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 Xe(t),this.addClass("vjs-error"),fs.error("(CODE:"+this.lt.code+" "+Xe.errorTypes[this.lt.code]+")",this.lt.message,this.lt),this.trigger("error"),this)},s.reportUserActivity=function(t){this.ds=!0},s.userActive=function(t){return void 0!==t?((t=!!t)!==this.vs&&(this.vs=t,t?(this.ds=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.ds=!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},s.wi=function(){var t,i,s,e,n=Ae(this,this.reportUserActivity);this.on("mousedown",(function(){n(),this.clearInterval(t),t=this.setInterval(n,250)})),this.on("mousemove",(function(t){t.screenX===i&&t.screenY===s||(i=t.screenX,s=t.screenY,n())})),this.on("mouseup",(function(i){n(),this.clearInterval(t)})),this.on("keydown",n),this.on("keyup",n),this.setInterval((function(){if(this.ds){this.ds=!1,this.userActive(!0),this.clearTimeout(e);var t=this.h.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.ds||this.userActive(!1)}),t))}}),250)},s.playbackRate=function(t){return void 0!==t?(this.us("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.Zi("playbackRate"):1},s.isAudio=function(t){return void 0!==t?(this.ps=!!t,this):!!this.ps},s.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new fh,this.rt)},s.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new vh,this.ht)},s.textTracks=function(){if(this.H)return this.H.textTracks()},s.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},s.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},s.addTextTrack=function(t,i,s){if(this.H)return this.H.addTextTrack(t,i,s)},s.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},s.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)},s.getVideoPlaybackQuality=function(){return this.Zi("getVideoPlaybackQuality")},s.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},s.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},s.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)},s.languages=function(){return Ee(i.prototype.h.languages,this.vi)},s.toJSON=function(){var t=Ee(this.h),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=Ee(e)).player=void 0,t.tracks[s]=e}return t},s.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new tn(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},i.getTagSettings=function(t){var i={sources:[],tracks:[]},s=Fs(t),e=s["data-setup"];if(As(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=Je(e||"{}"),r=n[0],h=n[1];r&&fs.error(r),as(s,h)}if(as(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(Fs(c)):"track"===l&&i.tracks.push(Fs(c))}return i},s.bi=function(){var t=ts.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},i}(De);Uo.players={};var Lo=Zi.navigator;Uo.prototype.h={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:Lo&&(Lo.languages&&Lo.languages[0]||Lo.userLanguage||Lo.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreenOptions:{navigationUI:"hide"}},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Uo.prototype[t]=function(){return this.Zi(t)}})),Vo.forEach((function(t){Uo.prototype["handleTech"+Ie(t)+"_"]=function(){return this.trigger(t)}})),De.registerComponent("Player",Uo);var Ho,zo,Wo=function(t){function i(s){var e;void 0===s&&(s={});var n=Ee(s,{kind:nn[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(ae)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return g.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.q=!0,r||Fe(e)}return y(i,t),i}(on),qo=function(t){function i(s){var e;void 0===s&&(s={});var n=Ee(s,{kind:en[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(ae)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return g.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||Fe(e)}return y(i,t),i}(on);function Go(t,i,s){var e;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),Go.getPlayers()[t])return i&&fs.warn('Player "'+t+'" is already initialised. Options will not be applied.'),s&&Go.getPlayers()[t].ready(s),Go.getPlayers()[t];e=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),ts.getElementById(t)}(t)}else e=t;if(!e||!e.nodeName)throw new v("The element or ID supplied is not valid. (videojs)");if(e.player||Uo.players[e.playerId])return e.player||Uo.players[e.playerId];i=i||{},Go.hooks("beforesetup").forEach((function(t){var s=t(e,Ee(i));us(s)&&!Array.isArray(s)?i=Ee(i,s):fs.error("please return an object in beforesetup hooks")}));var n=new(De.getComponent("Player"))(e,i,s);return Go.hooks("setup").forEach((function(t){return t(n)})),n}"undefined"==typeof HTMLVideoElement&&bs()&&(ts.createElement("video"),ts.createElement("audio"),ts.createElement("track")),Go.ys={},Go.hooks=function(t,i){return Go.ys[t]=Go.ys[t]||[],i&&(Go.ys[t]=Go.ys[t].concat(i)),Go.ys[t]},Go.hook=function(t,i){Go.hooks(t,i)},Go.removeHook=function(t,i){var s=Go.hooks(t).indexOf(i);return!(s<=-1)&&(Go.ys[t]=Go.ys[t].slice(),Go.ys[t].splice(s,1),!0)},!0!==Zi.VIDEOJS_NO_DYNAMIC_STYLE&&bs()&&((Ho=zs(".vjs-styles-defaults"))||(Ho=Me("vjs-styles-defaults"),(zo=zs("head"))&&zo.insertBefore(Ho,zo.firstChild),Pe(Ho,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),Ce(1,Go),Go.VERSION="5.20.6-opentelly.14",Go.options=Uo.prototype.h,Go.getPlayers=function(){return Uo.players},Go.players=Uo.players,Go.getComponent=De.getComponent,Go.registerComponent=function(t,i){mh.isTech(i)&&fs.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),De.registerComponent.call(De,t,i)},Go.getTech=mh.getTech,Go.registerTech=mh.registerTech,Go.browser=ve,Go.TOUCH_ENABLED=fe,Go.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in us(i)?("function"==typeof i.init&&(fs.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==g.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new v("Super expression must either be null or a function, not "+typeof i);t.prototype=g.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},Go.mergeOptions=Ee,Go.bind=Ae,Go.plugin=function(t,i){Uo.prototype[t]=i},Go.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),Go.options.languages=Ee(Go.options.languages,((s={})[t]=i,s)),Go.options.languages[t]},Go.log=fs,Go.createTimeRange=Go.createTimeRanges=Oe,Go.formatTime=Ah,Go.parseUrl=an,Go.isCrossOrigin=un,Go.EventTarget=Ne,Go.on=we,Go.one=je,Go.off=ke,Go.trigger=_e,Go.xhr=th,Go.TextTrack=rh,Go.AudioTrack=Wo,Go.VideoTrack=qo,Go.isEl=ws,Go.isTextNode=Vs,Go.createEl=_s,Go.hasClass=As,Go.addClass=Is,Go.removeClass=Es,Go.toggleClass=Ds,Go.setAttributes=Ns,Go.getAttributes=Fs,Go.emptyEl=Us,Go.appendContent=Ls,Go.insertContent=Hs,Go.computedStyle=$h;var Xo=10;function Jo(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 Qo(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Yo(t){const i=ta(t);return Jo(t)?i.end(i.length-1):i.start(0)}function Ko(t){return ta(t).start(0)}function Zo(t){const i=ta(t);return i.end(i.length-1)-i.start(0)}function ta(t){const i=t.seekable;if(i&&i.length)return i;let s=t.duration;return s=isFinite(s)?s:0,new mi([0,s]).ws()}function ia(t,i){void 0===i&&(i=t);let s=t<0?"-":"";t=w.abs(t);let e=w.floor(t%60),n=w.floor(t/60%60),r=w.floor(t/3600);const h=w.floor(i/60%60),o=w.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 sa(t){return class extends t{get ks(){var t;return null!=(t=this._s)?t:this._s=ea(this.player())}dispose(){this._s=void 0,super.dispose()}constructor(...t){super(...t),this._s=void 0}}}function ea(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function na(t){const i=ea(t),s=()=>{const s=Qo(t);t.toggleClass("theo-at-live",function(t,i){if(Jo(t)){let s=t.seekable;return 0===s.length||s.end(s.length-1)-i<Xo}return!1}(i,s)),t.toggleClass("vjs-live",Jo(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===Gi(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)}var ra="theo-ad-playing",ha="theo-dai-ad-playing";function oa(t,i,s){t.toggleClass(ra,i),t.toggleClass(ha,i&&s)}function aa(){this.userActive(!1)}var ua=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}},ca=function(t){return t.js="unavailable",t.xs="available",t.Ss="presenting",t}({});var la=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],fa=Go.getTech("Tech"),da=Go.getTech("Html5"),va=class extends fa{Ts(){var t;for(const t of la)this.ks.addEventListener(t,this.Cs);this.ks.addEventListener("error",this.Ms),this.ks.addEventListener("contentprotectionerror",this.Ms),this.ks.addEventListener("sourcechange",this.Ps),this.ks.addEventListener("loadstart",this.As),null==(t=this.ks.presentation)||t.addEventListener("presentationmodechange",this.Is),this.ks.textTracks.addEventListener("addtrack",this.Es),this.ks.textTracks.addEventListener("removetrack",this.Ds),this.ks.textTracks.addEventListener("change",this.Ns),this.ks.audioTracks.addEventListener("addtrack",this.Fs),this.ks.audioTracks.addEventListener("removetrack",this.Bs),this.ks.audioTracks.addEventListener("change",this.$s)}Rs(){var t;for(const t of la)this.ks.removeEventListener(t,this.Cs);this.ks.removeEventListener("error",this.Ms),this.ks.removeEventListener("contentprotectionerror",this.Ms),this.ks.removeEventListener("sourcechange",this.Ps),this.ks.removeEventListener("loadstart",this.As),null==(t=this.ks.presentation)||t.removeEventListener("presentationmodechange",this.Is),this.ks.textTracks.removeEventListener("addtrack",this.Es),this.ks.textTracks.removeEventListener("removetrack",this.Ds),this.ks.textTracks.removeEventListener("change",this.Ns),this.ks.audioTracks.removeEventListener("addtrack",this.Fs),this.ks.audioTracks.removeEventListener("removetrack",this.Bs),this.ks.audioTracks.removeEventListener("change",this.$s)}Os(t){this.trigger(new ua(t,this))}createEl(){let t=this.h,i=t.player;if(!i)throw new d(this.localize('Missing required tech option "player"'));let s=i.element;return Go.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.ks}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.ks.buffered}played(){return this.ks.played}reset(){this.ks.stop()}play(){this.ks.play()}pause(){this.ks.pause()}paused(){return this.ks.paused}currentTime(){return this.ks.currentTime}setCurrentTime(t){this.ks.currentTime=t}duration(){return this.ks.duration}volume(){return this.ks.volume}setVolume(t){this.ks.volume=t}muted(){return this.ks.muted}setMuted(t){this.ks.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.ks.src)return this.ks.src;if(this.ks.source){if(!W(this.ks.source.ads))return this.ks.source.ads[0].sources;if(function(t){if(t.sources)if(Ht(t.sources)){for(const i of t.sources)if(!Jt(i)&&"verizon-media"===i.integration)return!0}else if(!Jt(t.sources))return"verizon-media"===t.sources.integration;return!1}(this.ks.source))return"This source is managed by the Verizon Media integration extension.";if(function(t){if(t.sources)if(Ht(t.sources)){for(const i of t.sources)if(bi(i))return!0}else if(qt(t.sources))return bi(t.sources);return!1}(this.ks.source))return"This source is managed by the DAI integration extension.";if(_i(this.ks.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.ks.src}load(){this.setPreload("auto")}preload(){return this.ks.preload}setPreload(t){this.ks.preload=t}autoplay(){return this.ks.autoplay}setAutoplay(t){this.ks.autoplay=!!t}seeking(){return this.ks.seeking}seekable(){return this.ks.seekable}ended(){return this.ks.ended}playbackRate(){return this.ks.playbackRate}setPlaybackRate(t){this.ks.playbackRate=t}readyState(){return this.ks.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.ks.videoHeight}videoWidth(){return this.ks.videoWidth}supportsFullScreen(){return this.ks.presentation.supportsMode($.FULLSCREEN)}enterFullScreen(){this.ks.presentation.requestMode($.FULLSCREEN)}exitFullScreen(){this.ks.presentation.requestMode($.INLINE)}Vs(){let t=this.ks.ads;if(t&&t.playing)return!0;let i=this.ks.vr;return!(!i||i.state===ca.js)}initTextTrackListeners(){return this.on("touchend",(t=>{this.Vs()&&(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.Rs(),this.ks=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return Li}constructor(t={},i){super(t,i),this.Cs=t=>this.Os(t),this.Us=!1,this.Ps=()=>{void 0===this.ks.errorObject&&(this.Os(new Si(this.ks.currentTime,this.ks.readyState)),this.Os(new St),this.Os(new Ni(this.ks.duration)))},this.As=()=>{this.Os(new zt(this.ks.currentTime))},this.Es=t=>{this.textTracks().tt(t.track)},this.Fs=t=>{this.audioTracks().tt(t.track)},this.Ds=t=>{this.textTracks().it(t.track)},this.Bs=t=>{this.audioTracks().it(t.track)},this.Ns=()=>{let t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.$s=()=>{let t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Is=()=>{if(!this.supportsFullScreen())return;let t=this.Us,i=this.ks.presentation.currentMode===$.FULLSCREEN;t!==i&&(this.Us=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ms=()=>{const t=this.ks.errorObject,i=t&&mt(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.ks=this.h.player,this.Ts();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()}};va.prototype.featuresFullscreenResize=da.prototype.featuresFullscreenResize,va.prototype.featuresPlaybackRate=da.prototype.featuresPlaybackRate,va.prototype.featuresProgressEvents=!0,va.prototype.featuresTimeupdateEvents=!0,va.prototype.featuresNativeTextTracks=!0,Go.registerTech("THEOplayer",va);var pa=class{constructor(t){this.Ls=t=>{ki(this.Hs,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.zs=t=>{xi(this.Hs,"theo-mobile-button-hover")},this.Ws=t=>{this.Hs.blur()},this.Hs=t,t.addEventListener("touchstart",this.Ls),t.addEventListener("touchend",this.zs),t.addEventListener("focusin",this.Ws)}},ma=Go.getComponent("Menu"),ga=class extends(sa(ma)){get qs(){return this.player().el()}Gs(){ki(this.qs,"theo-menu-opened")}Xs(){xi(this.qs,"theo-menu-opened")}constructor(t,i){super(t,i)}},ya=Go.getComponent("MenuItem"),ba=class extends(sa(ya)){get parentMenu(){return this.Js}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.Qs||(this.parentMenu.Ys(this),"tap"!==t.type&&"keydown"!==t.type||(this.Qs=!0,this.trigger("click"),this.Qs=!1))}dispose(){Nt.Zs.Ks&&(this.el().removeEventListener("touchstart",this.Ls),this.el().removeEventListener("touchend",this.zs)),super.dispose()}constructor(t,i,s){super(t,Wi({selectable:!0},i)),this.Qs=!1,this.Ls=t=>{ki(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.zs=t=>{xi(this.el(),"theo-mobile-menu-item-hover")},this.Js=s,Nt.Zs.Ks&&(this.el().addEventListener("touchstart",this.Ls),this.el().addEventListener("touchend",this.zs))}},wa=Go.getComponent("ClickableComponent"),ka=class extends wa{get parentMenu(){return this.Js}get te(){return this.ie}set te(t){this.ie=t,this.el().setAttribute("tabindex",this.te?"0":"-1"),this.se()}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.Qs&&this.te&&(this.Js.ee(),"tap"===t.type&&(this.Qs=!0,this.trigger("click"),this.Qs=!1))}se(){this.te?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.Qs=!1,this.ie=!1,this.Js=s,this.on(t,"languagechange",this.se)}},_a=class extends ga{get menuHeader(){return this.ne}get menuItems(){return this.children()}addMenuItem(t){t=Wi({playerOptions:this.h.playerOptions},t);let i=new ba(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=Wi({playerOptions:this.h.playerOptions},t);let i=this.re(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"}Gs(){super.Gs(),a.removeEventListener("resize",this.he),a.addEventListener("resize",this.he),this.show()}oe(){let t=this.ae();if(!t)return;let i=t.getClientRects();Nt.Zs.Ks?this.ue(t,i):this.ce(t,i)}ae(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ce(t,i){}ue(t,i){}Xs(){a.removeEventListener("resize",this.he),super.Xs(),this.hide(),Nt.Zs.Ks&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=this.contentEl();ki(i,"theo-menu-content");let s=new ka(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.ne=s,t}Ys(t){}show(){return this.oe(),super.show()}dispose(){this.ne&&this.ne.dispose(),super.dispose()}constructor(t,i){super(t,i),this.he=()=>this.oe(),this.le=this.player().el(),this.hide(),this.on("menuchange",this.oe)}},ja=class extends _a{get fe(){return this.de}set fe(t){this.de&&this.de.ve(this),this.de=t,t&&t.pe(this)}me(t){this.fe.ge(t,"replace")}ye(t){t.fe.ge(this,"restore")}be(){xi(this.we,"vjs-hidden"),this.we.style.opacity="1",super.show()}ke(){ki(this.we,"vjs-hidden")}Gs(){this.fe&&this.fe.Gs(),super.Gs()}Xs(){this.fe&&this.fe.Xs(),super.Xs(),ki(this.we,"vjs-hidden")}ae(){if(this.fe&&this.fe._e)return this.fe._e.we}ce(t,i){if(i.length>0){let t=i[0].height,s=i[0].width;this.de.je.style.height=t+"px",this.de.je.style.width=s+"px"}super.ce(t,i)}constructor(t,i){super(t,i)}},xa=class{get je(){return this.Hs}get _e(){return this.xe}pe(t){t.ke(),this.Hs.appendChild(t.we)}ve(t){this.Hs.removeChild(t.we)}ge(t,i){if(t==this.xe)return;let s=this.xe;if(this.xe=t,this.xe.be(),this._e.focus(),Nt.Zs.Ks)s.ke();else{const t="translateX(100%)",e="translateX(-100%)",n=rt("transform");s.we.style.opacity="0",s.we.style[n]="replace"===i?e:t,this.xe.we.style.opacity="1",this.xe.we.style[n]="",u((()=>{s.ke(),s.we.style[n]=""}),300)}}Gs(){this.Se(),this.xe.be(),this.Te()}Xs(){this.Se(),this.xe.ke(),this.Ce.ke(),this.xe=this.Ce,this.Te()}Te(){it((()=>{xi(this.Hs,"theo-no-transition"),xi(this.xe.we,"theo-no-transition")}))}Se(){ki(this.Hs,"theo-no-transition"),ki(this.xe.we,"theo-no-transition")}constructor(t){this.Ce=this.xe=t,this.Hs=h.createElement("div"),this.Hs.className="theo-tertiary-background theo-menu-animation-container",this.Hs.appendChild(this.Ce.we),this.le=this.xe.player().el()}},Sa=class extends ja{get we(){return this.el()}get parentMenu(){return this.Me}re(t,i){let s=new Ta(t,i,this);return s.subMenu.fe=this.fe,s}ee(){this.Pe()}Ys(t){super.Ys(t),this.Pe()}Pe(){this.parentMenu.ye(this)}buildCSSClass(){return"theo-submenu "+(this.Ae?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Ae=!0;let i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Ae=!1,this.Me=s,this.menuHeader.te=!0}},Ta=class extends ba{get subMenu(){return this.Ie}handleClick(t){this.parentMenu.me(this.subMenu)}constructor(t,i,s){super(t,Wi({selectable:!1},i),s),this.Ie=new Sa(t,i,s)}},Ca=class extends ja{get menuButton(){return this.Ee}createEl(){let t=Go.createEl("div",{className:this.buildCSSClass()});return this.De=super.createEl(),this.De.className=super.buildCSSClass(),ki(this.De,"theo-menu-content-animatable"),t.appendChild(this.De),this.fe=new xa(this),t.appendChild(this.fe.je),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}re(t,i){let s=new Ta(t,i,this);return s.subMenu.fe=this.fe,s}ce(t,i){super.ce(t,i);let s=this.le.getClientRects(),e=s.length>0?s[0]:void 0,n=_(getComputedStyle(this.el()).fontSize);Xt(this.el(),this.Ee.el(),e,n)}get we(){return this.De}ee(){this.Ee.closeMenu()}dispose(){this.Ne||(this.Ne=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ne=!1,this.Ee=s}},Ma=class{set Fe(t){this.Be.innerHTML=this.$e.localize(t),this.Re(),this.Oe(),Di(this.$e.el())}get Fe(){return this.Be.textContent||""}Ve(){this.$e.off("mouseover",this.Oe),this.$e.off("mouseout",this.Re),this.$e.off("dispose",this.Ue),fi(this.Be)}constructor(t,i){this.Oe=()=>{xi(this.Be,"vjs-hidden");let t=this.$e.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=_(getComputedStyle(this.Be).fontSize);Xt(this.Be,this.$e.el(),i,s)},this.Re=()=>{ki(this.Be,"vjs-hidden")},this.Ue=()=>this.Ve(),this.$e=t,Di(t.el()),Bi(t.el()),this.Be=h.createElement("span"),this.Be.innerHTML=this.$e.localize(i),this.Be.className="theo-button-tooltip vjs-hidden",this.Be.setAttribute("aria-hidden","true"),this.$e.el().appendChild(this.Be),this.$e.on("mouseover",this.Oe),this.$e.on("mouseout",this.Re),this.$e.on("dispose",this.Ue)}},Pa=Go.getComponent("Button"),Aa=class extends(sa(Pa)){get Le(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.He}isMenuOpen(){return this.ze}openMenu(){this.We&&!this.ze&&(this.He.Gs(),this.el().setAttribute("aria-expanded","true"),this.ze=!0,this.He.focus())}closeMenu(){this.We&&this.ze&&(this.He.Xs(),this.el().setAttribute("aria-expanded","false"),this.ze=!1)}set minimumMenuItems(t){this.qe=t,this.Ge()}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.ze?this.closeMenu():this.openMenu()}enable(){return this.We=!0,super.enable()}disable(){return this.closeMenu(),this.We=!1,super.disable()}se(){this.Be.Fe=this.controlText()}dispose(){this.player().removeChild(this.He),this.He.dispose(),this.Be.Ve(),this.ks.removeEventListener("seeking",this.Xe),super.dispose()}constructor(t,i){super(t,i),this.ze=!1,this.qe=1,this.We=!0,this.Je=t=>{let i=this.el().contains(t.target),s=this.He.el().contains(t.target),e=!1;var n;Nt.Zs.Ks&&this.Le&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.ze||(e&&t.preventDefault(),this.closeMenu())},this.Qe=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.Xe=()=>{this.ze&&this.closeMenu()},this.Ge=()=>{this.He.menuItems.length>=this.qe?this.show():(this.closeMenu(),this.hide())},this.He=new Ca(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.He),this.Be=new Ma(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),Nt.Zs.Ye?(this.on(h,"touchend",this.Je),new pa(this.el())):(this.on(h,"click",this.Je),this.on(h,"keydown",this.Qe),lt&&this.on(h,lt.Ke,this.closeMenu)),this.ks.addEventListener("seeking",this.Xe),this.on(this.He,"menuchange",this.Ge),this.on(t,"languagechange",this.se),this.Ge()}},Ia=Go.getComponent("Component"),Ea=class extends(Go.getComponent("ControlBar")){addMenuButton(t){t=Wi({playerOptions:this.h.playerOptions},t);let i=new Aa(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)}};Go.registerComponent("THEOControlBarShadow",class extends Ia{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}});var Da=Go.getComponent("VolumeBar"),Na=class extends Da{handleFocus(t){super.handleFocus(t),this.Ze.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.Ze.removeClass("focus-within")}constructor(t,i){super(t,i),this.Ze=i.tn}},Fa=Go.getComponent("VolumeControl"),Ba=class extends Fa{constructor(t,i){super(t,i),this.sn=new Na(t,{tn:this}),this.addChild(this.sn)}};Ba.prototype.h=Wi({},Fa.prototype.h,{children:[]}),Go.registerComponent("VolumeControl",Ba);var $a=class extends(sa(Ea)){nn(){this.rn(this.hn())}an(){0===this.un&&(this.un=u(this.cn,100))}ln(t){"opacity"===t.propertyName&&(0!==this.un&&(c(this.un),this.un=0),this.rn(!0))}fn(t){"opacity"===t.propertyName&&(this.hn()||this.rn(!1))}hn(){return"0"!==a.getComputedStyle(this.el()).opacity}rn(t){this.dn!==t&&(this.dn=t,t?this.vn():this.ks.textTrackStyle.marginBottom=void 0)}vn(){const t=this.el().getBoundingClientRect().height;this.ks.textTrackStyle.marginBottom!==t&&(this.ks.textTrackStyle.marginBottom=t)}dispose(){c(this.un),this.un=0,this.mn.pn(et.gn,this.yn),this.mn.bn(),super.dispose()}constructor(t,i){super(t,i),this.dn=!1,this.un=0,this.cn=()=>{0!==this.un&&(this.un=0,this.rn(this.hn()))},this.yn=()=>{this.dn&&this.vn()},this.on(t,"ready",this.nn),this.on(t,"pause",this.nn),this.on(t,"useractive",this.nn),this.on(t,"firstplay",this.an),this.on(t,"play",this.an),this.on(t,"userinactive",this.an),this.on("transitionstart",this.ln),this.on("transitionend",this.fn),this.mn=new ot(this.el()),this.mn.wn(et.gn,this.yn),this.mn.kn(!0)}};$a.prototype.h=Wi({},Ea.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),Go.registerComponent("ControlBar",$a);var Ra=class extends Ea{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};Ra.prototype.h=Wi({},Ea.prototype.h,{children:[]}),Go.registerComponent("TopControlBar",Ra);var Oa=Go.getComponent("CurrentTimeDisplay"),Va=class extends(sa(Oa)){updateContent(){const t=Qo(this.player()),i=this.ks,s=Ko(i),e=this.localize("Current Time"),n=ia(w.max(0,t-s),Zo(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)}};Go.registerComponent("CurrentTimeDisplay",Va);var Ua=Go.getComponent("DurationDisplay"),La=class extends(sa(Ua)){updateContent(){const t=this.ks,i=j(t.duration)?NaN:Zo(t),s=t.clip.endTime-t.clip.startTime,e=w.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=ia(e);this.S.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}dispose(){var t;null==(t=this.ks)||t.clip.removeEventListener("change",this._n),super.dispose()}constructor(t,i){var s;super(t,i),this._n=()=>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.ks)||s.clip.addEventListener("change",this._n)}};Go.registerComponent("DurationDisplay",La);var Ha=Go.getComponent("Button"),za=class extends(sa(Ha)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){let t=super.createEl("button",{},{"aria-live":"off"});return this.jn=Go.createEl("span",{className:"theo-live-control-indicator"}),pi(t,this.jn),t}createControlTextEl(t){let i=super.createControlTextEl(t);return Go.removeClass(i,"vjs-control-text"),Go.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.ks;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Yo(i)),t.play()}}xn(){Jo(this.ks)?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this.xn(),this.on(t,"emptied",this.xn),this.on(t,"durationchange",this.xn),Nt.Zs.Ye&&new pa(this.el())}};Go.registerComponent("LiveDisplay",za);var Wa=Go.getComponent("LoadingSpinner");Go.registerComponent("LoadingSpinner",class extends Wa{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=Go.createEl("div",{className:"theo-loading-spinner-rotator"}),s=Go.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=Go.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)}});var qa=Go.getComponent("LoadProgressBar"),Ga=class extends(sa(qa)){update(){let t=this.ks,i=mi.Sn(ta(t)),s=i.Tn(0),e=mi.Sn(t.buffered).Cn(i),n=i.Mn(0)-s,r=e.U&&e.Mn(e.U-1)||0;r=w.max(0,r-s);let o=this.el(),a=this.Pn;o.style.width=Xa(r,n);for(let t=0;t<e.U;t++){let i=e.Tn(t),n=e.Mn(t),u=a[t];u||(u=h.createElement("div"),a.push(u),o.appendChild(u)),u.style.left=Xa(i-s,r),u.style.width=Xa(n-i,r)}for(let t=a.length;t>e.U;t--)o.removeChild(a[t-1]);a.length=e.U}constructor(t,i){super(t,i),this.Pn=[],this.on(t,"emptied",this.update)}};function Xa(t,i){let s=t/i||0;return 100*(s>=1?1:s)+"%"}Go.registerComponent("LoadProgressBar",Ga);var Ja=Go.getComponent("MouseTimeDisplay"),Qa=class extends(sa(Ja)){handleMouseMove(t){let i=t,s=this.ks,e=Ko(s)+this.calculateDistance(i)*Zo(s),n=i.pageX-Wt(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){let i=t,s=this.ks,e=Ko(s)+this.calculateDistance(i)*Zo(s),n=i.touches[0].pageX-Wt(this.el().parentNode).left;this.update(e,n+"px")}createEl(){let t=super.createEl();return this.An=Go.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.In=t;let s=this.En(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(r(this.An,s),this.Dn())}Dn(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){let t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=_(getComputedStyle(t).fontSize);Xt(this.tooltip,this.el(),s,e)}}En(t){const i=this.ks,s=t-Yo(i);return ia(Jo(i)?w.min(s,0):s,Zo(i))}dispose(){var t;this.ks.removeEventListener("dimensionchange",this.Nn),null==(t=this.ks.presentation)||t.removeEventListener("presentationmodechange",this.Nn),super.dispose()}constructor(t,i){var s;(super(t,i),this.In=NaN,this.Nn=()=>{let t=Qo(this.player());const i=this.ks;let s=(t-Ko(i))/Zo(i)||0;s=ei(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(Go.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.An)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),$t.Ks)&&(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.ks.addEventListener("dimensionchange",this.Nn),null==(s=this.ks.presentation)||s.addEventListener("presentationmodechange",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()})))}};Go.registerComponent("MouseTimeDisplay",Qa);var Ya=Go.getComponent("PlayProgressBar"),Ka=class extends(sa(Ya)){updateDataAttr(){let t=Qo(this.player());this.el().setAttribute("data-current-time",this.En(t))}En(t){let i=this.ks;return ia(t-Yo(i),Zo(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)}};Go.registerComponent("PlayProgressBar",Ka);var Za=Go.getComponent("RemainingTimeDisplay"),tu=class extends(sa(Za)){updateContent(){const t=this.ks,i=Zo(t);if(i){const s=ta(t).end(0),e=this.localize("Remaining Time"),n=ia(w.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)}};Go.registerComponent("RemainingTimeDisplay",tu);var iu=class{get ks(){return this._s||(this._s=this.Fn.tech({IWillNotUseThisInPlugins:!0}).theoplayer()),this._s}Bn(t){if(t.kind!==xt.$n)return;if(0===this.ks.seekable.length)return;this.Rn=t;const i=t.cues.slice();this.Vn.On(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 su(s,this.ks,n);this.Un.push(r),this.Ln.appendChild(r.je)}t.addEventListener("cuechange",this.Hn),this.Hn()}zn(){this.ks.addEventListener("loadedmetadata",this.Wn),this.ks.addEventListener("loadeddata",this.Wn),this.ks.addEventListener("sourcechange",this.Wn),this.ks.textTracks.addEventListener("addtrack",this.qn),this.ks.textTracks.addEventListener("removetrack",this.Gn),this.ks.textTracks.addEventListener("change",this.Wn)}Xn(){this.ks.removeEventListener("loadedmetadata",this.Wn),this.ks.removeEventListener("loadeddata",this.Wn),this.ks.removeEventListener("sourcechange",this.Wn),this.ks.textTracks.removeEventListener("addtrack",this.qn),this.ks.textTracks.removeEventListener("removetrack",this.Gn),this.ks.textTracks.removeEventListener("change",this.Wn)}Jn(){if(!(this.ks.readyState<Ft.Qn))for(let t of this.ks.textTracks)if(t.kind===xt.$n&&t.mode===wt.Yn&&t.cues.length>0&&t.readyState!==yt.ERROR)return t}Kn(t){this.Vn.Zn(t)}tr(){this.Vn.be()}ir(){this.Vn.ke()}sr(){for(let t of this.Un)t.Ve();this.Vn.sr(),this.Un=[],this.er=void 0,this.Rn&&this.Rn.removeEventListener("cuechange",this.Hn),this.Rn=void 0}Ve(){this.Xn(),this.nr.removeEventListener("mousemove",this.rr),this.nr.removeEventListener("mouseenter",this.hr),this.nr.removeEventListener("mouseleave",this.ar),this.sr(),this.Vn.Ve(),this._s=void 0}constructor(t,i){this.Fn=i,this.Un=[],this._s=void 0,this.qn=t=>{let i=t.track;i.kind===xt.$n&&(i.addEventListener("addcue",this.Wn),i.addEventListener("removecue",this.Wn),i.addEventListener("readystatechange",this.Wn)),this.Wn()},this.Gn=t=>{let i=t.track;i.kind===xt.$n&&(i.removeEventListener("addcue",this.Wn),i.removeEventListener("removecue",this.Wn),i.removeEventListener("readystatechange",this.Wn)),this.Wn()},this.rr=t=>{let i=this.ks,s=function(t,i){let s,e,n=Wt(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.Ln,t),e=Ko(i)+s.x*Zo(i);e===i.duration&&(e-=.1),this.Kn(e)},this.ar=()=>{this.Vn.ke()},this.hr=()=>{this.Vn.be()},this.Wn=()=>{let t=this.Jn();t!==this.Rn&&(this.sr(),t&&this.Bn(t))},this.Hn=()=>{var t,i,s;const e=null==(i=this.Rn)||null==(t=i.activeCues)?void 0:t[0],n=E(this.Un,(t=>t.ur===e));n!==this.er&&(null==(s=this.er)||s.cr(),this.er=n,null==n||n.lr())},this.nr=t,this.Vn=new eu,this.Fn.contentEl().appendChild(this.Vn.je),this.Ln=h.createElement("div"),ki(this.Ln,"theoplayer-chapterbar"),this.nr.appendChild(this.Ln),this.nr.addEventListener("mousemove",this.rr),this.nr.addEventListener("mouseenter",this.hr),this.nr.addEventListener("mouseleave",this.ar),this.zn()}},su=class{get je(){return this.Hs}lr(){ki(this.Hs,"theoplayer-chapter-indicator-active")}cr(){xi(this.Hs,"theoplayer-chapter-indicator-active")}dr(t,i){let s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1)-s,n=this.ur.startTime,r=this.ur.endTime-n,o=h.createElement("div");ki(o,"theoplayer-chapter-indicator");let a=h.createElement("div");ki(a,"theoplayer-chapter-indicator-highlight"),o.appendChild(a),i&&ki(o,"theoplayer-chapter-indicator-discontinuous");let u=w.min(n/e*100,100),c=100-u,l=w.min(r/e*100,c);return o.style.width=l+"%",o.style.left=u+"%",o}Ve(){fi(this.Hs)}constructor(t,i,s){this.ur=t,this.Hs=this.dr(i,s)}},eu=class{ke(){this.pr--,0===this.pr&&xi(this.je,"theoplayer-chapter-hovering")}On(t){this.mr=t||[],this.mr.length>0&&(this.je.style.display="")}gr(t){r(this.yr,t.content)}sr(){this.mr=[],r(this.yr,""),this.je.style.display="none"}be(){this.pr++,this.pr>0&&ki(this.je,"theoplayer-chapter-hovering")}Zn(t){for(let i of this.mr)if(nu(i,t)){this.gr(i);break}}Ve(){fi(this.je)}constructor(){this.mr=[],this.pr=0,this.je=h.createElement("div"),ki(this.je,"theoplayer-chaptertitle"),this.je.style.display="none",this.yr=h.createElement("p"),this.je.appendChild(this.yr)}};function nu(t,i){return new mi([t.startTime,t.endTime]).br(i)}var ru=Go.getComponent("SeekBar"),hu=class extends(sa(ru)){updateAriaAttributes(t){const i=Qo(this.player()),s=this.ks;t.setAttribute("aria-valuenow",(100*this.wr(i)).toFixed(2)),t.setAttribute("aria-valuetext",ia(i-Yo(s),Zo(s)))}getPercent(){return this.wr(this.player().currentTime())}handleMouseMove(t){if(this.ks&&this.ks.ads&&this.ks.ads.playing)return;const i=this.ks;let s=Ko(i)+this.calculateDistance(t)*Zo(i);s>=i.duration&&(s=i.duration-.1),this.Ln.Kn(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.Ln.tr(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.Ln.ir(),super.handleMouseUp(t)}wr(t){let i=this.ks,s=(t-Ko(i))/Zo(i);return ei(s,0,1)}dispose(){this.Ln.Ve(),R(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.Ln=new iu(this.el(),t)}};Go.registerComponent("SeekBar",hu);var ou=Go.getComponent("ProgressControl");Nt.Zs.Ks&&Go.registerComponent("ProgressControl",class extends ou{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"])}});var au=Go.getComponent("TooltipProgressBar"),uu=class extends(sa(au)){updateDataAttr(){let t=Qo(this.player()),i=this.En(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}En(t){const i=this.ks;return ia(t-Yo(i),Zo(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 cu(t){for(const i of t)if(i.enabled)return i}function lu(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:fu(t),description:du(t),hd:!!t.height&&t.height>=720}}function fu(t){return t.height?t.height+"p":t.bandwidth?du(t):""}function du(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":""}Go.registerComponent("TooltipProgressBar",uu);var vu=class{get kr(){return this._r}set kr(t){let i=this._r;for(let s=i.length-1;s>=0;s--){let e=i[s];B(t,e)||this.jr(e)}for(let i of t)this.Sr(i);this.Tr.oe()}get Cr(){return this.Tr.menuItems}Mr(t){let i=this.Cr;if(i)for(let s of i)if(s.Pr===t)return s}Ar(t){let i=this.Tr.addMenuItem();return i.Pr=t,i.on("click",(()=>this.Ir(i))),i.el().setAttribute("role","menuitemradio"),i}Er(t){t.dispose()}Dr(t){return!0}Sr(t){if(this.Dr(t)){B(this._r,t)||this._r.push(t);let i=this.Mr(t)||this.Ar(t);return this.Nr(i),i}this.jr(t)}jr(t){let i=this.Mr(t);i&&(this.Tr.removeMenuItem(i),this.Er(i)),N(this._r,t)}Ve(){const t=[];for(let i of this._r)t.push(i);for(let i of t)this.jr(i);R(t)}constructor(t){this._r=[],this.Tr=t}},pu=class extends vu{Fr(){return this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",r(this.Br,this.$r.localize("Quality")),this.Br}Rr(){return this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-quality-automatic",r(this.Or,this.$r.localize("Automatic")),this.Or}Vr(){return this.Ur=h.createElement("span"),r(this.Ur,this.$r.localize("Automatic")),this.Ur}Lr(){return this.Hr=h.createElement("span"),this.Hr.className="theo-primary-color theo-settings-control-menu-item-hd-label",r(this.Hr,this.$r.localize("HD")),this.Hr}zr(){let t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Or),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Ur),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Hr),this.Wr.el().appendChild(this.Br),this.Wr.el().appendChild(t),this.Wr.el().setAttribute("aria-label",this.$r.localize("Open the video quality settings menu"))}qr(){let t=this.Gr,i=t&&_u(t.targetQuality),s=t&&t.activeQuality,e=lu(this.Xr(i||s))||{name:this.$r.localize("Automatic")};r(this.Ur,e.name),Ci(this.Or,"vjs-hidden",!!i),Ci(this.Hr,"vjs-hidden",!e.hd)}Nr(t){let i=lu(t.Pr)||{name:this.$r.localize("Automatic")},s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.$r.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.$r.localize("Set video quality to ")+i.name),t.Pr?t.selected(t.Pr===this.Jr):t.selected(!this.Jr)}Ir(t){this.Gr&&(this.Gr.targetQuality=t.Pr&&t.Pr.videoQualities)}Xr(t,i){const s=i||this.kr;for(let i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Ve(){this._s.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Qr),this.$r.off("languagechange",this.se),this.Gr&&(this.Gr.removeEventListener("activequalitychanged",this.Yr),this.Gr.removeEventListener("targetqualitychanged",this.Kr),this.Gr.removeEventListener("update",this.Zr)),super.Ve()}constructor(t,i,s){super(t.subMenu),this.Gr=void 0,this.Jr=void 0,this.Qr=()=>{let t=cu(this._s.videoTracks);if(t===this.Gr)return;let i=[];if(this.Gr&&(this.Gr.removeEventListener("activequalitychanged",this.Yr),this.Gr.removeEventListener("targetqualitychanged",this.Kr),this.Gr.removeEventListener("update",this.Zr)),this.Gr=t,t){t.addEventListener("activequalitychanged",this.Yr),t.addEventListener("targetqualitychanged",this.Kr),t.addEventListener("update",this.Zr);const s=gu(wu(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.kr=i,this.Kr(),this.Yr()},this.Zr=t=>{const i=t.track;if(i!==this.Gr)return;const s=gu(wu(i.qualities.filter((t=>t.available)))),e=i&&_u(i.targetQuality);let n;this.Jr=this.Xr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.kr=n,this.qr()},this.Yr=()=>{this.Sr(void 0),this.qr()},this.Kr=()=>{let t=cu(this._s.videoTracks),i=t&&_u(t.targetQuality),s=this.Xr(i),e=this.Jr;s!==e&&(this.Jr=s,s&&e||this.Sr(void 0),e&&B(this.kr,e)&&this.Sr(e),i&&this.Sr(s),this.qr())},this.se=()=>{r(this.Tr.menuHeader.el(),this.$r.localize("Quality")),r(this.Br,this.$r.localize("Quality")),r(this.Or,this.$r.localize("Automatic")),r(this.Ur,this.$r.localize("Automatic")),r(this.Hr,this.$r.localize("HD")),this.Wr.el().setAttribute("aria-label",this.$r.localize("Open the video quality settings menu"));for(const t of this.Cr)this.Nr(t);this.qr()},this.Wr=t,this._s=i,this.$r=s,this.Br=this.Fr(),this.Or=this.Rr(),this.Ur=this.Vr(),this.Hr=this.Lr(),this.zr(),r(this.Tr.menuHeader.el(),this.$r.localize("Quality")),this.kr=[void 0],this._s.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Qr),this.$r.on("languagechange",this.se),this.Qr()}},mu=class{get height(){return this.th[0].height}get bandwidth(){return this.th[0].bandwidth}get videoQualities(){return this.th}get label(){return this.th[0].label}add(t){this.th.push(t)}constructor(t){this.th=t}};function gu(t){let i=[];for(let s of t){let t=s,e=!1;for(let s of i)if(ku(s,t)){s.add(t),e=!0;break}e||i.push(new mu([t]))}return i}function yu(t,i){return t&&i?A(t,i):C.ih}function bu(t,i){return t===i?C.ih:yu(t.height,i.height)||yu(t.width,i.width)||yu(t.bandwidth,i.bandwidth)}function wu(t){return Xi(t,bu).reverse()}function ku(t,i){return t.label&&i.label&&t.label===i.label||ct(lu(t),lu(i))}function _u(t){return Ht(t)?1===t.length?t[0]:void 0:t}function ju(t){return 1===t?"Normal":""+w.round(100*t)/100}var xu=class extends vu{Fr(){return this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",r(this.Br,this.$r.localize("Speed")),this.Br}zr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Wr.el().appendChild(this.Br),this.Wr.el().appendChild(t),this.Wr.el().setAttribute("aria-label",this.$r.localize("Open the video speed settings menu")),t}Ar(t){let i=super.Ar(t);return this.Nr(i),i}Nr(t){const i=t.Pr,s=this.$r.localize(ju(i));r(t.el(),s),t.el().setAttribute("aria-label",this.$r.localize("Set video speed to ")+s),t.selected(t.Pr===this._s.playbackRate)}Ir(t){this._s.playbackRate=t.Pr}Ve(){this._s.removeEventListener("ratechange",this.sh),this.$r.off("languagechange",this.se),super.Ve()}constructor(t,i,s,e){super(t.subMenu),this.eh=void 0,this.sh=()=>{this.eh&&this.Sr(this.eh);let t=this._s.playbackRate;this.eh=t,r(this.nh,this.$r.localize(ju(t))),t&&this.Sr(t)},this.se=()=>{r(this.Tr.menuHeader.el(),this.$r.localize("Speed")),r(this.Br,this.$r.localize("Speed")),this.Wr.el().setAttribute("aria-label",this.$r.localize("Open the video speed settings menu"));for(const t of this.Cr)this.Nr(t);this.sh()},this.Wr=t,this._s=i,this.$r=s,this.Br=this.Fr(),this.nh=this.zr(),r(this.Tr.menuHeader.el(),this.$r.localize("Speed")),this.kr=e,this._s.addEventListener("ratechange",this.sh),this.$r.on("languagechange",this.se),this.sh()}};Go.registerComponent("SettingsButton",class extends Aa{createEl(){let t=super.createEl();return this.rh=Go.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),r(this.rh,this.localize("HD")),t.appendChild(this.rh),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}se(){super.se(),r(this.rh,this.localize("HD")),r(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.Gr&&(this.Gr.removeEventListener("activequalitychanged",this.Yr),this.Gr=void 0),this.ks.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.hh),this.oh.Ve(),this.ah.Ve(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.Gr=void 0,this.hh=()=>{let t=cu(this.ks.videoTracks);t!==this.Gr&&(this.Gr&&this.Gr.removeEventListener("activequalitychanged",this.Yr),this.Gr=t,t&&t.addEventListener("activequalitychanged",this.Yr),this.Yr())},this.Yr=()=>{var t;const i=null==(t=this.Gr)?void 0:t.activeQuality,s=!!(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},ki(this.menu.el(),"theo-settings-control-menu"),r(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Be.Fe=this.controlText(),this.uh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.oh=new pu(this.uh,this.ks,t);let n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.lh=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.ah=new xu(this.lh,this.ks,t,n),this.ks.videoTracks.addEventListener(["addtrack","removetrack","change"],this.hh),this.hh()}});var Su=class extends vu{fh(t){let i=t.label;if(i)return i;let s=t.language;if(s){let t=Ri(s);if(t)return t.dh}return s||""}ph(){this.kr=this.mh}Ve(){this.mh.removeEventListener("addtrack",this.gh),this.mh.removeEventListener("removetrack",this.yh),this.mh.removeEventListener("change",this.bh),super.Ve()}constructor(t,i){super(t),this.gh=t=>{const i=t.track;this.Sr(i),i.addEventListener("update",this.wh)},this.yh=t=>{const i=t.track;this.jr(i),i.removeEventListener("update",this.wh)},this.bh=t=>this.ph(),this.wh=()=>{for(const t of this.kr)this.Sr(t)},this.mh=i,this.mh.addEventListener("addtrack",this.gh),this.mh.addEventListener("removetrack",this.yh),this.mh.addEventListener("change",this.bh),this.ph()}},Tu=class extends Su{Nr(t){let i=t.Pr,s=this.$r.localize(this.fh(i));r(t.el(),s),t.el().setAttribute("aria-label",this.$r.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Ir(t){let i=t.Pr;for(let t of this.ks.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Ve(){this.$r.off("languagechange",this.se),super.Ve()}constructor(t,i,s){super(t,i.audioTracks),this.se=()=>{r(this.Tr.menuHeader.el(),this.$r.localize("Language"));for(const t of this.Cr)this.Nr(t)},this.ks=i,this.$r=s,r(this.Tr.menuHeader.el(),this.$r.localize("Language")),this.$r.on("languagechange",this.se)}};Go.registerComponent("audioTrackButton",class extends Aa{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.kh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.kh=new Tu(this.menu,this.ks,t),this.controlText("Language"),this.Be.Fe=this.controlText()}});var Cu=class extends Su{Dr(t){return!!super.Dr(t)&&(!t.forced&&S(t.kind))}Ar(t){let i=super.Ar(t);ki(i.el(),"theo-text-track-menu-item");let s=h.createElement("span");i._h=s;let e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.jh=e;let n=t=>this.xh(t,i);i.Sh=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.Pr,e=this.$r.localize(this.fh(s));r(i._h,e),i.el().setAttribute("aria-label",this.$r.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===wt.Yn)}Er(t){let i=t;i.jh.removeEventListener("click",i.Sh),super.Er(t)}Ir(t){let i=t.Pr;for(let t of this.ks.textTracks)t!==i&&Tt(t.kind,i.kind)&&(t.mode=wt.Th);i.mode!==wt.Yn?i.mode=wt.Yn:i.mode=wt.Th}xh(t,i){t.stopImmediatePropagation(),this.Ir(i)}Ve(){this.$r.off("languagechange",this.se),super.Ve()}constructor(t,i,s){super(t,i.textTracks),this.se=()=>{r(this.Tr.menuHeader.el(),this.$r.localize("Subtitles"));for(const t of this.Cr)this.Nr(t)},this.ks=i,this.$r=s,r(this.Tr.menuHeader.el(),s.localize("Subtitles")),this.$r.on("languagechange",this.se)}};Go.registerComponent("subtitlesButton",class extends Aa{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.kh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.kh=new Cu(this.menu,this.ks,t),this.controlText("Subtitles"),this.Be.Fe=this.controlText()}});var Mu=Go.getComponent("playToggle"),Pu=class extends(sa(Mu)){handleClick(t){this.ks.muted||this.ks.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Be.Fe=this.controlText()}handlePause(t){this.ks.ended||(super.handlePause(t),this.controlText("Play"),this.Be.Fe=this.controlText())}se(){this.Be.Fe=this.controlText()}dispose(){this.Be.Ve(),this.ks.removeEventListener("ended",this.Ch),super.dispose()}constructor(t,i){super(t,i),this.Ch=()=>{this.controlText("Replay"),this.Be.Fe=this.controlText()},this.controlText("Play"),this.Be=new Ma(this,this.controlText()),this.ks.addEventListener("ended",this.Ch),this.on(t,"languagechange",this.se),Nt.Zs.Ye&&new pa(this.el())}};Go.registerComponent("playToggle",Pu);var Au=Go.getComponent("fullscreenToggle"),Iu=class extends(sa(Au)){handleClick(t){this.ks.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.Fe=this.controlText()}dispose(){this.Be.Ve(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Be=new Ma(this,this.controlText()),Nt.Zs.Ye&&new pa(this.el()),this.on(t,"languagechange",this.updateContent)}};Go.registerComponent("fullscreenToggle",Iu);var Eu=Go.getComponent("muteToggle"),Du=class extends(sa(Eu)){handleClick(t){this.ks.muted&&!this.ks.paused&&this.ks.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.se()}se(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Be.Fe=this.controlText()}dispose(){this.Be.Ve(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Be=new Ma(this,this.controlText()),Nt.Zs.Ye&&new pa(this.el()),this.on(t,"languagechange",this.se),Oi&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};Go.registerComponent("muteToggle",Du);var Nu=Go.getComponent("BigPlayButton"),Fu=class extends(sa(Nu)){createEl(){let t=super.createEl(),i=Go.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML='<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="theo-play-svg-circle" 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>',t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.ks.muted||this.ks.prepareWithUserAction(),super.handleClick(t),void 0!==this.ks.vr&&"unavailable"!==this.ks.vr.state&&(this.ks.vr.useDeviceMotionControls=!0)}};Go.registerComponent("BigPlayButton",Fu);var Bu=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;Go.registerComponent("MouseTimeDisplay",class extends Qa{Mh(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Ph&&(this.Ph=i,this.Ah=i.src?Nt.Ih(i.src).href:void 0,this.Ph.addEventListener(["addcue","removecue"],this.Eh),this.Dh())}Nh(t){t.track===this.Ph&&this.Fh()}createEl(){const t=super.createEl();return this.Bh=Go.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.$h=Go.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Rh(t)}Rh(t){let i;if(this.Ph&&this.Ph.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.Ph.cues,t);i=s&&s.content}if(i===this.Oh)return;if(this.Oh=i,Go.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",!!i),!i)return void this.Vh();const s=i.match(Bu);if(s){let[,t,i,e,n,r]=s;t=this.Uh(t);const h={Lh:+i,Hh:+e,Ti:+n,Ci:+r};this.zh(t,h)}else{const t=this.Uh(i);this.zh(t)}}Dh(){j(this.In)||this.Rh(this.In)}Uh(t){return this.Ph&&this.Ah?Nt.Ih(t,this.Ah).href:t}zh(t,i){this.Bh&&(this.Bh.src!==t?(this.Bh.onload=()=>{this.Wh(i)},this.Bh.src="",this.Bh.src=t):this.Wh(i))}Wh(t){if(!this.$h||!this.Bh)return;const i=this.$h.getContext("2d");i&&(null!=t||(t={Lh:0,Hh:0,Ti:this.Bh.naturalWidth,Ci:this.Bh.naturalHeight}),this.$h.width=t.Ti,this.$h.height=t.Ci,i.drawImage(this.Bh,t.Lh,t.Hh,t.Ti,t.Ci,0,0,t.Ti,t.Ci),this.qh(this.$h))}qh(t){this.Gh||(pi(this.tooltip,t),this.Gh=t),this.Dn()}Vh(){this.Gh&&(this.tooltip.removeChild(this.Gh),this.Gh=void 0,this.Dn())}Fh(){void 0!==this.Ph&&(this.Ph.removeEventListener(["addcue","removecue"],this.Eh),this.Ph=void 0),this.Ah=void 0,this.Vh(),this.Oh=void 0}dispose(){this.Fh(),super.dispose()}constructor(t,i){super(t,i),this.Gh=void 0,this.Ph=void 0,this.Ah=void 0,this.Xh=t=>this.Mh(t),this.Jh=t=>this.Nh(t),this.Eh=t=>this.Dh(),this.showThumbnails=()=>{this.Gh&&this.Gh.hidden&&(this.Gh.hidden=!1,this.Dn())},this.hideThumbnails=()=>{!this.Gh||this.Gh.hidden||this.player().scrubbing()||(this.Gh.hidden=!0,this.Dn())},this.on(this.player().textTracks(),"addtrack",this.Xh),this.on(this.player().textTracks(),"removetrack",this.Jh),$t.Ks&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}});var $u=Go.getComponent("VolumeLevel");Go.registerComponent("VolumeLevel",class extends $u{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}});var Ru=Go.getComponent("Component"),Ou=class extends Ru{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};Ou.prototype.h=Wi({},Ou.prototype.h,{children:[]}),Go.registerComponent("controlBarMenuContainer",Ou);var Vu=Go.getComponent("Player"),Uu=class extends Vu{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),fi(i),this.xi&&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)}};Uu.prototype.h=Wi({},Vu.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),Go.registerComponent("Player",Uu);var Lu=Go.getComponent("Player"),Hu=Lu.prototype.es;Lu.prototype.es=function(t){if(!(this.H&&this.H.Vs&&this.H.Vs()))return Hu.call(this,t)};var zu=Lu.prototype.createEl;function Wu(t,i,s,e){let n=Wi({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},s);n.controlBar=Wi({progressControl:{keepTooltipsInside:!0}},n.controlBar);let r=n.techOrder||(n.techOrder=[]);-1===r.indexOf("THEOplayer")&&r.unshift("THEOplayer"),(n.theoplayer||(n.theoplayer={})).player=t,s&&qt(s.language)&&(n.languages=Wi({},n.languages,{[Fi]:s.language}),n.language=Fi),i.setAttribute("data-vjs-player","");let h=i.getAttribute("style"),o=Go(t.element,n,e);return o.ready((()=>{na(o),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===zi.Qh;oa(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.verizonMedia){const s=i=>{const s="adbreakbegin"===i.type;oa(t,s,!1)};i.verizonMedia.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",s),t.adBreak.addEventListener("adbreakend",s)}))}i.addEventListener("sourcechange",(()=>{oa(t,!1,!1)}))}}(o,t),function(t){t.on("mouseleave",aa)}(o)})),i.removeAttribute("data-vjs-player"),h?i.setAttribute("style",h):i.removeAttribute("style"),Nt.Zs.Ks&&(ki(i,"theo-mobile"),qu(i)),function(t){t.on("seeking",(()=>{yi(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(o),o}function qu(t){a.outerHeight>a.outerWidth?(xi(t,"theo-mobile-landscape"),ki(t,"theo-mobile-portrait")):(xi(t,"theo-mobile-portrait"),ki(t,"theo-mobile-landscape"))}Lu.prototype.createEl=function(){let t=zu.call(this),i=Go.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t};var Gu=Go.getComponent("Button");var Xu="THEOPiPCloseButton";Go.registerComponent(Xu,class extends Gu{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.Kh.Yh()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.Kh)}(i))throw new d("Invalid Picture-in-picture options.");this.Kh=i.Kh}});var Ju,Qu=class extends z{get Zh(){return this.io}get so(){return this.t.cs()}eo(){this.t.wn(X.no,this.ro),this.ho||this.t.wn(X.oo,this.ao),this.t.uo.on("languagechange",this.se)}co(){var t;return"theo-pip-"+(null!=(t=this.lo)?t:"bottom-right")}fo(t){let i=this.do;i&&!this.so&&(this.vo||this.po(),this.mo(),ki(i,"theo-pip"),ki(i,this.co()),this.io=!0,this.yo=t,this.bo=!1,this.wo(new F($.PICTURE_IN_PICTURE)))}ko(t){let i=this.do;i&&(this._o(),xi(i,"theo-pip"),xi(i,this.co()),this.io=!1,this.bo=t,this.jo=this.yo,this.yo=!1,this.wo(new F($.INLINE)))}po(){if(!this.vo){let t=this.t.uo;t.addChild(Xu,{Kh:this});let i=h.createElement("div");i.className="theo-pip-overlay",this.xo=h.createElement("div"),this.xo.className="theo-pip-overlay-text",r(this.xo,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.xo),pi(t.el(),i),this.So=i,this.vo=!0}}To(){this.Co&&!this.Mo&&this.t.Po&&(this.Ao=this.t.Po.Io(Zt,this.Eo),this.Mo=!0)}Do(){this.Ao&&this.t.Po&&(this.t.Po.No(this.Ao),this.Mo=!1)}mo(){let t=this.t.uo.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"}_o(){let t=this.t.uo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}Fo(){xi(this.do,"theo-pip"),this.Zh&&this.lo&&xi(this.do,"theo-pip-"+this.lo),this.So&&(fi(this.So),this.So=void 0)}bn(){this.Fo(),this.Do(),this.Bo(),this.t.pn(X.no,this.ro),this.t.pn(X.oo,this.ao),this.t.uo.off("languagechange",this.se),this.t=void 0}constructor(t,i,s){super(),this.$o=!1,this.io=!1,this.bo=!1,this.yo=!1,this.vo=!1,this.Mo=!1,this.jo=!1,this.ro=()=>{this.$o=!0,this.Co&&!this.Zh&&this.Ao&&this.Ro&&this.Ao.Oo<=this.Ro&&this.fo(!1)},this.ao=()=>{this.ho||(this.$o=!1,this.ko(!1))},this.se=()=>{if(this.xo){const t=this.t.uo;r(this.xo,t.localize("Video playing in Picture-in-Picture mode"))}},this.Eo=t=>{!this.yo&&this.Co&&(j(t)||(this.Ro&&t<=this.Ro||this.jo?this.io||this.bo||this.fo(!1):this.io?this.ko(!1):this.bo=!1))},this.Ro=i.visibility,this.lo=i.position,this.ho=i.retainPresentationModeOnSourceChange,this.Co=void 0!==this.Ro,this.t=t,this.do=t.Vo,this.Yh=s,this.eo()}},Yu=class extends O{Uo(){let t=super.Uo();return t===$.INLINE&&this.Lo&&this.Lo.Zh?$.PICTURE_IN_PICTURE:t}Ho(t){return t===$.PICTURE_IN_PICTURE||super.Ho(t)}zo(t,i){t===$.FULLSCREEN&&this.Lo.Do(),super.zo(t,i),t!==$.FULLSCREEN&&this.Lo.To()}Wo(t,i){t!==i&&(t===$.FULLSCREEN&&this.Lo.ko(!1),t===$.INLINE&&i===$.PICTURE_IN_PICTURE&&this.Lo.ko(!0),super.Wo(t,i),t===$.PICTURE_IN_PICTURE&&(i===$.INLINE?this.Lo.fo(!0):this.Lo.fo(!1)))}bn(){super.bn(),this.Lo.bn(),this.qo.pn(X.no,this.Go),this.qo=void 0}constructor(t,i,s){super(i),this.Xo=()=>this.Zr(),this.Yh=()=>this.Jo($.INLINE),this.Go=()=>{this.Uo()!==$.FULLSCREEN&&this.Lo.To(),this.qo.pn(X.no,this.Go)},this.qo=t,this.Lo=new Qu(t,s.pip,this.Yh),this.Lo.wn("presentationmodechange",this.Xo),this.qo.wn(X.no,this.Go),this.Zr()}},Ku=class extends z{get Qo(){return dt.Yo(this.uo.el())||this.uo.supportsFullScreen()}get cs(){return this.uo.isFullscreen()||this.Ko}fo(){this.uo.requestFullscreen()}ko(){this.uo.exitFullscreen(),this.Zo.ko()}bn(){this.Bo(),this.uo.off("fullscreenchange",this.ta),this.Zo.pn(D.ia,this.ta),this.Zo.pn(D.sa,this.Os),this.uo.isFullWindow&&this.uo.exitFullscreen()}constructor(t,i){super(),this.Us=!1,this.Ko=!1,this.ea=!1,this.ta=()=>{if(this.ea)return;const t=this.Us,i=this.cs;t!==i&&(this.Us=i,this.wo(new ut))},this.na=()=>{this.Ko=this.Zo.cs,this.ta()},this.ra=()=>{this.ea||(this.uo.isFullWindow&&this.uo.supportsFullScreen()||this.Ko&&!this.uo.supportsFullScreen())&&(this.ea=!0,this.uo.exitFullscreen(),this.uo.requestFullscreen(),this.ea=!1,this.ta())},this.uo=t,this.Zo=i,this.uo.on("fullscreenchange",this.ta),this.Zo.wn(D.ia,this.na),this.Zo.wn(D.ha,this.ra),this.Zo.wn(D.sa,this.Os),this.ta()}};function Zu(t){return class extends t{get Po(){return this.oa}cs(){return"fullscreen"===this.aa.Uo()}ua(){return function(t,i){let s=g.create(t);const e=i.uo;return at(s,{get controls(){return e.controls()},set controls(t){e.controls(ft(t))},get presentation(){return i.aa.ca},get presentationMode(){return i.aa.Uo()},set presentationMode(t){const s=U(t);s&&i.aa.Jo(s)},get ui(){return e},get visibility(){return i.Po.ca}})}(this.la,this)}bn(){super.bn(),this.aa.bn(),this.fa.bn(),this.uo.dispose(),this.oa.bn()}da(t){this.uo.src(""),super.da(t)}constructor(t,i,s){super(i,s),this.Vo=t,this.oa=new si(t),this.la=super.ua(),g.defineProperty(this.la,"constructor",{value:vi}),this.uo=Wu(this.la,this.Vo,s.ui),this.fa=new Ku(this.uo,this.va),this.aa=new Yu(this,this.fa,s),this.aa.wn("presentationmodechange",this.Os)}}}function tc(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(Vt(t)&&!j(t))return ei(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=ft(t.retainPresentationModeOnSourceChange),t}function ic(t){const i=I(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=tc(i.pip),i}function sc(){return Ju||(Ju=function(t){let i=t;for(const t of Yi)i=t(i);return i}(Ju=Zu(li()))),Ju}function ec(t,i){const s=ic(i),e=h.createElement("div");Ai(e),t.appendChild(e);const n=new(sc())(t,e,s);n.pa=n;let r=n.ca;return n.ma(),n.ga(ri),g.defineProperty(r,"constructor",{value:ec}),r=ht(r),oi(n),function(t){for(const i of Ki)i(t)}(n),r}var nc="theo-cast-",rc=Go.getComponent("Button"),hc=class extends(sa(rc)){get ya(){throw new d("ba")}get wa(){return this.h.wa}get ka(){return this.h.ka}buildCSSClass(){return nc+"button theo-"+this.ka+"-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=nc+"svg-container",r.innerHTML=this.wa,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this._a===H.AVAILABLE)null==(i=this.ya)||i.start();else if(this._a===H.CONNECTED||this._a===H.CONNECTING){var s;null==(s=this.ya)||s.stop()}}ja(t){xi(this.do,"theo-"+this.ka+"-"+this._a),this._a=t,ki(this.do,"theo-"+this.ka+"-"+this._a),this.se()}se(){this.xa(this._a),this.Be.Fe=this.controlText()}xa(t){t===H.CONNECTED?this.controlText("Stop Casting"):t===H.AVAILABLE?this.controlText("Start Casting"):t===H.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.do=t.el(),this._a=H.UNAVAILABLE,this.controlText("Unavailable"),this.Be=new Ma(this,this.controlText()),null==(s=this.ya)||s.addEventListener("statechange",(t=>{const i=t;this.ja(i.state)})),Nt.Zs.Ye&&(this.Sa=new pa(this.el())),this.ja(this.ya?this.ya.state:H.UNAVAILABLE),this.on(t,"languagechange",this.se)}},oc=0;function ac(){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-'+oc+'">\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-'+oc+')">\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 oc++,t}Go.registerComponent("chromecastButton",class extends hc{get ya(){var t;return null==(t=this.ks.cast)?void 0:t.chromecast}constructor(t,i){super(t,Wi({},i,{ka:"chromecast",wa:ac()}))}});var uc="theo-chromecast-",cc=Go.getComponent("Component"),lc=class t extends(sa(cc)){buildCSSClass(){return uc+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();ki(i,uc+"overlay");const s=Go.createEl("div",{className:uc+"status-icon",innerHTML:t.ICON_SVG}),e=Go.createEl("div",{className:uc+"status-info"});r(e,"Playing on");const n=Go.createEl("div",{className:uc+"status-title"}),h=Go.createEl("div",{className:uc+"status"});return this.yr=n,h.appendChild(s),h.appendChild(e),h.appendChild(n),i.appendChild(h),i}dispose(){var t;null==(t=this.Ta)||t.removeEventListener("statechange",this.update),this.Ta=void 0,this.ks.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.Ta?(this.yr&&r(this.yr,this.Ta.receiverName||""),this.Ta.state===H.CONNECTED?this.show():this.hide()):this.hide()},this.Ta=null==(s=this.ks.cast)?void 0:s.chromecast,null==(e=this.Ta)||e.addEventListener("statechange",this.update),this.ks.addEventListener("play",this.update),this.update()}};lc.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>',Go.registerComponent("chromecastOverlay",lc);Go.registerComponent("airplayButton",class extends hc{dispose(){var t,i;null==(t=this.ks.ads)||t.removeEventListener("adbreakbegin",this.Ca),null==(i=this.ks.ads)||i.removeEventListener("adbreakend",this.Ma),this.ks.removeEventListener("currentsourcechange",this.Ma),super.dispose()}get ya(){var t;return null==(t=this.ks.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,Wi({},i,{ka:"airplay",wa:'\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.Ma=()=>{this.enable()},this.Ca=()=>{this.disable()},null==(s=this.ks.ads)||s.addEventListener("adbreakbegin",this.Ca),null==(e=this.ks.ads)||e.addEventListener("adbreakend",this.Ma),this.ks.addEventListener("currentsourcechange",this.Ma)}});var fc={Default:"","Monospaced Serif":T.Pa,"Proportional Serif":T.Aa,"Monospaced Sans-Serif":T.Ia,"Proportional Sans-Serif":T.Ea},dc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},vc=[50,75,100,150,200];function pc(t){return{label:t+"%",value:t}}function mc(t){return g.keys(t).map((i=>({label:i,value:t[i]})))}vc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var gc=vc.map((function(t){return{label:t+"%",value:t+"%"}})),yc=[25,50,75,100].map(pc),bc=[0,25,50,75,100].map(pc),wc=mc(dc),kc=mc(fc),_c=mc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),jc=100,xc="#000000",Sc="#FFFFFF",Tc="#000000",Cc=class extends vu{Da(){let t=this.$r.localize(this.Na);r(this.Fa.subMenu.menuHeader.el(),t),this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",r(this.Br,t);let i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",ki(this.Fa.el(),"theo-subtitle-options-menu-item"),this.Fa.el().appendChild(this.Br),this.Fa.el().appendChild(i),i}Ba(t){const i=this.Mr(t);i&&this.$a(i)}Ra(){return this.kr}Ir(t){this.Oa(t.Pr)}$a(t){for(let t of this.Tr.menuItems)t.selected(!1);t?(t.selected(!0),this.Va(t.Pr.label)):this.Va("Custom")}Va(t){this.Ua=t,r(this.La,this.$r.localize(t)),this.Fa.parentMenu.oe()}Ar(t){let i=super.Ar(t);return ki(i.el(),"theo-subtitle-options-menu-item"),this.Nr(i),i}Nr(t){const i=this.$r.localize(t.Pr.label);r(t.el(),i);const s=this.$r.localize("Set "+this.Na+" to ")+i;t.el().setAttribute("aria-label",s)}Ve(){this.$r.off("languagechange",this.se),super.Ve()}constructor(t,i,s,e){super(t.subMenu),this.Fa=t,this.$r=e,this.Ua="",this.se=()=>{let t=this.$r.localize(this.Na);r(this.Fa.subMenu.menuHeader.el(),t),r(this.Br,t),this.Va(this.Ua);for(const t of this.Cr)this.Nr(t)},this.Na=i,this.Oa=s.Xo,this.La=this.Da(),this.kr=s.Ha,this.$r.on("languagechange",this.se)}},Mc=class t{static za(t,i,s,e){if(void 0===t&&void 0===i)return;return Lt(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.Wa=i,this.qa=t=>{this.Wa.fontFamily=t.value},this.Ga=t=>{this.Wa.fontSize=t.value},this.Xa=i=>{this.Ja=i.value,this.Wa.fontColor=t.za(this.Qa,this.Ja,Sc,jc)},this.Ya=i=>{this.Qa=i.value,this.Wa.fontColor=t.za(this.Qa,this.Ja,Sc,jc)},this.Ka=i=>{this.Za=i.value,this.Wa.backgroundColor=t.za(this.Za,this.tu,xc,jc)},this.iu=i=>{this.tu=i.value,this.Wa.backgroundColor=t.za(this.Za,this.tu,xc,jc)},this.su=i=>{this.eu=i.value,this.Wa.windowColor=t.za(this.eu,this.nu,Tc,jc)},this.ru=i=>{this.nu=i.value,this.Wa.windowColor=t.za(this.eu,this.nu,Tc,jc)},this.hu=t=>{this.Wa.edgeStyle=t.value}}},Pc=class{ou(t,i){const s=this.au(t,i.Ra());s&&i.Ba(s)}au(t,i){return E(i,(i=>i.value===t))}uu(t,i,s){let e,n;if(void 0===t)e=this.au(void 0,i.Ra()),n=this.au(void 0,s.Ra());else if(t){let r=function(t){let i=Ot(t);i||(i=Ot(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=At(Dt(t),1));if(!i){let s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=At(Dt(dc[s]),1)}return i}(t);if(r){let t=Bt(r),h=100*r.cu;e=this.au(t,i.Ra()),n=this.au(h,s.Ra())}}e&&i.Ba(e),n&&s.Ba(n)}constructor(t,i){this.Wa=t,this.lu=i,this.fu=()=>{let t=this.Wa.fontFamily;this.ou(t,this.lu["Font family"]);let i=this.Wa.fontColor;this.uu(i,this.lu["Font color"],this.lu["Font opacity"]);let s=this.Wa.fontSize;this.ou(s,this.lu["Font size"]);let e=this.Wa.backgroundColor;this.uu(e,this.lu["Background color"],this.lu["Background opacity"]);let n=this.Wa.windowColor;this.uu(n,this.lu["Window color"],this.lu["Window opacity"]);let r=this.Wa.edgeStyle;this.ou(r,this.lu["Character edge style"])},this.Wa.addEventListener("change",this.fu),this.fu()}};var Ac=class extends vu{du(){return{"Font family":{Ha:Ic(kc),Xo:this.vu.qa},"Font color":{Ha:Ic(wc),Xo:this.vu.Ya},"Font opacity":{Ha:Ic(yc),Xo:this.vu.Xa},"Font size":{Ha:Ic(gc),Xo:this.vu.Ga},"Background color":{Ha:Ic(wc),Xo:this.vu.Ka},"Background opacity":{Ha:Ic(bc),Xo:this.vu.iu},"Window color":{Ha:Ic(wc),Xo:this.vu.su},"Window opacity":{Ha:Ic(bc),Xo:this.vu.ru},"Character edge style":{Ha:Ic(_c),Xo:this.vu.hu}}}pu(){this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",this.mu=h.createElement("span"),this.mu.className="theo-primary-color theo-settings-control-menu-item-value",this.Wr.el().appendChild(this.Br),this.Wr.el().appendChild(this.mu),this.se()}Ar(t){let i=this.Tr.addSubMenuItem();return i.Pr=t,this.lu[t]=new Cc(i,t,this.gu[t],this.$r),i}Nr(t){}Ir(t){}Ve(){this.$r.off("languagechange",this.se),this.yu.removeEventListener(["addtrack","removetrack"],this.bu),super.Ve()}constructor(t,i,s,e){super(t.subMenu),this.Wr=t,this.yu=i,this.$r=e,this.lu={},this.bu=()=>{this.yu.some((t=>S(t.kind)))?this.Wr.show():this.Wr.hide()},this.se=()=>{r(this.Tr.menuHeader.el(),this.$r.localize("Subtitle Options")),r(this.Br,this.$r.localize("Subtitle")),r(this.mu,this.$r.localize("Options")),this.Wr.el().setAttribute("aria-label",this.$r.localize("Open the subtitle options menu"))},this.vu=new Mc(s),this.gu=this.du(),this.kr=g.keys(this.gu),this.pu(),this.wu=new Pc(s,this.lu),this.$r.on("languagechange",this.se),this.yu.addEventListener(["addtrack","removetrack"],this.bu),this.bu()}};function Ic(t){let i=[{label:"Default",value:void 0}];for(let s of t)"Default"!==s.label&&i.push(s);return i}!function(t){Ki.push(t)}((function(t){const i=t.uo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new Ac(s,t.nt.ca,t.ku.ca,t.uo);t.uo.on("dispose",(()=>{i.removeMenuItem(s),s.dispose(),e.Ve(),i.dispose()}))}));var Ec=.02,Dc=class{_u(t){const i=t-this.xu.ju-20,s=t-this.xu.ju+20;if(0===this.xu.lo)return;const e=this.xu.t.currentProgramDateTime.valueOf();e>s?this.Su(this.Tu):e<i?this.Su(this.Cu):this.Su(this.Mu)}Pu(t){const i=t-this.xu.ju/1e3-Ec,s=t-this.xu.ju/1e3+Ec;if(0===this.xu.lo)return;const e=this.xu.t.currentTime;e>s?this.Su(this.Tu):e<i?this.Su(this.Cu):this.Su(this.Mu)}Au(){this.Mu=this.qo.Iu,this.Tu=this.qo.Iu-.05,this.Cu=this.qo.Iu+.05}Su(t){const i=this.xu.t;if(i.playbackRate!==t&&0!==i.playbackRate){t>=.2&&t<=2.05?i.playbackRate=t:this.qo.Eu(this.xu)}}Du(){this.qo.pn(X.Nu,this.Fu),this.qo.pn(X.Bu,this.$u)}constructor(t,i){this.Mu=1,this.Tu=1.05,this.Cu=.95,this.Fu=()=>{this.Au()},this.$u=()=>{if(!this.qo.Ru)return;const t=this.qo.Ru.ju,i=this.qo.Ou,s=this.qo.Vu;null!==s?this._u(s.valueOf()+t):this.Pu(i+t/1e3)},this.xu=t,this.qo=i,this.qo.wn(X.Nu,this.Fu),this.qo.wn(X.Bu,this.$u)}},Nc=class{get t(){return this.qo}get ca(){var t;return null!=(t=this.Uu)?t:this.Uu=function(t){return{get label(){return t._h},get position(){return t.lo},set position(i){t.lo=i},get muted(){return t.Lu},set muted(i){t.Lu=i},get canResize(){return t.Hu},get x(){return t.Lh},set x(i){t.Lh=i},get y(){return t.Hh},set y(i){t.Hh=i},get width(){return t.Ti},set width(i){t.Ti=i},get height(){return t.Ci},set height(i){t.Ci=i},get enabled(){return t.Rt},set enabled(i){t.Rt=i},get offset(){return t.ju},set offset(i){t.ju=i},remove(){t.zu()}}}(this)}get _h(){return this.Wu}get lo(){return this.Gu.qu.indexOf(this)}set lo(t){this.Gu.Xu(this,t)}get Lu(){return this.qo.muted}set Lu(t){this.Rt&&(this.Gu.Ju=this,this.Qu(t))}get Hu(){return 0!==this.lo&&this.Gu.Yu===Qc.OVERLAY}get Lh(){return this.Ku}set Lh(t){this.Hu&&(this.Zu||(this.Zu=!0),this.Ku=t>1-this.Ti?1-this.Ti:w.max(t,0),this.t.element.style.setProperty("left",100*this.Ku+"%"))}get Hh(){return this.tc}set Hh(t){this.Hu&&(this.Zu||(this.Zu=!0),this.tc=t>1-this.Ci?1-this.Ci:w.max(t,0),this.t.element.style.setProperty("top",100*this.tc+"%"))}get Ti(){return this.ic}set Ti(t){this.Hu&&this.sc(t)}get Ci(){return this.ec}set Ci(t){this.Hu&&this.sc(t)}get Rt(){return this.We}set Rt(t){t!==this.We&&0!==this.lo&&(t?(L(this.Gu.Eu(this)),this.Gu.nc(this),this.t.element.style.setProperty("display","block")):(this.t.pause(),this.t.element.style.setProperty("display","none")),this.We=t,this.Gu.rc(this))}get hc(){return this.Zu}set hc(t){this.Zu=t}get oc(){return this.ac}set oc(t){this.ac=t}get ju(){return this.uc}set ju(t){this.uc=t,this.cc(this.Gu.Ou,this.Gu.Vu)}lc(t,i,s,e,n){!this.Zu&&n&&(this.Zu=!0),this.Ku=t,this.tc=i,this.ic=s,this.ec=e}Qu(t){this.qo.muted=t}zu(){0!==this.lo&&this.Gu.fc(this)}dc(){this.t.element.style.setProperty("top",100*this.tc+"%"),this.t.element.style.setProperty("left",100*this.Ku+"%"),this.t.element.style.setProperty("width",100*this.ic+"%")}sc(t){const i=this.Ku+this.ic,s=w.min(t,i),e=.9-this.tc,n=w.min(t,e),r=w.max(w.min(s,n),.1),h=this.ic-r;this.ic=r,this.ec=r,this.Lh+=h,this.t.element.style.setProperty("width",100*r+"%")}cc(t,i){if(null!==i){const t=i.valueOf()-this.ju;this.qo.currentProgramDateTime=new Date(t)}else this.qo.currentTime=t-this.ju/1e3}vc(t){const i=this.t.element.getElementsByClassName(zc)[0],s=t?qc:Wc;xi(i,t?Wc:qc),ki(i,s)}Du(){this.mc.Du(),this.qo.element.remove(),this.qo.destroy()}constructor(t,i,s,e){this.We=!0,this.Zu=!1,this.ac=0,this.Wu=t,this.qo=i,this.Gu=s,this.mc=new Dc(this,s),this.uc=null!=e?e:0,this.ic=.2,this.ec=.2,this.Ku=.76,this.tc=0}};var Fc=class{get multiViewPlayer(){return this.Gu}get abr(){}get audioTracks(){return this.gc}get autoplay(){return this.Gu.autoplay}set autoplay(t){this.Gu.autoplay=t}get buffered(){return this.Gu.buffered}get canvas(){}get clip(){return this.yc.ca}get currentProgramDateTime(){return null}get currentTime(){return this.Gu.currentTime}set currentTime(t){this.Gu.currentTime=t}get duration(){return this.Gu.duration}get element(){return this.Hs}get ended(){return this.Gu.ended}get error(){}get errorObject(){return this.Gu.errorObject}get latency(){}get loop(){return!1}get metrics(){}get muted(){return this.Gu.muted}set muted(t){this.Gu.muted=t}get network(){}get paused(){return this.Gu.paused}get playbackRate(){return this.Gu.playbackRate}set playbackRate(t){this.Gu.playbackRate=t}get played(){return this.Gu.played}get poster(){return""}get preload(){return""}get presentation(){}get readyState(){return this.Gu.readyState}get seekable(){return this.Gu.seekable}get seeking(){return this.Gu.seeking}get source(){}get src(){return"dummySource"}get textTrackStyle(){return this.bc}get textTracks(){return this.wc}addTextTrack(t){throw d("Not implemented")}get uid(){return 0}get videoHeight(){return 0}get videoTracks(){return this.gc}get videoWidth(){return 0}get volume(){return this.Gu.volume}set volume(t){this.Gu.volume=t}get views(){return this.Gu.views}get visibility(){}get layout(){return this.Gu.layout}set layout(t){this.Gu.layout=t}play(){this.Gu.play()}pause(){this.Gu.pause()}stop(){this.Gu.stop()}destroy(){this.Gu.destroy()}prepareWithUserAction(){this.Gu.prepareWithUserAction()}addEventListener(t,i){this.kc.wn(t,i)}removeEventListener(t,i){this.kc.pn(t,i)}setSource(t){}constructor(t,i){this.kc=new z,this.Gu=t,this.Hs=i,this.yc=new pt,this.gc=(new ci).ca,this.wc=(new di).ca,this.bc=(new kt).ca,this.Gu.addEventListener(["play","pause","seeking","seeked","timeupdate","ended","playing","waiting","sourcechange","readystatechange","loadedmetadata","loadeddata","canplay","canplaythrough","loadstart","progress","durationchange","volumechange","ratechange","error"],this.kc.Os)}},Bc=class extends q{constructor(t){super(Jc._c),this.view=t}},$c=class extends q{constructor(t,i){super(Jc.VIEW_POSITION_CHANGE),this.oldPosition=t,this.newPosition=i}},Rc=class extends q{constructor(t){super(Jc.jc),this.view=t}},Oc=class extends q{constructor(t){super(Jc.VIEW_CHANGE),this.view=t}},Vc=class extends q{constructor(t){super(Jc.xc),this.layout=t}},Uc=class extends z{get Ou(){return this.qo.Ou}get Sc(){return this.qo.Sc}get lt(){return this.qo.Tc}get Cc(){return this.qo.Cc}get Mc(){return this.qo.Mc}get Pc(){return this.qo.Pc}get Ac(){return!1}get Ic(){return!1}Du(){this.Bo()}constructor(t){super(),this.Ec=t=>{this.Os(new ai(t.source))},this.Dc=t=>{this.Os(new Ii(t.currentTime))},this.Nc=t=>{this.Os(new Mi(t.currentTime))},this.Fc=t=>{this.Os(new Hi(t.currentTime))},this.Bc=t=>{this.Os(new qi(t.currentTime))},this.$c=t=>{this.Os(new nt(t.currentTime,t.currentProgramDateTime))},this.Rc=t=>{this.Os(new Vi(t.currentTime))},this.Oc=t=>{this.Os(new Kt(t.currentTime))},this.Vc=t=>{this.Os(new zt(t.currentTime))},this.Uc=t=>{this.Os(new Et(t.currentTime,t.readyState))},this.Lc=t=>{this.Os(new Rt(t.currentTime,this.Mc))},this.Hc=t=>{this.Os(new Ut(t.currentTime,this.Mc))},this.zc=t=>{this.Os(new Gt(t.currentTime,this.Mc))},this.Wc=t=>{this.Os(new Qt(t.currentTime,this.Mc))},this.qc=()=>{this.Os(new St)},this.Gc=t=>{this.Os(new jt(t.currentTime))},this.Xc=t=>{this.Os(new Ni(t.duration))},this.Jc=t=>{this.Os(new Ji(this.Ou,t.volume))},this.Qc=t=>{this.Os(new $i(this.Ou,t.playbackRate))},this.Yc=t=>{this.Os(new Ui(t.errorObject))},this.Kc=()=>{this.Os(new ut)},this.qo=t,this.qo.wn("sourcechange",this.Ec),this.qo.wn("play",this.Dc),this.qo.wn("pause",this.Nc),this.qo.wn("seeking",this.Fc),this.qo.wn("seeked",this.Bc),this.qo.wn("timeupdate",this.$c),this.qo.wn("ended",this.Rc),this.qo.wn("playing",this.Oc),this.qo.wn("waiting",this.Vc),this.qo.wn("readystatechange",this.Uc),this.qo.wn("loadedmetadata",this.Lc),this.qo.wn("loadeddata",this.Hc),this.qo.wn("canplay",this.zc),this.qo.wn("canplaythrough",this.Wc),this.qo.wn("loadstart",this.qc),this.qo.wn("progress",this.Gc),this.qo.wn("durationchange",this.Xc),this.qo.wn("volumechange",this.Jc),this.qo.wn("ratechange",this.Qc),this.qo.wn("error",this.Yc),this.qo.wn("fullscreenchange",this.Kc)}},Lc=class{async Zc(){const t=this.qo;if(!t.tl||!t.Cc)return;const i=this.il.mutedAutoplay;switch(await this.nl.sl(t.Lu)){case"all":t.Lu||t.rl(),t.hl();break;case"muted":(t.Lu||i===M.ALL)&&(t.Lu=!0,t.hl())}}bn(){this.nl.bn(),this.mn.bn()}constructor(t,i,s){this.qo=t,this.il=s,this.bc=new kt,this.mn=new ot(i);const e=new hi(this.mn,this.bc,1,[vt.ol]);this.nl=new ui(e)}},Hc=[Pt.al,Pt.cl,Pt.ll,Pt.fl],zc="theo-switch-audio-button",Wc="vjs-icon-volume-mute",qc="vjs-icon-volume-high",Gc="theo-main-view",Xc="theo-layout-",Jc=function(t){return t._c="addview",t.jc="removeview",t.VIEW_CHANGE="viewchange",t.VIEW_POSITION_CHANGE="viewpositionchange",t.xc="layoutchange",t}({}),Qc=function(t){return t.GALLERY="gallery",t.OVERLAY="overlay",t.SPOTLIGHT="spotlight",t}({}),Yc=class extends z{get ca(){var t;return null!=(t=this.Uu)?t:this.Uu=function(t){return{load:(i,s,e,n)=>t.On(i,s,e,n),get views(){return t.qu.map((t=>t.ca))},get mainVideoView(){var i;return null==(i=t.Ru)?void 0:i.ca},get mainAudioView(){var i;return null==(i=t.Ju)?void 0:i.ca},get ui(){return t.uo},get layout(){return t.Yu},set layout(i){t.Yu=i},get buffered(){return t.dl},get currentTime(){return t.Ou},set currentTime(i){t.Ou=i},get autoplay(){return t.tl},set autoplay(i){t.tl=i},get duration(){return t.ct},get ended(){return t.Sc},get errorObject(){return t.Tc},get muted(){return t.Lu},set muted(i){t.Lu=i},get paused(){return t.Cc},get playbackRate(){return t.Iu},set playbackRate(i){t.Iu=i},get played(){return t.vl},get readyState(){return t.Mc},get seekable(){return t.pl},get seeking(){return t.Pc},get volume(){return t.ml},set volume(i){t.ml=i},play(){t.hl()},pause(){t.gl()},stop(){t.yl()},destroy(){t.Du(),t=null},requestFullscreen(i){t.bl(i)},exitFullscreen(){t.wl()},prepareWithUserAction(){t.rl()},addEventListener(i,s){t.wn(i,s)},removeEventListener(i,s){t.pn(i,s)}}}(this)}get uo(){return this.kl}get qu(){return this._l}get Ru(){return this.jl}get Ju(){var t;return null!=(t=this.xl)?t:this.jl}set Ju(t){if(this.xl===t)return;const i=this.Ju,s=null!=t?t:this.Ru;i.t.removeEventListener(X.Sl,this.Tl),i.vc(!1),i.Lu||(i.Qu(!0),s.Qu(!1)),s.t.addEventListener(X.Sl,this.Tl),s.vc(!0),this.xl=t}get Yu(){return this.Cl}set Yu(t){if(t!==this.Cl){if("overlay"===this.Yu)for(const t of this.qu)t.t.element.style.setProperty("left","auto"),t.t.element.style.setProperty("top","auto"),t.t.element.style.removeProperty("z-index");xi(this.Hs,Xc+this.Cl),this.Cl=t,ki(this.Hs,Xc+this.Cl),this.dc(),this.wo(new Vc(t))}}get dl(){if(0===this.qu.length)return mi.Ml().ws();return this.Pl().reduce(((t,i)=>t.Cn(mi.Sn(i.t.buffered))),new mi([0,1/0])).ws()}get Ou(){return this.jl&&this.Al?this.jl.t.currentTime+this.jl.ju/1e3:0}set Ou(t){this.Il();const i=this.Pl();let s=null;if(null!==this.Vu){s=this.Vu;const i=t-this.Ou;s.setSeconds(s.getSeconds()+i)}for(const e of i)e.cc(t,s)}get Vu(){if(!this.jl)return null;return this.qu.every((t=>null!==t.t.currentProgramDateTime))?new Date(this.jl.t.currentProgramDateTime.valueOf()+this.jl.ju):null}get tl(){return this.El}set tl(t){this.El=t,this.Dl.Zc()}get ct(){if(0===this.qu.length)return NaN;let t=1/0;for(const i of this.Pl())t=w.min(i.t.duration,t);return t}get Sc(){return this.qu.some((t=>t.t.ended))}get lt(){return this.Tc}get Tc(){if(this.Nl)return this.Nl;for(const t of this.qu){const i=t.t.errorObject;if(void 0!==i)return i}}get Lu(){var t,i;return null!=(i=null==(t=this.Ju)?void 0:t.Lu)&&i}set Lu(t){this.Ju&&this.Ju.Qu(t),this.Tl()}get Cc(){if(!this.qu.length)return!0;return this.Pl().some((t=>t.t.paused))}get Iu(){var t,i,s;return null!=(s=null!=(i=this.Fl)?i:null==(t=this.jl)?void 0:t.t.playbackRate)?s:1}set Iu(t){if(void 0!==this.Fl)this.Fl=t;else for(const i of this.qu)i.t.playbackRate=t;this.Bl()}get vl(){return this.qu.reduce(((t,i)=>t.$l(mi.Sn(i.t.played))),mi.Ml()).ws()}get Mc(){if(0===this.qu.length)return Ft.Rl;let t=Ft.Ol;for(const i of this.Pl())i.t.readyState<t&&(t=i.t.readyState);return t}get pl(){if(0===this.qu.length)return mi.Ml().ws();return this.Pl().reduce(((t,i)=>t.Cn(mi.Sn(i.t.seekable))),new mi([0,1/0])).ws()}get Pc(){return this.qu.some((t=>t.t.seeking))}get ml(){var t,i;return null!=(i=null==(t=this.Ju)?void 0:t.t.volume)?i:1}set ml(t){for(const i of this.qu)i.t.volume=t;this.Tl()}On(t,i,s,e){if(this.Vl)throw this.Nl;const n=this.qu.filter((i=>i._h===t))[0];return n?n.ca:this.Ul(t,i,s,e)}hl(){if(!this.jl||!this.Cc)return;this.Il();const t=this.Pl();for(const i of t)i.t.play()}gl(){const t=this.Pl();for(const i of t)i.t.pause()}yl(){for(let t=this.qu.length-1;t>=0;t--)this.fc(this.qu[t]);this.jl=void 0,this.xl=void 0,this.Nl=void 0,this.Ll&&(this.Ll.Hl(),this.Ll=void 0),this.zl=!0,this.Wl=!1,this.ql=!1,this.Gl=-1,this.Xl=Ft.Rl,this.Jl=!1,this.Fl=void 0,this.Ql=!1,this.Yl=-1,this.Kl=!1,this.Zl=-1,this.Al=!1,this.tf.sr(),this.wo(new ai(void 0))}Du(){for(let t=this.qu.length-1;t>=0;t--)this.fc(this.qu[t]);this.Bo(),this.tf.bn(),this.if.Du(),this.sf.Du(),this.Dl.bn(),this.uo.dispose()}bl(t){this.wo(new ut),this.Hs.requestFullscreen(t).catch(Yt)}wl(){this.wo(new ut),h.exitFullscreen().catch(Yt)}rl(){for(const t of this.qu)t.t.prepareWithUserAction()}Ul(t,i,s,e){const n=h.createElement("div");ki(n,"theo-view"),this.Hs.appendChild(n);const r=new(li())(n,this.il).ca;r.source=i;const o=new Nc(t,r,this,e);if(s){const t=h.createElement("div");t.className="theo-view-description";const i=h.createElement("span");i.textContent=s,t.appendChild(i),n.appendChild(t),o.t.addEventListener("dimensionchange",(()=>{this.ef(t)}))}return this.nf(o),this.qu.push(o),1===this.qu.length?(this.jl=o,this.rf(this.jl),ki(this.jl.t.element,Gc)):(this.hf(r),0!==this.Ou&&L(this.Eu(o,!0))),this.dc(),this.wo(new Bc(o.ca)),o.ca}Pl(){return this.qu.filter((t=>t.Rt))}af(){return this.qu.filter((t=>t.Rt&&t!==this.jl))}hf(t){t.volume=this.jl.t.volume,t.muted=!0,t.playbackRate=this.jl.t.playbackRate}nf(t){t.oc=this.qu.length;const i=t.t.element;i.addEventListener("dblclick",(()=>{this.uf(t)})),i.addEventListener("touchend",(i=>{this.cf>=i.timeStamp?(i.preventDefault(),this.uf(t),this.cf=0):this.cf=i.timeStamp+500}));const s=h.createElement("div"),e=0===this.qu.length?qc:Wc;s.className="theo-primary-color "+zc+" "+e,s.addEventListener("click",(()=>{this.Ju=t})),s.addEventListener("touchend",(()=>{this.Ju=t})),i.appendChild(s);const n=h.createElement("div");n.className="theo-primary-color theo-disable-button vjs-icon-close",n.addEventListener("click",(()=>{t.Rt=!1})),n.addEventListener("touchend",(()=>{t.Rt=!1})),i.appendChild(n),this.lf(t,i),this.ff(t),this.df(t)}lf(t,i){const s=h.createElement("div");let e=0;const n=i=>{if(this.vf=!0,this.nc(t),i.preventDefault(),"touchstart"===i.type){e=i.changedTouches[0].clientX,h.addEventListener("touchmove",r),h.addEventListener("touchend",o),h.addEventListener("touchcancel",o)}else{e=i.x,h.addEventListener("mousemove",r),h.addEventListener("mouseup",o)}},r=i=>{let s;if("touchmove"===i.type){s=i.changedTouches[0].clientX}else{s=i.x}const n=e-s,r=t.t.element.parentElement.clientWidth,h=(t.t.element.clientWidth+n)/r;t.Ti=h,t.Ci=h,e=s},o=t=>{this.vf=!1,"mouseup"===t.type?(h.removeEventListener("mousemove",r),h.removeEventListener("mouseup",o)):(h.removeEventListener("touchmove",r),h.removeEventListener("touchend",o),h.removeEventListener("touchcancel",o))};s.addEventListener("mousedown",n),s.addEventListener("touchstart",n),s.className="theo-resize-button theo-primary-color vjs-icon-resize-handle-sw",i.appendChild(s)}ef(t){const i=t.parentElement.clientWidth/100,s=w.min(40,5.23*i);t.style.fontSize=s+"px"}ff(t){const i=t.t.element,s=i.parentElement;let e={x:0,y:0};const n=i=>{if(!this.vf&&t.Hu)if(this.nc(t),i.preventDefault(),"touchstart"===i.type){const t=i;e.x=t.changedTouches[0].clientX,e.y=t.changedTouches[0].clientY,h.addEventListener("touchmove",r),h.addEventListener("touchend",o),h.addEventListener("touchcancel",o)}else{const t=i;e.x=t.x,e.y=t.y,h.addEventListener("mousemove",r),h.addEventListener("mouseup",o)}},r=n=>{let r;if("touchmove"===n.type){const t=n;r={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}}else{const t=n;r={x:t.x,y:t.y}}const h=r.x-e.x,o=r.y-e.y,a=i.offsetLeft,u=s.clientWidth;t.Lh=(a+h)/u;const c=s.offsetHeight,l=i.offsetTop;t.Hh=(l+o)/c,e=r},o=t=>{"mouseup"===t.type?(h.removeEventListener("mouseup",o),h.removeEventListener("mousemove",r)):(h.removeEventListener("touchmove",r),h.removeEventListener("touchend",o),h.removeEventListener("touchcancel",o))};i.addEventListener("mousedown",n),i.addEventListener("touchstart",n)}nc(t){for(const i of this.qu)i.oc>t.oc&&(i.oc-=1,i.t.element.style.setProperty("z-index",""+i.oc));t.oc=this.qu.length,t.t.element.style.setProperty("z-index",""+t.oc)}Il(){if(void 0!==this.Fl)return;this.Fl=this.Iu;const t=this.Pl();for(const i of t)i.t.playbackRate=0}pf(){if(void 0===this.Fl)return;if(this.Pc||this.Mc<Ft.mf){if(this.jl&&!this.Al){this.Al=!0;for(const t of this.af())this.jl.ju!==t.ju&&t.cc(this.Ou,this.Vu)}return}const t=this.Pl();for(const i of t)i.t.playbackRate=this.Fl;this.Fl=void 0,this.Al=!0}rc(t){t.Rt||t!==this.xl||(this.Ju=void 0),this.wo(new Oc(t.ca)),this.dc()}async Eu(t,i){void 0===i&&(i=!1),this.Il();const s=t.t;i&&(this.Ll=new Q,s.addEventListener(X.oo,this.Ps),await this.Ll.gf,s.removeEventListener(X.oo,this.Ps)),s.readyState===Ft.Rl&&(this.Ql=!0,s.play()),this.Cc?s.pause():s.play(),t.cc(this.Ou,this.Vu)}dc(){const t=this.Pl();if(!t.length)return;let i=0;switch(this.Yu){case"spotlight":{t.length>1?this.Hs.style.gridTemplateColumns="80% 20%":this.Hs.style.gridTemplateColumns="100%";let s=1/0;for(const e of t)if(i>=s+1)e.Rt=!1;else if(e.t.element.style.setProperty("width","100%"),i++,2===i){const i=e.t.element.clientHeight,n=e.t.element.parentElement.clientHeight,r=w.floor(n/i);s=w.min(t.length-1,r),this.Hs.style.gridTemplateRows="repeat("+s+", 1fr)"}break}case"overlay":{let s=0;for(i=1;i<t.length;i++){const e=t[i];if(i>=5)e.Rt=!1;else{if(!e.hc){const t=.04+.24*s;e.lc(e.Lh,t,e.Ti,e.Ci,!1),this.nc(e),s++}e.t.element.style.setProperty("z-index",""+e.oc),e.dc()}}break}case"gallery":{const s=t.length,e=w.ceil(w.sqrt(s));for(const s of t)i>=9?s.Rt=!1:(s.t.element.style.setProperty("width",100/e+"%"),i++);break}}}Xu(t,i){const s=i>=0?w.min(w.floor(i),this.qu.length-1):0,e=t.lo,n=w.min(e,s),r=w.max(e,s),h=0===n;if(!(!this.qu[n].Rt||!this.qu[r].Rt)||!h){if("overlay"===this.Yu){const t=this.qu[r],i=this.qu[n],s=t.Lh,e=t.Hh,h=t.Ti,o=t.Ci,a=i.hc||t.hc;t.lc(i.Lh,i.Hh,i.Ti,i.Ci,a),[this.qu[n],this.qu[r]]=[this.qu[r],this.qu[n]],i.lc(s,e,h,o,a)}else[this.qu[n],this.qu[r]]=[this.qu[r],this.qu[n]];h&&this.yf(this.qu[0]),this.wo(new $c(e,s))}}fc(t){t===this.xl&&(this.Ju=void 0),t.Du(),N(this.qu,t),this.dc(),this.wo(new Rc(t.ca))}uf(t){this.Sc||0===this.vl.length||this.jl===t||"gallery"===this.Cl||this.Xu(t,0)}yf(t,i){void 0===i&&(i=!1);let s=!1;const e=this.jl;this.jl=t,t.hc=!1,this.bf(e),xi(e.t.element,Gc),this.xl||(s=e.Lu,e.Qu(!0),e.vc(!1),t.vc(!0),i&&!s?this.wo(new Ji(this.Ou,0)):t.Qu(s)),this.nc(e),ki(this.jl.t.element,Gc),this.rf(this.jl),"overlay"===this.Yu&&this.dc()}df(t){t.t.addEventListener(X.wf,this.kf),t.t.addEventListener(X._f,this.Ch),t.t.addEventListener(X.no,this.jf),t.t.addEventListener(X.xf,this.Sf),t.t.addEventListener(X.Tf,this.Xe),t.t.addEventListener(X.Cf,this.Mf),t.t.addEventListener(X.Pf,this.Af),t.t.addEventListener(Pt.If,this.Ef),t.t.addEventListener(_t.sa,this.Ms)}rf(t){t.t.addEventListener(X.Df,this.Os),t.t.addEventListener(X.Nu,this.Bl),t.t.addEventListener(X.Bu,this.Nf),this.xl||t.t.addEventListener(X.Sl,this.Tl)}bf(t){t.t.removeEventListener(X.Df,this.Os),t.t.removeEventListener(X.Nu,this.Bl),t.t.removeEventListener(X.Bu,this.Nf),this.xl||t.t.removeEventListener(X.Sl,this.Tl)}constructor(t,i,s){super(),this._l=[],this.Cl="gallery",this.vf=!1,this.Vl=!1,this.zl=!0,this.Wl=!1,this.ql=!1,this.Gl=-1,this.Xl=Ft.Rl,this.Jl=!1,this.cf=0,this.Fl=void 0,this.Ql=!1,this.El=!1,this.Yl=-1,this.Kl=!1,this.Zl=-1,this.Al=!1,this.Ff=t=>{this.pf(),V((()=>this.Os(t)))},this.Bf=t=>{this.Il(),this.Os(t)},this.Ps=()=>{var t;null==(t=this.Ll)||t.$f(),this.Ll=void 0},this.Bl=()=>{const t=this.Iu;this.Zl!==t&&(this.Zl=t,this.Os(new $i(this.Ou,t)))},this.Tl=()=>{const t=this.ml,i=this.Lu;this.Yl===t&&this.Kl===i||(this.Yl=t,this.Kl=i,this.Os(new Ji(this.Ou,t)))},this.Nf=t=>{(this.Mc>Ft.Rf||this.Pc)&&this.Os(t)},this.kf=t=>{this.pf(),this.Pc||(this.Wl=!1,this.Os(t))},this.Af=t=>{const i=this.ct;this.Gl!==i&&(this.Gl=i,this.Os(t))},this.Ms=t=>{this.Os(t)},this.jf=t=>{if(this.zl){if(this.Ql)return void(this.Ql=!1);this.zl=!1,this.ql=!1,this.Os(t)}},this.Xe=t=>{this.Wl||(this.Wl=!0,this.Os(t))},this.Sf=t=>{!this.zl&&this.Cc&&(this.zl=!0,this.Os(t))},this.Ch=t=>{this.ql||(this.ql=!0,this.Os(t))},this.Mf=t=>{this.Jl||(this.Jl=!0,this.Os(t))},this.Ef=t=>{const i=this.Mc;this.Xl!==i&&(this.Xl=i,this.Os(t))},this.Of=async()=>{try{await this.Uf.Vf([G.MULTIVIEW])}catch(t){this.yl(),this.Nl=st(t,K.LICENSE_INVALID_FEATURE),this.Vl=!0,this.wo(new ni(this.Nl))}},this.Lf=t,this.Hs=i,this.il=s;const e=Nt.Hf,n=new bt,r=new Z("8.8.3",e,n),h=new Y(s.isEmbeddable,"8.8.3",J());if(this.Uf=new gt(e,h,r,n,s,J()),this.Uf.zf().then(this.Of),this.Wf=new Fc(this.ca,this.Hs),this.kl=Wu(this.Wf,this.Lf,s.ui),ki(this.Hs,Xc+this.Cl),Nt.Zs.Ks){const t=this.kl.el();ki(t,"theo-mobile"),qu(t)}this.sf=new Uc(this),this.if=new Ct(this.sf),this.if.wn(Pt.qf,this.Ff),this.tf=new ii(this,!0),this.tf.wn(Hc,this.Os),this.tf.wn(Pt.Gf,this.Bf),this.Dl=new Lc(this,t,s)}};function Kc(t,i){var s;const e=ic(Wi({},i||{},{allowNativeFullscreen:!1,ui:Wi({},(null==i?void 0:i.ui)||{},{userActions:Wi({},(null==i||null==(s=i.ui)?void 0:s.userActions)||{},{click:!1})}),abr:Wi({},(null==i?void 0:i.abr)||{},{restrictToPlayerSize:!0})})),n=h.createElement("div");Ai(n),t.appendChild(n);let r=new Yc(t,n,e).ca;return g.defineProperty(r,"constructor",{value:Kc}),r=ht(r),r}var Zc="vjs-selected",tl=class extends vu{Nr(t){const i=t.Pr,s=this.$r.localize(i.label);r(t._h,s),t.el().setAttribute("aria-label",this.$r.localize("Enable/disable")+" "+s),t.el().setAttribute("role","menuitemcheckbox"),t.selected(i.enabled)}Ar(t){const i=super.Ar(t);ki(i.el(),"theo-multi-view-menu-item"),2===this.Cr.length&&ki(i.el(),"theo-multi-view-menu-item-position-zero");const s=h.createElement("span");i._h=s;const e=h.createElement("div");e.className="theo-multi-view-menu-item-toggle",i.jh=e;const n=t=>this.xh(t,i);i.Sh=n,e.addEventListener("click",n);const r=h.createElement("div");return r.className="theo-multi-view-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),this.Xf.before(i.el()),i}Jf(){const t=this.Tr.addMenuItem().el();ki(t,"theo-multi-view-menu-item"),ki(t,"theo-multi-view-menu-layout-select");const i=h.createElement("button");i.className="vjs-icon-view-grid",i.addEventListener("click",(()=>{this._s.layout=Qc.GALLERY})),t.appendChild(i),this.Qf=i;const s=h.createElement("button");s.className="vjs-icon-view-spotlight",s.addEventListener("click",(()=>{this._s.layout=Qc.SPOTLIGHT})),t.appendChild(s),this.Yf=s;const e=h.createElement("button");return e.className="vjs-icon-multi-view",e.addEventListener("click",(()=>{this._s.layout=Qc.OVERLAY})),t.appendChild(e),this.Kf=e,t}xh(t,i){t.stopImmediatePropagation(),this.Ir(i)}Ir(t){const i=t.Pr;for(const t of this._s.views)t===i&&(t.enabled=!t.enabled);this.Nr(t)}Er(t){t.jh.removeEventListener("click",t.Sh),super.Er(t)}constructor(t,i,s){super(t),this.Zf=t=>{this.Sr(t.view)},this.td=t=>{this.jr(t.view)},this.sd=t=>{const i=t.oldPosition,s=t.newPosition,e=w.max(i,s),n=w.min(i,s),r=h.getElementsByClassName("theo-multi-view-menu-item");r[e].before(r[n]),r[n].before(r[e]),0===n&&(xi(r[e],"theo-multi-view-menu-item-position-zero"),ki(r[n],"theo-multi-view-menu-item-position-zero"))},this.ed=()=>{const t=this._s.layout;Ci(this.Qf,Zc,t===Qc.GALLERY),Ci(this.Yf,Zc,t===Qc.SPOTLIGHT),Ci(this.Kf,Zc,t===Qc.OVERLAY)},i.views&&(this._s=i,this.$r=s,this._s.multiViewPlayer.addEventListener(Jc._c,this.Zf),this._s.multiViewPlayer.addEventListener(Jc.jc,this.td),this._s.multiViewPlayer.addEventListener(Jc.VIEW_CHANGE,this.Zf),this._s.multiViewPlayer.addEventListener(Jc.VIEW_POSITION_CHANGE,this.sd),this._s.multiViewPlayer.addEventListener(Jc.xc,this.ed),r(this.Tr.menuHeader.el(),this.$r.localize("MultiView")),this.Xf=this.Jf(),this.ed())}};Go.registerComponent("multiViewButton",class extends Aa{buildCSSClass(){return"vjs-icon-view-grid "+super.buildCSSClass()}dispose(){this.kh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=3,this.kh=new tl(this.menu,this.ks,t),this.controlText(t.localize("Views")),this.Be.Fe=this.controlText()}});export{vi as ChromelessPlayer,tt as ErrorCategory,K as ErrorCode,Kc as MultiViewPlayer,ec as Player,P as cache,Qi as cast,wi as features,Ti as playerSuiteVersion,Pi as players,Ei as registerContentProtectionIntegration,gi as utils,ji as version,Go as videojs};
|
|
40
|
+
var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==a?a:"undefined"!=typeof global?global:this,a=s.window,h=s.document,u=(s.location,s.navigator,s.setTimeout),c=s.clearTimeout,d=(s.setInterval,s.clearInterval,s.Error),v=s.TypeError,m=s.SyntaxError,g=s.Object,w=s.Math,k=s.parseInt,_=s.parseFloat,j=s.isNaN,x=s.Uint8Array;s.Worker,s.WorkerGlobalScope,s.XMLHttpRequest;import{$ as S,$a as T,A as C,Aa as P,Ab as M,B as A,Ba as I,Bb as E,C as D,Ca as N,Cb as F,D as B,Da as $,E as R,Ea as O,F as V,Fa as U,G as L,Ga as H,H as z,Ha as W,I as q,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 ft,Sa as dt,T as vt,Ta as pt,U as mt,Ua as gt,V as yt,Va as bt,W as wt,Wa as kt,X as _t,Xa as jt,Y as xt,Ya as St,Z as Tt,Za as Ct,_ as Pt,_a as Mt,a as At,aa as It,ab as Et,b as Dt,ba as Nt,bb as Ft,c as Bt,ca as $t,cb as Rt,d as Ot,da as Vt,db as Ut,e as Lt,ea as Ht,eb as zt,f as Wt,fa as qt,fb as Gt,g as Xt,ga as Jt,gb as Qt,h as Yt,ha as Kt,hb as Zt,i as ti,ia as ii,ib as si,j as ei,ja as ni,jb as t,k as ri,ka as hi,kb as oi,l as ai,la as ui,lb as ci,m as li,ma as fi,mb as di,n as vi,na as pi,nb as mi,o as gi,oa as yi,ob as bi,p as wi,pa as ki,pb as _i,q as ji,qa as xi,qb as Si,r as Ti,ra as Ci,rb as Pi,s as Mi,sa as Ai,sb as Ii,t as Ei,ta as Di,tb as Ni,u as Fi,ua as Bi,ub as $i,v as Ri,va as Oi,vb as Vi,w as Ui,wa as Li,wb as Hi,x as zi,xa as Wi,xb as qi,y as Gi,ya as Xi,yb as Ji,z as Qi,za as Yi,zb as Ki}from"./THEOplayer.common.esm.js";var Zi=[];var ts=[];var is=void 0!==a?a:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ss=void 0!==h?h:{createElement:function(){}};function es(t,i){return i||(i=t.slice(0)),t.raw=i,t}var ns=1;function rs(){return ns++}var hs,os=g.prototype.toString,as=function(t){return ls(t)?g.keys(t):[]};function us(t,i){as(t).forEach((function(s){return i(t[s],s)}))}function cs(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 g.assign?g.assign.apply(g,[t].concat(s)):(s.forEach((function(i){i&&us(i,(function(i,s){t[s]=i}))})),t)}function ls(t){return!!t&&"object"==typeof t}function fs(t){return ls(t)&&"[object Object]"===os.call(t)&&t.constructor===g}var ds=function(t,i,s){void 0===s&&(s=!!le&&le<11),"log"!==t&&i.unshift(t.toUpperCase()+":"),hs.history.push(i),i.unshift("VIDEOJS:");var e=is.console&&is.console[t];e&&(s&&(i=i.map((function(t){if(ls(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"](is.console,i):e(i))};(hs=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];ds("log",i)}).history=[],hs.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return ds("error",i)},hs.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return ds("warn",i)};var vs=hs,ps="undefined"!=typeof globalThis?globalThis:void 0!==a?a:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ms(t){return t.replace(/\n\r?\s*/g,"")}var gs,ys=function(t){for(var i="",s=0;s<arguments.length;s++)i+=ms(t[s])+(arguments[s+1]||"");return i};function bs(t){return"string"==typeof t&&/\S/.test(t)}function ws(t){if(/\s/.test(t))throw new d("class has illegal whitespace characters")}function ks(){return ss===is.document&&void 0!==ss.createElement}function _s(t){return ls(t)&&1===t.nodeType}function js(t){return function(i,s){if(!bs(i))return ss[t](null);bs(s)&&(s=ss.querySelector(s));var e=_s(s)?s:ss;return e[t]&&e[t](i)}}function xs(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=ss.createElement(t);return g.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(vs.warn(ys(gs||(gs=es(["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?Ss(n,s):n[t]=s})),g.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&zs(n,e),n}function Ss(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function Ts(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var Cs={},Ps="vdata"+(new Date).getTime();function Ms(t){var i=t[Ps];return i||(i=t[Ps]=rs()),Cs[i]||(Cs[i]={}),Cs[i]}function As(t){var i=t[Ps];return!!i&&!!g.getOwnPropertyNames(Cs[i]).length}function Is(t){var i=t[Ps];if(i){delete Cs[i];try{delete t[Ps]}catch(i){t.removeAttribute?t.removeAttribute(Ps):t[Ps]=null}}}function Es(t,i){return ws(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function Ds(t,i){return t.classList?t.classList.add(i):Es(t,i)||(t.className=(t.className+" "+i).trim()),t}function Ns(t,i){return t.classList?t.classList.remove(i):(ws(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function Fs(t,i,s){var e=Es(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?Ds(t,i):Ns(t,i),t}function Bs(t,i){g.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 Rs(t,i,s){t.setAttribute(i,s)}function Os(t,i){t.removeAttribute(i)}function Vs(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=ss.documentElement,e=ss.body,n=s.clientLeft||e.clientLeft||0,r=is.pageXOffset||e.scrollLeft,h=i.left+r-n,o=s.clientTop||e.clientTop||0,a=is.pageYOffset||e.scrollTop,u=i.top+a-o;return{left:w.round(h),top:w.round(u)}}function Us(t,i){var s={},e=Vs(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=w.max(0,w.min(1,(h-a+r)/r)),s.x=w.max(0,w.min(1,(u-o)/n)),s}function Ls(t){return ls(t)&&3===t.nodeType}function Hs(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function zs(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()),_s(t)||Ls(t)?t:"string"==typeof t&&/\S/.test(t)?ss.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function Ws(t,i){return zs(Hs(t),i)}var b,qs=js("querySelector"),Gs=js("querySelectorAll"),Xs=is.navigator&&is.navigator.userAgent||"",Js=/AppleWebKit\/([\d.]+)/i.exec(Xs),Qs=Js?_(Js.pop()):null,Ys=/iPad/i.test(Xs),Ks=/iPhone/i.test(Xs)&&!Ys,Zs=/iPod/i.test(Xs),te=Ks||Ys||Zs,ie=(b=Xs.match(/OS (\d+)_/i))&&b[1]?b[1]:null,se=/Android/i.test(Xs),ee=function(){var t=Xs.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&_(t[1]),s=t[2]&&_(t[2]);return i&&s?_(t[1]+"."+t[2]):i||null}(),ne=se&&/webkit/i.test(Xs)&&ee<2.3,re=se&&ee<5&&Qs<537,he=/Firefox/i.test(Xs),oe=/Edge/i.test(Xs),ae=!oe&&/Chrome/i.test(Xs),ue=function(){var t=Xs.match(/Chrome\/(\d+)/);return t&&t[1]?_(t[1]):null}(),ce=/MSIE\s8\.0/.test(Xs),le=function(){var t=/MSIE\s(\d+)\.\d/.exec(Xs),i=t&&_(t[1]);return!i&&/Trident\/7.0/i.test(Xs)&&/rv:11.0/.test(Xs)&&(i=11),i}(),fe=/Safari/i.test(Xs)&&!ae&&!se&&!oe,de=fe||te,ve=ks()&&("ontouchstart"in is||is.DocumentTouch&&is.document instanceof is.DocumentTouch),pe=ks()&&"backgroundSize"in is.document.createElement("video").style,me=g.freeze({__proto__:null,IS_IPAD:Ys,IS_IPHONE:Ks,IS_IPOD:Zs,IS_IOS:te,IOS_VERSION:ie,IS_ANDROID:se,ANDROID_VERSION:ee,IS_OLD_ANDROID:ne,IS_NATIVE_ANDROID:re,IS_FIREFOX:he,IS_EDGE:oe,IS_CHROME:ae,CHROME_VERSION:ue,IS_IE8:ce,IE_VERSION:le,IS_SAFARI:fe,IS_ANY_SAFARI:de,TOUCH_ENABLED:ve,BACKGROUND_SIZE_SUPPORTED:pe});function ge(t,i){var s=Ms(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)),g.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===g.getOwnPropertyNames(s).length&&Is(t)}function ye(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function be(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||is.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||ss),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=ss.documentElement,h=ss.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 we=!1;!function(){try{var t=g.defineProperty({},"passive",{get:function(){we=!0}});is.addEventListener("test",null,t)}catch(t){}}();var ke=["touchstart","touchmove"];function _e(t,i,s){if(Array.isArray(i))return ye(_e,t,i,s);var e=Ms(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=rs()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=be(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){vs.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;we&&ke.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function je(t,i,s){if(As(t)){var e=Ms(t);if(e.handlers){if(Array.isArray(i))return ye(je,t,i,s);var n=function(i){e.handlers[i]=[],ge(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);ge(t,i)}else n(i)}else for(var o in e.handlers)n(o)}}}function xe(t,i,s){var e=As(t)?Ms(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=be(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)xe.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=Ms(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 Se(t,i,s){if(Array.isArray(i))return ye(Se,t,i,s);var e=function e(){je(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||rs(),_e(t,i,e)}var Te,Ce=!1,Pe=function(){if(ks()){var t=ss.getElementsByTagName("video"),i=ss.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){Me(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&Te(u)}else Ce||Me(1)}};function Me(t,i){i&&(Te=i),is.setTimeout(Pe,t)}ks()&&"complete"===ss.readyState?Ce=!0:Se(is,"load",(function(){Ce=!0}));var Ae=function(t){var i=ss.createElement("style");return i.className=t,i},Ie=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},Ee=function(t,i,s){i.guid||(i.guid=rs());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function De(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function Ne(){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&&us(i,(function(i,s){fs(i)?(fs(t[s])||(t[s]={}),t[s]=Ne(t[s],i)):t[s]=i}))})),t}var Fe=function(){function t(t,i,s){if(!t&&this.play?this.t=t=this:this.t=t,this.h=Ne({},this.h),i=this.h=Ne(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"+rs()}this.l=i.name||null,i.el?this.v=i.el:!1!==i.createEl&&(this.v=this.createEl()),this.m=[],this.k={},this.j={},!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.j=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),Is(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return vs.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=Ne(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,s){return xs(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=De(t),this.j[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=De(i),s||(s={}),!0===s&&(vs.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 d("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&&De(n.name()))&&(this.j[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.j[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:g.keys(s)).concat(g.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||De(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))_e(this.v,t,Ee(this,i));else{var n=t,r=i,h=Ee(this,s),o=function(){return e.off(n,r,h)};o.guid=h.guid,this.on("dispose",o);var a=function(){return e.off("dispose",o)};a.guid=h.guid,t.nodeName?(_e(n,r,h),_e(n,"dispose",a)):"function"==typeof t.on&&(n.on(r,h),n.on("dispose",a))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))je(this.v,t,i);else{var e=t,n=i,r=Ee(this,s);this.off("dispose",r),t.nodeName?(je(e,n,r),je(e,"dispose",r)):(e.off(n,r),e.off("dispose",r))}return this},i.one=function(t,i,s){var e=arguments,n=this;if("string"==typeof t||Array.isArray(t))Se(this.v,t,Ee(this,i));else{var r=t,h=i,o=Ee(this,s),a=function t(){n.off(r,h,t),o.apply(null,e)};a.guid=o.guid,this.on(r,h,a)}return this},i.trigger=function(t,i){return xe(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.T?i?t.call(this):this.setTimeout(t,1):(this.C=this.C||[],this.C.push(t))),this},i.triggerReady=function(){this.T=!0,this.setTimeout((function(){var t=this.C;this.C=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},i.$=function(t,i){return qs(t,i||this.contentEl())},i.$$=function(t,i){return Gs(t,i||this.contentEl())},i.hasClass=function(t){return Es(this.v,t)},i.addClass=function(t){return Ds(this.v,t),this},i.removeClass=function(t){return Ns(this.v,t),this},i.toggleClass=function(t,i){return Fs(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 Rs(this.v,t,i),this},i.removeAttribute=function(t){return Os(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 k(-1!==n?e.slice(0,n):this.v["offset"+De(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new d("currentDimension only accepts width or height value");if("function"==typeof is.getComputedStyle){var s=is.getComputedStyle(this.v);i=s.getPropertyValue(t)||s[t]}if(0===(i=_(i))){var e="offset"+De(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;w.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=Ee(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=Ee(this,t);var s=is.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){is.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=Ee(this,t);var s=is.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){is.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=De(i),t.P||(t.P={}),"Player"===i&&t.P[i]){var e=t.P[i];if(e.players&&g.keys(e.players).length>0&&g.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new d("Can not register Player component after player has been created")}return t.P[i]=s,s}},t.getComponent=function(i){if(i)return i=De(i),t.P&&t.P[i]?t.P[i]:is&&is.videojs&&is.videojs[i]?(vs.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),is.videojs[i]):void 0},t.extend=function(i){i=i||{},vs.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=g.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();Fe.registerComponent("Component",Fe);var Be=function(){};function $e(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Re(t,i){return(Re=g.setPrototypeOf?g.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function e(t,i){t.prototype=g.create(i.prototype),t.prototype.constructor=t,Re(t,i)}function Oe(t,i,s,e){return void 0===e&&(vs.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new d("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 Ve(t){return void 0===t||0===t.length?{length:0,start:function(){throw new d("This TimeRanges object is empty")},end:function(){throw new d("This TimeRanges object is empty")}}:{length:t.length,start:Oe.bind(null,"start",0,t),end:Oe.bind(null,"end",1,t)}}function Ue(t,i){return Array.isArray(t)?Ve(t):void 0===t||void 0===i?Ve():Ve([[t,i]])}function Le(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=Ue(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}Be.prototype.M={},Be.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},_e(this,t,i),this.addEventListener=s},Be.prototype.addEventListener=Be.prototype.on,Be.prototype.off=function(t,i){je(this,t,i)},Be.prototype.removeEventListener=Be.prototype.off,Be.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},Se(this,t,i),this.addEventListener=s},Be.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=be(t),this.M[i]&&this["on"+i]&&this["on"+i](t),xe(this,t)},Be.prototype.dispatchEvent=Be.prototype.trigger;var He,ze,We,qe,Ge={prefixed:!0},Xe=[["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"]],Je=Xe[0];for(ze=0;ze<Xe.length;ze++)if(Xe[ze][1]in ss){He=Xe[ze];break}if(He){for(We=0;We<He.length;We++)Ge[Je[We]]=He[We];Ge.prefixed=He[0]!==Je[0]}function Qe(t){if(t instanceof Qe)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:ls(t)&&("number"==typeof t.code&&(this.code=t.code),cs(this,t)),this.message||(this.message=Qe.defaultMessages[this.code]||"")}for(Qe.prototype.code=0,Qe.prototype.message="",Qe.prototype.status=null,Qe.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Qe.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."},qe=0;qe<Qe.errorTypes.length;qe++)Qe[Qe.errorTypes[qe]]=qe,Qe.prototype[Qe.errorTypes[qe]]=qe;var Ye=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var Ke=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}}))})},Ze=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=Ke(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(Ke))},tn=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()},sn="vjs-modal-dialog",en=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).A=e.I=e.D=!1,e.closeable(!e.h.uncloseable),e.content(e.h.content),e.S=xs("div",{className:sn+"-content"},{role:"document"}),e.N=xs("p",{className:sn+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),Ss(e.N,e.description()),e.v.appendChild(e.N),e.v.appendChild(e.S),e.on(i,"languagechange",e.handleLanguagechange),e}e(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 sn+" 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.A){var t=this.player();this.trigger("beforemodalopen"),this.A=!0,(this.h.fillAlways||!this.I&&!this.D)&&this.fill(),this.B=!t.paused(),this.h.pauseOnOpen&&this.B&&t.pause(),this.closeable()&&this.on(this.v.ownerDocument,"keydown",Ee(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.I=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.A},s.close=function(){if(this.A){var t=this.player();this.trigger("beforemodalclose"),this.A=!1,this.B&&this.h.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.v.ownerDocument,"keydown",Ee(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.D=!0,s.removeChild(i),this.empty(),Ws(i,t),this.trigger("modalfill"),e?s.insertBefore(i,e):s.appendChild(i),this},s.empty=function(){return this.trigger("beforemodalempty"),Hs(this.contentEl()),this.trigger("modalempty"),this},s.content=function(t){return void 0!==t&&(this.O=t),this.O},s.handleLanguagechange=function(){this.v.setAttribute("aria-label",this.label()),Ss(this.N,this.description()),this.opened()?this.fill():(this.I||this.D)&&(this.I=!1,this.D=!1,this.empty())},i}(Fe);en.prototype.h={pauseOnOpen:!0,temporary:!0},Fe.registerComponent("ModalDialog",en);var nn=function(){function t(i){var s=this;if(ce)for(var e in s=ss.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.V.call(s,i),g.defineProperty(s,"length",{get:function(){return this.U}}),ce)return s}var i=t.prototype;return i.V=function(t){var i=this.length||0,s=0,e=t.length;this.L=t,this.U=t.length;var n=function(t){""+t in this||g.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}(),rn={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},hn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},on={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},an={disabled:"disabled",hidden:"hidden",showing:"showing"},un=function(t){function i(s){var e;void 0===s&&(s={});var n=$e(e=t.call(this)||this);if(ce)for(var r in n=ss.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",rs()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){g.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||$e(e)}return e(i,t),i}(Be),cn=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=ss.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=ss.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),ss.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&&ss.body.removeChild(e),r},ln=function(t){var i=is.location,s=cn(t);return(":"===s.protocol?i.protocol:s.protocol)+s.host!==i.protocol+i.host},fn={exports:{}};void 0!==a?fn.exports=a:void 0!==ps?fn.exports=ps:"undefined"!=typeof self?fn.exports=self:fn.exports={};var dn=function(t){var i=vn.call(t);return"[object Function]"===i||"function"==typeof t&&"[object RegExp]"!==i||void 0!==a&&(t===a.setTimeout||t===a.alert||t===a.confirm||t===a.prompt)},vn=g.prototype.toString;var pn,mn,gn,yn,bn,wn,kn,_n,jn,xn,Sn,Tn,Cn=Array.prototype.slice,Pn=g.prototype.toString,Mn=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==Pn.call(i))throw new v("Function.prototype.bind called on incompatible "+i);for(var s,e=Cn.call(arguments,1),n=w.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(Cn.call(arguments)));return g(n)===n?n:this}return i.apply(t,e.concat(Cn.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},An=Function.prototype.bind||Mn,In=g.prototype.toString,En=function(t){var i=In.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]"===In.call(t.callee)),s};g.keys||(mn=g.prototype.hasOwnProperty,gn=g.prototype.toString,yn=En,bn=g.prototype.propertyIsEnumerable,wn=!bn.call({toString:null},"toString"),kn=bn.call((function(){}),"prototype"),_n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],jn=function(t){var i=t.constructor;return i&&i.prototype===t},xn={$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},Sn=function(){if(void 0===a)return!1;for(var t in a)try{if(!xn["$"+t]&&mn.call(a,t)&&null!==a[t]&&"object"==typeof a[t])try{jn(a[t])}catch(t){return!0}}catch(t){return!0}return!1}(),Tn=function(t){if(void 0===a||!Sn)return jn(t);try{return jn(t)}catch(t){return!1}},pn=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===gn.call(t),e=yn(t),n=i&&"[object String]"===gn.call(t),r=[];if(!i&&!s&&!e)throw new v("Object.keys called on a non-object");var h=kn&&s;if(n&&t.length>0&&!mn.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||!mn.call(t,u)||r.push(String(u));if(wn)for(var c=Tn(t),l=0;l<_n.length;++l)c&&"constructor"===_n[l]||!mn.call(t,_n[l])||r.push(_n[l]);return r});var Dn=pn,Nn=Array.prototype.slice,Fn=En,Bn=g.keys,$n=Bn?function(t){return Bn(t)}:Dn,Rn=g.keys;$n.shim=function(){if(g.keys){var t=function(){var t=g.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(g.keys=function(t){return Fn(t)?Rn(Nn.call(t)):Rn(t)})}else g.keys=$n;return g.keys||$n};var On=$n,Vn="function"==typeof At&&"symbol"==typeof At("foo"),Un=g.prototype.toString,Ln=Array.prototype.concat,Hn=g.defineProperty,zn=Hn&&function(){var t={};try{for(var i in Hn(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),Wn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===Un.call(t)}(e)&&e())&&(zn?Hn(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},qn=function(t,i){var s=arguments.length>2?arguments[2]:{},e=On(i);Vn&&(e=Ln.call(e,g.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)Wn(t,e[n],i[e[n]],s[e[n]])};qn.supportsDescriptors=!!zn;var Gn,Xn=qn,Jn=g.getOwnPropertyDescriptor?function(){return g.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new v},Qn="function"==typeof At&&"symbol"==typeof Dt,Yn=g.getPrototypeOf||function(t){return t.__proto__},Kn=void 0===x?Gn:Yn(x),Zn={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?Gn:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?Gn:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Qn?Yn([][Dt]()):Gn,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":Gn,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":Gn,"$ %AsyncGenerator%":Gn,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":Gn,"$ %AsyncIteratorPrototype%":Gn,"$ %Atomics%":"undefined"==typeof Atomics?Gn:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?Gn:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?Gn:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":d,"$ %ErrorPrototype%":d.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?Gn:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?Gn:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?Gn:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?Gn:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":Gn,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":Gn,"$ %Int8Array%":"undefined"==typeof Int8Array?Gn:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?Gn:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?Gn:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?Gn:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?Gn:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?Gn:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":j,"$ %IteratorPrototype%":Qn?Yn(Yn([][Dt]())):Gn,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?Gn:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Qn?Yn((new Map)[Dt]()):Gn,"$ %MapPrototype%":"undefined"==typeof Map?Gn:Map.prototype,"$ %Math%":w,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":g,"$ %ObjectPrototype%":g.prototype,"$ %ObjProto_toString%":g.prototype.toString,"$ %ObjProto_valueOf%":g.prototype.valueOf,"$ %parseFloat%":_,"$ %parseInt%":k,"$ %Promise%":"undefined"==typeof Promise?Gn:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?Gn:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?Gn:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?Gn:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?Gn:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?Gn:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?Gn:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?Gn:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?Gn:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Qn?Yn((new Set)[Dt]()):Gn,"$ %SetPrototype%":"undefined"==typeof Set?Gn:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Gn:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?Gn:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Qn?Yn(""[Dt]()):Gn,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Qn?At:Gn,"$ %SymbolPrototype%":Qn?At.prototype:Gn,"$ %SyntaxError%":m,"$ %SyntaxErrorPrototype%":m.prototype,"$ %ThrowTypeError%":Jn,"$ %TypedArray%":Kn,"$ %TypedArrayPrototype%":Kn?Kn.prototype:Gn,"$ %TypeError%":v,"$ %TypeErrorPrototype%":v.prototype,"$ %Uint8Array%":void 0===x?Gn:x,"$ %Uint8ArrayPrototype%":void 0===x?Gn:x.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Gn:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?Gn:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?Gn:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?Gn:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?Gn:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?Gn:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?Gn:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?Gn:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?Gn:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?Gn:WeakSet.prototype},tr=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new v('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in Zn))throw new m("intrinsic "+t+" does not exist!");if(void 0===Zn[s]&&!i)throw new v("intrinsic "+t+" exists, but is not available. Please file an issue!");return Zn[s]},ir=An.call(Function.call,g.prototype.hasOwnProperty),sr=tr,er=sr("%TypeError%"),nr=sr("%SyntaxError%"),rr=ir,hr={"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(rr(i,e)&&!s[e])return!1;var n=rr(i,"[[Value]]"),r=rr(i,"[[Get]]")||rr(i,"[[Set]]");if(n&&r)throw new er("Property Descriptors may not be both accessor and data descriptors");return!0}},or=Number.isNaN||function(t){return t!=t},ar=Number.isNaN||function(t){return t!=t},ur=Number.isFinite||function(t){return"number"==typeof t&&!ar(t)&&t!==1/0&&t!==-1/0},cr=Function.prototype.toString,lr=/^\s*class\b/,fr=function(t){try{var i=cr.call(t);return lr.test(i)}catch(t){return!1}},dr=g.prototype.toString,vr="function"==typeof At&&"symbol"==typeof At.toStringTag,pr=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(vr)return function(t){try{return!fr(t)&&(cr.call(t),!0)}catch(t){return!1}}(t);if(fr(t))return!1;var i=dr.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},mr=g.prototype.toString,gr=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},yr=pr,br=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===mr.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(yr(t[n[e]])&&(s=t[n[e]](),gr(s)))return s;throw new v("No default value")}throw new v("invalid [[DefaultValue]] hint supplied")},wr=tr,kr=wr("%Object%"),_r=wr("%TypeError%"),jr=wr("%String%"),xr=function(t,i,s,e){var n=hr[i];if("function"!=typeof n)throw new nr("unknown record type: "+i);if(!n(t,e))throw new er(s+" must be a "+i);console.log(n(t,e),e)},Sr=or,Tr=ur,Cr=function(t){return t>=0?1:-1},Pr=function(t,i){var s=t%i;return w.floor(s>=0?s:s+i)},Mr=ir,Ar={ToPrimitive:function(t){return gr(t)?t:arguments.length>1?br(t,arguments[1]):br(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return Sr(i)?0:0!==i&&Tr(i)?Cr(i)*w.floor(w.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(Sr(i)||0===i||!Tr(i))return 0;var s=Cr(i)*w.floor(w.abs(i));return Pr(s,65536)},ToString:function(t){return jr(t)},ToObject:function(t){return this.CheckObjectCoercible(t),kr(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new _r(i||"Cannot call method on "+t);return t},IsCallable:pr,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:Sr(t)&&Sr(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(Mr(t,s)&&!i[s])return!1;var e=Mr(t,"[[Value]]"),n=Mr(t,"[[Get]]")||Mr(t,"[[Set]]");if(e&&n)throw new _r("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(xr(this,"Property Descriptor","Desc",t),!(!Mr(t,"[[Get]]")&&!Mr(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(xr(this,"Property Descriptor","Desc",t),!(!Mr(t,"[[Value]]")&&!Mr(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(xr(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(xr(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 _r("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new _r("ToPropertyDescriptor requires an object");var i={};if(Mr(t,"enumerable")&&(i["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),Mr(t,"configurable")&&(i["[[Configurable]]"]=this.ToBoolean(t.configurable)),Mr(t,"value")&&(i["[[Value]]"]=t.value),Mr(t,"writable")&&(i["[[Writable]]"]=this.ToBoolean(t.writable)),Mr(t,"get")){var s=t.get;if(void 0!==s&&!this.IsCallable(s))throw new v("getter must be a function");i["[[Get]]"]=s}if(Mr(t,"set")){var e=t.set;if(void 0!==e&&!this.IsCallable(e))throw new _r("setter must be a function");i["[[Set]]"]=e}if((Mr(i,"[[Get]]")||Mr(i,"[[Set]]"))&&(Mr(i,"[[Value]]")||Mr(i,"[[Writable]]")))throw new _r("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},Ir=An.call(Function.call,String.prototype.replace),Er=/^[\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]+$/,Nr=function(){var t=Ar.ToString(Ar.CheckObjectCoercible(this));return Ir(Ir(t,Er,""),Dr,"")},Fr=Nr,Br=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:Fr},$r=Xn,Rr=Br,Or=Xn,Vr=Nr,Ur=Br,Lr=function(){var t=Rr();return $r(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},Hr=An.call(Function.call,Ur());Or(Hr,{getPolyfill:Ur,implementation:Vr,shim:Lr});var zr=Hr,Wr=pr,qr=g.prototype.toString,Gr=g.prototype.hasOwnProperty,Xr=zr,Jr=function(t,i,s){if(!Wr(i))throw new v("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===qr.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)Gr.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)Gr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Qr=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)Yr.call(s,e)&&(t[e]=s[e])}return t},Yr=g.prototype.hasOwnProperty;var Kr=fn.exports,Zr=dn,th=function(t){if(!t)return{};var i={};return Jr(Xr(t).split("\n"),(function(t){var s=t.indexOf(":"),e=Xr(t.slice(0,s)).toLowerCase(),n=Xr(t.slice(s+1));void 0===i[e]?i[e]=n:!function(t){return"[object Array]"===g.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},ih=Qr,sh=nh;function eh(t,i,s){var e=t;return Zr(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=ih(i,{uri:t}),e.callback=s,e}function nh(t,i,s){return rh(i=eh(t,i,s))}function rh(t){if(void 0===t.callback)throw new d("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),b)try{t=JSON.parse(t)}catch(t){}return t}var n={body:void 0,headers:{},statusCode:0,method:p,url:v,rawRequest:l};function r(t){return c(f),t instanceof d||(t=new d(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;c(f),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:p,headers:{},url:v,rawRequest:l},l.getAllResponseHeaders&&(r.headers=th(l.getAllResponseHeaders()))):h=new d("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,l=t.xhr||null;l||(l=t.cors||t.useXDR?new nh.XDomainRequest:new nh.XMLHttpRequest);var f,v=l.url=t.uri||t.url,p=l.method=t.method||"GET",m=t.body||t.data||null,g=l.headers=t.headers||{},y=!!t.sync,b=!1;if("json"in t&&(b=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),m=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(p,v,!y,t.username,t.password),y||(l.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(f=u((function(){a=!0,l.abort("timeout");var t=new d("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}),t.timeout)),l.setRequestHeader)for(o in g)g.hasOwnProperty(o)&&l.setRequestHeader(o,g[o]);else if(t.headers&&!function(t){for(var i in t)if(t.hasOwnProperty(i))return!1;return!0}(t.headers))throw new d("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(m),l}nh.XMLHttpRequest=Kr.XMLHttpRequest||function(){},nh.XDomainRequest="withCredentials"in new nh.XMLHttpRequest?nh.XMLHttpRequest:Kr.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){nh["delete"===t?"del":t]=function(i,s,e){return(s=eh(i,s,e)).method=t.toUpperCase(),rh(s)}}));var hh=function(t,i){var s=new is.WebVTT.Parser(is,is.vttjs,is.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&&(is.console&&is.console.groupCollapsed&&is.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach((function(t){return vs.error(t)})),is.console&&is.console.groupEnd&&is.console.groupEnd()),s.flush()},oh=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new d("A tech was not provided.");var n=Ne(s,{kind:on[s.kind]||"subtitles",language:s.language||s.srclang||""}),r=an[n.mode]||"disabled",h=n.default;"metadata"!==n.kind&&"chapters"!==n.kind||(r="hidden");var o=e=t.call(this,n)||this;if(o.H=n.tech,ce)for(var a in i.prototype)"constructor"!==a&&(o[a]=i.prototype[a]);o.L=[],o.W=[];var u=new nn(o.L),c=new nn(o.W),l=!1,f=Ee(o,(function(){this.activeCues,l&&(this.trigger("cuechange"),l=!1)}));return"disabled"!==r&&o.H.ready((function(){o.H.on("timeupdate",f)}),!0),g.defineProperty(o,"default",{get:function(){return h},set:function(){}}),g.defineProperty(o,"mode",{get:function(){return r},set:function(t){var i=this;an[t]&&("showing"===(r=t)&&this.H.ready((function(){i.H.on("timeupdate",f)}),!0),this.trigger("modechange"))}}),g.defineProperty(o,"cues",{get:function(){return this.q?u:null},set:function(){}}),g.defineProperty(o,"activeCues",{get:function(){if(!this.q)return null;if(0===this.cues.length)return c;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(l=!1,i.length!==this.W.length)l=!0;else for(var r=0;r<i.length;r++)-1===this.W.indexOf(i[r])&&(l=!0);return this.W=i,c.V(this.W),c},set:function(){}}),n.src?(o.src=n.src,function(t,i){var s={uri:t},e=ln(t);e&&(s.cors=e),sh(s,Ee(this,(function(t,s,e){if(t)return vs.error(t,s);if(i.q=!0,"function"!=typeof is.WebVTT){if(i.H){var n=function(){return hh(e,i)};i.H.on("vttjsloaded",n),i.H.on("vttjserror",(function(){vs.error("vttjs failed to load, stopping trying to process "+i.src),i.H.off("vttjsloaded",n)}))}}else hh(e,i)})))}(n.src,o)):o.q=!0,o||$e(e)}e(i,t);var s=i.prototype;return s.addCue=function(t){var i=t;if(is.vttjs&&!(t instanceof is.vttjs.VTTCue)){for(var s in i=new is.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.V(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.V(this.L);break}}},i}(un);oh.prototype.M={cuechange:"cuechange"};var ah=function(t){function i(s){var e,n;void 0===s&&(s={});var r=$e(e=t.call(this)||this);if(ce)for(var h in r=ss.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new oh(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,g.defineProperty(r,"readyState",{get:function(){return n}}),g.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),ce?r||$e(e):e}return e(i,t),i}(Be);ah.prototype.M={load:"load"},ah.NONE=0,ah.LOADING=1,ah.LOADED=2,ah.ERROR=3;var uh,ch=function(){function t(i){void 0===i&&(i=[]);var s=this;if(ce)for(var e in s=ss.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.X=[],g.defineProperty(s,"length",{get:function(){return this.X.length}});for(var n=0,r=i.length;n<r;n++)s.J(i[n]);if(ce)return s}var i=t.prototype;return i.J=function(t){var i=this.X.length;""+i in this||g.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}(),lh=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=$e(n),ce))for(var r in e=ss.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.Z=[],g.defineProperty(e,"length",{get:function(){return this.Z.length}});for(var h=0;h<s.length;h++)e.tt(s[h]);return e||$e(n)}e(i,t);var s=i.prototype;return s.tt=function(t){var i=this.Z.length;""+i in this||g.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}(Be);for(uh in lh.prototype.M={change:"change",addtrack:"addtrack",removetrack:"removetrack"},lh.prototype.M)lh.prototype["on"+uh]=null;var fh=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),ce){for(var r in n=ss.createElement("custom"),lh.prototype)"constructor"!==r&&(n[r]=lh.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||$e(e)}return e(i,t),i.prototype.tt=function(i){t.prototype.tt.call(this,i),i.addEventListener("modechange",Ee(this,(function(){this.trigger("change")})))},i}(lh),dh=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},vh=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){dh(s,s[r]);break}if(ce){for(var h in n=ss.createElement("custom"),lh.prototype)"constructor"!==h&&(n[h]=lh.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,g.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||$e(e)}e(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.selected&&dh(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.st||(s.st=!0,dh(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}(lh),ph=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},mh=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){ph(s,s[r]);break}if(ce){for(var h in n=ss.createElement("custom"),lh.prototype)"constructor"!==h&&(n[h]=lh.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||$e(e)}e(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&ph(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.st||(s.st=!0,ph(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}(lh),gh=void 0;var yh=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 fh,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}e(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(Ee(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 Ue(0,0)},s.bufferedPercent=function(){return Le(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 Qe(t),this.trigger("error")),this.lt},s.played=function(){return this.et?Ue(0,0):Ue()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=Ee(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",Ee(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.ft=function(){var t=this;if(!is.WebVTT)if(ss.body.contains(this.el())){if(!this.h["vtt.js"]&&fs(gh)&&g.keys(gh).length>0)return void this.trigger("vttjsloaded");var i=ss.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})),is.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.ft)},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.ft();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 vh,this.rt},s.audioTracks=function(){return this.ht=this.ht||new mh,this.ht},s.textTracks=function(){return this.nt=this.nt||new fh,this.nt},s.remoteTextTracks=function(){return this.dt=this.dt||new fh,this.dt},s.remoteTextTrackEls=function(){return this.vt=this.vt||new ch,this.vt},s.addTextTrack=function(t,i,s){if(!t)throw new d("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 oh(n);return r.tt(h),h}(this,t,i,s)},s.createRemoteTextTrack=function(t){var i=Ne(t,{tech:this});return new ah(i)},s.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(vs.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 d("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]:is&&is.videojs&&is.videojs[t]?(vs.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),is.videojs[t]):void 0},i}(Fe);yh.prototype.nt,yh.prototype.ht,yh.prototype.rt,yh.prototype.featuresVolumeControl=!0,yh.prototype.featuresFullscreenResize=!1,yh.prototype.featuresPlaybackRate=!1,yh.prototype.featuresProgressEvents=!1,yh.prototype.featuresTimeupdateEvents=!1,yh.prototype.featuresNativeTextTracks=!1,yh.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:vs.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.wt),this.off(this.v,"loadstart",t.prototype.kt),this.one(this.v,"loadstart",t.prototype.wt)),this.yt=s.handleSource(i,this,this.h),this.on("dispose",this.disposeSourceHandler),this},t.prototype.wt=function(){this.one(this.v,"loadstart",t.prototype.kt)},t.prototype.kt=function(){this.disposeSourceHandler(),this.one(this.v,"loadstart",t.prototype.kt)},t.prototype.disposeSourceHandler=function(){this.bt&&(this.clearTracks(["audio","video"]),this.bt=null),this.cleanupAutoTextTracks(),this.yt&&(this.off(this.v,"loadstart",t.prototype.wt),this.off(this.v,"loadstart",t.prototype.kt),this.yt.dispose&&this.yt.dispose(),this.yt=null)}},Fe.registerComponent("Tech",yh),Fe.registerComponent("MediaTechController",yh),yh.registerTech("Tech",yh);var bh=function(t){function i(i,s,e){var n;if(n=t.call(this,i,s,e)||this,s.playerOptions.sources&&0!==s.playerOptions.sources.length)i.src(s.playerOptions.sources);else for(var r=0,h=s.playerOptions.techOrder;r<h.length;r++){var o=De(h[r]),a=yh.getTech(o);if(o||(a=Fe.getComponent(o)),a&&a.isSupported()){i._t(o);break}}return n}return e(i,t),i}(Fe);Fe.registerComponent("MediaLoader",bh);var wh=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}e(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=cs({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&vs.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=cs({role:"button","aria-live":"polite"},e),this.jt=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.xt=xs("span",{className:"vjs-control-text"}),t&&t.appendChild(this.xt),this.controlText(this.St,t),this.xt},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.xt.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.jt&&this.v.setAttribute("tabIndex",this.jt),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.jt&&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){_e(ss,"keydown",Ee(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){je(ss,"keydown",Ee(this,this.handleKeyPress))},i}(Fe);Fe.registerComponent("ClickableComponent",wh);var kh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",Ee($e(e),e.update)),e}e(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=xs("div",{className:"vjs-poster",tabIndex:-1});return pe||(this.Tt=xs("img"),t.appendChild(this.Tt)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.Tt)this.Tt.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}(wh);Fe.registerComponent("PosterImage",kh);var _h="#222",jh={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 xh(t,i){return"rgba("+k(t[1]+t[1],16)+","+k(t[2]+t[2],16)+","+k(t[3]+t[3],16)+","+i+")"}function Sh(t,i,s){try{t.style[i]=s}catch(t){return}}var Th=function(t){function i(i,s,e){var n;return n=t.call(this,i,s,e)||this,i.on("loadstart",Ee($e(n),n.toggleDisplay)),i.on("texttrackchange",Ee($e(n),n.updateDisplay)),i.ready(Ee($e(n),(function(){if(i.H&&i.H.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",Ee(this,this.updateDisplay));for(var t=this.h.playerOptions.tracks||[],s=0;s<t.length;s++)this.t.addRemoteTextTrack(t[s],!0);var e,n,r={captions:1,subtitles:1},h=this.t.textTracks();if(h){for(var o=0;o<h.length;o++){var a=h[o];a.default&&("descriptions"!==a.kind||e?a.kind in r&&!n&&(n=a):e=a)}n?n.mode="showing":e&&(e.mode="showing")}}}))),n}e(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 is.WebVTT&&is.WebVTT.processCues(is,[],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 is.WebVTT&&t.activeCues){for(var i=this.t.textTrackSettings.getValues(),s=[],e=0;e<t.activeCues.length;e++)s.push(t.activeCues[e]);is.WebVTT.processCues(is,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&&Sh(h.firstChild,"color",xh(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(h.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&Sh(h.firstChild,"backgroundColor",xh(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?Sh(h,"backgroundColor",xh(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 "+_h:"raised"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+_h:"depressed"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+_h:"uniform"===i.edgeStyle&&(h.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+_h)),i.fontPercent&&1!==i.fontPercent){var o=is.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=jh[i.fontFamily])}}}},i}(Fe);Fe.registerComponent("TextTrackDisplay",Th);var Ch=function(t){function i(){return t.apply(this,arguments)||this}return e(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(Fe);Fe.registerComponent("LoadingSpinner",Ch);var Ph=function(t){function i(){return t.apply(this,arguments)||this}e(i,t);var s=i.prototype;return s.createEl=function(t,i,s){void 0===t&&(t="button"),void 0===i&&(i={}),void 0===s&&(s={}),i=cs({className:this.buildCSSClass()},i),"button"!==t&&(vs.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),i=cs({tabIndex:0},i),s=cs({role:"button"},s)),s=cs({type:"button","aria-live":"polite"},s);var e=Fe.prototype.createEl.call(this,t,i,s);return this.createControlTextEl(e),e},s.addChild=function(t,i){void 0===i&&(i={});var s=this.constructor.name;return vs.warn("Adding an actionable (user controllable) child to a Button ("+s+") is not supported; use a ClickableComponent instead."),Fe.prototype.addChild.call(this,t,i)},s.enable=function(){t.prototype.enable.call(this),this.v.removeAttribute("disabled")},s.disable=function(){t.prototype.disable.call(this),this.v.setAttribute("disabled","disabled")},s.handleKeyPress=function(i){32!==i.which&&13!==i.which&&t.prototype.handleKeyPress.call(this,i)},i}(wh);Fe.registerComponent("Button",Ph);var Mh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Ct=!1,e.on("mousedown",e.handleMouseDown),e}e(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this;if(this.Ct&&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.Ct=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Ct=!0},i}(Ph);Mh.prototype.St="Play Video",Fe.registerComponent("BigPlayButton",Mh);var Ah=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}e(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}(Ph);Fe.registerComponent("CloseButton",Ah);var Ih=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}e(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}(Ph);function Eh(t,i){void 0===i&&(i=t),t=t<0?0:t;var s=w.floor(t%60),e=w.floor(t/60%60),n=w.floor(t/3600),r=w.floor(i/60%60),h=w.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)}Ih.prototype.St="Play",Fe.registerComponent("PlayToggle",Ih);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}e(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=xs("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=Eh(i,this.t.duration());e!==this.Pt&&(this.Pt=e,this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(Fe);Fe.registerComponent("CurrentTimeDisplay",Dh);var Nh=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}e(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=xs("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=Eh(i);this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(Fe);Fe.registerComponent("DurationDisplay",Nh);var Fh=function(t){function i(){return t.apply(this,arguments)||this}return e(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}(Fe);Fe.registerComponent("TimeDivider",Fh);var Bh=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}e(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=xs("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=Eh(this.t.remainingTime());s!==this.Pt&&(this.Pt=s,this.S.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(Fe);Fe.registerComponent("RemainingTimeDisplay",Bh);var $h=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}e(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=xs("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.xt=xs("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.Mt=ss.createTextNode(this.localize("LIVE")),this.S.appendChild(this.xt),this.S.appendChild(this.Mt),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.xt.innerHTML=this.localize("Stream Type"),this.Mt.innerHTML=this.localize("LIVE")},i}(Fe);Fe.registerComponent("LiveDisplay",$h);var Rh=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}e(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=cs({tabIndex:0},s),e=cs({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(),ss.body.focus(),ss.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;ss.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=Us(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.At||!1:(this.At=!!t,this.At?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(Fe);function Oh(t,i){if(!t||!i)return"";if("function"==typeof is.getComputedStyle){var s=is.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}Fe.registerComponent("Slider",Rh);var Vh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).It=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}e(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"});return this.Et=xs("span",{innerHTML:this.localize("Loaded")}),this.Dt=ss.createTextNode(": 0%"),this.xt=xs("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Et),this.xt.appendChild(this.Dt),i.appendChild(this.xt),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.It,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(xs()),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.Et.innerHTML=this.localize("Loaded")},i}(Fe);Fe.registerComponent("LoadProgressBar",Vh);var Uh=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(Ee($e(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}e(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.Nt=xs("span",{innerHTML:this.localize("Progress")}),this.Ft=ss.createTextNode(": 0%"),this.xt=xs("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Nt),this.xt.appendChild(this.Ft),i.appendChild(this.xt),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",Eh(i,this.t.duration()))},s.handleLanguagechange=function(){this.Nt.innerHTML=this.localize("Progress")},i}(Fe);Fe.registerComponent("PlayProgressBar",Uh);var Lh=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(Ee($e(e),e.updateDataAttr)),e}e(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=xs("div",{className:"vjs-time-tooltip"}),this.Nt=xs("span",{innerHTML:this.localize("Progress")}),this.Ft=ss.createTextNode(": 0%"),this.xt=xs("span",{className:"vjs-control-text"}),this.xt.appendChild(this.Nt),this.xt.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.xt),i},s.updateDataAttr=function(t){var i=Eh(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.Nt.innerHTML=this.localize("Progress")},i}(Fe);Fe.registerComponent("TooltipProgressBar",Lh);var Hh=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(Ee($e(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}e(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=_(Oh(this.player().el(),"width")),s=_(Oh(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=w.floor(i-s/2)+"px",e.minWidth=w.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",Eh(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}(Rh);Hh.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},Hh.prototype.playerEvent="timeupdate",Fe.registerComponent("SeekBar",Hh);var zh=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=xs("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)}}(Ee($e(e),e.handleMouseMove),25))})),e}e(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-Vs(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=Eh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Bt(i)+1,n=_(Oh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return Us(this.el().parentNode,t).x},s.Bt=function(t){if(!this.keepTooltipsInside)return t;var i=_(Oh(this.player().el(),"width")),s=_(Oh(this.tooltip,"width"))/2,e=t;return t<s?e=w.ceil(s):t>i-s&&(e=w.floor(i-s)),e},i}(Fe);Fe.registerComponent("MouseTimeDisplay",zh);var Wh=function(t){function i(){return t.apply(this,arguments)||this}return e(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(Fe);Wh.prototype.h={children:["seekBar"]},Fe.registerComponent("ProgressControl",Wh);var qh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}e(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}(Ph);qh.prototype.St="Fullscreen",Fe.registerComponent("FullscreenToggle",qh);var Gh=function(t){function i(){return t.apply(this,arguments)||this}return e(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}(Fe);Fe.registerComponent("VolumeLevel",Gh);var Xh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(Ee($e(e),e.updateARIAAttributes)),e}e(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}(Rh);Xh.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Xh.prototype.playerEvent="volumechange",Fe.registerComponent("VolumeBar",Xh);var Jh=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 e(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(Fe);Jh.prototype.h={children:["volumeBar"]},Fe.registerComponent("VolumeControl",Jh);var Qh=function(t){function i(){return t.apply(this,arguments)||this}e(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",Ee(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=xs(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),_e(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(Fe);Fe.registerComponent("Popup",Qh);var Yh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}e(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}(wh);Fe.registerComponent("PopupButton",Yh);var Kh=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}e(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++)Ns(this.v,"vjs-vol-"+n);Ds(this.v,"vjs-vol-"+s)},i}(Ph);Kh.prototype.St="Mute",Fe.registerComponent("MuteToggle",Kh);var Zh=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($e(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}e(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 Qh(this.t,{contentElType:"div"}),i=new Xh(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Kh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],Ee(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],Ee(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],Ee(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Yh);Zh.prototype.volumeUpdate=Kh.prototype.update,Zh.prototype.St="Mute",Fe.registerComponent("VolumeMenuButton",Zh);var to=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}e(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",Ee(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=xs(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),_e(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}(Fe);Fe.registerComponent("Menu",to);var io=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}e(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.Ot=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Vt?this.hide():this.show()},s.createMenu=function(){var t=new to(this.t);if(this.Vt=0,this.h.title){var i=xs("li",{className:"vjs-menu-title",innerHTML:De(this.h.title),tabIndex:-1});this.Vt+=1,t.m.unshift(i),Ts(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",Ee(this,(function(t){this.unpressButton(),this.v.blur()}))),this.Ot?this.unpressButton():this.pressButton()},s.handleKeyPress=function(i){27===i.which||9===i.which?(this.Ot&&this.unpressButton(),9!==i.which&&i.preventDefault()):38===i.which||40===i.which?this.Ot||(this.pressButton(),i.preventDefault()):t.prototype.handleKeyPress.call(this,i)},s.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.Ot&&this.unpressButton(),9!==t.which&&t.preventDefault())},s.pressButton=function(){this.Rt&&(this.Ot=!0,this.menu.lockShowing(),this.v.setAttribute("aria-expanded","true"),this.menu.focus())},s.unpressButton=function(){this.Rt&&(this.Ot=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.v.focus())},s.disable=function(){return this.Ot=!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}(wh);Fe.registerComponent("MenuButton",io);var so=function(t){function i(i,s){var e,n=s.tracks;if((e=t.call(this,i,s)||this).items.length<=1&&e.hide(),!n)return $e(e);var r=Ee($e(e),e.update);return n.addEventListener("removetrack",r),n.addEventListener("addtrack",r),e.t.on("dispose",(function(){n.removeEventListener("removetrack",r),n.removeEventListener("addtrack",r)})),e}return e(i,t),i}(io);Fe.registerComponent("TrackButton",so);var eo=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}e(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",cs({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Ut=ss.createTextNode(this.localize(this.h.label)),n.appendChild(this.Ut),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.Ut.innerHTML=this.localize(this.h.label)},i}(wh);Fe.registerComponent("MenuItem",eo);var no=function(t){function i(i,s){var e,n,r=s.track,h=i.textTracks();if(s.label=r.label||r.language||"Unknown",s.selected=r.default||"showing"===r.mode,(e=t.call(this,i,s)||this).track=r,h){var o=Ee($e(e),e.handleTracksChange);i.on(["loadstart","texttrackchange"],o),h.addEventListener("change",o),e.on("dispose",(function(){h.removeEventListener("change",o)}))}h&&void 0===h.onchange&&e.on(["tap","click"],(function(){if("object"!=typeof is.Event)try{n=new is.Event("change")}catch(t){}n||(n=ss.createEvent("Event")).initEvent("change",!0,!0),h.dispatchEvent(n)}));return e}e(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}(eo);Fe.registerComponent("TextTrackMenuItem",no);var ro=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 e(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}(no);Fe.registerComponent("OffTextTrackMenuItem",ro);var ho=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return e(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new ro(this.t,{kind:this.Lt})),this.Vt+=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 no(this.t,{track:e,selectable:!0}))}return t},i}(so);Fe.registerComponent("TextTrackButton",ho);var oo=function(t){function i(i,s){var e,n=s.track,r=s.cue,h=i.currentTime();return s.selectable=!0,s.label=r.text,s.selected=r.startTime<=h&&h<r.endTime,(e=t.call(this,i,s)||this).track=n,e.cue=r,n.addEventListener("cuechange",Ee($e(e),e.update)),e}e(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}(eo);Fe.registerComponent("ChaptersTrackMenuItem",oo);var ao=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}e(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(De(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 oo(this.t,{track:this.Ht,cue:n});t.push(r)}return t},i}(ho);ao.prototype.Lt="chapters",ao.prototype.St="Chapters",Fe.registerComponent("ChaptersButton",ao);var uo=function(t){function i(i,s,e){var n;(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Descriptions Menu");var r=i.textTracks();if(r){var h=Ee($e(n),n.handleTracksChange);r.addEventListener("change",h),n.on("dispose",(function(){r.removeEventListener("change",h)}))}return n}e(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}(ho);uo.prototype.Lt="descriptions",uo.prototype.St="Descriptions",Fe.registerComponent("DescriptionsButton",uo);var co=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 e(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(ho);co.prototype.Lt="subtitles",co.prototype.St="Subtitles",Fe.registerComponent("SubtitlesButton",co);var lo=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 e(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").v.focus()},i}(no);Fe.registerComponent("CaptionSettingsMenuItem",lo);var fo=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}e(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 lo(this.t,{kind:this.Lt})),this.Vt+=1),t.prototype.createItems.call(this,i)},i}(ho);fo.prototype.Lt="captions",fo.prototype.St="Captions",Fe.registerComponent("CaptionsButton",fo);var vo=function(t){function i(i,s){var e,n=s.track,r=i.audioTracks();if(s.label=n.label||n.language||"Unknown",s.selected=n.enabled,(e=t.call(this,i,s)||this).track=n,r){var h=Ee($e(e),e.handleTracksChange);r.addEventListener("change",h),e.on("dispose",(function(){r.removeEventListener("change",h)}))}return e}e(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}(eo);Fe.registerComponent("AudioTrackMenuItem",vo);var po=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}e(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.Vt=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 vo(this.t,{track:e,selectable:!0}))}return t},i}(so);po.prototype.St="Audio Track",Fe.registerComponent("AudioTrackButton",po);var mo=function(t){function i(i,s){var e,n=s.rate,r=_(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}e(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}(eo);mo.prototype.contentElType="button",Fe.registerComponent("PlaybackRateMenuItem",mo);var go=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}e(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Ut=xs("div",{className:"vjs-playback-rate-value",innerHTML:1}),i.appendChild(this.Ut),i},s.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},s.createMenu=function(){var t=new to(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new mo(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.Ut.innerHTML=this.player().playbackRate()+"x")},i}(io);go.prototype.St="Playback Rate",Fe.registerComponent("PlaybackRateMenuButton",go);var yo=function(t){function i(){return t.apply(this,arguments)||this}e(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}(Fe);Fe.registerComponent("Spacer",yo);var bo=function(t){function i(){return t.apply(this,arguments)||this}e(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}(yo);Fe.registerComponent("CustomControlSpacer",bo);var wo=function(t){function i(){return t.apply(this,arguments)||this}return e(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(Fe);wo.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},Fe.registerComponent("ControlBar",wo);var ko=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}e(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}(en);ko.prototype.h=Ne(en.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Fe.registerComponent("ErrorDisplay",ko);var _o="vjs-text-track-settings",jo=["#000","Black"],xo=["#00F","Blue"],So=["#0FF","Cyan"],To=["#0F0","Green"],Co=["#F0F","Magenta"],Po=["#F00","Red"],Mo=["#FFF","White"],Ao=["#FF0","Yellow"],Io=["1","Opaque"],Eo=["0.5","Semi-Transparent"],Do=["0","Transparent"],No={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[jo,Mo,Po,To,xo,Ao,Co,So]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Io,Eo,Do]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Mo,jo,Po,To,xo,Ao,Co,So]},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:[Io,Eo]},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:[Do,Eo,Io]}};function Fo(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}No.windowColor.options=No.backgroundColor.options;var Bo,$o=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=Ee($e(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()})),us(No,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.h.persistTextTrackSettings&&e.restoreSettings(),e}e(i,t);var s=i.prototype;return s.Wt=function(t){var i=this,s=No[t],e=s.id.replace("%s",this.o);return[xs("label",{className:"vjs-label",textContent:s.label},{for:e}),xs("select",{id:e},void 0,s.options.map((function(t){return xs("option",{textContent:i.localize(t[1]),value:t[0]})})))]},s.qt=function(){var t=xs("legend",{textContent:this.localize("Text")}),i=this.Wt("color"),s=xs("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.Wt("textOpacity"));return xs("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Gt=function(){var t=xs("legend",{textContent:this.localize("Background")}),i=this.Wt("backgroundColor"),s=xs("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.Wt("backgroundOpacity"));return xs("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=xs("legend",{textContent:this.localize("Window")}),i=this.Wt("windowColor"),s=xs("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.Wt("windowOpacity"));return xs("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return xs("div",{className:"vjs-tracksettings-colors"},void 0,[this.qt(),this.Gt(),this.Xt()])},s.Qt=function(){var t=xs("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.Wt("fontPercent")),i=xs("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.Wt("edgeStyle")),s=xs("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.Wt("fontFamily"));return xs("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Yt=function(){var t=xs("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=xs("button",{className:"vjs-done-button",textContent:"Done"});return xs("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=xs("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=xs("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=xs("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=xs("div",void 0,{role:"document"},[i,s,t]);return xs("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),as(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(No,(function(i,s,e){var n=function(t,i){return Fo(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;us(No,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(Fo(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},s.setDefaults=function(){var t=this;us(No,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},s.restoreSettings=function(){var t;try{t=JSON.parse(is.localStorage.getItem(_o))}catch(t){vs.warn(t)}t&&this.setValues(t)},s.saveSettings=function(){if(this.h.persistTextTrackSettings){var t=this.getValues();try{g.keys(t).length?is.localStorage.setItem(_o,JSON.stringify(t)):is.localStorage.removeItem(_o)}catch(t){vs.warn(t)}}},s.updateDisplay=function(){var t=this.t.getChild("textTrackDisplay");t&&t.updateDisplay()},i}(Fe);Fe.registerComponent("TextTrackSettings",$o);var Ro,r=function(t){function i(i,s){var e;e=t.call(this,i,s)||this;var n=i.source,r=!1;if(n&&(e.v.currentSrc!==n.src||i.tag&&3===i.tag.Kt)?e.setSource(n):e.Zt(e.v),e.v.hasChildNodes()){for(var h=e.v.childNodes,o=h.length,a=[];o--;){var u=h[o];"track"===u.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().J(u),e.remoteTextTracks().tt(u.track),r||e.v.hasAttribute("crossorigin")||!ln(u.src)||(r=!0)):a.push(u))}for(var c=0;c<a.length;c++)e.v.removeChild(a[c])}return["audio","video"].forEach((function(t){var i=e.el()[t+"Tracks"],s=e[t+"Tracks"](),n=De(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&&(r&&vs.warn(ys(Bo||(Bo=es(["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=Ee($e(e),e.handleTextTrackChange),e.hi=Ee($e(e),e.handleTextTrackAdd),e.oi=Ee($e(e),e.handleTextTrackRemove),e.ai()),e.ci(),(ve||Ks||re)&&!0===i.nativeControlsForTouch&&e.setControls(!0),e.fi(),e.triggerReady(),e}e(i,t);var s=i.prototype;return s.dispose=function(){var s=this;["audio","video","text"].forEach((function(t){var i=De(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=ss.createElement("video");var e=Ne({},this.h.tag&&$s(this.h.tag));ve&&!0===this.h.nativeControlsForTouch||delete e.controls,Bs(t,cs(e,{id:this.h.techId,class:"vjs-tech"}))}t.playerId=this.h.playerId}void 0!==this.h.preload&&Rs(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?Rs(t,h,h):Os(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.di)}},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.di=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){vs(t,"Video is not ready. (Video.js)")}},s.duration=function(){var t=this;if(this.v.duration===1/0&&se&&ae&&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.fi=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=is.navigator&&is.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=ss.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),is.performance&&"function"==typeof is.performance.now?t.creationTime=is.performance.now():is.performance&&is.performance.timing&&"number"==typeof is.performance.timing.navigationStart&&(t.creationTime=is.Date.now()-is.performance.timing.navigationStart),t},i}(yh);ks()&&(r.TEST_VID=ss.createElement("video"),(Ro=ss.createElement("track")).kind="captions",Ro.srclang="en",Ro.label="English",r.TEST_VID.appendChild(Ro)),r.isSupported=function(){try{r.TEST_VID.volume=.5}catch(t){return!1}return!(!r.TEST_VID||!r.TEST_VID.canPlayType)},r.canControlVolume=function(){try{var t=r.TEST_VID.volume;return r.TEST_VID.volume=t/2+.1,t!==r.TEST_VID.volume}catch(t){return!1}},r.canControlPlaybackRate=function(){if(se&&ae&&ue<58)return!1;try{var t=r.TEST_VID.playbackRate;return r.TEST_VID.playbackRate=t/2+.1,t!==r.TEST_VID.playbackRate}catch(t){return!1}},r.supportsNativeTextTracks=function(){return de},r.supportsNativeVideoTracks=function(){return!(!r.TEST_VID||!r.TEST_VID.videoTracks)},r.supportsNativeAudioTracks=function(){return!(!r.TEST_VID||!r.TEST_VID.audioTracks)},r.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],r.prototype.featuresVolumeControl=r.canControlVolume(),r.prototype.featuresPlaybackRate=r.canControlPlaybackRate(),r.prototype.movingMediaElementInDOM=!te,r.prototype.featuresFullscreenResize=!0,r.prototype.featuresProgressEvents=!0,r.prototype.featuresTimeupdateEvents=!0,r.prototype.featuresNativeTextTracks=r.supportsNativeTextTracks(),r.prototype.featuresNativeVideoTracks=r.supportsNativeVideoTracks(),r.prototype.featuresNativeAudioTracks=r.supportsNativeAudioTracks();var Oo=r.TEST_VID&&r.TEST_VID.constructor.prototype.canPlayType,Vo=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,Uo=/^video\/mp4/i;r.patchCanPlayType=function(){ee>=4&&!he?r.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Vo.test(t)?"maybe":Oo.call(this,t)}:ne&&(r.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&Uo.test(t)?"maybe":Oo.call(this,t)})},r.unpatchCanPlayType=function(){var t=r.TEST_VID.constructor.prototype.canPlayType;return r.TEST_VID.constructor.prototype.canPlayType=Oo,t},r.patchCanPlayType(),r.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){}}()}}},r.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){r.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){r.prototype["set"+De(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){r.prototype[t]=function(){return this.v[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){r.prototype["set"+De(t)]=function(i){this.v[t]=i}})),["pause","load"].forEach((function(t){r.prototype[t]=function(){return this.v[t]()}})),yh.withSourceHandlers(r),r.nativeSourceHandler={},r.nativeSourceHandler.canPlayType=function(t){try{return r.TEST_VID.canPlayType(t)}catch(t){return""}},r.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return r.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 r.nativeSourceHandler.canPlayType("video/"+s)}return""},r.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},r.nativeSourceHandler.dispose=function(){},r.registerSourceHandler(r.nativeSourceHandler),Fe.registerComponent("Html5",r),yh.registerTech("Html5",r);var Lo=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],Ho=function(t){function i(s,e,n){var r;if(s.id=s.id||["vjs_video",rs()].join("_"),(e=cs(i.getTagSettings(s),e)).initChildren=!1,e.createEl=!1,e.reportTouchActivity=!1,!e.language)if("function"==typeof s.closest){var h=s.closest("[lang]");h&&(e.language=h.getAttribute("lang"))}else for(var o=s;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 d("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(r.tag=s,r.tagAttributes=s&&$s(s),r.language(r.h.language),e.languages){var a={};g.getOwnPropertyNames(e.languages).forEach((function(t){a[t.toLowerCase()]=e.languages[t]})),r.vi=a}else r.vi=i.prototype.h.languages;r.pi={},r.mi=e.poster||"",r.gi=!!e.controls,s.controls=!1,r.yi=!1,r.v=r.createEl();var u=Ne(r.h);if(e.plugins){var c=e.plugins;g.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):vs.error("Unable to find plugin:",t)}),$e(r))}r.h.playerOptions=u,r.initChildren(),r.isAudio("audio"===s.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"),te||r.addClass("vjs-workinghover"),i.players[r.o]=$e(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.wi(),r.on("fullscreenchange",r.ki),r.on("stageclick",r._i),r}e(i,t);var s=i.prototype;return s.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.ji&&this.ji.parentNode&&this.ji.parentNode.removeChild(this.ji),i.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)},s.createEl=function(){var i,s=this.tag,e=this.xi=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(g.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!==is.VIDEOJS_NO_DYNAMIC_STYLE){this.ji=Ae("vjs-styles-dimensions");var r=qs(".vjs-styles-defaults"),h=qs("head");h.insertBefore(this.ji,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);Ds(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return s.Kt=s.networkState,s.parentNode&&!e&&s.parentNode.insertBefore(i,s),Ts(s,i),this.m.unshift(s),this.v=i,i},s.width=function(t){return this.dimension("width",t)},s.height=function(t){return this.dimension("height",t)},s.dimension=function(t,i){var s="width"===t?"Ti":"Ci";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=_(i);if(j(e))return vs.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Pi(),this},s.fluid=function(t){if(void 0===t)return!!this.Mi;this.Mi=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Pi()},s.aspectRatio=function(t){if(void 0===t)return this.Ai;if(!/^\d+\:\d+$/.test(t))throw new d("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Ai=t,this.fluid(!0),this.Pi()},s.Pi=function(){if(!0!==is.VIDEOJS_NO_DYNAMIC_STYLE){var t,i,s,e=(void 0!==this.Ai&&"auto"!==this.Ai?this.Ai:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.Ti?this.Ti:void 0!==this.Ci?this.Ci/n:this.videoWidth()||300,i=void 0!==this.Ci?this.Ci:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),Ie(this.ji,"\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.Ti?this.Ti:this.h.width,h="number"==typeof this.Ci?this.Ci:this.h.height,o=this.H&&this.H.el();o&&(r>=0&&(o.width=r),h>=0&&(o.height=h))}},s._t=function(t,i){var s=this;this.H&&this.Ii(),"Html5"!==t&&this.tag&&(yh.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Ei=t,this.T=!1;var e=cs({source:i,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Di",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.xi||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(e.tag=this.tag),i&&(this.Ni=i.type,i.src===this.pi.src&&this.pi.currentTime>0&&(e.startTime=this.pi.currentTime),this.pi.sources=null,this.pi.source=i,this.pi.src=i.src);var n=yh.getTech(t);n||(n=Fe.getComponent(t)),this.H=new n(e),this.H.ready(Ee(this,this.Fi),!0),tn(this.Bi||[],this.H),Lo.forEach((function(t){s.on(s.H,t,s["handleTech"+De(t)+"_"])})),this.on(this.H,"loadstart",this.$i),this.on(this.H,"waiting",this.Ri),this.on(this.H,"canplay",this.Oi),this.on(this.H,"canplaythrough",this.Vi),this.on(this.H,"playing",this.Ui),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.Wi),this.on(this.H,"firstplay",this.qi),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.Pi),this.on(this.H,"resize",this.Pi),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||Ts(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},s.Ii=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.Bi=Ze(this.H),this.T=!1,this.H.dispose(),this.H=!1},s.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 is.alert(i),new d(i)},s.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)},s.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)},s.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){vs("deleting tag.poster throws in some browsers",t)}this.play()}},s.$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"))},s.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},s.Wi=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},s.Ri=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return t.removeClass("vjs-waiting")}))},s.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},s.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},s.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},s.Hi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},s.zi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},s.qi=function(){this.h.starttime&&(vs.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")},s.Gi=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},s.Li=function(){this.addClass("vjs-ended"),this.h.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},s.Xi=function(){this.duration(this.Zi("duration"))},s.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()))},s.os=function(){this.userActive(!this.userActive())},s.ns=function(){this.userWasActive=this.userActive()},s.rs=function(){this.userWasActive&&this.reportUserActivity()},s.hs=function(t){t.cancelable&&t.preventDefault()},s.ki=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},s._i=function(){this.reportUserActivity()},s.Ji=function(t,i){i&&(this.toggleClass("vjs-ios-native-fs",!(!i.nativeIOSFullscreen||!i.isFullscreen)),this.isFullscreen(i.isFullscreen)),this.trigger("fullscreenchange")},s.Qi=function(){var t=this.H.error();this.error(t)},s.Ki=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},s.getCache=function(){return this.pi},s.us=function(t,i){if(this.H&&!this.H.T)this.H.ready((function(){this[t](i)}),!0);else try{this.H&&this.H[t](i)}catch(t){throw vs(t),t}},s.Zi=function(t){if(this.H&&this.H.T)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?vs("Video.js: "+t+" method not defined for "+this.Ei+" playback technology.",i):"TypeError"===i.name?(vs("Video.js: "+t+" unavailable on "+this.Ei+" playback technology element.",i),this.H.T=!1):vs(i),i}},s.play=function(){return this.src()||this.currentSrc()?this.us("play"):this.H.one("loadstart",(function(){this.play()})),this},s.pause=function(){return this.us("pause"),this},s.paused=function(){return!1!==this.Zi("paused")},s.scrubbing=function(t){return void 0!==t?(this.yi=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.yi},s.currentTime=function(t){return void 0!==t?(this.us("setCurrentTime",t),this):(this.pi.currentTime=this.Zi("currentTime")||0,this.pi.currentTime)},s.duration=function(t){return void 0===t?void 0!==this.pi.duration?this.pi.duration:NaN:((t=_(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)},s.remainingTime=function(){return this.duration()-this.currentTime()},s.buffered=function(){var t=this.Zi("buffered");return t&&t.length||(t=Ue(0,0)),t},s.bufferedPercent=function(){return Le(this.buffered(),this.duration())},s.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),s=t.end(t.length-1);return s>i&&(s=i),s},s.volume=function(t){var i;return void 0!==t?(i=w.max(0,w.min(1,_(t))),this.pi.volume=i,this.us("setVolume",i),this):(i=_(this.Zi("volume")),j(i)?1:i)},s.muted=function(t){return void 0!==t?(this.us("setMuted",t),this):this.Zi("muted")||!1},s.supportsFullScreen=function(){return this.Zi("supportsFullScreen")||!1},s.isFullscreen=function(t){return void 0!==t?(this.cs=!!t,this):!!this.cs},s.requestFullscreen=function(t){var i,s=Ge;return this.isFullscreen(!0),s.requestFullscreen?(_e(ss,s.fullscreenchange,Ee(this,(function t(i){this.isFullscreen(ss[s.fullscreenElement]),!1===this.isFullscreen()&&je(ss,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},s.exitFullscreen=function(){var t=Ge;return this.isFullscreen(!1),t.requestFullscreen?ss[t.exitFullscreen]():this.H.supportsFullScreen()?this.us("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},s.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=ss.documentElement.style.overflow,_e(ss,"keydown",Ee(this,this.fullWindowOnEscKey)),ss.documentElement.style.overflow="hidden",Ds(ss.body,"vjs-full-window"),this.trigger("enterFullWindow")},s.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},s.exitFullWindow=function(){this.isFullWindow=!1,je(ss,"keydown",this.fullWindowOnEscKey),ss.documentElement.style.overflow=this.docOrigOverflow,Ns(ss.body,"vjs-full-window"),this.trigger("exitFullWindow")},s.canPlayType=function(t){for(var i,s=0,e=this.h.techOrder;s<e.length;s++){var n=De(e[s]),r=yh.getTech(n);if(r||(r=Fe.getComponent(n)),r){if(r.isSupported()&&(i=r.canPlayType(t)))return i}else vs.error('The "'+n+'" tech is undefined. Skipped browser support check for that tech.')}return""},s.selectSource=function(t){var i,s=this,e=this.h.techOrder.map(De).map((function(t){return[t,yh.getTech(t)||Fe.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(vs.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),n=function(t,i,s){var e;return t.some((function(t){return i.some((function(i){if(e=s(t,i))return!0}))})),e},r=function(t,i){var e=t[0];if(t[1].canPlaySource(i,s.h[e.toLowerCase()]))return{source:i,tech:e}};return(this.h.sourceOrder?n(t,e,(i=r,function(t,s){return i(s,t)})):n(e,t,r))||!1},s.src=function(t){if(void 0===t)return this.Zi("src");var i=yh.getTech(this.Ei);return i||(i=Fe.getComponent(this.Ei)),Array.isArray(t)?this.ls(t):"string"==typeof t?this.src({src:t}):t instanceof g&&(t.type&&!i.canPlaySource(t,this.h[this.Ei.toLowerCase()])?this.ls([t]):(this.pi.sources=null,this.pi.source=t,this.pi.src=t.src,this.Ni=t.type||"",this.ready((function(){i.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},s.ls=function(t){var i=this.selectSource(t);i?(i.tech===this.Ei?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())},s.load=function(){return this.us("load"),this},s.reset=function(){return this._t(De(this.h.techOrder[0]),null),this.us("reset"),this},s.currentSources=function(){var t=this.currentSource(),i=[];return 0!==g.keys(t).length&&i.push(t),this.pi.sources||i},s.currentSource=function(){var t={},i=this.currentSrc();return i&&(t.src=i),this.pi.source||t},s.currentSrc=function(){return this.Zi("currentSrc")||this.pi.src||""},s.currentType=function(){return this.Ni||""},s.preload=function(t){return void 0!==t?(this.us("setPreload",t),this.h.preload=t,this):this.Zi("preload")},s.autoplay=function(t){return void 0!==t?(this.us("setAutoplay",t),this.h.autoplay=t,this):this.Zi("autoplay",t)},s.playsinline=function(t){return void 0!==t?(this.us("setPlaysinline",t),this.h.playsinline=t,this):this.Zi("playsinline")},s.loop=function(t){return void 0!==t?(this.us("setLoop",t),this.h.loop=t,this):this.Zi("loop")},s.poster=function(t){return void 0===t?this.mi:(t||(t=""),this.mi=t,this.us("setPoster",t),this.trigger("posterchange"),this)},s.Yi=function(){!this.mi&&this.H&&this.H.poster&&(this.mi=this.H.poster()||"",this.trigger("posterchange"))},s.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},s.usingNativeControls=function(t){return void 0!==t?(t=!!t,this.fs!==t&&(this.fs=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.fs},s.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 Qe(t),this.addClass("vjs-error"),vs.error("(CODE:"+this.lt.code+" "+Qe.errorTypes[this.lt.code]+")",this.lt.message,this.lt),this.trigger("error"),this)},s.reportUserActivity=function(t){this.ds=!0},s.userActive=function(t){return void 0!==t?((t=!!t)!==this.vs&&(this.vs=t,t?(this.ds=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.ds=!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},s.wi=function(){var t,i,s,e,n=Ee(this,this.reportUserActivity);this.on("mousedown",(function(){n(),this.clearInterval(t),t=this.setInterval(n,250)})),this.on("mousemove",(function(t){t.screenX===i&&t.screenY===s||(i=t.screenX,s=t.screenY,n())})),this.on("mouseup",(function(i){n(),this.clearInterval(t)})),this.on("keydown",n),this.on("keyup",n),this.setInterval((function(){if(this.ds){this.ds=!1,this.userActive(!0),this.clearTimeout(e);var t=this.h.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.ds||this.userActive(!1)}),t))}}),250)},s.playbackRate=function(t){return void 0!==t?(this.us("setPlaybackRate",t),this):this.H&&this.H.featuresPlaybackRate?this.Zi("playbackRate"):1},s.isAudio=function(t){return void 0!==t?(this.ps=!!t,this):!!this.ps},s.videoTracks=function(){return this.H?this.H.videoTracks():(this.rt=this.rt||new vh,this.rt)},s.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new mh,this.ht)},s.textTracks=function(){if(this.H)return this.H.textTracks()},s.remoteTextTracks=function(){if(this.H)return this.H.remoteTextTracks()},s.remoteTextTrackEls=function(){if(this.H)return this.H.remoteTextTrackEls()},s.addTextTrack=function(t,i,s){if(this.H)return this.H.addTextTrack(t,i,s)},s.addRemoteTextTrack=function(t,i){if(this.H)return this.H.addRemoteTextTrack(t,i)},s.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)},s.getVideoPlaybackQuality=function(){return this.Zi("getVideoPlaybackQuality")},s.videoWidth=function(){return this.H&&this.H.videoWidth&&this.H.videoWidth()||0},s.videoHeight=function(){return this.H&&this.H.videoHeight&&this.H.videoHeight()||0},s.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)},s.languages=function(){return Ne(i.prototype.h.languages,this.vi)},s.toJSON=function(){var t=Ne(this.h),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=Ne(e)).player=void 0,t.tracks[s]=e}return t},s.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new en(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},i.getTagSettings=function(t){var i={sources:[],tracks:[]},s=$s(t),e=s["data-setup"];if(Es(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=Ye(e||"{}"),r=n[0],h=n[1];r&&vs.error(r),cs(s,h)}if(cs(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},s.bi=function(){var t=ss.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},i}(Fe);Ho.players={};var zo=is.navigator;Ho.prototype.h={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:zo&&(zo.languages&&zo.languages[0]||zo.userLanguage||zo.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreenOptions:{navigationUI:"hide"}},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Ho.prototype[t]=function(){return this.Zi(t)}})),Lo.forEach((function(t){Ho.prototype["handleTech"+De(t)+"_"]=function(){return this.trigger(t)}})),Fe.registerComponent("Player",Ho);var Wo,qo,Go=function(t){function i(s){var e;void 0===s&&(s={});var n=Ne(s,{kind:hn[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(ce)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return g.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.q=!0,r||$e(e)}return e(i,t),i}(un),Xo=function(t){function i(s){var e;void 0===s&&(s={});var n=Ne(s,{kind:rn[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(ce)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return g.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||$e(e)}return e(i,t),i}(un);function Jo(t,i,s){var e;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),Jo.getPlayers()[t])return i&&vs.warn('Player "'+t+'" is already initialised. Options will not be applied.'),s&&Jo.getPlayers()[t].ready(s),Jo.getPlayers()[t];e=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),ss.getElementById(t)}(t)}else e=t;if(!e||!e.nodeName)throw new v("The element or ID supplied is not valid. (videojs)");if(e.player||Ho.players[e.playerId])return e.player||Ho.players[e.playerId];i=i||{},Jo.hooks("beforesetup").forEach((function(t){var s=t(e,Ne(i));ls(s)&&!Array.isArray(s)?i=Ne(i,s):vs.error("please return an object in beforesetup hooks")}));var n=new(Fe.getComponent("Player"))(e,i,s);return Jo.hooks("setup").forEach((function(t){return t(n)})),n}"undefined"==typeof HTMLVideoElement&&ks()&&(ss.createElement("video"),ss.createElement("audio"),ss.createElement("track")),Jo.ys={},Jo.hooks=function(t,i){return Jo.ys[t]=Jo.ys[t]||[],i&&(Jo.ys[t]=Jo.ys[t].concat(i)),Jo.ys[t]},Jo.hook=function(t,i){Jo.hooks(t,i)},Jo.removeHook=function(t,i){var s=Jo.hooks(t).indexOf(i);return!(s<=-1)&&(Jo.ys[t]=Jo.ys[t].slice(),Jo.ys[t].splice(s,1),!0)},!0!==is.VIDEOJS_NO_DYNAMIC_STYLE&&ks()&&((Wo=qs(".vjs-styles-defaults"))||(Wo=Ae("vjs-styles-defaults"),(qo=qs("head"))&&qo.insertBefore(Wo,qo.firstChild),Ie(Wo,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),Me(1,Jo),Jo.VERSION="5.20.6-opentelly.14",Jo.options=Ho.prototype.h,Jo.getPlayers=function(){return Ho.players},Jo.players=Ho.players,Jo.getComponent=Fe.getComponent,Jo.registerComponent=function(t,i){yh.isTech(i)&&vs.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Fe.registerComponent.call(Fe,t,i)},Jo.getTech=yh.getTech,Jo.registerTech=yh.registerTech,Jo.browser=me,Jo.TOUCH_ENABLED=ve,Jo.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in ls(i)?("function"==typeof i.init&&(vs.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==g.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new v("Super expression must either be null or a function, not "+typeof i);t.prototype=g.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},Jo.mergeOptions=Ne,Jo.bind=Ee,Jo.plugin=function(t,i){Ho.prototype[t]=i},Jo.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),Jo.options.languages=Ne(Jo.options.languages,((s={})[t]=i,s)),Jo.options.languages[t]},Jo.log=vs,Jo.createTimeRange=Jo.createTimeRanges=Ue,Jo.formatTime=Eh,Jo.parseUrl=cn,Jo.isCrossOrigin=ln,Jo.EventTarget=Be,Jo.on=_e,Jo.one=Se,Jo.off=je,Jo.trigger=xe,Jo.xhr=sh,Jo.TextTrack=oh,Jo.AudioTrack=Go,Jo.VideoTrack=Xo,Jo.isEl=_s,Jo.isTextNode=Ls,Jo.createEl=xs,Jo.hasClass=Es,Jo.addClass=Ds,Jo.removeClass=Ns,Jo.toggleClass=Fs,Jo.setAttributes=Bs,Jo.getAttributes=$s,Jo.emptyEl=Hs,Jo.appendContent=zs,Jo.insertContent=Ws,Jo.computedStyle=Oh;var Qo=10;function Yo(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 Ko(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Zo(t){const i=sa(t);return Yo(t)?i.end(i.length-1):i.start(0)}function ta(t){return sa(t).start(0)}function ia(t){const i=sa(t);return i.end(i.length-1)-i.start(0)}function sa(t){const i=t.seekable;if(i&&i.length)return i;let s=t.duration;return s=isFinite(s)?s:0,new ki([0,s]).ws()}function ea(t,i){void 0===i&&(i=t);let s=t<0?"-":"";t=w.abs(t);let e=w.floor(t%60),n=w.floor(t/60%60),r=w.floor(t/3600);const h=w.floor(i/60%60),o=w.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 na(t){return class extends t{get ks(){var t;return null!=(t=this._s)?t:this._s=ra(this.player())}dispose(){this._s=void 0,super.dispose()}constructor(...t){super(...t),this._s=void 0}}}function ra(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function ha(t){const i=ra(t),s=()=>{const s=Ko(t);t.toggleClass("theo-at-live",function(t,i){if(Yo(t)){let s=t.seekable;return 0===s.length||s.end(s.length-1)-i<Qo}return!1}(i,s)),t.toggleClass("vjs-live",Yo(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)}var oa="theo-ad-playing",aa="theo-dai-ad-playing";function ua(t,i,s){t.toggleClass(oa,i),t.toggleClass(aa,i&&s)}function ca(){this.userActive(!1)}var la=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}},fa=function(t){return t.js="unavailable",t.xs="available",t.Ss="presenting",t}({});var da=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],va=Jo.getTech("Tech"),pa=Jo.getTech("Html5"),ma=class extends va{Ts(){var t;for(const t of da)this.ks.addEventListener(t,this.Cs);this.ks.addEventListener("error",this.Ps),this.ks.addEventListener("contentprotectionerror",this.Ps),this.ks.addEventListener("sourcechange",this.Ms),this.ks.addEventListener("loadstart",this.As),null==(t=this.ks.presentation)||t.addEventListener(pt.MODE_CHANGE,this.Is),this.ks.textTracks.addEventListener("addtrack",this.Es),this.ks.textTracks.addEventListener("removetrack",this.Ds),this.ks.textTracks.addEventListener("change",this.Ns),this.ks.audioTracks.addEventListener("addtrack",this.Fs),this.ks.audioTracks.addEventListener("removetrack",this.Bs),this.ks.audioTracks.addEventListener("change",this.$s)}Rs(){var t;for(const t of da)this.ks.removeEventListener(t,this.Cs);this.ks.removeEventListener("error",this.Ps),this.ks.removeEventListener("contentprotectionerror",this.Ps),this.ks.removeEventListener("sourcechange",this.Ms),this.ks.removeEventListener("loadstart",this.As),null==(t=this.ks.presentation)||t.removeEventListener(pt.MODE_CHANGE,this.Is),this.ks.textTracks.removeEventListener("addtrack",this.Es),this.ks.textTracks.removeEventListener("removetrack",this.Ds),this.ks.textTracks.removeEventListener("change",this.Ns),this.ks.audioTracks.removeEventListener("addtrack",this.Fs),this.ks.audioTracks.removeEventListener("removetrack",this.Bs),this.ks.audioTracks.removeEventListener("change",this.$s)}Os(t){this.trigger(new la(t,this))}createEl(){let t=this.h,i=t.player;if(!i)throw new d(this.localize('Missing required tech option "player"'));let s=i.element;return Jo.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.ks}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.ks.buffered}played(){return this.ks.played}reset(){this.ks.stop()}play(){this.ks.play()}pause(){this.ks.pause()}paused(){return this.ks.paused}currentTime(){return this.ks.currentTime}setCurrentTime(t){this.ks.currentTime=t}duration(){return this.ks.duration}volume(){return this.ks.volume}setVolume(t){this.ks.volume=t}muted(){return this.ks.muted}setMuted(t){this.ks.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.ks.src)return this.ks.src;if(this.ks.source){if(!W(this.ks.source.ads))return this.ks.source.ads[0].sources;if(function(t){if(t.sources)if(Lt(t.sources)){for(const i of t.sources)if(!Xt(i)&&"verizon-media"===i.integration)return!0}else if(!Xt(t.sources))return"verizon-media"===t.sources.integration;return!1}(this.ks.source))return"This source is managed by the Verizon Media integration extension.";if(function(t){if(t.sources)if(Lt(t.sources)){for(const i of t.sources)if(xi(i))return!0}else if(Wt(t.sources))return xi(t.sources);return!1}(this.ks.source))return"This source is managed by the DAI integration extension.";if(Ci(this.ks.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.ks.src}load(){this.setPreload("auto")}preload(){return this.ks.preload}setPreload(t){this.ks.preload=t}autoplay(){return this.ks.autoplay}setAutoplay(t){this.ks.autoplay=!!t}seeking(){return this.ks.seeking}seekable(){return this.ks.seekable}ended(){return this.ks.ended}playbackRate(){return this.ks.playbackRate}setPlaybackRate(t){this.ks.playbackRate=t}readyState(){return this.ks.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.ks.videoHeight}videoWidth(){return this.ks.videoWidth}supportsFullScreen(){return this.ks.presentation.supportsMode(I.FULLSCREEN)}enterFullScreen(){this.ks.presentation.requestMode(I.FULLSCREEN)}exitFullScreen(){this.ks.presentation.requestMode(I.INLINE)}Vs(){let t=this.ks.ads;if(t&&t.playing)return!0;let i=this.ks.vr;return!(!i||i.state===fa.js)}initTextTrackListeners(){return this.on("touchend",(t=>{this.Vs()&&(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.Rs(),this.ks=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return Mi}constructor(t={},i){super(t,i),this.Cs=t=>this.Os(t),this.Us=!1,this.Ms=()=>{void 0===this.ks.errorObject&&(this.Os(new Ai(this.ks.currentTime,this.ks.readyState)),this.Os(new T),this.Os(new Oi(this.ks.duration)))},this.As=()=>{this.Os(new Jt(this.ks.currentTime))},this.Es=t=>{this.textTracks().tt(t.track)},this.Fs=t=>{this.audioTracks().tt(t.track)},this.Ds=t=>{this.textTracks().it(t.track)},this.Bs=t=>{this.audioTracks().it(t.track)},this.Ns=()=>{let t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.$s=()=>{let t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Is=()=>{if(!this.supportsFullScreen())return;let t=this.Us,i=this.ks.presentation.currentMode===I.FULLSCREEN;t!==i&&(this.Us=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ps=()=>{const t=this.ks.errorObject,i=t&&wt(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.ks=this.h.player,this.Ts();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()}};ma.prototype.featuresFullscreenResize=pa.prototype.featuresFullscreenResize,ma.prototype.featuresPlaybackRate=pa.prototype.featuresPlaybackRate,ma.prototype.featuresProgressEvents=!0,ma.prototype.featuresTimeupdateEvents=!0,ma.prototype.featuresNativeTextTracks=!0,Jo.registerTech("THEOplayer",ma);var ga=class{constructor(t){this.Ls=t=>{ri(this.Hs,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.zs=t=>{ai(this.Hs,"theo-mobile-button-hover")},this.Ws=t=>{this.Hs.blur()},this.Hs=t,t.addEventListener("touchstart",this.Ls),t.addEventListener("touchend",this.zs),t.addEventListener("focusin",this.Ws)}},ya=Jo.getComponent("Menu"),ba=class extends(na(ya)){get qs(){return this.player().el()}Gs(){ri(this.qs,"theo-menu-opened")}Xs(){ai(this.qs,"theo-menu-opened")}constructor(t,i){super(t,i)}},wa=Jo.getComponent("MenuItem"),ka=class extends(na(wa)){get parentMenu(){return this.Js}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.Qs||(this.parentMenu.Ys(this),"tap"!==t.type&&"keydown"!==t.type||(this.Qs=!0,this.trigger("click"),this.Qs=!1))}dispose(){Ri.Zs.Ks&&(this.el().removeEventListener("touchstart",this.Ls),this.el().removeEventListener("touchend",this.zs)),super.dispose()}constructor(t,i,s){super(t,Gi({selectable:!0},i)),this.Qs=!1,this.Ls=t=>{ri(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.zs=t=>{ai(this.el(),"theo-mobile-menu-item-hover")},this.Js=s,Ri.Zs.Ks&&(this.el().addEventListener("touchstart",this.Ls),this.el().addEventListener("touchend",this.zs))}},_a=Jo.getComponent("ClickableComponent"),ja=class extends _a{get parentMenu(){return this.Js}get te(){return this.ie}set te(t){this.ie=t,this.el().setAttribute("tabindex",this.te?"0":"-1"),this.se()}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.Qs&&this.te&&(this.Js.ee(),"tap"===t.type&&(this.Qs=!0,this.trigger("click"),this.Qs=!1))}se(){this.te?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.Qs=!1,this.ie=!1,this.Js=s,this.on(t,"languagechange",this.se)}},xa=class extends ba{get menuHeader(){return this.ne}get menuItems(){return this.children()}addMenuItem(t){t=Gi({playerOptions:this.h.playerOptions},t);let i=new ka(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=Gi({playerOptions:this.h.playerOptions},t);let i=this.re(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"}Gs(){super.Gs(),a.removeEventListener("resize",this.he),a.addEventListener("resize",this.he),this.show()}oe(){let t=this.ae();if(!t)return;let i=t.getClientRects();Ri.Zs.Ks?this.ue(t,i):this.ce(t,i)}ae(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ce(t,i){}ue(t,i){}Xs(){a.removeEventListener("resize",this.he),super.Xs(),this.hide(),Ri.Zs.Ks&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=this.contentEl();ri(i,"theo-menu-content");let s=new ja(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.ne=s,t}Ys(t){}show(){return this.oe(),super.show()}dispose(){this.ne&&this.ne.dispose(),super.dispose()}constructor(t,i){super(t,i),this.he=()=>this.oe(),this.le=this.player().el(),this.hide(),this.on("menuchange",this.oe)}},Sa=class extends xa{get fe(){return this.de}set fe(t){this.de&&this.de.ve(this),this.de=t,t&&t.pe(this)}me(t){this.fe.ge(t,"replace")}ye(t){t.fe.ge(this,"restore")}be(){ai(this.we,"vjs-hidden"),this.we.style.opacity="1",super.show()}ke(){ri(this.we,"vjs-hidden")}Gs(){this.fe&&this.fe.Gs(),super.Gs()}Xs(){this.fe&&this.fe.Xs(),super.Xs(),ri(this.we,"vjs-hidden")}ae(){if(this.fe&&this.fe._e)return this.fe._e.we}ce(t,i){if(i.length>0){let t=i[0].height,s=i[0].width;this.de.je.style.height=t+"px",this.de.je.style.width=s+"px"}super.ce(t,i)}constructor(t,i){super(t,i)}},Ta=class{get je(){return this.Hs}get _e(){return this.xe}pe(t){t.ke(),this.Hs.appendChild(t.we)}ve(t){this.Hs.removeChild(t.we)}ge(t,i){if(t==this.xe)return;let s=this.xe;if(this.xe=t,this.xe.be(),this._e.focus(),Ri.Zs.Ks)s.ke();else{const t="translateX(100%)",e="translateX(-100%)",n=rt("transform");s.we.style.opacity="0",s.we.style[n]="replace"===i?e:t,this.xe.we.style.opacity="1",this.xe.we.style[n]="",u((()=>{s.ke(),s.we.style[n]=""}),300)}}Gs(){this.Se(),this.xe.be(),this.Te()}Xs(){this.Se(),this.xe.ke(),this.Ce.ke(),this.xe=this.Ce,this.Te()}Te(){it((()=>{ai(this.Hs,"theo-no-transition"),ai(this.xe.we,"theo-no-transition")}))}Se(){ri(this.Hs,"theo-no-transition"),ri(this.xe.we,"theo-no-transition")}constructor(t){this.Ce=this.xe=t,this.Hs=h.createElement("div"),this.Hs.className="theo-tertiary-background theo-menu-animation-container",this.Hs.appendChild(this.Ce.we),this.le=this.xe.player().el()}},Ca=class extends Sa{get we(){return this.el()}get parentMenu(){return this.Pe}re(t,i){let s=new Pa(t,i,this);return s.subMenu.fe=this.fe,s}ee(){this.Me()}Ys(t){super.Ys(t),this.Me()}Me(){this.parentMenu.ye(this)}buildCSSClass(){return"theo-submenu "+(this.Ae?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Ae=!0;let i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Ae=!1,this.Pe=s,this.menuHeader.te=!0}},Pa=class extends ka{get subMenu(){return this.Ie}handleClick(t){this.parentMenu.me(this.subMenu)}constructor(t,i,s){super(t,Gi({selectable:!1},i),s),this.Ie=new Ca(t,i,s)}},Ma=class extends Sa{get menuButton(){return this.Ee}createEl(){let t=Jo.createEl("div",{className:this.buildCSSClass()});return this.De=super.createEl(),this.De.className=super.buildCSSClass(),ri(this.De,"theo-menu-content-animatable"),t.appendChild(this.De),this.fe=new Ta(this),t.appendChild(this.fe.je),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}re(t,i){let s=new Pa(t,i,this);return s.subMenu.fe=this.fe,s}ce(t,i){super.ce(t,i);let s=this.le.getClientRects(),e=s.length>0?s[0]:void 0,n=_(getComputedStyle(this.el()).fontSize);si(this.el(),this.Ee.el(),e,n)}get we(){return this.De}ee(){this.Ee.closeMenu()}dispose(){this.Ne||(this.Ne=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ne=!1,this.Ee=s}},Aa=class{set Fe(t){this.Be.innerHTML=this.$e.localize(t),this.Re(),this.Oe(),gi(this.$e.el())}get Fe(){return this.Be.textContent||""}Ve(){this.$e.off("mouseover",this.Oe),this.$e.off("mouseout",this.Re),this.$e.off("dispose",this.Ue),Yt(this.Be)}constructor(t,i){this.Oe=()=>{ai(this.Be,"vjs-hidden");let t=this.$e.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=_(getComputedStyle(this.Be).fontSize);si(this.Be,this.$e.el(),i,s)},this.Re=()=>{ri(this.Be,"vjs-hidden")},this.Ue=()=>this.Ve(),this.$e=t,gi(t.el()),wi(t.el()),this.Be=h.createElement("span"),this.Be.innerHTML=this.$e.localize(i),this.Be.className="theo-button-tooltip vjs-hidden",this.Be.setAttribute("aria-hidden","true"),this.$e.el().appendChild(this.Be),this.$e.on("mouseover",this.Oe),this.$e.on("mouseout",this.Re),this.$e.on("dispose",this.Ue)}},Ia=Jo.getComponent("Button"),Ea=class extends(na(Ia)){get Le(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.He}isMenuOpen(){return this.ze}openMenu(){this.We&&!this.ze&&(this.He.Gs(),this.el().setAttribute("aria-expanded","true"),this.ze=!0,this.He.focus())}closeMenu(){this.We&&this.ze&&(this.He.Xs(),this.el().setAttribute("aria-expanded","false"),this.ze=!1)}set minimumMenuItems(t){this.qe=t,this.Ge()}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.ze?this.closeMenu():this.openMenu()}enable(){return this.We=!0,super.enable()}disable(){return this.closeMenu(),this.We=!1,super.disable()}se(){this.Be.Fe=this.controlText()}dispose(){this.player().removeChild(this.He),this.He.dispose(),this.Be.Ve(),this.ks.removeEventListener("seeking",this.Xe),super.dispose()}constructor(t,i){super(t,i),this.ze=!1,this.qe=1,this.We=!0,this.Je=t=>{let i=this.el().contains(t.target),s=this.He.el().contains(t.target),e=!1;var n;Ri.Zs.Ks&&this.Le&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.ze||(e&&t.preventDefault(),this.closeMenu())},this.Qe=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.Xe=()=>{this.ze&&this.closeMenu()},this.Ge=()=>{this.He.menuItems.length>=this.qe?this.show():(this.closeMenu(),this.hide())},this.He=new Ma(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.He),this.Be=new Aa(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),Ri.Zs.Ye?(this.on(h,"touchend",this.Je),new ga(this.el())):(this.on(h,"click",this.Je),this.on(h,"keydown",this.Qe),lt&&this.on(h,lt.Ke,this.closeMenu)),this.ks.addEventListener("seeking",this.Xe),this.on(this.He,"menuchange",this.Ge),this.on(t,"languagechange",this.se),this.Ge()}},Da=Jo.getComponent("Component"),Na=class extends(Jo.getComponent("ControlBar")){addMenuButton(t){t=Gi({playerOptions:this.h.playerOptions},t);let i=new Ea(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)}};Jo.registerComponent("THEOControlBarShadow",class extends Da{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}});var Fa=Jo.getComponent("VolumeBar"),Ba=class extends Fa{handleFocus(t){super.handleFocus(t),this.Ze.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.Ze.removeClass("focus-within")}constructor(t,i){super(t,i),this.Ze=i.tn}},$a=Jo.getComponent("VolumeControl"),Ra=class extends $a{constructor(t,i){super(t,i),this.sn=new Ba(t,{tn:this}),this.addChild(this.sn)}};Ra.prototype.h=Gi({},$a.prototype.h,{children:[]}),Jo.registerComponent("VolumeControl",Ra);var Oa=class extends(na(Na)){nn(){this.rn(this.hn())}an(){0===this.un&&(this.un=u(this.cn,100))}ln(t){"opacity"===t.propertyName&&(0!==this.un&&(c(this.un),this.un=0),this.rn(!0))}fn(t){"opacity"===t.propertyName&&(this.hn()||this.rn(!1))}hn(){return"0"!==a.getComputedStyle(this.el()).opacity}rn(t){this.dn!==t&&(this.dn=t,t?this.vn():this.ks.textTrackStyle.marginBottom=void 0)}vn(){const t=this.el().getBoundingClientRect().height;this.ks.textTrackStyle.marginBottom!==t&&(this.ks.textTrackStyle.marginBottom=t)}dispose(){c(this.un),this.un=0,this.mn.pn(et.gn,this.yn),this.mn.bn(),super.dispose()}constructor(t,i){super(t,i),this.dn=!1,this.un=0,this.cn=()=>{0!==this.un&&(this.un=0,this.rn(this.hn()))},this.yn=()=>{this.dn&&this.vn()},this.on(t,"ready",this.nn),this.on(t,"pause",this.nn),this.on(t,"useractive",this.nn),this.on(t,"firstplay",this.an),this.on(t,"play",this.an),this.on(t,"userinactive",this.an),this.on("transitionstart",this.ln),this.on("transitionend",this.fn),this.mn=new ot(this.el()),this.mn.wn(et.gn,this.yn),this.mn.kn(!0)}};Oa.prototype.h=Gi({},Na.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),Jo.registerComponent("ControlBar",Oa);var Va=class extends Na{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};Va.prototype.h=Gi({},Na.prototype.h,{children:[]}),Jo.registerComponent("TopControlBar",Va);var Ua=Jo.getComponent("CurrentTimeDisplay"),La=class extends(na(Ua)){updateContent(){const t=Ko(this.player()),i=this.ks,s=ta(i),e=this.localize("Current Time"),n=ea(w.max(0,t-s),ia(i));n!==this.Pt&&(this.Pt=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)}};Jo.registerComponent("CurrentTimeDisplay",La);var Ha=Jo.getComponent("DurationDisplay"),za=class extends(na(Ha)){updateContent(){const t=this.ks,i=j(t.duration)?NaN:ia(t),s=t.clip.endTime-t.clip.startTime,e=w.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=ea(e);this.S.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}dispose(){var t;null==(t=this.ks)||t.clip.removeEventListener("change",this._n),super.dispose()}constructor(t,i){var s;super(t,i),this._n=()=>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.ks)||s.clip.addEventListener("change",this._n)}};Jo.registerComponent("DurationDisplay",za);var Wa=Jo.getComponent("Button"),qa=class extends(na(Wa)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){let t=super.createEl("button",{},{"aria-live":"off"});return this.jn=Jo.createEl("span",{className:"theo-live-control-indicator"}),ti(t,this.jn),t}createControlTextEl(t){let i=super.createControlTextEl(t);return Jo.removeClass(i,"vjs-control-text"),Jo.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.ks;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Zo(i)),t.play()}}xn(){Yo(this.ks)?this.show():this.hide()}constructor(t,i){super(t,i),this.controlText("Live"),this.xn(),this.on(t,"emptied",this.xn),this.on(t,"durationchange",this.xn),Ri.Zs.Ye&&new ga(this.el())}};Jo.registerComponent("LiveDisplay",qa);var Ga=Jo.getComponent("LoadingSpinner");Jo.registerComponent("LoadingSpinner",class extends Ga{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){let t=super.createEl();t.className=this.buildCSSClass();let i=Jo.createEl("div",{className:"theo-loading-spinner-rotator"}),s=Jo.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=Jo.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)}});var Xa=Jo.getComponent("LoadProgressBar"),Ja=class extends(na(Xa)){update(){let t=this.ks,i=ki.Sn(sa(t)),s=i.Tn(0),e=ki.Sn(t.buffered).Cn(i),n=i.Pn(0)-s,r=e.U&&e.Pn(e.U-1)||0;r=w.max(0,r-s);let o=this.el(),a=this.Mn;o.style.width=Qa(r,n);for(let t=0;t<e.U;t++){let i=e.Tn(t),n=e.Pn(t),u=a[t];u||(u=h.createElement("div"),a.push(u),o.appendChild(u)),u.style.left=Qa(i-s,r),u.style.width=Qa(n-i,r)}for(let t=a.length;t>e.U;t--)o.removeChild(a[t-1]);a.length=e.U}constructor(t,i){super(t,i),this.Mn=[],this.on(t,"emptied",this.update)}};function Qa(t,i){let s=t/i||0;return 100*(s>=1?1:s)+"%"}Jo.registerComponent("LoadProgressBar",Ja);var Ya=Jo.getComponent("MouseTimeDisplay"),Ka=class extends(na(Ya)){handleMouseMove(t){let i=t,s=this.ks,e=ta(s)+this.calculateDistance(i)*ia(s),n=i.pageX-Zt(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){let i=t,s=this.ks,e=ta(s)+this.calculateDistance(i)*ia(s),n=i.touches[0].pageX-Zt(this.el().parentNode).left;this.update(e,n+"px")}createEl(){let t=super.createEl();return this.An=Jo.createEl("span",{className:"theo-time-tooltip-text"}),t}update(i,s){this.In=i;let e=this.En(i);this.el().style.left=s,this.el().setAttribute("data-current-time",e),this.keepTooltipsInside&&(t(this.An,e),this.Dn())}Dn(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){let t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=_(getComputedStyle(t).fontSize);si(this.tooltip,this.el(),s,e)}}En(t){const i=this.ks,s=t-Zo(i);return ea(Yo(i)?w.min(s,0):s,ia(i))}dispose(){var t;this.ks.removeEventListener("dimensionchange",this.Nn),null==(t=this.ks.presentation)||t.removeEventListener(pt.MODE_CHANGE,this.Nn),super.dispose()}constructor(t,i){var s;(super(t,i),this.In=NaN,this.Nn=()=>{let t=Ko(this.player());const i=this.ks;let s=(t-ta(i))/ia(i)||0;s=ji(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(Jo.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.An)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),Bt.Ks)&&(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.ks.addEventListener("dimensionchange",this.Nn),null==(s=this.ks.presentation)||s.addEventListener(pt.MODE_CHANGE,this.Nn),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",zi((t=>this.handleTouchMove(t)),25)),this.Nn()})))}};Jo.registerComponent("MouseTimeDisplay",Ka);var Za=Jo.getComponent("PlayProgressBar"),tu=class extends(na(Za)){updateDataAttr(){let t=Ko(this.player());this.el().setAttribute("data-current-time",this.En(t))}En(t){let i=this.ks;return ea(t-Zo(i),ia(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)}};Jo.registerComponent("PlayProgressBar",tu);var iu=Jo.getComponent("RemainingTimeDisplay"),su=class extends(na(iu)){updateContent(){const t=this.ks,i=ia(t);if(i){const s=sa(t).end(0),e=this.localize("Remaining Time"),n=ea(w.max(0,s-this.player().currentTime()),i);n!==this.Pt&&(this.Pt=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)}};Jo.registerComponent("RemainingTimeDisplay",su);var eu=class{get ks(){return this._s||(this._s=this.Fn.tech({IWillNotUseThisInPlugins:!0}).theoplayer()),this._s}Bn(t){if(t.kind!==Pt.$n)return;if(0===this.ks.seekable.length)return;this.Rn=t;const i=t.cues.slice();this.Vn.On(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 nu(s,this.ks,n);this.Un.push(r),this.Ln.appendChild(r.je)}t.addEventListener("cuechange",this.Hn),this.Hn()}zn(){this.ks.addEventListener("loadedmetadata",this.Wn),this.ks.addEventListener("loadeddata",this.Wn),this.ks.addEventListener("sourcechange",this.Wn),this.ks.textTracks.addEventListener("addtrack",this.qn),this.ks.textTracks.addEventListener("removetrack",this.Gn),this.ks.textTracks.addEventListener("change",this.Wn)}Xn(){this.ks.removeEventListener("loadedmetadata",this.Wn),this.ks.removeEventListener("loadeddata",this.Wn),this.ks.removeEventListener("sourcechange",this.Wn),this.ks.textTracks.removeEventListener("addtrack",this.qn),this.ks.textTracks.removeEventListener("removetrack",this.Gn),this.ks.textTracks.removeEventListener("change",this.Wn)}Jn(){if(!(this.ks.readyState<Vt.Qn))for(let t of this.ks.textTracks)if(t.kind===Pt.$n&&t.mode===xt.Yn&&t.cues.length>0&&t.readyState!==_t.ERROR)return t}Kn(t){this.Vn.Zn(t)}tr(){this.Vn.be()}ir(){this.Vn.ke()}sr(){for(let t of this.Un)t.Ve();this.Vn.sr(),this.Un=[],this.er=void 0,this.Rn&&this.Rn.removeEventListener("cuechange",this.Hn),this.Rn=void 0}Ve(){this.Xn(),this.nr.removeEventListener("mousemove",this.rr),this.nr.removeEventListener("mouseenter",this.hr),this.nr.removeEventListener("mouseleave",this.ar),this.sr(),this.Vn.Ve(),this._s=void 0}constructor(t,i){this.Fn=i,this.Un=[],this._s=void 0,this.qn=t=>{let i=t.track;i.kind===Pt.$n&&(i.addEventListener("addcue",this.Wn),i.addEventListener("removecue",this.Wn),i.addEventListener("readystatechange",this.Wn)),this.Wn()},this.Gn=t=>{let i=t.track;i.kind===Pt.$n&&(i.removeEventListener("addcue",this.Wn),i.removeEventListener("removecue",this.Wn),i.removeEventListener("readystatechange",this.Wn)),this.Wn()},this.rr=t=>{let i=this.ks,s=function(t,i){let s,e,n=Zt(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=ji((o-s+h)/h,0,1),c=ji((e-a)/r,0,1);return{x:c,y:u}}(this.Ln,t),e=ta(i)+s.x*ia(i);e===i.duration&&(e-=.1),this.Kn(e)},this.ar=()=>{this.Vn.ke()},this.hr=()=>{this.Vn.be()},this.Wn=()=>{let t=this.Jn();t!==this.Rn&&(this.sr(),t&&this.Bn(t))},this.Hn=()=>{var t,i,s;const e=null==(i=this.Rn)||null==(t=i.activeCues)?void 0:t[0],n=D(this.Un,(t=>t.ur===e));n!==this.er&&(null==(s=this.er)||s.cr(),this.er=n,null==n||n.lr())},this.nr=t,this.Vn=new ru,this.Fn.contentEl().appendChild(this.Vn.je),this.Ln=h.createElement("div"),ri(this.Ln,"theoplayer-chapterbar"),this.nr.appendChild(this.Ln),this.nr.addEventListener("mousemove",this.rr),this.nr.addEventListener("mouseenter",this.hr),this.nr.addEventListener("mouseleave",this.ar),this.zn()}},nu=class{get je(){return this.Hs}lr(){ri(this.Hs,"theoplayer-chapter-indicator-active")}cr(){ai(this.Hs,"theoplayer-chapter-indicator-active")}dr(t,i){let s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1)-s,n=this.ur.startTime,r=this.ur.endTime-n,o=h.createElement("div");ri(o,"theoplayer-chapter-indicator");let a=h.createElement("div");ri(a,"theoplayer-chapter-indicator-highlight"),o.appendChild(a),i&&ri(o,"theoplayer-chapter-indicator-discontinuous");let u=w.min(n/e*100,100),c=100-u,l=w.min(r/e*100,c);return o.style.width=l+"%",o.style.left=u+"%",o}Ve(){Yt(this.Hs)}constructor(t,i,s){this.ur=t,this.Hs=this.dr(i,s)}},ru=class{ke(){this.pr--,0===this.pr&&ai(this.je,"theoplayer-chapter-hovering")}On(t){this.mr=t||[],this.mr.length>0&&(this.je.style.display="")}gr(i){t(this.yr,i.content)}sr(){this.mr=[],t(this.yr,""),this.je.style.display="none"}be(){this.pr++,this.pr>0&&ri(this.je,"theoplayer-chapter-hovering")}Zn(t){for(let i of this.mr)if(hu(i,t)){this.gr(i);break}}Ve(){Yt(this.je)}constructor(){this.mr=[],this.pr=0,this.je=h.createElement("div"),ri(this.je,"theoplayer-chaptertitle"),this.je.style.display="none",this.yr=h.createElement("p"),this.je.appendChild(this.yr)}};function hu(t,i){return new ki([t.startTime,t.endTime]).br(i)}var ou=Jo.getComponent("SeekBar"),au=class extends(na(ou)){updateAriaAttributes(t){const i=Ko(this.player()),s=this.ks;t.setAttribute("aria-valuenow",(100*this.wr(i)).toFixed(2)),t.setAttribute("aria-valuetext",ea(i-Zo(s),ia(s)))}getPercent(){return this.wr(this.player().currentTime())}handleMouseMove(t){if(this.ks&&this.ks.ads&&this.ks.ads.playing)return;const i=this.ks;let s=ta(i)+this.calculateDistance(t)*ia(i);s>=i.duration&&(s=i.duration-.1),this.Ln.Kn(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.Ln.tr(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.Ln.ir(),super.handleMouseUp(t)}wr(t){let i=this.ks,s=(t-ta(i))/ia(i);return ji(s,0,1)}dispose(){this.Ln.Ve(),V(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.Ln=new eu(this.el(),t)}};Jo.registerComponent("SeekBar",au);var uu=Jo.getComponent("ProgressControl");Ri.Zs.Ks&&Jo.registerComponent("ProgressControl",class extends uu{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"])}});var cu=Jo.getComponent("TooltipProgressBar"),lu=class extends(na(cu)){updateDataAttr(){let t=Ko(this.player()),i=this.En(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}En(t){const i=this.ks;return ea(t-Zo(i),ia(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 fu(t){for(const i of t)if(i.enabled)return i}function du(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:vu(t),description:pu(t),hd:!!t.height&&t.height>=720}}function vu(t){return t.height?t.height+"p":t.bandwidth?pu(t):""}function pu(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":""}Jo.registerComponent("TooltipProgressBar",lu);var mu=class{get kr(){return this._r}set kr(t){let i=this._r;for(let s=i.length-1;s>=0;s--){let e=i[s];R(t,e)||this.jr(e)}for(let i of t)this.Sr(i);this.Tr.oe()}get Cr(){return this.Tr.menuItems}Pr(t){let i=this.Cr;if(i)for(let s of i)if(s.Mr===t)return s}Ar(t){let i=this.Tr.addMenuItem();return i.Mr=t,i.on("click",(()=>this.Ir(i))),i.el().setAttribute("role","menuitemradio"),i}Er(t){t.dispose()}Dr(t){return!0}Sr(t){if(this.Dr(t)){R(this._r,t)||this._r.push(t);let i=this.Pr(t)||this.Ar(t);return this.Nr(i),i}this.jr(t)}jr(t){let i=this.Pr(t);i&&(this.Tr.removeMenuItem(i),this.Er(i)),B(this._r,t)}Ve(){const t=[];for(let i of this._r)t.push(i);for(let i of t)this.jr(i);V(t)}constructor(t){this._r=[],this.Tr=t}},gu=class extends mu{Fr(){return this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",t(this.Br,this.$r.localize("Quality")),this.Br}Rr(){return this.Or=h.createElement("span"),this.Or.className="theo-settings-control-menu-quality-automatic",t(this.Or,this.$r.localize("Automatic")),this.Or}Vr(){return this.Ur=h.createElement("span"),t(this.Ur,this.$r.localize("Automatic")),this.Ur}Lr(){return this.Hr=h.createElement("span"),this.Hr.className="theo-primary-color theo-settings-control-menu-item-hd-label",t(this.Hr,this.$r.localize("HD")),this.Hr}zr(){let t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Or),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Ur),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Hr),this.Wr.el().appendChild(this.Br),this.Wr.el().appendChild(t),this.Wr.el().setAttribute("aria-label",this.$r.localize("Open the video quality settings menu"))}qr(){let i=this.Gr,s=i&&xu(i.targetQuality),e=i&&i.activeQuality,n=du(this.Xr(s||e))||{name:this.$r.localize("Automatic")};t(this.Ur,n.name),li(this.Or,"vjs-hidden",!!s),li(this.Hr,"vjs-hidden",!n.hd)}Nr(t){let i=du(t.Mr)||{name:this.$r.localize("Automatic")},s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.$r.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.$r.localize("Set video quality to ")+i.name),t.Mr?t.selected(t.Mr===this.Jr):t.selected(!this.Jr)}Ir(t){this.Gr&&(this.Gr.targetQuality=t.Mr&&t.Mr.videoQualities)}Xr(t,i){const s=i||this.kr;for(let i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Ve(){this._s.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Qr),this.$r.off("languagechange",this.se),this.Gr&&(this.Gr.removeEventListener("activequalitychanged",this.Yr),this.Gr.removeEventListener("targetqualitychanged",this.Kr),this.Gr.removeEventListener("update",this.Zr)),super.Ve()}constructor(i,s,e){super(i.subMenu),this.Gr=void 0,this.Jr=void 0,this.Qr=()=>{let t=fu(this._s.videoTracks);if(t===this.Gr)return;let i=[];if(this.Gr&&(this.Gr.removeEventListener("activequalitychanged",this.Yr),this.Gr.removeEventListener("targetqualitychanged",this.Kr),this.Gr.removeEventListener("update",this.Zr)),this.Gr=t,t){t.addEventListener("activequalitychanged",this.Yr),t.addEventListener("targetqualitychanged",this.Kr),t.addEventListener("update",this.Zr);const s=bu(_u(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.kr=i,this.Kr(),this.Yr()},this.Zr=t=>{const i=t.track;if(i!==this.Gr)return;const s=bu(_u(i.qualities.filter((t=>t.available)))),e=i&&xu(i.targetQuality);let n;this.Jr=this.Xr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.kr=n,this.qr()},this.Yr=()=>{this.Sr(void 0),this.qr()},this.Kr=()=>{let t=fu(this._s.videoTracks),i=t&&xu(t.targetQuality),s=this.Xr(i),e=this.Jr;s!==e&&(this.Jr=s,s&&e||this.Sr(void 0),e&&R(this.kr,e)&&this.Sr(e),i&&this.Sr(s),this.qr())},this.se=()=>{t(this.Tr.menuHeader.el(),this.$r.localize("Quality")),t(this.Br,this.$r.localize("Quality")),t(this.Or,this.$r.localize("Automatic")),t(this.Ur,this.$r.localize("Automatic")),t(this.Hr,this.$r.localize("HD")),this.Wr.el().setAttribute("aria-label",this.$r.localize("Open the video quality settings menu"));for(const t of this.Cr)this.Nr(t);this.qr()},this.Wr=i,this._s=s,this.$r=e,this.Br=this.Fr(),this.Or=this.Rr(),this.Ur=this.Vr(),this.Hr=this.Lr(),this.zr(),t(this.Tr.menuHeader.el(),this.$r.localize("Quality")),this.kr=[void 0],this._s.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Qr),this.$r.on("languagechange",this.se),this.Qr()}},yu=class{get height(){return this.th[0].height}get bandwidth(){return this.th[0].bandwidth}get videoQualities(){return this.th}get label(){return this.th[0].label}add(t){this.th.push(t)}constructor(t){this.th=t}};function bu(t){let i=[];for(let s of t){let t=s,e=!1;for(let s of i)if(ju(s,t)){s.add(t),e=!0;break}e||i.push(new yu([t]))}return i}function wu(t,i){return t&&i?A(t,i):C.ih}function ku(t,i){return t===i?C.ih:wu(t.height,i.height)||wu(t.width,i.width)||wu(t.bandwidth,i.bandwidth)}function _u(t){return Qi(t,ku).reverse()}function ju(t,i){return t.label&&i.label&&t.label===i.label||vt(du(t),du(i))}function xu(t){return Lt(t)?1===t.length?t[0]:void 0:t}function Su(t){return 1===t?"Normal":""+w.round(100*t)/100}var Tu=class extends mu{Fr(){return this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",t(this.Br,this.$r.localize("Speed")),this.Br}zr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Wr.el().appendChild(this.Br),this.Wr.el().appendChild(t),this.Wr.el().setAttribute("aria-label",this.$r.localize("Open the video speed settings menu")),t}Ar(t){let i=super.Ar(t);return this.Nr(i),i}Nr(i){const s=i.Mr,e=this.$r.localize(Su(s));t(i.el(),e),i.el().setAttribute("aria-label",this.$r.localize("Set video speed to ")+e),i.selected(i.Mr===this._s.playbackRate)}Ir(t){this._s.playbackRate=t.Mr}Ve(){this._s.removeEventListener("ratechange",this.sh),this.$r.off("languagechange",this.se),super.Ve()}constructor(i,s,e,n){super(i.subMenu),this.eh=void 0,this.sh=()=>{this.eh&&this.Sr(this.eh);let i=this._s.playbackRate;this.eh=i,t(this.nh,this.$r.localize(Su(i))),i&&this.Sr(i)},this.se=()=>{t(this.Tr.menuHeader.el(),this.$r.localize("Speed")),t(this.Br,this.$r.localize("Speed")),this.Wr.el().setAttribute("aria-label",this.$r.localize("Open the video speed settings menu"));for(const t of this.Cr)this.Nr(t);this.sh()},this.Wr=i,this._s=s,this.$r=e,this.Br=this.Fr(),this.nh=this.zr(),t(this.Tr.menuHeader.el(),this.$r.localize("Speed")),this.kr=n,this._s.addEventListener("ratechange",this.sh),this.$r.on("languagechange",this.se),this.sh()}};Jo.registerComponent("SettingsButton",class extends Ea{createEl(){let i=super.createEl();return this.rh=Jo.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),t(this.rh,this.localize("HD")),i.appendChild(this.rh),i}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}se(){super.se(),t(this.rh,this.localize("HD")),t(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.Gr&&(this.Gr.removeEventListener("activequalitychanged",this.Yr),this.Gr=void 0),this.ks.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.hh),this.oh.Ve(),this.ah.Ve(),super.dispose()}constructor(i,s){var e,n;super(i,s),this.Gr=void 0,this.hh=()=>{let t=fu(this.ks.videoTracks);t!==this.Gr&&(this.Gr&&this.Gr.removeEventListener("activequalitychanged",this.Yr),this.Gr=t,t&&t.addEventListener("activequalitychanged",this.Yr),this.Yr())},this.Yr=()=>{var t;const i=null==(t=this.Gr)?void 0:t.activeQuality,s=!!(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},ri(this.menu.el(),"theo-settings-control-menu"),t(this.menu.menuHeader.el(),i.localize("Settings")),this.controlText("Settings"),this.Be.Fe=this.controlText(),this.uh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.oh=new gu(this.uh,this.ks,i);let r=null!=(n=null==s||null==(e=s.playerOptions)?void 0:e.playbackRates)?n:[];this.lh=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.ah=new Tu(this.lh,this.ks,i,r),this.ks.videoTracks.addEventListener(["addtrack","removetrack","change"],this.hh),this.hh()}});var Cu=class extends mu{fh(t){let i=t.label;if(i)return i;let s=t.language;if(s){let t=qi(s);if(t)return t.dh}return s||""}ph(){this.kr=this.mh}Ve(){this.mh.removeEventListener("addtrack",this.gh),this.mh.removeEventListener("removetrack",this.yh),this.mh.removeEventListener("change",this.bh),super.Ve()}constructor(t,i){super(t),this.gh=t=>{const i=t.track;this.Sr(i),i.addEventListener("update",this.wh)},this.yh=t=>{const i=t.track;this.jr(i),i.removeEventListener("update",this.wh)},this.bh=t=>this.ph(),this.wh=()=>{for(const t of this.kr)this.Sr(t)},this.mh=i,this.mh.addEventListener("addtrack",this.gh),this.mh.addEventListener("removetrack",this.yh),this.mh.addEventListener("change",this.bh),this.ph()}},Pu=class extends Cu{Nr(i){let s=i.Mr,e=this.$r.localize(this.fh(s));t(i.el(),e),i.el().setAttribute("aria-label",this.$r.localize("Set the audio language to")+" "+e),i.selected(s.enabled)}Ir(t){let i=t.Mr;for(let t of this.ks.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Ve(){this.$r.off("languagechange",this.se),super.Ve()}constructor(i,s,e){super(i,s.audioTracks),this.se=()=>{t(this.Tr.menuHeader.el(),this.$r.localize("Language"));for(const t of this.Cr)this.Nr(t)},this.ks=s,this.$r=e,t(this.Tr.menuHeader.el(),this.$r.localize("Language")),this.$r.on("languagechange",this.se)}};Jo.registerComponent("audioTrackButton",class extends Ea{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.kh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.kh=new Pu(this.menu,this.ks,t),this.controlText("Language"),this.Be.Fe=this.controlText()}});var Mu=class extends Cu{Dr(t){return!!super.Dr(t)&&(!t.forced&&It(t.kind))}Ar(t){let i=super.Ar(t);ri(i.el(),"theo-text-track-menu-item");let s=h.createElement("span");i._h=s;let e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.jh=e;let n=t=>this.xh(t,i);i.Sh=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(i){let s=i,e=s.Mr,n=this.$r.localize(this.fh(e));t(s._h,n),s.el().setAttribute("aria-label",this.$r.localize("Set the subtitle language to")+" "+n),s.el().setAttribute("role","menuitemcheckbox"),s.selected(e.mode===xt.Yn)}Er(t){let i=t;i.jh.removeEventListener("click",i.Sh),super.Er(t)}Ir(t){let i=t.Mr;for(let t of this.ks.textTracks)t!==i&&S(t.kind,i.kind)&&(t.mode=xt.Th);i.mode!==xt.Yn?i.mode=xt.Yn:i.mode=xt.Th}xh(t,i){t.stopImmediatePropagation(),this.Ir(i)}Ve(){this.$r.off("languagechange",this.se),super.Ve()}constructor(i,s,e){super(i,s.textTracks),this.se=()=>{t(this.Tr.menuHeader.el(),this.$r.localize("Subtitles"));for(const t of this.Cr)this.Nr(t)},this.ks=s,this.$r=e,t(this.Tr.menuHeader.el(),e.localize("Subtitles")),this.$r.on("languagechange",this.se)}};Jo.registerComponent("subtitlesButton",class extends Ea{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.kh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.kh=new Mu(this.menu,this.ks,t),this.controlText("Subtitles"),this.Be.Fe=this.controlText()}});var Au=Jo.getComponent("playToggle"),Iu=class extends(na(Au)){handleClick(t){this.ks.muted||this.ks.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Be.Fe=this.controlText()}handlePause(t){this.ks.ended||(super.handlePause(t),this.controlText("Play"),this.Be.Fe=this.controlText())}se(){this.Be.Fe=this.controlText()}dispose(){this.Be.Ve(),this.ks.removeEventListener("ended",this.Ch),super.dispose()}constructor(t,i){super(t,i),this.Ch=()=>{this.controlText("Replay"),this.Be.Fe=this.controlText()},this.controlText("Play"),this.Be=new Aa(this,this.controlText()),this.ks.addEventListener("ended",this.Ch),this.on(t,"languagechange",this.se),Ri.Zs.Ye&&new ga(this.el())}};Jo.registerComponent("playToggle",Iu);var Eu=Jo.getComponent("fullscreenToggle"),Du=class extends(na(Eu)){handleClick(t){this.ks.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.Fe=this.controlText()}dispose(){this.Be.Ve(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Be=new Aa(this,this.controlText()),Ri.Zs.Ye&&new ga(this.el()),this.on(t,"languagechange",this.updateContent)}};Jo.registerComponent("fullscreenToggle",Du);var Nu=Jo.getComponent("muteToggle"),Fu=class extends(na(Nu)){handleClick(t){this.ks.muted&&!this.ks.paused&&this.ks.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.se()}se(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Be.Fe=this.controlText()}dispose(){this.Be.Ve(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Be=new Aa(this,this.controlText()),Ri.Zs.Ye&&new ga(this.el()),this.on(t,"languagechange",this.se),Ti&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};Jo.registerComponent("muteToggle",Fu);var Bu=Jo.getComponent("BigPlayButton"),$u=class extends(na(Bu)){createEl(){let t=super.createEl(),i=Jo.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML='<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="theo-play-svg-circle" 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>',t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.ks.muted||this.ks.prepareWithUserAction(),super.handleClick(t),void 0!==this.ks.vr&&"unavailable"!==this.ks.vr.state&&(this.ks.vr.useDeviceMotionControls=!0)}};Jo.registerComponent("BigPlayButton",$u);var Ru=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;Jo.registerComponent("MouseTimeDisplay",class extends Ka{Ph(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Mh&&(this.Mh=i,this.Ah=i.src?Ri.Ih(i.src).href:void 0,this.Mh.addEventListener(["addcue","removecue"],this.Eh),this.Dh())}Nh(t){t.track===this.Mh&&this.Fh()}createEl(){const t=super.createEl();return this.Bh=Jo.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.$h=Jo.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Rh(t)}Rh(t){let i;if(this.Mh&&this.Mh.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.Mh.cues,t);i=s&&s.content}if(i===this.Oh)return;if(this.Oh=i,Jo.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",!!i),!i)return void this.Vh();const s=i.match(Ru);if(s){let[,t,i,e,n,r]=s;t=this.Uh(t);const h={Lh:+i,Hh:+e,Ti:+n,Ci:+r};this.zh(t,h)}else{const t=this.Uh(i);this.zh(t)}}Dh(){j(this.In)||this.Rh(this.In)}Uh(t){return this.Mh&&this.Ah?Ri.Ih(t,this.Ah).href:t}zh(t,i){this.Bh&&(this.Bh.src!==t?(this.Bh.onload=()=>{this.Wh(i)},this.Bh.src="",this.Bh.src=t):this.Wh(i))}Wh(t){if(!this.$h||!this.Bh)return;const i=this.$h.getContext("2d");i&&(null!=t||(t={Lh:0,Hh:0,Ti:this.Bh.naturalWidth,Ci:this.Bh.naturalHeight}),this.$h.width=t.Ti,this.$h.height=t.Ci,i.drawImage(this.Bh,t.Lh,t.Hh,t.Ti,t.Ci,0,0,t.Ti,t.Ci),this.qh(this.$h))}qh(t){this.Gh||(ti(this.tooltip,t),this.Gh=t),this.Dn()}Vh(){this.Gh&&(this.tooltip.removeChild(this.Gh),this.Gh=void 0,this.Dn())}Fh(){void 0!==this.Mh&&(this.Mh.removeEventListener(["addcue","removecue"],this.Eh),this.Mh=void 0),this.Ah=void 0,this.Vh(),this.Oh=void 0}dispose(){this.Fh(),super.dispose()}constructor(t,i){super(t,i),this.Gh=void 0,this.Mh=void 0,this.Ah=void 0,this.Xh=t=>this.Ph(t),this.Jh=t=>this.Nh(t),this.Eh=t=>this.Dh(),this.showThumbnails=()=>{this.Gh&&this.Gh.hidden&&(this.Gh.hidden=!1,this.Dn())},this.hideThumbnails=()=>{!this.Gh||this.Gh.hidden||this.player().scrubbing()||(this.Gh.hidden=!0,this.Dn())},this.on(this.player().textTracks(),"addtrack",this.Xh),this.on(this.player().textTracks(),"removetrack",this.Jh),Bt.Ks&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}});var Ou=Jo.getComponent("VolumeLevel");Jo.registerComponent("VolumeLevel",class extends Ou{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}});var Vu=Jo.getComponent("Component"),Uu=class extends Vu{createEl(){let t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};Uu.prototype.h=Gi({},Uu.prototype.h,{children:[]}),Jo.registerComponent("controlBarMenuContainer",Uu);var Lu=Jo.getComponent("Player"),Hu=class extends Lu{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),Yt(i),this.xi&&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)}};Hu.prototype.h=Gi({},Lu.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),Jo.registerComponent("Player",Hu);var zu=Jo.getComponent("Player"),Wu=zu.prototype.es;zu.prototype.es=function(t){if(!(this.H&&this.H.Vs&&this.H.Vs()))return Wu.call(this,t)};var qu=zu.prototype.createEl;function Gu(t,i,s,e){let n=Gi({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},s);n.controlBar=Gi({progressControl:{keepTooltipsInside:!0}},n.controlBar);let r=n.techOrder||(n.techOrder=[]);-1===r.indexOf("THEOplayer")&&r.unshift("THEOplayer"),(n.theoplayer||(n.theoplayer={})).player=t,s&&Wt(s.language)&&(n.languages=Gi({},n.languages,{[Hi]:s.language}),n.language=Hi),i.setAttribute("data-vjs-player","");let h=i.getAttribute("style"),o=Jo(t.element,n,e);return o.ready((()=>{ha(o),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===Ki.Qh;ua(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.verizonMedia){const s=i=>{const s="adbreakbegin"===i.type;ua(t,s,!1)};i.verizonMedia.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",s),t.adBreak.addEventListener("adbreakend",s)}))}i.addEventListener("sourcechange",(()=>{ua(t,!1,!1)}))}}(o,t),function(t){t.on("mouseleave",ca)}(o)})),i.removeAttribute("data-vjs-player"),h?i.setAttribute("style",h):i.removeAttribute("style"),Ri.Zs.Ks&&(ri(i,"theo-mobile"),Xu(i)),function(t){t.on("seeking",(()=>{ei(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(o),o}function Xu(t){a.outerHeight>a.outerWidth?(ai(t,"theo-mobile-landscape"),ri(t,"theo-mobile-portrait")):(ai(t,"theo-mobile-portrait"),ri(t,"theo-mobile-landscape"))}zu.prototype.createEl=function(){let t=qu.call(this),i=Jo.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t};var Ju=Jo.getComponent("Button");var Qu="THEOPiPCloseButton";Jo.registerComponent(Qu,class extends Ju{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.Kh.Yh()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.Kh)}(i))throw new d("Invalid Picture-in-picture options.");this.Kh=i.Kh}});var Yu,Ku=class extends X{get Zh(){return this.io}get so(){return this.t.cs()}eo(){this.t.wn(K.no,this.ro),this.ho||this.t.wn(K.oo,this.ao),this.t.uo.on("languagechange",this.se)}co(){var t;return"theo-pip-"+(null!=(t=this.lo)?t:"bottom-right")}fo(t){let i=this.do;i&&!this.so&&(this.vo||this.po(),this.mo(),ri(i,"theo-pip"),ri(i,this.co()),this.io=!0,this.yo=t,this.bo=!1,this.wo(new gt(I.PICTURE_IN_PICTURE)))}ko(t){let i=this.do;i&&(this._o(),ai(i,"theo-pip"),ai(i,this.co()),this.io=!1,this.bo=t,this.jo=this.yo,this.yo=!1,this.wo(new gt(I.INLINE)))}po(){if(!this.vo){let i=this.t.uo;i.addChild(Qu,{Kh:this});let s=h.createElement("div");s.className="theo-pip-overlay",this.xo=h.createElement("div"),this.xo.className="theo-pip-overlay-text",t(this.xo,i.localize("Video playing in Picture-in-Picture mode")),s.appendChild(this.xo),ti(i.el(),s),this.So=s,this.vo=!0}}To(){this.Co&&!this.Po&&this.t.Mo&&(this.Ao=this.t.Mo.Io(oi,this.Eo),this.Po=!0)}Do(){this.Ao&&this.t.Mo&&(this.t.Mo.No(this.Ao),this.Po=!1)}mo(){let t=this.t.uo.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"}_o(){let t=this.t.uo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}Fo(){ai(this.do,"theo-pip"),this.Zh&&this.lo&&ai(this.do,"theo-pip-"+this.lo),this.So&&(Yt(this.So),this.So=void 0)}bn(){this.Fo(),this.Do(),this.Bo(),this.t.pn(K.no,this.ro),this.t.pn(K.oo,this.ao),this.t.uo.off("languagechange",this.se),this.t=void 0}constructor(i,s,e){super(),this.$o=!1,this.io=!1,this.bo=!1,this.yo=!1,this.vo=!1,this.Po=!1,this.jo=!1,this.ro=()=>{this.$o=!0,this.Co&&!this.Zh&&this.Ao&&this.Ro&&this.Ao.Oo<=this.Ro&&this.fo(!1)},this.ao=()=>{this.ho||(this.$o=!1,this.Yh(),this.ko(!1))},this.se=()=>{if(this.xo){const i=this.t.uo;t(this.xo,i.localize("Video playing in Picture-in-Picture mode"))}},this.Eo=t=>{!this.yo&&this.Co&&(j(t)||(this.Ro&&t<=this.Ro||this.jo?this.io||this.bo||this.fo(!1):this.io?this.ko(!1):this.bo=!1))},this.Ro=s.visibility,this.lo=s.position,this.ho=s.retainPresentationModeOnSourceChange,this.Co=void 0!==this.Ro,this.t=i,this.do=i.Vo,this.Yh=e,this.eo()}},Zu=class extends bt{Uo(){let t=super.Uo();return t===I.INLINE&&this.Lo.Zh?I.PICTURE_IN_PICTURE:t}Ho(t){return t===I.PICTURE_IN_PICTURE||super.Ho(t)}zo(t){this.Wo=this.qo,t===I.FULLSCREEN||t===I.NATIVE_PICTURE_IN_PICTURE?this.Lo.Do():this.Lo.To(),super.zo(t)}Go(t){super.Go(t),t===I.PICTURE_IN_PICTURE?q(this.Jo.Xo((t=>this.Qo(t)))):t===I.FULLSCREEN?this.Lo.ko(!1):this.Lo.ko(!0)}async Qo(t){L(t),await Promise.all([this.Yo(),this.Ko.ko()]).catch(Ui),L(t),this.Lo.fo(!this.Zo),this.wo(new gt(this.qo)),this.Zo=!1,this.ta=!1}ki(){this.ta||(this.Lo.Zh&&this.ia.cs?this.zo(I.FULLSCREEN):this.Wo!==I.PICTURE_IN_PICTURE||this.ia.cs?super.ki():(this.Zo=!0,this.zo(I.PICTURE_IN_PICTURE)))}bn(){super.bn(),this.Lo.bn(),this.sa.pn(K.no,this.ea),this.sa=void 0}constructor(t,i,s,e){super(i,s),this.Wo=I.INLINE,this.Zo=!1,this.Yh=()=>{this.qo===I.PICTURE_IN_PICTURE&&this.zo(I.INLINE)},this.na=t=>{this.ta||(this.qo!==I.PICTURE_IN_PICTURE||this.Lo.Zh?this.qo!==I.PICTURE_IN_PICTURE&&this.Lo.Zh&&(this.Zo=!0,this.zo(I.PICTURE_IN_PICTURE)):this.zo(I.INLINE))},this.ea=()=>{this.Uo()!==I.PICTURE_IN_PICTURE&&this.Uo()!==I.INLINE||this.Lo.To(),this.sa.pn(K.no,this.ea)},this.sa=t,this.Lo=new Ku(t,e.pip,this.Yh),this.Lo.wn(pt.MODE_CHANGE,this.na),this.sa.wn(K.no,this.ea)}},tc=class extends X{get ra(){return dt.ha(this.uo.el())||this.uo.supportsFullScreen()}get cs(){return this.uo.isFullscreen()||this.oa}fo(){this.uo.requestFullscreen()}ko(){this.uo.exitFullscreen(),this.aa.ko()}bn(){this.Bo(),this.uo.off("fullscreenchange",this.ua),this.aa.pn(U.ca,this.ua),this.aa.pn(U.la,this.Os),this.uo.isFullWindow&&this.uo.exitFullscreen()}constructor(t,i){super(),this.Us=!1,this.oa=!1,this.fa=!1,this.ua=()=>{if(this.fa)return;const t=this.Us,i=this.cs;t!==i&&(this.Us=i,this.wo(new ut))},this.da=()=>{this.oa=this.aa.cs,this.ua()},this.va=()=>{this.fa||(this.uo.isFullWindow&&this.uo.supportsFullScreen()||this.oa&&!this.uo.supportsFullScreen())&&(this.fa=!0,this.uo.exitFullscreen(),this.uo.requestFullscreen(),this.fa=!1,this.ua())},this.uo=t,this.aa=i,this.uo.on("fullscreenchange",this.ua),this.aa.wn(U.ca,this.da),this.aa.wn(U.pa,this.va),this.aa.wn(U.la,this.Os),this.ua()}};function ic(t){return class extends t{get Mo(){return this.ma}cs(){return this.ga.Uo()===I.FULLSCREEN}ya(){return function(t,i){let s=g.create(t);const e=i.uo;return ft(s,{get controls(){return e.controls()},set controls(t){e.controls(mt(t))},get presentation(){return i.ga.ba},get presentationMode(){return i.ga.Uo()},set presentationMode(t){const s=O(t);s&&i.ga.zo(s)},get ui(){return e},get visibility(){return i.Mo.ba}})}(this.wa,this)}bn(){super.bn(),this.ga.bn(),this.ka.bn(),this.uo.dispose(),this.ma.bn()}_a(t){this.uo.src(""),super._a(t)}constructor(t,i,s){super(i,s),this.Vo=t,this.ma=new ci(t),this.wa=super.ya(),g.defineProperty(this.wa,"constructor",{value:_i}),this.uo=Gu(this.wa,this.Vo,s.ui),this.ka=new tc(this.uo,this.ja),this.ga=new Zu(this,this.ka,this.Sa.xa(),s),this.ga.wn(pt.MODE_CHANGE,this.Os)}}}function sc(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)&&!j(t))return ji(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=mt(t.retainPresentationModeOnSourceChange),t}function ec(t){const i=$(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=sc(i.pip),i}function nc(){return Yu||(Yu=function(t){let i=t;for(const t of Zi)i=t(i);return i}(Yu=ic(bi()))),Yu}function rc(t,i){const s=ec(i),e=h.createElement("div");vi(e),t.appendChild(e);const n=new(nc())(t,e,s);n.Ta=n;let r=n.ba;return n.Ca(),n.Pa(di),g.defineProperty(r,"constructor",{value:rc}),r=ct(r),fi(n),function(t){for(const i of ts)i(t)}(n),r}var hc="theo-cast-",oc=Jo.getComponent("Button"),ac=class extends(na(oc)){get Ma(){throw new d("Aa")}get Ia(){return this.h.Ia}get Ea(){return this.h.Ea}buildCSSClass(){return hc+"button theo-"+this.Ea+"-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=hc+"svg-container",r.innerHTML=this.Ia,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.Da===H.AVAILABLE)null==(i=this.Ma)||i.start();else if(this.Da===H.CONNECTED||this.Da===H.CONNECTING){var s;null==(s=this.Ma)||s.stop()}}Na(t){ai(this.do,"theo-"+this.Ea+"-"+this.Da),this.Da=t,ri(this.do,"theo-"+this.Ea+"-"+this.Da),this.se()}se(){this.Fa(this.Da),this.Be.Fe=this.controlText()}Fa(t){t===H.CONNECTED?this.controlText("Stop Casting"):t===H.AVAILABLE?this.controlText("Start Casting"):t===H.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.do=t.el(),this.Da=H.UNAVAILABLE,this.controlText("Unavailable"),this.Be=new Aa(this,this.controlText()),null==(s=this.Ma)||s.addEventListener("statechange",(t=>{const i=t;this.Na(i.state)})),Ri.Zs.Ye&&(this.Ba=new ga(this.el())),this.Na(this.Ma?this.Ma.state:H.UNAVAILABLE),this.on(t,"languagechange",this.se)}},uc=0;function cc(){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-'+uc+'">\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-'+uc+')">\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 uc++,t}Jo.registerComponent("chromecastButton",class extends ac{get Ma(){var t;return null==(t=this.ks.cast)?void 0:t.chromecast}constructor(t,i){super(t,Gi({},i,{Ea:"chromecast",Ia:cc()}))}});var lc="theo-chromecast-",fc=Jo.getComponent("Component"),dc=class i extends(na(fc)){buildCSSClass(){return lc+"overlay "+super.buildCSSClass()}createEl(){const s=super.createEl();ri(s,lc+"overlay");const e=Jo.createEl("div",{className:lc+"status-icon",innerHTML:i.ICON_SVG}),n=Jo.createEl("div",{className:lc+"status-info"});t(n,"Playing on");const r=Jo.createEl("div",{className:lc+"status-title"}),h=Jo.createEl("div",{className:lc+"status"});return this.yr=r,h.appendChild(e),h.appendChild(n),h.appendChild(r),s.appendChild(h),s}dispose(){var t;null==(t=this.$a)||t.removeEventListener("statechange",this.update),this.$a=void 0,this.ks.removeEventListener("play",this.update),super.dispose()}constructor(i,s){var e,n;super(i,s),this.update=()=>{this.$a?(this.yr&&t(this.yr,this.$a.receiverName||""),this.$a.state===H.CONNECTED?this.show():this.hide()):this.hide()},this.$a=null==(e=this.ks.cast)?void 0:e.chromecast,null==(n=this.$a)||n.addEventListener("statechange",this.update),this.ks.addEventListener("play",this.update),this.update()}};dc.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>',Jo.registerComponent("chromecastOverlay",dc);Jo.registerComponent("airplayButton",class extends ac{dispose(){var t,i;null==(t=this.ks.ads)||t.removeEventListener("adbreakbegin",this.Ra),null==(i=this.ks.ads)||i.removeEventListener("adbreakend",this.Oa),this.ks.removeEventListener("currentsourcechange",this.Oa),super.dispose()}get Ma(){var t;return null==(t=this.ks.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,Gi({},i,{Ea:"airplay",Ia:'\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.Oa=()=>{this.enable()},this.Ra=()=>{this.disable()},null==(s=this.ks.ads)||s.addEventListener("adbreakbegin",this.Ra),null==(e=this.ks.ads)||e.addEventListener("adbreakend",this.Oa),this.ks.addEventListener("currentsourcechange",this.Oa)}});var vc={Default:"","Monospaced Serif":Ft.Va,"Proportional Serif":Ft.Ua,"Monospaced Sans-Serif":Ft.La,"Proportional Sans-Serif":Ft.Ha},pc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},mc=[50,75,100,150,200];function gc(t){return{label:t+"%",value:t}}function yc(t){return g.keys(t).map((i=>({label:i,value:t[i]})))}mc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var bc=mc.map((function(t){return{label:t+"%",value:t+"%"}})),wc=[25,50,75,100].map(gc),kc=[0,25,50,75,100].map(gc),_c=yc(pc),jc=yc(vc),xc=yc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Sc=100,Tc="#000000",Cc="#FFFFFF",Pc="#000000",Mc=class extends mu{za(){let i=this.$r.localize(this.Wa);t(this.qa.subMenu.menuHeader.el(),i),this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",t(this.Br,i);let s=h.createElement("span");return s.className="theo-primary-color theo-settings-control-menu-item-value",ri(this.qa.el(),"theo-subtitle-options-menu-item"),this.qa.el().appendChild(this.Br),this.qa.el().appendChild(s),s}Ga(t){const i=this.Pr(t);i&&this.Xa(i)}Ja(){return this.kr}Ir(t){this.Qa(t.Mr)}Xa(t){for(let t of this.Tr.menuItems)t.selected(!1);t?(t.selected(!0),this.Ya(t.Mr.label)):this.Ya("Custom")}Ya(i){this.Ka=i,t(this.Za,this.$r.localize(i)),this.qa.parentMenu.oe()}Ar(t){let i=super.Ar(t);return ri(i.el(),"theo-subtitle-options-menu-item"),this.Nr(i),i}Nr(i){const s=this.$r.localize(i.Mr.label);t(i.el(),s);const e=this.$r.localize("Set "+this.Wa+" to ")+s;i.el().setAttribute("aria-label",e)}Ve(){this.$r.off("languagechange",this.se),super.Ve()}constructor(i,s,e,n){super(i.subMenu),this.qa=i,this.$r=n,this.Ka="",this.se=()=>{let i=this.$r.localize(this.Wa);t(this.qa.subMenu.menuHeader.el(),i),t(this.Br,i),this.Ya(this.Ka);for(const t of this.Cr)this.Nr(t)},this.Wa=s,this.Qa=e.tu,this.Za=this.za(),this.kr=e.iu,this.$r.on("languagechange",this.se)}},Ac=class t{static su(t,i,s,e){if(void 0===t&&void 0===i)return;return Qt(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.eu=i,this.nu=t=>{this.eu.fontFamily=t.value},this.ru=t=>{this.eu.fontSize=t.value},this.hu=i=>{this.ou=i.value,this.eu.fontColor=t.su(this.au,this.ou,Cc,Sc)},this.uu=i=>{this.au=i.value,this.eu.fontColor=t.su(this.au,this.ou,Cc,Sc)},this.cu=i=>{this.lu=i.value,this.eu.backgroundColor=t.su(this.lu,this.fu,Tc,Sc)},this.du=i=>{this.fu=i.value,this.eu.backgroundColor=t.su(this.lu,this.fu,Tc,Sc)},this.vu=i=>{this.pu=i.value,this.eu.windowColor=t.su(this.pu,this.mu,Pc,Sc)},this.gu=i=>{this.mu=i.value,this.eu.windowColor=t.su(this.pu,this.mu,Pc,Sc)},this.yu=t=>{this.eu.edgeStyle=t.value}}},Ic=class{bu(t,i){const s=this.wu(t,i.Ja());s&&i.Ga(s)}wu(t,i){return D(i,(i=>i.value===t))}ku(t,i,s){let e,n;if(void 0===t)e=this.wu(void 0,i.Ja()),n=this.wu(void 0,s.Ja());else if(t){let r=function(t){let i=Gt(t);i||(i=Gt(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=Rt(Ut(t),1));if(!i){let s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=Rt(Ut(pc[s]),1)}return i}(t);if(r){let t=zt(r),h=100*r._u;e=this.wu(t,i.Ja()),n=this.wu(h,s.Ja())}}e&&i.Ga(e),n&&s.Ga(n)}constructor(t,i){this.eu=t,this.ju=i,this.xu=()=>{let t=this.eu.fontFamily;this.bu(t,this.ju["Font family"]);let i=this.eu.fontColor;this.ku(i,this.ju["Font color"],this.ju["Font opacity"]);let s=this.eu.fontSize;this.bu(s,this.ju["Font size"]);let e=this.eu.backgroundColor;this.ku(e,this.ju["Background color"],this.ju["Background opacity"]);let n=this.eu.windowColor;this.ku(n,this.ju["Window color"],this.ju["Window opacity"]);let r=this.eu.edgeStyle;this.bu(r,this.ju["Character edge style"])},this.eu.addEventListener("change",this.xu),this.xu()}};var Ec=class extends mu{Su(){return{"Font family":{iu:Dc(jc),tu:this.Tu.nu},"Font color":{iu:Dc(_c),tu:this.Tu.uu},"Font opacity":{iu:Dc(wc),tu:this.Tu.hu},"Font size":{iu:Dc(bc),tu:this.Tu.ru},"Background color":{iu:Dc(_c),tu:this.Tu.cu},"Background opacity":{iu:Dc(kc),tu:this.Tu.du},"Window color":{iu:Dc(_c),tu:this.Tu.vu},"Window opacity":{iu:Dc(kc),tu:this.Tu.gu},"Character edge style":{iu:Dc(xc),tu:this.Tu.yu}}}Cu(){this.Br=h.createElement("span"),this.Br.className="theo-settings-control-menu-item-title",this.Pu=h.createElement("span"),this.Pu.className="theo-primary-color theo-settings-control-menu-item-value",this.Wr.el().appendChild(this.Br),this.Wr.el().appendChild(this.Pu),this.se()}Ar(t){let i=this.Tr.addSubMenuItem();return i.Mr=t,this.ju[t]=new Mc(i,t,this.Mu[t],this.$r),i}Nr(t){}Ir(t){}Ve(){this.$r.off("languagechange",this.se),this.Au.removeEventListener(["addtrack","removetrack"],this.Iu),super.Ve()}constructor(i,s,e,n){super(i.subMenu),this.Wr=i,this.Au=s,this.$r=n,this.ju={},this.Iu=()=>{this.Au.some((t=>It(t.kind)))?this.Wr.show():this.Wr.hide()},this.se=()=>{t(this.Tr.menuHeader.el(),this.$r.localize("Subtitle Options")),t(this.Br,this.$r.localize("Subtitle")),t(this.Pu,this.$r.localize("Options")),this.Wr.el().setAttribute("aria-label",this.$r.localize("Open the subtitle options menu"))},this.Tu=new Ac(e),this.Mu=this.Su(),this.kr=g.keys(this.Mu),this.Cu(),this.Eu=new Ic(e,this.ju),this.$r.on("languagechange",this.se),this.Au.addEventListener(["addtrack","removetrack"],this.Iu),this.Iu()}};function Dc(t){let i=[{label:"Default",value:void 0}];for(let s of t)"Default"!==s.label&&i.push(s);return i}!function(t){ts.push(t)}((function(t){const i=t.uo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new Ec(s,t.nt.ba,t.Du.ba,t.uo);t.uo.on("dispose",(()=>{i.removeMenuItem(s),s.dispose(),e.Ve(),i.dispose()}))}));var Nc=.02,Fc=class{Nu(t){const i=t-this.Bu.Fu-20,s=t-this.Bu.Fu+20;if(0===this.Bu.lo)return;const e=this.Bu.t.currentProgramDateTime.valueOf();e>s?this.$u(this.Ru):e<i?this.$u(this.Ou):this.$u(this.Vu)}Uu(t){const i=t-this.Bu.Fu/1e3-Nc,s=t-this.Bu.Fu/1e3+Nc;if(0===this.Bu.lo)return;const e=this.Bu.t.currentTime;e>s?this.$u(this.Ru):e<i?this.$u(this.Ou):this.$u(this.Vu)}Lu(){this.Vu=this.sa.Hu,this.Ru=this.sa.Hu-.05,this.Ou=this.sa.Hu+.05}$u(t){const i=this.Bu.t;if(i.playbackRate!==t&&0!==i.playbackRate){t>=.2&&t<=2.05?i.playbackRate=t:this.sa.zu(this.Bu)}}Wu(){this.sa.pn(K.qu,this.Gu),this.sa.pn(K.Xu,this.Ju)}constructor(t,i){this.Vu=1,this.Ru=1.05,this.Ou=.95,this.Gu=()=>{this.Lu()},this.Ju=()=>{if(!this.sa.Qu)return;const t=this.sa.Qu.Fu,i=this.sa.Yu,s=this.sa.Ku;null!==s?this.Nu(s.valueOf()+t):this.Uu(i+t/1e3)},this.Bu=t,this.sa=i,this.sa.wn(K.qu,this.Gu),this.sa.wn(K.Xu,this.Ju)}},Bc=class{get t(){return this.sa}get ba(){var t;return null!=(t=this.Zu)?t:this.Zu=function(t){return{get label(){return t._h},get position(){return t.lo},set position(i){t.lo=i},get muted(){return t.tc},set muted(i){t.tc=i},get canResize(){return t.ic},get x(){return t.Lh},set x(i){t.Lh=i},get y(){return t.Hh},set y(i){t.Hh=i},get width(){return t.Ti},set width(i){t.Ti=i},get height(){return t.Ci},set height(i){t.Ci=i},get enabled(){return t.Rt},set enabled(i){t.Rt=i},get offset(){return t.Fu},set offset(i){t.Fu=i},remove(){t.sc()}}}(this)}get _h(){return this.ec}get lo(){return this.rc.nc.indexOf(this)}set lo(t){this.rc.hc(this,t)}get tc(){return this.sa.muted}set tc(t){this.Rt&&(this.rc.oc=this,this.ac(t))}get ic(){return 0!==this.lo&&this.rc.uc===Kc.OVERLAY}get Lh(){return this.cc}set Lh(t){this.ic&&(this.lc||(this.lc=!0),this.cc=t>1-this.Ti?1-this.Ti:w.max(t,0),this.t.element.style.setProperty("left",100*this.cc+"%"))}get Hh(){return this.fc}set Hh(t){this.ic&&(this.lc||(this.lc=!0),this.fc=t>1-this.Ci?1-this.Ci:w.max(t,0),this.t.element.style.setProperty("top",100*this.fc+"%"))}get Ti(){return this.dc}set Ti(t){this.ic&&this.vc(t)}get Ci(){return this.mc}set Ci(t){this.ic&&this.vc(t)}get Rt(){return this.We}set Rt(t){t!==this.We&&0!==this.lo&&(t?(q(this.rc.zu(this)),this.rc.gc(this),this.t.element.style.setProperty("display","block")):(this.t.pause(),this.t.element.style.setProperty("display","none")),this.We=t,this.rc.yc(this))}get bc(){return this.lc}set bc(t){this.lc=t}get wc(){return this.kc}set wc(t){this.kc=t}get Fu(){return this._c}set Fu(t){this._c=t,this.jc(this.rc.Yu,this.rc.Ku)}xc(t,i,s,e,n){!this.lc&&n&&(this.lc=!0),this.cc=t,this.fc=i,this.dc=s,this.mc=e}ac(t){this.sa.muted=t}sc(){0!==this.lo&&this.rc.Sc(this)}Tc(){this.t.element.style.setProperty("top",100*this.fc+"%"),this.t.element.style.setProperty("left",100*this.cc+"%"),this.t.element.style.setProperty("width",100*this.dc+"%")}vc(t){const i=this.cc+this.dc,s=w.min(t,i),e=.9-this.fc,n=w.min(t,e),r=w.max(w.min(s,n),.1),h=this.dc-r;this.dc=r,this.mc=r,this.Lh+=h,this.t.element.style.setProperty("width",100*r+"%")}jc(t,i){if(null!==i){const t=i.valueOf()-this.Fu;this.sa.currentProgramDateTime=new Date(t)}else this.sa.currentTime=t-this.Fu/1e3}Cc(t){const i=this.t.element.getElementsByClassName(qc)[0],s=t?Xc:Gc;ai(i,t?Gc:Xc),ri(i,s)}Wu(){this.Pc.Wu(),this.sa.element.remove(),this.sa.destroy()}constructor(t,i,s,e){this.We=!0,this.lc=!1,this.kc=0,this.ec=t,this.sa=i,this.rc=s,this.Pc=new Fc(this,s),this._c=null!=e?e:0,this.dc=.2,this.mc=.2,this.cc=.76,this.fc=0}};var $c=class{get multiViewPlayer(){return this.rc}get abr(){}get audioTracks(){return this.Mc}get autoplay(){return this.rc.autoplay}set autoplay(t){this.rc.autoplay=t}get buffered(){return this.rc.buffered}get canvas(){}get clip(){return this.Ac.ba}get currentProgramDateTime(){return null}get currentTime(){return this.rc.currentTime}set currentTime(t){this.rc.currentTime=t}get duration(){return this.rc.duration}get element(){return this.Hs}get ended(){return this.rc.ended}get error(){}get errorObject(){return this.rc.errorObject}get latency(){}get loop(){return!1}get metrics(){}get muted(){return this.rc.muted}set muted(t){this.rc.muted=t}get network(){}get paused(){return this.rc.paused}get playbackRate(){return this.rc.playbackRate}set playbackRate(t){this.rc.playbackRate=t}get played(){return this.rc.played}get poster(){return""}get preload(){return""}get presentation(){}get readyState(){return this.rc.readyState}get seekable(){return this.rc.seekable}get seeking(){return this.rc.seeking}get source(){}get src(){return"dummySource"}get textTrackStyle(){return this.Ic}get textTracks(){return this.Ec}addTextTrack(t){throw d("Not implemented")}get uid(){return 0}get videoHeight(){return 0}get videoTracks(){return this.Mc}get videoWidth(){return 0}get volume(){return this.rc.volume}set volume(t){this.rc.volume=t}get views(){return this.rc.views}get visibility(){}get layout(){return this.rc.layout}set layout(t){this.rc.layout=t}play(){this.rc.play()}pause(){this.rc.pause()}stop(){this.rc.stop()}destroy(){this.rc.destroy()}prepareWithUserAction(){this.rc.prepareWithUserAction()}addEventListener(t,i){this.Dc.wn(t,i)}removeEventListener(t,i){this.Dc.pn(t,i)}setSource(t){}constructor(t,i){this.Dc=new X,this.rc=t,this.Hs=i,this.Ac=new kt,this.Mc=(new pi).ba,this.Ec=(new yi).ba,this.Ic=(new Ct).ba,this.rc.addEventListener(["play","pause","seeking","seeked","timeupdate","ended","playing","waiting","sourcechange","readystatechange","loadedmetadata","loadeddata","canplay","canplaythrough","loadstart","progress","durationchange","volumechange","ratechange","error"],this.Dc.Os)}},Rc=class extends Q{constructor(t){super(Yc.Nc),this.view=t}},Oc=class extends Q{constructor(t,i){super(Yc.VIEW_POSITION_CHANGE),this.oldPosition=t,this.newPosition=i}},Vc=class extends Q{constructor(t){super(Yc.Fc),this.view=t}},Uc=class extends Q{constructor(t){super(Yc.VIEW_CHANGE),this.view=t}},Lc=class extends Q{constructor(t){super(Yc.Bc),this.layout=t}},Hc=class extends X{get Yu(){return this.sa.Yu}get $c(){return this.sa.$c}get lt(){return this.sa.Rc}get Oc(){return this.sa.Oc}get Vc(){return this.sa.Vc}get Uc(){return this.sa.Uc}get Lc(){return!1}get Hc(){return!1}Wu(){this.Bo()}constructor(t){super(),this.zc=t=>{this.Os(new mi(t.source))},this.Wc=t=>{this.Os(new Bi(t.currentTime))},this.qc=t=>{this.Os(new Di(t.currentTime))},this.Gc=t=>{this.Os(new Xi(t.currentTime))},this.Xc=t=>{this.Os(new Yi(t.currentTime))},this.Jc=t=>{this.Os(new at(t.currentTime,t.currentProgramDateTime))},this.Qc=t=>{this.Os(new Wi(t.currentTime))},this.Yc=t=>{this.Os(new ni(t.currentTime))},this.Kc=t=>{this.Os(new Jt(t.currentTime))},this.Zc=t=>{this.Os(new $t(t.currentTime,t.readyState))},this.tl=t=>{this.Os(new Ht(t.currentTime,this.Vc))},this.il=t=>{this.Os(new qt(t.currentTime,this.Vc))},this.sl=t=>{this.Os(new Kt(t.currentTime,this.Vc))},this.nl=t=>{this.Os(new ii(t.currentTime,this.Vc))},this.rl=()=>{this.Os(new T)},this.hl=t=>{this.Os(new Mt(t.currentTime))},this.ol=t=>{this.Os(new Oi(t.duration))},this.al=t=>{this.Os(new P(this.Yu,t.volume))},this.cl=t=>{this.Os(new Li(this.Yu,t.playbackRate))},this.ll=t=>{this.Os(new Ji(t.errorObject))},this.fl=()=>{this.Os(new ut)},this.sa=t,this.sa.wn("sourcechange",this.zc),this.sa.wn("play",this.Wc),this.sa.wn("pause",this.qc),this.sa.wn("seeking",this.Gc),this.sa.wn("seeked",this.Xc),this.sa.wn("timeupdate",this.Jc),this.sa.wn("ended",this.Qc),this.sa.wn("playing",this.Yc),this.sa.wn("waiting",this.Kc),this.sa.wn("readystatechange",this.Zc),this.sa.wn("loadedmetadata",this.tl),this.sa.wn("loadeddata",this.il),this.sa.wn("canplay",this.sl),this.sa.wn("canplaythrough",this.nl),this.sa.wn("loadstart",this.rl),this.sa.wn("progress",this.hl),this.sa.wn("durationchange",this.ol),this.sa.wn("volumechange",this.al),this.sa.wn("ratechange",this.cl),this.sa.wn("error",this.ll),this.sa.wn("fullscreenchange",this.fl)}},zc=class{async dl(){const t=this.sa;if(!t.vl||!t.Oc)return;const i=this.pl.mutedAutoplay;switch(await this.gl.ml(t.tc)){case"all":t.tc||t.yl(),t.bl();break;case"muted":(t.tc||i===N.ALL)&&(t.tc=!0,t.bl())}}bn(){this.gl.bn(),this.mn.bn()}constructor(t,i,s){this.sa=t,this.pl=s,this.Ic=new Ct,this.mn=new ot(i);const e=new Ei(this.mn,this.Ic,1,[yt.wl]);this.gl=new Fi(e)}},Wc=[Nt.kl,Nt._l,Nt.jl,Nt.xl],qc="theo-switch-audio-button",Gc="vjs-icon-volume-mute",Xc="vjs-icon-volume-high",Jc="theo-main-view",Qc="theo-layout-",Yc=function(t){return t.Nc="addview",t.Fc="removeview",t.VIEW_CHANGE="viewchange",t.VIEW_POSITION_CHANGE="viewpositionchange",t.Bc="layoutchange",t}({}),Kc=function(t){return t.GALLERY="gallery",t.OVERLAY="overlay",t.SPOTLIGHT="spotlight",t}({}),Zc=class extends X{get ba(){var t;return null!=(t=this.Zu)?t:this.Zu=function(t){return{load:(i,s,e,n)=>t.On(i,s,e,n),get views(){return t.nc.map((t=>t.ba))},get mainVideoView(){var i;return null==(i=t.Qu)?void 0:i.ba},get mainAudioView(){var i;return null==(i=t.oc)?void 0:i.ba},get ui(){return t.uo},get layout(){return t.uc},set layout(i){t.uc=i},get buffered(){return t.Sl},get currentTime(){return t.Yu},set currentTime(i){t.Yu=i},get autoplay(){return t.vl},set autoplay(i){t.vl=i},get duration(){return t.ct},get ended(){return t.$c},get errorObject(){return t.Rc},get muted(){return t.tc},set muted(i){t.tc=i},get paused(){return t.Oc},get playbackRate(){return t.Hu},set playbackRate(i){t.Hu=i},get played(){return t.Tl},get readyState(){return t.Vc},get seekable(){return t.Cl},get seeking(){return t.Uc},get volume(){return t.Pl},set volume(i){t.Pl=i},play(){t.bl()},pause(){t.Ml()},stop(){t.Al()},destroy(){t.Wu(),t=null},requestFullscreen(i){t.Il(i)},exitFullscreen(){t.Yo()},prepareWithUserAction(){t.yl()},addEventListener(i,s){t.wn(i,s)},removeEventListener(i,s){t.pn(i,s)}}}(this)}get uo(){return this.El}get nc(){return this.Dl}get Qu(){return this.Nl}get oc(){var t;return null!=(t=this.Fl)?t:this.Nl}set oc(t){if(this.Fl===t)return;const i=this.oc,s=null!=t?t:this.Qu;i.t.removeEventListener(K.Bl,this.$l),i.Cc(!1),i.tc||(i.ac(!0),s.ac(!1)),s.t.addEventListener(K.Bl,this.$l),s.Cc(!0),this.Fl=t}get uc(){return this.Rl}set uc(t){if(t!==this.Rl){if("overlay"===this.uc)for(const t of this.nc)t.t.element.style.setProperty("left","auto"),t.t.element.style.setProperty("top","auto"),t.t.element.style.removeProperty("z-index");ai(this.Hs,Qc+this.Rl),this.Rl=t,ri(this.Hs,Qc+this.Rl),this.Tc(),this.wo(new Lc(t))}}get Sl(){if(0===this.nc.length)return ki.Ol().ws();return this.Vl().reduce(((t,i)=>t.Cn(ki.Sn(i.t.buffered))),new ki([0,1/0])).ws()}get Yu(){return this.Nl&&this.Ul?this.Nl.t.currentTime+this.Nl.Fu/1e3:0}set Yu(t){this.Ll();const i=this.Vl();let s=null;if(null!==this.Ku){s=this.Ku;const i=t-this.Yu;s.setSeconds(s.getSeconds()+i)}for(const e of i)e.jc(t,s)}get Ku(){if(!this.Nl)return null;return this.nc.every((t=>null!==t.t.currentProgramDateTime))?new Date(this.Nl.t.currentProgramDateTime.valueOf()+this.Nl.Fu):null}get vl(){return this.Hl}set vl(t){this.Hl=t,this.zl.dl()}get ct(){if(0===this.nc.length)return NaN;let t=1/0;for(const i of this.Vl())t=w.min(i.t.duration,t);return t}get $c(){return this.nc.some((t=>t.t.ended))}get lt(){return this.Rc}get Rc(){if(this.Wl)return this.Wl;for(const t of this.nc){const i=t.t.errorObject;if(void 0!==i)return i}}get tc(){var t,i;return null!=(i=null==(t=this.oc)?void 0:t.tc)&&i}set tc(t){this.oc&&this.oc.ac(t),this.$l()}get Oc(){if(!this.nc.length)return!0;return this.Vl().some((t=>t.t.paused))}get Hu(){var t,i,s;return null!=(s=null!=(i=this.ql)?i:null==(t=this.Nl)?void 0:t.t.playbackRate)?s:1}set Hu(t){if(void 0!==this.ql)this.ql=t;else for(const i of this.nc)i.t.playbackRate=t;this.Gl()}get Tl(){return this.nc.reduce(((t,i)=>t.Xl(ki.Sn(i.t.played))),ki.Ol()).ws()}get Vc(){if(0===this.nc.length)return Vt.Jl;let t=Vt.Ql;for(const i of this.Vl())i.t.readyState<t&&(t=i.t.readyState);return t}get Cl(){if(0===this.nc.length)return ki.Ol().ws();return this.Vl().reduce(((t,i)=>t.Cn(ki.Sn(i.t.seekable))),new ki([0,1/0])).ws()}get Uc(){return this.nc.some((t=>t.t.seeking))}get Pl(){var t,i;return null!=(i=null==(t=this.oc)?void 0:t.t.volume)?i:1}set Pl(t){for(const i of this.nc)i.t.volume=t;this.$l()}On(t,i,s,e){if(this.Yl)throw this.Wl;const n=this.nc.filter((i=>i._h===t))[0];return n?n.ba:this.Kl(t,i,s,e)}bl(){if(!this.Nl||!this.Oc)return;this.Ll();const t=this.Vl();for(const i of t)i.t.play()}Ml(){const t=this.Vl();for(const i of t)i.t.pause()}Al(){for(let t=this.nc.length-1;t>=0;t--)this.Sc(this.nc[t]);this.Nl=void 0,this.Fl=void 0,this.Wl=void 0,this.Zl&&(this.Zl.tf(),this.Zl=void 0),this.if=!0,this.sf=!1,this.ef=!1,this.nf=-1,this.rf=Vt.Jl,this.hf=!1,this.ql=void 0,this.af=!1,this.uf=-1,this.cf=!1,this.lf=-1,this.Ul=!1,this.ff.sr(),this.wo(new mi(void 0))}Wu(){for(let t=this.nc.length-1;t>=0;t--)this.Sc(this.nc[t]);this.Bo(),this.ff.bn(),this.df.Wu(),this.vf.Wu(),this.zl.bn(),this.uo.dispose()}Il(t){this.wo(new ut),this.Hs.requestFullscreen(t).catch(Ui)}Yo(){this.wo(new ut),h.exitFullscreen().catch(Ui)}yl(){for(const t of this.nc)t.t.prepareWithUserAction()}Kl(t,i,s,e){const n=h.createElement("div");ri(n,"theo-view"),this.Hs.appendChild(n);const r=new(bi())(n,this.pl).ba;r.source=i;const o=new Bc(t,r,this,e);if(s){const t=h.createElement("div");t.className="theo-view-description";const i=h.createElement("span");i.textContent=s,t.appendChild(i),n.appendChild(t),o.t.addEventListener("dimensionchange",(()=>{this.pf(t)}))}return this.mf(o),this.nc.push(o),1===this.nc.length?(this.Nl=o,this.gf(this.Nl),ri(this.Nl.t.element,Jc)):(this.yf(r),0!==this.Yu&&q(this.zu(o,!0))),this.Tc(),this.wo(new Rc(o.ba)),o.ba}Vl(){return this.nc.filter((t=>t.Rt))}bf(){return this.nc.filter((t=>t.Rt&&t!==this.Nl))}yf(t){t.volume=this.Nl.t.volume,t.muted=!0,t.playbackRate=this.Nl.t.playbackRate}mf(t){t.wc=this.nc.length;const i=t.t.element;i.addEventListener("dblclick",(()=>{this.wf(t)})),i.addEventListener("touchend",(i=>{this.kf>=i.timeStamp?(i.preventDefault(),this.wf(t),this.kf=0):this.kf=i.timeStamp+500}));const s=h.createElement("div"),e=0===this.nc.length?Xc:Gc;s.className="theo-primary-color "+qc+" "+e,s.addEventListener("click",(()=>{this.oc=t})),s.addEventListener("touchend",(()=>{this.oc=t})),i.appendChild(s);const n=h.createElement("div");n.className="theo-primary-color theo-disable-button vjs-icon-close",n.addEventListener("click",(()=>{t.Rt=!1})),n.addEventListener("touchend",(()=>{t.Rt=!1})),i.appendChild(n),this._f(t,i),this.jf(t),this.xf(t)}_f(t,i){const s=h.createElement("div");let e=0;const n=i=>{if(this.Sf=!0,this.gc(t),i.preventDefault(),"touchstart"===i.type){e=i.changedTouches[0].clientX,h.addEventListener("touchmove",r),h.addEventListener("touchend",o),h.addEventListener("touchcancel",o)}else{e=i.x,h.addEventListener("mousemove",r),h.addEventListener("mouseup",o)}},r=i=>{let s;if("touchmove"===i.type){s=i.changedTouches[0].clientX}else{s=i.x}const n=e-s,r=t.t.element.parentElement.clientWidth,h=(t.t.element.clientWidth+n)/r;t.Ti=h,t.Ci=h,e=s},o=t=>{this.Sf=!1,"mouseup"===t.type?(h.removeEventListener("mousemove",r),h.removeEventListener("mouseup",o)):(h.removeEventListener("touchmove",r),h.removeEventListener("touchend",o),h.removeEventListener("touchcancel",o))};s.addEventListener("mousedown",n),s.addEventListener("touchstart",n),s.className="theo-resize-button theo-primary-color vjs-icon-resize-handle-sw",i.appendChild(s)}pf(t){const i=t.parentElement.clientWidth/100,s=w.min(40,5.23*i);t.style.fontSize=s+"px"}jf(t){const i=t.t.element,s=i.parentElement;let e={x:0,y:0};const n=i=>{if(!this.Sf&&t.ic)if(this.gc(t),i.preventDefault(),"touchstart"===i.type){const t=i;e.x=t.changedTouches[0].clientX,e.y=t.changedTouches[0].clientY,h.addEventListener("touchmove",r),h.addEventListener("touchend",o),h.addEventListener("touchcancel",o)}else{const t=i;e.x=t.x,e.y=t.y,h.addEventListener("mousemove",r),h.addEventListener("mouseup",o)}},r=n=>{let r;if("touchmove"===n.type){const t=n;r={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}}else{const t=n;r={x:t.x,y:t.y}}const h=r.x-e.x,o=r.y-e.y,a=i.offsetLeft,u=s.clientWidth;t.Lh=(a+h)/u;const c=s.offsetHeight,l=i.offsetTop;t.Hh=(l+o)/c,e=r},o=t=>{"mouseup"===t.type?(h.removeEventListener("mouseup",o),h.removeEventListener("mousemove",r)):(h.removeEventListener("touchmove",r),h.removeEventListener("touchend",o),h.removeEventListener("touchcancel",o))};i.addEventListener("mousedown",n),i.addEventListener("touchstart",n)}gc(t){for(const i of this.nc)i.wc>t.wc&&(i.wc-=1,i.t.element.style.setProperty("z-index",""+i.wc));t.wc=this.nc.length,t.t.element.style.setProperty("z-index",""+t.wc)}Ll(){if(void 0!==this.ql)return;this.ql=this.Hu;const t=this.Vl();for(const i of t)i.t.playbackRate=0}Tf(){if(void 0===this.ql)return;if(this.Uc||this.Vc<Vt.Cf){if(this.Nl&&!this.Ul){this.Ul=!0;for(const t of this.bf())this.Nl.Fu!==t.Fu&&t.jc(this.Yu,this.Ku)}return}const t=this.Vl();for(const i of t)i.t.playbackRate=this.ql;this.ql=void 0,this.Ul=!0}yc(t){t.Rt||t!==this.Fl||(this.oc=void 0),this.wo(new Uc(t.ba)),this.Tc()}async zu(t,i){void 0===i&&(i=!1),this.Ll();const s=t.t;i&&(this.Zl=new tt,s.addEventListener(K.oo,this.Ms),await this.Zl.Pf,s.removeEventListener(K.oo,this.Ms)),s.readyState===Vt.Jl&&(this.af=!0,s.play()),this.Oc?s.pause():s.play(),t.jc(this.Yu,this.Ku)}Tc(){const t=this.Vl();if(!t.length)return;let i=0;switch(this.uc){case"spotlight":{t.length>1?this.Hs.style.gridTemplateColumns="80% 20%":this.Hs.style.gridTemplateColumns="100%";let s=1/0;for(const e of t)if(i>=s+1)e.Rt=!1;else if(e.t.element.style.setProperty("width","100%"),i++,2===i){const i=e.t.element.clientHeight,n=e.t.element.parentElement.clientHeight,r=w.floor(n/i);s=w.min(t.length-1,r),this.Hs.style.gridTemplateRows="repeat("+s+", 1fr)"}break}case"overlay":{let s=0;for(i=1;i<t.length;i++){const e=t[i];if(i>=5)e.Rt=!1;else{if(!e.bc){const t=.04+.24*s;e.xc(e.Lh,t,e.Ti,e.Ci,!1),this.gc(e),s++}e.t.element.style.setProperty("z-index",""+e.wc),e.Tc()}}break}case"gallery":{const s=t.length,e=w.ceil(w.sqrt(s));for(const s of t)i>=9?s.Rt=!1:(s.t.element.style.setProperty("width",100/e+"%"),i++);break}}}hc(t,i){const s=i>=0?w.min(w.floor(i),this.nc.length-1):0,e=t.lo,n=w.min(e,s),r=w.max(e,s),h=0===n;if(!(!this.nc[n].Rt||!this.nc[r].Rt)||!h){if("overlay"===this.uc){const t=this.nc[r],i=this.nc[n],s=t.Lh,e=t.Hh,h=t.Ti,o=t.Ci,a=i.bc||t.bc;t.xc(i.Lh,i.Hh,i.Ti,i.Ci,a),[this.nc[n],this.nc[r]]=[this.nc[r],this.nc[n]],i.xc(s,e,h,o,a)}else[this.nc[n],this.nc[r]]=[this.nc[r],this.nc[n]];h&&this.Mf(this.nc[0]),this.wo(new Oc(e,s))}}Sc(t){t===this.Fl&&(this.oc=void 0),t.Wu(),B(this.nc,t),this.Tc(),this.wo(new Vc(t.ba))}wf(t){this.$c||0===this.Tl.length||this.Nl===t||"gallery"===this.Rl||this.hc(t,0)}Mf(t,i){void 0===i&&(i=!1);let s=!1;const e=this.Nl;this.Nl=t,t.bc=!1,this.Af(e),ai(e.t.element,Jc),this.Fl||(s=e.tc,e.ac(!0),e.Cc(!1),t.Cc(!0),i&&!s?this.wo(new P(this.Yu,0)):t.ac(s)),this.gc(e),ri(this.Nl.t.element,Jc),this.gf(this.Nl),"overlay"===this.uc&&this.Tc()}xf(t){t.t.addEventListener(K.If,this.Ef),t.t.addEventListener(K.Df,this.Ch),t.t.addEventListener(K.no,this.Nf),t.t.addEventListener(K.Ff,this.Bf),t.t.addEventListener(K.$f,this.Xe),t.t.addEventListener(K.Rf,this.Of),t.t.addEventListener(K.Vf,this.Uf),t.t.addEventListener(Nt.Lf,this.Hf),t.t.addEventListener(Tt.la,this.Ps)}gf(t){t.t.addEventListener(K.zf,this.Os),t.t.addEventListener(K.qu,this.Gl),t.t.addEventListener(K.Xu,this.Wf),this.Fl||t.t.addEventListener(K.Bl,this.$l)}Af(t){t.t.removeEventListener(K.zf,this.Os),t.t.removeEventListener(K.qu,this.Gl),t.t.removeEventListener(K.Xu,this.Wf),this.Fl||t.t.removeEventListener(K.Bl,this.$l)}constructor(t,i,s){super(),this.Dl=[],this.Rl="gallery",this.Sf=!1,this.Yl=!1,this.if=!0,this.sf=!1,this.ef=!1,this.nf=-1,this.rf=Vt.Jl,this.hf=!1,this.kf=0,this.ql=void 0,this.af=!1,this.Hl=!1,this.uf=-1,this.cf=!1,this.lf=-1,this.Ul=!1,this.qf=t=>{this.Tf(),z((()=>this.Os(t)))},this.Gf=t=>{this.Ll(),this.Os(t)},this.Ms=()=>{var t;null==(t=this.Zl)||t.Xf(),this.Zl=void 0},this.Gl=()=>{const t=this.Hu;this.lf!==t&&(this.lf=t,this.Os(new Li(this.Yu,t)))},this.$l=()=>{const t=this.Pl,i=this.tc;this.uf===t&&this.cf===i||(this.uf=t,this.cf=i,this.Os(new P(this.Yu,t)))},this.Wf=t=>{(this.Vc>Vt.Jf||this.Uc)&&this.Os(t)},this.Ef=t=>{this.Tf(),this.Uc||(this.sf=!1,this.Os(t))},this.Uf=t=>{const i=this.ct;this.nf!==i&&(this.nf=i,this.Os(t))},this.Ps=t=>{this.Os(t)},this.Nf=t=>{if(this.if){if(this.af)return void(this.af=!1);this.if=!1,this.ef=!1,this.Os(t)}},this.Xe=t=>{this.sf||(this.sf=!0,this.Os(t))},this.Bf=t=>{!this.if&&this.Oc&&(this.if=!0,this.Os(t))},this.Ch=t=>{this.ef||(this.ef=!0,this.Os(t))},this.Of=t=>{this.hf||(this.hf=!0,this.Os(t))},this.Hf=t=>{const i=this.Vc;this.rf!==i&&(this.rf=i,this.Os(t))},this.Qf=async()=>{try{await this.Kf.Yf([G.MULTIVIEW])}catch(t){this.Al(),this.Wl=ht(t,st.LICENSE_INVALID_FEATURE),this.Yl=!0,this.wo(new ui(this.Wl))}},this.Zf=t,this.Hs=i,this.pl=s;const e=Ri.td,n=new St,r=new Z("8.10.0",e,n),h=new Y(s.isEmbeddable,"8.10.0",J());if(this.Kf=new jt(e,h,r,n,s,J()),this.Kf.sd().then(this.Qf),this.ed=new $c(this.ba,this.Hs),this.El=Gu(this.ed,this.Zf,s.ui),ri(this.Hs,Qc+this.Rl),Ri.Zs.Ks){const t=this.El.el();ri(t,"theo-mobile"),Xu(t)}this.vf=new Hc(this),this.df=new Et(this.vf),this.df.wn(Nt.nd,this.qf),this.ff=new hi(this,!0),this.ff.wn(Wc,this.Os),this.ff.wn(Nt.rd,this.Gf),this.zl=new zc(this,t,s)}};function tl(t,i){var s;const e=ec(Gi({},i||{},{allowNativeFullscreen:!1,ui:Gi({},(null==i?void 0:i.ui)||{},{userActions:Gi({},(null==i||null==(s=i.ui)?void 0:s.userActions)||{},{click:!1})}),abr:Gi({},(null==i?void 0:i.abr)||{},{restrictToPlayerSize:!0})})),n=h.createElement("div");vi(n),t.appendChild(n);let r=new Zc(t,n,e).ba;return g.defineProperty(r,"constructor",{value:tl}),r=ct(r),r}var il="vjs-selected",sl=class extends mu{Nr(i){const s=i.Mr,e=this.$r.localize(s.label);t(i._h,e),i.el().setAttribute("aria-label",this.$r.localize("Enable/disable")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.enabled)}Ar(t){const i=super.Ar(t);ri(i.el(),"theo-multi-view-menu-item"),2===this.Cr.length&&ri(i.el(),"theo-multi-view-menu-item-position-zero");const s=h.createElement("span");i._h=s;const e=h.createElement("div");e.className="theo-multi-view-menu-item-toggle",i.jh=e;const n=t=>this.xh(t,i);i.Sh=n,e.addEventListener("click",n);const r=h.createElement("div");return r.className="theo-multi-view-menu-item-toggle-slider",e.appendChild(r),i.el().appendChild(s),i.el().appendChild(e),this.od.before(i.el()),i}ad(){const t=this.Tr.addMenuItem().el();ri(t,"theo-multi-view-menu-item"),ri(t,"theo-multi-view-menu-layout-select");const i=h.createElement("button");i.className="vjs-icon-view-grid",i.addEventListener("click",(()=>{this._s.layout=Kc.GALLERY})),t.appendChild(i),this.ud=i;const s=h.createElement("button");s.className="vjs-icon-view-spotlight",s.addEventListener("click",(()=>{this._s.layout=Kc.SPOTLIGHT})),t.appendChild(s),this.ld=s;const e=h.createElement("button");return e.className="vjs-icon-multi-view",e.addEventListener("click",(()=>{this._s.layout=Kc.OVERLAY})),t.appendChild(e),this.fd=e,t}xh(t,i){t.stopImmediatePropagation(),this.Ir(i)}Ir(t){const i=t.Mr;for(const t of this._s.views)t===i&&(t.enabled=!t.enabled);this.Nr(t)}Er(t){t.jh.removeEventListener("click",t.Sh),super.Er(t)}constructor(i,s,e){super(i),this.dd=t=>{this.Sr(t.view)},this.vd=t=>{this.jr(t.view)},this.pd=t=>{const i=t.oldPosition,s=t.newPosition,e=w.max(i,s),n=w.min(i,s),r=h.getElementsByClassName("theo-multi-view-menu-item");r[e].before(r[n]),r[n].before(r[e]),0===n&&(ai(r[e],"theo-multi-view-menu-item-position-zero"),ri(r[n],"theo-multi-view-menu-item-position-zero"))},this.md=()=>{const t=this._s.layout;li(this.ud,il,t===Kc.GALLERY),li(this.ld,il,t===Kc.SPOTLIGHT),li(this.fd,il,t===Kc.OVERLAY)},s.views&&(this._s=s,this.$r=e,this._s.multiViewPlayer.addEventListener(Yc.Nc,this.dd),this._s.multiViewPlayer.addEventListener(Yc.Fc,this.vd),this._s.multiViewPlayer.addEventListener(Yc.VIEW_CHANGE,this.dd),this._s.multiViewPlayer.addEventListener(Yc.VIEW_POSITION_CHANGE,this.pd),this._s.multiViewPlayer.addEventListener(Yc.Bc,this.md),t(this.Tr.menuHeader.el(),this.$r.localize("MultiView")),this.od=this.ad(),this.md())}};Jo.registerComponent("multiViewButton",class extends Ea{buildCSSClass(){return"vjs-icon-view-grid "+super.buildCSSClass()}dispose(){this.kh.Ve(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=3,this.kh=new sl(this.menu,this.ks,t),this.controlText(t.localize("Views")),this.Be.Fe=this.controlText()}});export{_i as ChromelessPlayer,nt as ErrorCategory,st as ErrorCode,tl as MultiViewPlayer,rc as Player,F as cache,E as cast,Pi as features,Ni as playerSuiteVersion,$i as players,Vi as registerContentProtectionIntegration,Si as utils,Ii as version,Jo as videojs};
|