@theoplayer/theoads 9.8.0 → 9.8.2
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/THEOplayer.chromeless.d.ts +1 -1
- package/THEOplayer.chromeless.esm.js +2 -2
- package/THEOplayer.chromeless.js +3 -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 +3 -3
package/THEOplayer.esm.js
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
THEOplayer is based on patented technology developed by
|
|
35
35
|
THEO Technologies (https://www.theoplayer.com).
|
|
36
36
|
|
|
37
|
-
Version: 9.8.
|
|
38
|
-
Created: 2025-07-
|
|
37
|
+
Version: 9.8.2
|
|
38
|
+
Created: 2025-07-17T19:39:34.634Z
|
|
39
39
|
*/
|
|
40
|
-
var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,u=(a.location,a.navigator,a.setTimeout),c=a.clearTimeout,v=a.setInterval,p=a.clearInterval,m=a.Error,g=a.TypeError,k=a.SyntaxError,w=a.Object,_=a.Math,x=a.parseInt,C=a.parseFloat,S=a.isNaN,j=a.Uint8Array;a.Worker,a.WorkerGlobalScope,a.XMLHttpRequest;import{$ as T,$a as M,A,Aa as P,B as N,Ba as E,C as B,Ca as I,D as F,Da as D,E as $,Ea as R,F as U,Fa as O,G as V,Ga as L,H,Ha as q,I as z,Ia as W,J as G,Ja as X,K as J,Ka as Q,L as Y,La as K,M as Z,Ma as tt,N as it,Na as d,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 dt,Ta as ft,U as vt,Ua as pt,V as mt,Va as gt,W as yt,Wa as bt,X as kt,Xa as wt,Y as _t,Ya as xt,Z as Ct,Za as St,_ as jt,_a as Tt,a as Mt,aa as At,ab as Pt,b as Nt,ba as Et,bb as Bt,c as f,ca as It,cb as Ft,d as Dt,da as $t,db as Rt,e as Ut,ea as Ot,eb as Vt,f as Lt,fa as Ht,fb as qt,g as zt,ga as Wt,gb as Gt,h as Xt,ha as Jt,i as Qt,ia as Yt,j as Kt,ja as Zt,k as ti,ka as ii,l as si,la as ei,m as ni,ma as ri,n as hi,na as oi,o as ai,oa as ui,p as ci,pa as li,q as di,qa as fi,r as vi,ra as pi,s as mi,sa as gi,t as yi,ta as bi,u as ki,ua as wi,v as _i,va as xi,w as Ci,wa as Si,x as ji,xa as Ti,y as Mi,ya as Ai,z as Pi,za as Ni}from"./THEOplayer.common.esm.js";f(),f(),f(),f();var Ei=[];function Bi(t){Ei.push(t)}var Ii=[];function Fi(t){Ii.push(t)}f(),f(),f(),f();var b=void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Di=void 0!==h?h:{createElement:function(){}};function $i(t,i){return i||(i=t.slice(0)),t.raw=i,t}var Ri=1;function Ui(){return Ri++}var Oi,Vi=w.prototype.toString,Li=function(t){return zi(t)?w.keys(t):[]};function Hi(t,i){Li(t).forEach((function(s){return i(t[s],s)}))}function qi(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),e=1;e<i;e++)s[e-1]=arguments[e];return w.assign?w.assign.apply(w,[t].concat(s)):(s.forEach((function(i){i&&Hi(i,(function(i,s){t[s]=i}))})),t)}function zi(t){return!!t&&"object"==typeof t}function Wi(t){return zi(t)&&"[object Object]"===Vi.call(t)&&t.constructor===w}var Gi=function(t,i,s){void 0===s&&(s=!!Ws&&Ws<11),"log"!==t&&i.unshift(t.toUpperCase()+":"),Oi.history.push(i),i.unshift("VIDEOJS:");var e=b.console&&b.console[t];e&&(s&&(i=i.map((function(t){if(zi(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(i){return String(t)}return String(t)})).join(" ")),e.apply?e[Array.isArray(i)?"apply":"call"](b.console,i):e(i))};(Oi=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];Gi("log",i)}).history=[],Oi.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Gi("error",i)},Oi.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Gi("warn",i)};var Xi=Oi,Ji="undefined"!=typeof globalThis?globalThis:void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Qi(t){return t.replace(/\n\r?\s*/g,"")}var Yi,Ki=function(t){for(var i="",s=0;s<arguments.length;s++)i+=Qi(t[s])+(arguments[s+1]||"");return i};function Zi(t){return"string"==typeof t&&/\S/.test(t)}function ts(t){if(/\s/.test(t))throw new m("class has illegal whitespace characters")}function is(){return Di===b.document&&void 0!==Di.createElement}function ss(t){return zi(t)&&1===t.nodeType}function es(t){return function(i,s){if(!Zi(i))return Di[t](null);Zi(s)&&(s=Di.querySelector(s));var e=ss(s)?s:Di;return e[t]&&e[t](i)}}function ns(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=Di.createElement(t);return w.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Xi.warn(Ki(Yi||(Yi=$i(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."])),t,s)),n.setAttribute(t,s)):"textContent"===t?rs(n,s):n[t]=s})),w.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&Cs(n,e),n}function rs(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function hs(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var os={},as="vdata"+(new Date).getTime();function us(t){var i=t[as];return i||(i=t[as]=Ui()),os[i]||(os[i]={}),os[i]}function cs(t){var i=t[as];return!!i&&!!w.getOwnPropertyNames(os[i]).length}function ls(t){var i=t[as];if(i){delete os[i];try{delete t[as]}catch(i){t.removeAttribute?t.removeAttribute(as):t[as]=null}}}function ds(t,i){return ts(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function fs(t,i){return t.classList?t.classList.add(i):ds(t,i)||(t.className=(t.className+" "+i).trim()),t}function vs(t,i){return t.classList?t.classList.remove(i):(ts(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function ps(t,i,s){var e=ds(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?fs(t,i):vs(t,i),t}function ms(t,i){w.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function gs(t){var i={};if(t&&t.attributes&&t.attributes.length>0)for(var s=t.attributes,e=s.length-1;e>=0;e--){var n=s[e].name,r=s[e].value;"boolean"!=typeof t[n]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+",")||(r=null!==r),i[n]=r}return i}function ys(t,i,s){t.setAttribute(i,s)}function bs(t,i){t.removeAttribute(i)}function ks(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=Di.documentElement,e=Di.body,n=s.clientLeft||e.clientLeft||0,r=b.pageXOffset||e.scrollLeft,h=i.left+r-n,o=s.clientTop||e.clientTop||0,a=b.pageYOffset||e.scrollTop,u=i.top+a-o;return{left:_.round(h),top:_.round(u)}}function ws(t,i){var s={},e=ks(t),n=t.offsetWidth,r=t.offsetHeight,h=e.top,o=e.left,a=i.pageY,u=i.pageX;return i.changedTouches&&(u=i.changedTouches[0].pageX,a=i.changedTouches[0].pageY),s.y=_.max(0,_.min(1,(h-a+r)/r)),s.x=_.max(0,_.min(1,(u-o)/n)),s}function _s(t){return zi(t)&&3===t.nodeType}function xs(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Cs(t,i){return function(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),ss(t)||_s(t)?t:"string"==typeof t&&/\S/.test(t)?Di.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function Ss(t,i){return Cs(xs(t),i)}var js,Ts=es("querySelector"),Ms=es("querySelectorAll"),As=b.navigator&&b.navigator.userAgent||"",Ps=/AppleWebKit\/([\d.]+)/i.exec(As),Ns=Ps?C(Ps.pop()):null,Es=/iPad/i.test(As),Bs=/iPhone/i.test(As)&&!Es,Is=/iPod/i.test(As),Fs=Bs||Es||Is,Ds=(js=As.match(/OS (\d+)_/i))&&js[1]?js[1]:null,$s=/Android/i.test(As),Rs=function(){var t=As.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&C(t[1]),s=t[2]&&C(t[2]);return i&&s?C(t[1]+"."+t[2]):i||null}(),Us=$s&&/webkit/i.test(As)&&Rs<2.3,Os=$s&&Rs<5&&Ns<537,Vs=/Firefox/i.test(As),Ls=/Edge/i.test(As),Hs=!Ls&&/Chrome/i.test(As),qs=function(){var t=As.match(/Chrome\/(\d+)/);return t&&t[1]?C(t[1]):null}(),zs=/MSIE\s8\.0/.test(As),Ws=function(){var t=/MSIE\s(\d+)\.\d/.exec(As),i=t&&C(t[1]);return!i&&/Trident\/7.0/i.test(As)&&/rv:11.0/.test(As)&&(i=11),i}(),Gs=/Safari/i.test(As)&&!Hs&&!$s&&!Ls,Xs=Gs||Fs,Js=is()&&("ontouchstart"in b||b.DocumentTouch&&b.document instanceof b.DocumentTouch),Qs=is()&&"backgroundSize"in b.document.createElement("video").style,Ys=w.freeze({__proto__:null,IS_IPAD:Es,IS_IPHONE:Bs,IS_IPOD:Is,IS_IOS:Fs,IOS_VERSION:Ds,IS_ANDROID:$s,ANDROID_VERSION:Rs,IS_OLD_ANDROID:Us,IS_NATIVE_ANDROID:Os,IS_FIREFOX:Vs,IS_EDGE:Ls,IS_CHROME:Hs,CHROME_VERSION:qs,IS_IE8:zs,IE_VERSION:Ws,IS_SAFARI:Gs,IS_ANY_SAFARI:Xs,TOUCH_ENABLED:Js,BACKGROUND_SIZE_SUPPORTED:Qs});function Ks(t,i){var s=us(t);0===s.handlers[i].length&&(delete s.handlers[i],t.removeEventListener?t.removeEventListener(i,s.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+i,s.dispatcher)),w.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===w.getOwnPropertyNames(s).length&&ls(t)}function Zs(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function te(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||b.event;for(var n in t={},e)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&"path"!==n&&("returnValue"===n&&e.preventDefault||(t[n]=e[n]));if(t.target||(t.target=t.srcElement||Di),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){e.preventDefault&&e.preventDefault(),t.returnValue=!1,e.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){e.stopPropagation&&e.stopPropagation(),t.cancelBubble=!0,e.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=s,t.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=s,null!==t.clientX&&void 0!==t.clientX){var r=Di.documentElement,h=Di.body;t.pageX=t.clientX+(r&&r.scrollLeft||h&&h.scrollLeft||0)-(r&&r.clientLeft||h&&h.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||h&&h.scrollTop||0)-(r&&r.clientTop||h&&h.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var ie=!1;!function(){try{var t=w.defineProperty({},"passive",{get:function(){ie=!0}});b.addEventListener("test",null,t)}catch(t){}}();var se=["touchstart","touchmove"];function ee(t,i,s){if(Array.isArray(i))return Zs(ee,t,i,s);var e=us(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=Ui()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=te(i);var n=e.handlers[i.type];if(n)for(var r=n.slice(0),h=0,o=r.length;h<o&&!i.isImmediatePropagationStopped();h++)try{r[h].call(t,i,s)}catch(t){Xi.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;ie&&se.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function ne(t,i,s){if(cs(t)){var e=us(t);if(e.handlers){if(Array.isArray(i))return Zs(ne,t,i,s);var n=function(i){e.handlers[i]=[],Ks(t,i)};if(i){var r=e.handlers[i];if(r)if(s){if(s.guid)for(var h=0;h<r.length;h++)r[h].guid===s.guid&&r.splice(h--,1);Ks(t,i)}else n(i)}else for(var o in e.handlers)n(o)}}}function re(t,i,s){var e=cs(t)?us(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=te(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)re.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=us(i.target);i.target[i.type]&&(r.disabled=!0,"function"==typeof i.target[i.type]&&i.target[i.type](),r.disabled=!1)}return!i.defaultPrevented}function he(t,i,s){if(Array.isArray(i))return Zs(he,t,i,s);var e=function e(){ne(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||Ui(),ee(t,i,e)}var oe,ae=!1,ue=function(){if(is()){var t=Di.getElementsByTagName("video"),i=Di.getElementsByTagName("audio"),s=[];if(t&&t.length>0)for(var e=0,n=t.length;e<n;e++)s.push(t[e]);if(i&&i.length>0)for(var r=0,h=i.length;r<h;r++)s.push(i[r]);if(s&&s.length>0)for(var o=0,a=s.length;o<a;o++){var u=s[o];if(!u||!u.getAttribute){ce(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&oe(u)}else ae||ce(1)}};function ce(t,i){i&&(oe=i),b.setTimeout(ue,t)}is()&&"complete"===Di.readyState?ae=!0:he(b,"load",(function(){ae=!0}));var le=function(t){var i=Di.createElement("style");return i.className=t,i},de=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},n=function(t,i,s){i.guid||(i.guid=Ui());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function fe(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function ve(){for(var t={},i=arguments.length,s=new Array(i),e=0;e<i;e++)s[e]=arguments[e];return s.forEach((function(i){i&&Hi(i,(function(i,s){Wi(i)?(Wi(t[s])||(t[s]={}),t[s]=ve(t[s],i)):t[s]=i}))})),t}var pe=function(){function t(t,i,s){if(!t&&this.play?this.t=t=this:this.t=t,this.h=ve({},this.h),i=this.h=ve(this.h,i),this.o=i.id||i.el&&i.el.id,!this.o){var e=t&&t.id&&t.id()||"no_player";this.o=e+"u"+Ui()}this.l=i.name||null,i.el?this.v=i.el:!1!==i.createEl&&(this.v=this.createEl()),this.m=[],this.k={},this.C={},!1!==i.initChildren&&this.initChildren(),this.ready(s),!1!==i.reportTouchActivity&&this.enableTouchActivity()}var i=t.prototype;return i.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.m)for(var t=this.m.length-1;t>=0;t--)this.m[t].dispose&&this.m[t].dispose();this.m=null,this.k=null,this.C=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),ls(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return Xi.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=ve(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,s){return ns(t,i,s)},i.localize=function(t){var i=this.t.language&&this.t.language(),s=this.t.languages&&this.t.languages();if(!i||!s)return t;var e=s[i];if(e&&e[t])return e[t];var n=s[i.split("-")[0]];return n&&n[t]?n[t]:t},i.contentEl=function(){return this.S||this.v},i.id=function(){return this.o},i.name=function(){return this.l},i.children=function(){return this.m},i.getChildById=function(t){return this.k[t]},i.getChild=function(t){if(t)return t=fe(t),this.C[t]},i.addChild=function(i,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.m.length),"string"==typeof i){r=fe(i),s||(s={}),!0===s&&(Xi.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),s={});var h=s.componentClass||r;s.name=r;var o=t.getComponent(h);if(!o)throw new m("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.t||this,s)}else n=i;if(this.m.splice(e,0,n),"function"==typeof n.id&&(this.k[n.id()]=n),(r=r||n.name&&fe(n.name()))&&(this.C[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.m){for(var i=!1,s=this.m.length-1;s>=0;s--)if(this.m[s]===t){i=!0,this.m.splice(s,1);break}if(i){this.k[t.id()]=null,this.C[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,s=this.h.children;if(s){var e,n=this.h,r=t.getComponent("Tech");(e=Array.isArray(s)?s:w.keys(s)).concat(w.keys(this.h).filter((function(t){return!e.some((function(i){return"string"==typeof i?t===i:t===i.name}))}))).map((function(t){var e,n;return"string"==typeof t?n=s[e=t]||i.h[e]||{}:(e=t.name,n=t),{name:e,opts:n}})).filter((function(i){var s=t.getComponent(i.opts.componentClass||fe(i.name));return s&&!r.isTech(s)})).forEach((function(t){var s=t.name,e=t.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=i.h.playerOptions;var r=i.addChild(s,e);r&&(i[s]=r)}}))}},i.buildCSSClass=function(){return""},i.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))ee(this.v,t,n(this,i));else{var r=t,h=i,o=n(this,s),a=function(){return e.off(r,h,o)};a.guid=o.guid,this.on("dispose",a);var u=function(){return e.off("dispose",a)};u.guid=o.guid,t.nodeName?(ee(r,h,o),ee(r,"dispose",u)):"function"==typeof t.on&&(r.on(h,o),r.on("dispose",u))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))ne(this.v,t,i);else{var e=t,r=i,h=n(this,s);this.off("dispose",h),t.nodeName?(ne(e,r,h),ne(e,"dispose",h)):(e.off(r,h),e.off("dispose",h))}return this},i.one=function(t,i,s){var e=arguments,r=this;if("string"==typeof t||Array.isArray(t))he(this.v,t,n(this,i));else{var h=t,o=i,a=n(this,s),u=function t(){r.off(h,o,t),a.apply(null,e)};u.guid=a.guid,this.on(h,o,u)}return this},i.trigger=function(t,i){return re(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.j?i?t.call(this):this.setTimeout(t,1):(this.T=this.T||[],this.T.push(t))),this},i.triggerReady=function(){this.j=!0,this.setTimeout((function(){var t=this.T;this.T=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},i.$=function(t,i){return Ts(t,i||this.contentEl())},i.$$=function(t,i){return Ms(t,i||this.contentEl())},i.hasClass=function(t){return ds(this.v,t)},i.addClass=function(t){return fs(this.v,t),this},i.removeClass=function(t){return vs(this.v,t),this},i.toggleClass=function(t,i){return ps(this.v,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},i.setAttribute=function(t,i){return ys(this.v,t,i),this},i.removeAttribute=function(t){return bs(this.v,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.v.style[t]=i:this.v.style[t]="auto"===i?"":i+"px",s||this.trigger("resize"),this;if(!this.v)return 0;var e=this.v.style[t],n=e.indexOf("px");return x(-1!==n?e.slice(0,n):this.v["offset"+fe(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new m("currentDimension only accepts width or height value");if("function"==typeof b.getComputedStyle){var s=b.getComputedStyle(this.v);i=s.getPropertyValue(t)||s[t]}if(0===(i=C(i))){var e="offset"+fe(t);i=this.v[e]}return i},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.v.focus()},i.blur=function(){this.v.blur()},i.emitTapEvents=function(){var t,i=0,s=null;this.on("touchstart",(function(e){1===e.touches.length&&(s={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},i=(new Date).getTime(),t=!0)})),this.on("touchmove",(function(i){if(i.touches.length>1)t=!1;else if(s){var e=i.touches[0].pageX-s.pageX,n=i.touches[0].pageY-s.pageY;_.sqrt(e*e+n*n)>10&&(t=!1)}}));var e=function(){t=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",(function(e){(s=null,!0===t)&&((new Date).getTime()-i<200&&(e.preventDefault(),this.trigger("tap")))}))},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=n(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){i(),this.clearInterval(t),t=this.setInterval(i,250)}));var s=function(s){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",s),this.on("touchcancel",s)}},i.setTimeout=function(t,i){t=n(this,t);var s=b.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){b.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=n(this,t);var s=b.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){b.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,s){if(i){if(i=fe(i),t.M||(t.M={}),"Player"===i&&t.M[i]){var e=t.M[i];if(e.players&&w.keys(e.players).length>0&&w.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new m("Can not register Player component after player has been created")}return t.M[i]=s,s}},t.getComponent=function(i){if(i)return i=fe(i),t.M&&t.M[i]?t.M[i]:b&&b.videojs&&b.videojs[i]?(Xi.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),b.videojs[i]):void 0},t.extend=function(i){i=i||{},Xi.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=i.init||i.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=w.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();pe.registerComponent("Component",pe);var me=function(){};function ge(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ye(t,i){return(ye=w.setPrototypeOf?w.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function be(t,i){t.prototype=w.create(i.prototype),t.prototype.constructor=t,ye(t,i)}function ke(t,i,s,e){return void 0===e&&(Xi.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new m("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 we(t){return void 0===t||0===t.length?{length:0,start:function(){throw new m("This TimeRanges object is empty")},end:function(){throw new m("This TimeRanges object is empty")}}:{length:t.length,start:ke.bind(null,"start",0,t),end:ke.bind(null,"end",1,t)}}function _e(t,i){return Array.isArray(t)?we(t):void 0===t||void 0===i?we():we([[t,i]])}function xe(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=_e(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}me.prototype.A={},me.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},ee(this,t,i),this.addEventListener=s},me.prototype.addEventListener=me.prototype.on,me.prototype.off=function(t,i){ne(this,t,i)},me.prototype.removeEventListener=me.prototype.off,me.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},he(this,t,i),this.addEventListener=s},me.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=te(t),this.A[i]&&this["on"+i]&&this["on"+i](t),re(this,t)},me.prototype.dispatchEvent=me.prototype.trigger;var Ce,Se,je,Te,Me={prefixed:!0},Ae=[["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"]],Pe=Ae[0];for(Se=0;Se<Ae.length;Se++)if(Ae[Se][1]in Di){Ce=Ae[Se];break}if(Ce){for(je=0;je<Ce.length;je++)Me[Pe[je]]=Ce[je];Me.prefixed=Ce[0]!==Pe[0]}function Ne(t){if(t instanceof Ne)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:zi(t)&&("number"==typeof t.code&&(this.code=t.code),qi(this,t)),this.message||(this.message=Ne.defaultMessages[this.code]||"")}for(Ne.prototype.code=0,Ne.prototype.message="",Ne.prototype.status=null,Ne.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Ne.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."},Te=0;Te<Ne.errorTypes.length;Te++)Ne[Ne.errorTypes[Te]]=Te,Ne.prototype[Ne.errorTypes[Te]]=Te;var Ee=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var Be=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(i,s,e){return t[s]&&(i[s]=t[s]),i}),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},Ie=function(t){var i=t.$$("track"),s=Array.prototype.map.call(i,(function(t){return t.track}));return Array.prototype.map.call(i,(function(t){var i=Be(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(Be))},Fe=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()},De="vjs-modal-dialog",$e=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).P=e.N=e.B=!1,e.closeable(!e.h.uncloseable),e.content(e.h.content),e.S=ns("div",{className:De+"-content"},{role:"document"}),e.I=ns("p",{className:De+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),rs(e.I,e.description()),e.v.appendChild(e.I),e.v.appendChild(e.S),e.on(i,"languagechange",e.handleLanguagechange),e}be(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 De+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},s.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},s.label=function(){return this.h.label||this.localize("Modal Window")},s.description=function(){var t=this.h.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},s.open=function(){if(!this.P){var t=this.player();this.trigger("beforemodalopen"),this.P=!0,(this.h.fillAlways||!this.N&&!this.B)&&this.fill(),this.D=!t.paused(),this.h.pauseOnOpen&&this.D&&t.pause(),this.closeable()&&this.on(this.v.ownerDocument,"keydown",n(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.N=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.P},s.close=function(){if(this.P){var t=this.player();this.trigger("beforemodalclose"),this.P=!1,this.D&&this.h.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.v.ownerDocument,"keydown",n(this,this.handleKeyPress)),t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.h.temporary&&this.dispose()}return this},s.closeable=function(t){if("boolean"==typeof t){var i=this.R=!!t,s=this.getChild("closeButton");if(i&&!s){var e=this.S;this.S=this.v,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.S=e,this.on(s,"close",this.close)}!i&&s&&(this.off(s,"close",this.close),this.removeChild(s),s.dispose())}return this.R},s.fill=function(){return this.fillWith(this.content())},s.fillWith=function(t){var i=this.contentEl(),s=i.parentNode,e=i.nextSibling;return this.trigger("beforemodalfill"),this.B=!0,s.removeChild(i),this.empty(),Ss(i,t),this.trigger("modalfill"),e?s.insertBefore(i,e):s.appendChild(i),this},s.empty=function(){return this.trigger("beforemodalempty"),xs(this.contentEl()),this.trigger("modalempty"),this},s.content=function(t){return void 0!==t&&(this.U=t),this.U},s.handleLanguagechange=function(){this.v.setAttribute("aria-label",this.label()),rs(this.I,this.description()),this.opened()?this.fill():(this.N||this.B)&&(this.N=!1,this.B=!1,this.empty())},i}(pe);$e.prototype.h={pauseOnOpen:!0,temporary:!0},pe.registerComponent("ModalDialog",$e);var Re=function(){function t(i){var s=this;if(zs)for(var e in s=Di.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.O.call(s,i),w.defineProperty(s,"length",{get:function(){return this.V}}),zs)return s}var i=t.prototype;return i.O=function(t){var i=this.length||0,s=0,e=t.length;this.L=t,this.V=t.length;var n=function(t){""+t in this||w.defineProperty(this,""+t,{get:function(){return this.L[t]}})};if(i<e)for(s=i;s<e;s++)n.call(this,s)},i.getCueById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},t}(),Ue={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Oe={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Ve={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Le={disabled:"disabled",hidden:"hidden",showing:"showing"},He=function(t){function i(s){var e;void 0===s&&(s={});var n=ge(e=t.call(this)||this);if(zs)for(var r in n=Di.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",Ui()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){w.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||ge(e)}return be(i,t),i}(me),qe=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=Di.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=Di.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),Di.body.appendChild(e));for(var r={},h=0;h<i.length;h++)r[i[h]]=s[i[h]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),n&&Di.body.removeChild(e),r},ze=function(t){var i=b.location,s=qe(t);return(":"===s.protocol?i.protocol:s.protocol)+s.host!==i.protocol+i.host},We={exports:{}};void 0!==s?We.exports=s:void 0!==Ji?We.exports=Ji:"undefined"!=typeof self?We.exports=self:We.exports={};var Ge=function(t){var i=Xe.call(t);return"[object Function]"===i||"function"==typeof t&&"[object RegExp]"!==i||void 0!==s&&(t===s.setTimeout||t===s.alert||t===s.confirm||t===s.prompt)},Xe=w.prototype.toString;var Je,Qe,Ye,Ke,Ze,tn,sn,en,nn,rn,hn,on,an=Array.prototype.slice,un=w.prototype.toString,cn=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==un.call(i))throw new g("Function.prototype.bind called on incompatible "+i);for(var s,e=an.call(arguments,1),n=_.max(0,i.length-e.length),r=[],h=0;h<n;h++)r.push("$"+h);if(s=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var n=i.apply(this,e.concat(an.call(arguments)));return w(n)===n?n:this}return i.apply(t,e.concat(an.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},ln=Function.prototype.bind||cn,dn=w.prototype.toString,fn=function(t){var i=dn.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]"===dn.call(t.callee)),s};w.keys||(Qe=w.prototype.hasOwnProperty,Ye=w.prototype.toString,Ke=fn,Ze=w.prototype.propertyIsEnumerable,tn=!Ze.call({toString:null},"toString"),sn=Ze.call((function(){}),"prototype"),en=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],nn=function(t){var i=t.constructor;return i&&i.prototype===t},rn={$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},hn=function(){if(void 0===s)return!1;for(var t in s)try{if(!rn["$"+t]&&Qe.call(s,t)&&null!==s[t]&&"object"==typeof s[t])try{nn(s[t])}catch(t){return!0}}catch(t){return!0}return!1}(),on=function(t){if(void 0===s||!hn)return nn(t);try{return nn(t)}catch(t){return!1}},Je=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===Ye.call(t),e=Ke(t),n=i&&"[object String]"===Ye.call(t),r=[];if(!i&&!s&&!e)throw new g("Object.keys called on a non-object");var h=sn&&s;if(n&&t.length>0&&!Qe.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||!Qe.call(t,u)||r.push(String(u));if(tn)for(var c=on(t),l=0;l<en.length;++l)c&&"constructor"===en[l]||!Qe.call(t,en[l])||r.push(en[l]);return r});var vn=Je,pn=Array.prototype.slice,mn=fn,gn=w.keys,yn=gn?function(t){return gn(t)}:vn,bn=w.keys;yn.shim=function(){if(w.keys){var t=function(){var t=w.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(w.keys=function(t){return mn(t)?bn(pn.call(t)):bn(t)})}else w.keys=yn;return w.keys||yn};var kn=yn,wn="function"==typeof Mt&&"symbol"==typeof Mt("foo"),_n=w.prototype.toString,xn=Array.prototype.concat,Cn=w.defineProperty,Sn=Cn&&function(){var t={};try{for(var i in Cn(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),jn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===_n.call(t)}(e)&&e())&&(Sn?Cn(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},Tn=function(t,i){var s=arguments.length>2?arguments[2]:{},e=kn(i);wn&&(e=xn.call(e,w.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)jn(t,e[n],i[e[n]],s[e[n]])};Tn.supportsDescriptors=!!Sn;var Mn,An=Tn,Pn=w.getOwnPropertyDescriptor?function(){return w.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new g},Nn="function"==typeof Mt&&"symbol"==typeof Nt,En=w.getPrototypeOf||function(t){return t.__proto__},Bn=void 0===j?Mn:En(j),In={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?Mn:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?Mn:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Nn?En([][Nt]()):Mn,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":Mn,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":Mn,"$ %AsyncGenerator%":Mn,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":Mn,"$ %AsyncIteratorPrototype%":Mn,"$ %Atomics%":"undefined"==typeof Atomics?Mn:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?Mn:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?Mn:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":m,"$ %ErrorPrototype%":m.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?Mn:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?Mn:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?Mn:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?Mn:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":Mn,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":Mn,"$ %Int8Array%":"undefined"==typeof Int8Array?Mn:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?Mn:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?Mn:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?Mn:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?Mn:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?Mn:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":S,"$ %IteratorPrototype%":Nn?En(En([][Nt]())):Mn,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?Mn:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Nn?En((new Map)[Nt]()):Mn,"$ %MapPrototype%":"undefined"==typeof Map?Mn:Map.prototype,"$ %Math%":_,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":w,"$ %ObjectPrototype%":w.prototype,"$ %ObjProto_toString%":w.prototype.toString,"$ %ObjProto_valueOf%":w.prototype.valueOf,"$ %parseFloat%":C,"$ %parseInt%":x,"$ %Promise%":"undefined"==typeof Promise?Mn:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?Mn:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?Mn:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?Mn:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?Mn:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?Mn:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?Mn:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?Mn:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?Mn:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Nn?En((new Set)[Nt]()):Mn,"$ %SetPrototype%":"undefined"==typeof Set?Mn:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Mn:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?Mn:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Nn?En(""[Nt]()):Mn,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Nn?Mt:Mn,"$ %SymbolPrototype%":Nn?Mt.prototype:Mn,"$ %SyntaxError%":k,"$ %SyntaxErrorPrototype%":k.prototype,"$ %ThrowTypeError%":Pn,"$ %TypedArray%":Bn,"$ %TypedArrayPrototype%":Bn?Bn.prototype:Mn,"$ %TypeError%":g,"$ %TypeErrorPrototype%":g.prototype,"$ %Uint8Array%":void 0===j?Mn:j,"$ %Uint8ArrayPrototype%":void 0===j?Mn:j.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Mn:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?Mn:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?Mn:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?Mn:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?Mn:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?Mn:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?Mn:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?Mn:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?Mn:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?Mn:WeakSet.prototype},Fn=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new g('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in In))throw new k("intrinsic "+t+" does not exist!");if(void 0===In[s]&&!i)throw new g("intrinsic "+t+" exists, but is not available. Please file an issue!");return In[s]},Dn=ln.call(Function.call,w.prototype.hasOwnProperty),$n=Fn,Rn=$n("%TypeError%"),Un=$n("%SyntaxError%"),On=Dn,Vn={"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(On(i,e)&&!s[e])return!1;var n=On(i,"[[Value]]"),r=On(i,"[[Get]]")||On(i,"[[Set]]");if(n&&r)throw new Rn("Property Descriptors may not be both accessor and data descriptors");return!0}},Ln=Number.isNaN||function(t){return t!=t},Hn=Number.isNaN||function(t){return t!=t},qn=Number.isFinite||function(t){return"number"==typeof t&&!Hn(t)&&t!==1/0&&t!==-1/0},zn=Function.prototype.toString,Wn=/^\s*class\b/,Gn=function(t){try{var i=zn.call(t);return Wn.test(i)}catch(t){return!1}},Xn=w.prototype.toString,Jn="function"==typeof Mt&&"symbol"==typeof Mt.toStringTag,Qn=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(Jn)return function(t){try{return!Gn(t)&&(zn.call(t),!0)}catch(t){return!1}}(t);if(Gn(t))return!1;var i=Xn.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},Yn=w.prototype.toString,Kn=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},Zn=Qn,tr=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===Yn.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(Zn(t[n[e]])&&(s=t[n[e]](),Kn(s)))return s;throw new g("No default value")}throw new g("invalid [[DefaultValue]] hint supplied")},ir=Fn,sr=ir("%Object%"),er=ir("%TypeError%"),nr=ir("%String%"),rr=function(t,i,s,e){var n=Vn[i];if("function"!=typeof n)throw new Un("unknown record type: "+i);if(!n(t,e))throw new Rn(s+" must be a "+i);console.log(n(t,e),e)},hr=Ln,or=qn,ar=function(t){return t>=0?1:-1},ur=function(t,i){var s=t%i;return _.floor(s>=0?s:s+i)},cr=Dn,lr={ToPrimitive:function(t){return Kn(t)?t:arguments.length>1?tr(t,arguments[1]):tr(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return hr(i)?0:0!==i&&or(i)?ar(i)*_.floor(_.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(hr(i)||0===i||!or(i))return 0;var s=ar(i)*_.floor(_.abs(i));return ur(s,65536)},ToString:function(t){return nr(t)},ToObject:function(t){return this.CheckObjectCoercible(t),sr(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new er(i||"Cannot call method on "+t);return t},IsCallable:Qn,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:hr(t)&&hr(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 er("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(rr(this,"Property Descriptor","Desc",t),!(!cr(t,"[[Get]]")&&!cr(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(rr(this,"Property Descriptor","Desc",t),!(!cr(t,"[[Value]]")&&!cr(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(rr(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(rr(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 er("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new er("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 g("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 er("setter must be a function");i["[[Set]]"]=e}if((cr(i,"[[Get]]")||cr(i,"[[Set]]"))&&(cr(i,"[[Value]]")||cr(i,"[[Writable]]")))throw new er("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},dr=ln.call(Function.call,String.prototype.replace),fr=/^[\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]+/,vr=/[\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]+$/,pr=function(){var t=lr.ToString(lr.CheckObjectCoercible(this));return dr(dr(t,fr,""),vr,"")},mr=pr,gr=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:mr},yr=An,br=gr,kr=An,wr=pr,_r=gr,xr=function(){var t=br();return yr(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},Cr=ln.call(Function.call,_r());kr(Cr,{getPolyfill:_r,implementation:wr,shim:xr});var Sr=Cr,jr=Qn,Tr=w.prototype.toString,Mr=w.prototype.hasOwnProperty,Ar=Sr,Pr=function(t,i,s){if(!jr(i))throw new g("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===Tr.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)Mr.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)Mr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Nr=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)Er.call(s,e)&&(t[e]=s[e])}return t},Er=w.prototype.hasOwnProperty;var Br=We.exports,Ir=Ge,Fr=function(t){if(!t)return{};var i={};return Pr(Ar(t).split("\n"),(function(t){var s=t.indexOf(":"),e=Ar(t.slice(0,s)).toLowerCase(),n=Ar(t.slice(s+1));void 0===i[e]?i[e]=n:!function(t){return"[object Array]"===w.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},Dr=Nr,$r=Ur;function Rr(t,i,s){var e=t;return Ir(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=Dr(i,{uri:t}),e.callback=s,e}function Ur(t,i,s){return Or(i=Rr(t,i,s))}function Or(t){if(void 0===t.callback)throw new m("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:v,url:f,rawRequest:l};function r(t){return c(d),t instanceof m||(t=new m(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;c(d),i=t.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var r=n,h=null;return 0!==i?(r={body:e(),statusCode:i,method:v,headers:{},url:f,rawRequest:l},l.getAllResponseHeaders&&(r.headers=Fr(l.getAllResponseHeaders()))):h=new m("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,l=t.xhr||null;l||(l=t.cors||t.useXDR?new Ur.XDomainRequest:new Ur.XMLHttpRequest);var d,f=l.url=t.uri||t.url,v=l.method=t.method||"GET",p=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"!==v&&"HEAD"!==v&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),p=JSON.stringify(t.json))),l.onreadystatechange=function(){4===l.readyState&&h()},l.onload=h,l.onerror=r,l.onprogress=function(){},l.ontimeout=r,l.open(v,f,!y,t.username,t.password),y||(l.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(d=u((function(){a=!0,l.abort("timeout");var t=new m("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 m("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(l.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(l),l.send(p),l}Ur.XMLHttpRequest=Br.XMLHttpRequest||function(){},Ur.XDomainRequest="withCredentials"in new Ur.XMLHttpRequest?Ur.XMLHttpRequest:Br.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){Ur["delete"===t?"del":t]=function(i,s,e){return(s=Rr(i,s,e)).method=t.toUpperCase(),Or(s)}}));var Vr=function(t,i){var s=new b.WebVTT.Parser(b,b.vttjs,b.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&&(b.console&&b.console.groupCollapsed&&b.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach((function(t){return Xi.error(t)})),b.console&&b.console.groupEnd&&b.console.groupEnd()),s.flush()},Lr=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new m("A tech was not provided.");var r=ve(s,{kind:Ve[s.kind]||"subtitles",language:s.language||s.srclang||""}),h=Le[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(h="hidden");var a=e=t.call(this,r)||this;if(a.H=r.tech,zs)for(var u in i.prototype)"constructor"!==u&&(a[u]=i.prototype[u]);a.L=[],a.q=[];var c=new Re(a.L),l=new Re(a.q),d=!1,f=n(a,(function(){this.activeCues,d&&(this.trigger("cuechange"),d=!1)}));return"disabled"!==h&&a.H.ready((function(){a.H.on("timeupdate",f)}),!0),w.defineProperty(a,"default",{get:function(){return o},set:function(){}}),w.defineProperty(a,"mode",{get:function(){return h},set:function(t){var i=this;Le[t]&&("showing"===(h=t)&&this.H.ready((function(){i.H.on("timeupdate",f)}),!0),this.trigger("modechange"))}}),w.defineProperty(a,"cues",{get:function(){return this.W?c:null},set:function(){}}),w.defineProperty(a,"activeCues",{get:function(){if(!this.W)return null;if(0===this.cues.length)return l;for(var t=this.H.currentTime(),i=[],s=0,e=this.cues.length;s<e;s++){var n=this.cues[s];(n.startTime<=t&&n.endTime>=t||n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t)&&i.push(n)}if(d=!1,i.length!==this.q.length)d=!0;else for(var r=0;r<i.length;r++)-1===this.q.indexOf(i[r])&&(d=!0);return this.q=i,l.O(this.q),l},set:function(){}}),r.src?(a.src=r.src,function(t,i){var s={uri:t},e=ze(t);e&&(s.cors=e),$r(s,n(this,(function(t,s,e){if(t)return Xi.error(t,s);if(i.W=!0,"function"!=typeof b.WebVTT){if(i.H){var n=function(){return Vr(e,i)};i.H.on("vttjsloaded",n),i.H.on("vttjserror",(function(){Xi.error("vttjs failed to load, stopping trying to process "+i.src),i.H.off("vttjsloaded",n)}))}}else Vr(e,i)})))}(r.src,a)):a.W=!0,a||ge(e)}be(i,t);var s=i.prototype;return s.addCue=function(t){var i=t;if(b.vttjs&&!(t instanceof b.vttjs.VTTCue)){for(var s in i=new b.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)s in i||(i[s]=t[s]);i.id=t.id,i.G=t}var e=this.H.textTracks();if(e)for(var n=0;n<e.length;n++)e[n]!==this&&e[n].removeCue(i);this.L.push(i),this.cues.O(this.L)},s.removeCue=function(t){for(var i=this.L.length;i--;){var s=this.L[i];if(s===t||s.G&&s.G===t){this.L.splice(i,1),this.cues.O(this.L);break}}},i}(He);Lr.prototype.A={cuechange:"cuechange"};var Hr=function(t){function i(s){var e,n;void 0===s&&(s={});var r=ge(e=t.call(this)||this);if(zs)for(var h in r=Di.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new Lr(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,w.defineProperty(r,"readyState",{get:function(){return n}}),w.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),zs?r||ge(e):e}return be(i,t),i}(me);Hr.prototype.A={load:"load"},Hr.NONE=0,Hr.LOADING=1,Hr.LOADED=2,Hr.ERROR=3;var qr,zr=function(){function t(i){void 0===i&&(i=[]);var s=this;if(zs)for(var e in s=Di.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.X=[],w.defineProperty(s,"length",{get:function(){return this.X.length}});for(var n=0,r=i.length;n<r;n++)s.J(i[n]);if(zs)return s}var i=t.prototype;return i.J=function(t){var i=this.X.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.X[i]}}),-1===this.X.indexOf(t)&&this.X.push(t)},i.Y=function(t){for(var i,s=0,e=this.X.length;s<e;s++)if(t===this.X[s].track){i=this.X[s];break}return i},i.K=function(t){for(var i=0,s=this.X.length;i<s;i++)if(t===this.X[i]){this.X.splice(i,1);break}},t}(),Wr=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=ge(n),zs))for(var r in e=Di.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.Z=[],w.defineProperty(e,"length",{get:function(){return this.Z.length}});for(var h=0;h<s.length;h++)e.tt(s[h]);return e||ge(n)}be(i,t);var s=i.prototype;return s.tt=function(t){var i=this.Z.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.Z[i]}}),-1===this.Z.indexOf(t)&&(this.Z.push(t),this.trigger({track:t,type:"addtrack"}))},s.it=function(t){for(var i,s=0,e=this.length;s<e;s++)if(this[s]===t){(i=this[s]).off&&i.off(),this.Z.splice(s,1);break}i&&this.trigger({track:i,type:"removetrack"})},s.getTrackById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},i}(me);for(qr in Wr.prototype.A={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Wr.prototype.A)Wr.prototype["on"+qr]=null;var Gr=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),zs){for(var r in n=Di.createElement("custom"),Wr.prototype)"constructor"!==r&&(n[r]=Wr.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||ge(e)}return be(i,t),i.prototype.tt=function(i){t.prototype.tt.call(this,i),i.addEventListener("modechange",n(this,(function(){this.trigger("change")})))},i}(Wr),Xr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},Jr=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].selected){Xr(s,s[r]);break}if(zs){for(var h in n=Di.createElement("custom"),Wr.prototype)"constructor"!==h&&(n[h]=Wr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,w.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||ge(e)}be(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.selected&&Xr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.st||(s.st=!0,Xr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(Wr),Qr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},Yr=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){Qr(s,s[r]);break}if(zs){for(var h in n=Di.createElement("custom"),Wr.prototype)"constructor"!==h&&(n[h]=Wr.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||ge(e)}be(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&Qr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.st||(s.st=!0,Qr(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}(Wr),Kr=void 0;var Zr=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 Gr,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}be(i,t);var s=i.prototype;return s.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},s.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},s.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(n(this,(function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()})),500)},s.onDurationChange=function(t){this.ct=this.duration()},s.buffered=function(){return _e(0,0)},s.bufferedPercent=function(){return xe(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 Ne(t),this.trigger("error")),this.lt},s.played=function(){return this.et?_e(0,0):_e()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=n(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",n(this,(function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)}))))},s.initTrackListeners=function(){var t=this;["video","audio"].forEach((function(i){var s=function(){t.trigger(i+"trackchange")},e=t[i+"Tracks"]();e.addEventListener("removetrack",s),e.addEventListener("addtrack",s),t.on("dispose",(function(){e.removeEventListener("removetrack",s),e.removeEventListener("addtrack",s)}))}))},s.dt=function(){var t=this;if(!b.WebVTT)if(Di.body.contains(this.el())){if(!this.h["vtt.js"]&&Wi(Kr)&&w.keys(Kr).length>0)return void this.trigger("vttjsloaded");var i=Di.createElement("script");i.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){i.onload=null,i.onerror=null})),b.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.dt)},s.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var s=this.remoteTextTracks(),e=function(t){return i.tt(t.track)},n=function(t){return i.it(t.track)};s.on("addtrack",e),s.on("removetrack",n),this.dt();var r=function(){return t.trigger("texttrackchange")},h=function(){r();for(var t=0;t<i.length;t++){var s=i[t];s.removeEventListener("cuechange",r),"showing"===s.mode&&s.addEventListener("cuechange",r)}};h(),i.addEventListener("change",h),i.addEventListener("addtrack",h),i.addEventListener("removetrack",h),this.on("dispose",(function(){s.off("addtrack",e),s.off("removetrack",n),i.removeEventListener("change",h),i.removeEventListener("addtrack",h),i.removeEventListener("removetrack",h);for(var t=0;t<i.length;t++){i[t].removeEventListener("cuechange",r)}}))}},s.videoTracks=function(){return this.rt=this.rt||new Jr,this.rt},s.audioTracks=function(){return this.ht=this.ht||new Yr,this.ht},s.textTracks=function(){return this.nt=this.nt||new Gr,this.nt},s.remoteTextTracks=function(){return this.ft=this.ft||new Gr,this.ft},s.remoteTextTrackEls=function(){return this.vt=this.vt||new zr,this.vt},s.addTextTrack=function(t,i,s){if(!t)throw new m("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 Lr(n);return r.tt(h),h}(this,t,i,s)},s.createRemoteTextTrack=function(t){var i=ve(t,{tech:this});return new Hr(i)},s.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(Xi.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().J(s),this.remoteTextTracks().tt(s.track),!0!==i&&this.ot.tt(s.track),s},s.removeRemoteTextTrack=function(t){var i=this.remoteTextTrackEls().Y(t);this.remoteTextTrackEls().K(i),this.remoteTextTracks().it(t),this.ot.it(t)},s.getVideoPlaybackQuality=function(){return{}},s.setPoster=function(){},s.playsinline=function(){},s.setPlaysinline=function(){},s.canPlayType=function(){return""},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,s){if(i.gt||(i.gt={}),!i.isTech(s))throw new m("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]:b&&b.videojs&&b.videojs[t]?(Xi.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),b.videojs[t]):void 0},i}(pe);Zr.prototype.nt,Zr.prototype.ht,Zr.prototype.rt,Zr.prototype.featuresVolumeControl=!0,Zr.prototype.featuresFullscreenResize=!1,Zr.prototype.featuresPlaybackRate=!1,Zr.prototype.featuresProgressEvents=!1,Zr.prototype.featuresTimeupdateEvents=!1,Zr.prototype.featuresNativeTextTracks=!1,Zr.withSourceHandlers=function(t){t.registerSourceHandler=function(i,s){var e=t.sourceHandlers;e||(e=t.sourceHandlers=[]),void 0===s&&(s=e.length),e.splice(s,0,i)},t.canPlayType=function(i){for(var s,e=t.sourceHandlers||[],n=0;n<e.length;n++)if(s=e[n].canPlayType(i))return s;return""},t.selectSourceHandler=function(i,s){for(var e=t.sourceHandlers||[],n=0;n<e.length;n++)if(e[n].canHandleSource(i,s))return e[n];return null},t.canPlaySource=function(i,s){var e=t.selectSourceHandler(i,s);return e?e.canHandleSource(i,s):""};["seekable","duration"].forEach((function(t){var i=this[t];"function"==typeof i&&(this[t]=function(){return this.yt&&this.yt[t]?this.yt[t].apply(this.yt,arguments):i.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(i){var s=t.selectSourceHandler(i,this.h);return s||(t.nativeSourceHandler?s=t.nativeSourceHandler:Xi.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),s!==t.nativeSourceHandler&&(this.bt=i,this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.one(this.v,"loadstart",t.prototype.kt)),this.yt=s.handleSource(i,this,this.h),this.on("dispose",this.disposeSourceHandler),this},t.prototype.kt=function(){this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.wt=function(){this.disposeSourceHandler(),this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.disposeSourceHandler=function(){this.bt&&(this.clearTracks(["audio","video"]),this.bt=null),this.cleanupAutoTextTracks(),this.yt&&(this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.yt.dispose&&this.yt.dispose(),this.yt=null)}},pe.registerComponent("Tech",Zr),pe.registerComponent("MediaTechController",Zr),Zr.registerTech("Tech",Zr);var th=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=fe(h[r]),a=Zr.getTech(o);if(o||(a=pe.getComponent(o)),a&&a.isSupported()){i._t(o);break}}return n}return be(i,t),i}(pe);pe.registerComponent("MediaLoader",th);var ih=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}be(i,t);var s=i.prototype;return s.createEl=function(i,s,e){void 0===i&&(i="div"),void 0===s&&(s={}),void 0===e&&(e={}),s=qi({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&Xi.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=qi({role:"button","aria-live":"polite"},e),this.xt=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.Ct=ns("span",{className:"vjs-control-text"}),t&&t.appendChild(this.Ct),this.controlText(this.St,t),this.Ct},s.controlText=function(t,i){if(void 0===i&&(i=this.el()),void 0===t)return this.St||"Need Text";var s=this.localize(t);return this.St=t,this.Ct.innerHTML=s,this.nonIconControl||i.setAttribute("title",s),this},s.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},s.enable=function(){return this.removeClass("vjs-disabled"),this.v.setAttribute("aria-disabled","false"),void 0!==this.xt&&this.v.setAttribute("tabIndex",this.xt),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this},s.disable=function(){return this.addClass("vjs-disabled"),this.v.setAttribute("aria-disabled","true"),void 0!==this.xt&&this.v.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this},s.handleLanguagechange=function(){this.controlText(this.St)},s.handleClick=function(t){},s.handleFocus=function(t){ee(Di,"keydown",n(this,this.handleKeyPress))},s.handleKeyPress=function(i){32===i.which||13===i.which?(i.preventDefault(),this.handleClick(i)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,i)},s.handleBlur=function(t){ne(Di,"keydown",n(this,this.handleKeyPress))},i}(pe);pe.registerComponent("ClickableComponent",ih);var sh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",n(ge(e),e.update)),e}be(i,t);var s=i.prototype;return s.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},s.createEl=function(){var t=ns("div",{className:"vjs-poster",tabIndex:-1});return Qs||(this.jt=ns("img"),t.appendChild(this.jt)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.jt)this.jt.src=t;else{var i="";t&&(i='url("'+t+'")'),this.v.style.backgroundImage=i}},s.handleClick=function(t){this.t.controls()&&(this.t.paused()?this.t.play():this.t.pause())},i}(ih);pe.registerComponent("PosterImage",sh);var eh="#222",nh={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 rh(t,i){return"rgba("+x(t[1]+t[1],16)+","+x(t[2]+t[2],16)+","+x(t[3]+t[3],16)+","+i+")"}function hh(t,i,s){try{t.style[i]=s}catch(t){return}}var oh=function(t){function i(i,s,e){var r;return r=t.call(this,i,s,e)||this,i.on("loadstart",n(ge(r),r.toggleDisplay)),i.on("texttrackchange",n(ge(r),r.updateDisplay)),i.ready(n(ge(r),(function(){if(i.H&&i.H.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",n(this,this.updateDisplay));for(var t=this.h.playerOptions.tracks||[],s=0;s<t.length;s++)this.t.addRemoteTextTrack(t[s],!0);var e,r,h={captions:1,subtitles:1},o=this.t.textTracks();if(o){for(var a=0;a<o.length;a++){var u=o[a];u.default&&("descriptions"!==u.kind||e?u.kind in h&&!r&&(r=u):e=u)}r?r.mode="showing":e&&(e.mode="showing")}}}))),r}be(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 b.WebVTT&&b.WebVTT.processCues(b,[],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 b.WebVTT&&t.activeCues){for(var i=this.t.textTrackSettings.getValues(),s=[],e=0;e<t.activeCues.length;e++)s.push(t.activeCues[e]);b.WebVTT.processCues(b,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&&hh(h.firstChild,"color",rh(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(h.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&hh(h.firstChild,"backgroundColor",rh(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?hh(h,"backgroundColor",rh(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 "+eh:"raised"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+eh:"depressed"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+eh:"uniform"===i.edgeStyle&&(h.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+eh)),i.fontPercent&&1!==i.fontPercent){var o=b.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=nh[i.fontFamily])}}}},i}(pe);pe.registerComponent("TextTrackDisplay",oh);var ah=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(pe);pe.registerComponent("LoadingSpinner",ah);var uh=function(t){function i(){return t.apply(this,arguments)||this}be(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=qi({className:this.buildCSSClass()},i),"button"!==t&&(Xi.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),i=qi({tabIndex:0},i),s=qi({role:"button"},s)),s=qi({type:"button","aria-live":"polite"},s);var e=pe.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 Xi.warn("Adding an actionable (user controllable) child to a Button ("+s+") is not supported; use a ClickableComponent instead."),pe.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}(ih);pe.registerComponent("Button",uh);var ch=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Tt=!1,e.on("mousedown",e.handleMouseDown),e}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this;if(this.Tt&&t.clientX&&t.clientY)this.t.play();else{var s=this.t.getChild("controlBar"),e=s&&s.getChild("playToggle");this.one(this.t,"play",(function(){e?e.focus():i.t.focus()})),this.t.play()}},s.handleKeyPress=function(i){this.Tt=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Tt=!0},i}(uh);ch.prototype.St="Play Video",pe.registerComponent("BigPlayButton",ch);var lh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}be(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}(uh);pe.registerComponent("CloseButton",lh);var dh=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}be(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}(uh);function fh(t,i){void 0===i&&(i=t),t=t<0?0:t;var s=_.floor(t%60),e=_.floor(t/60%60),n=_.floor(t/3600),r=_.floor(i/60%60),h=_.floor(i/3600);return(S(t)||t===1/0)&&(n=e=s="-"),(n=n>0||h>0?n+":":"")+(e=((n||r>=10)&&e<10?"0"+e:e)+":")+(s=s<10?"0"+s:s)}dh.prototype.St="Play",pe.registerComponent("PlayToggle",dh);var vh=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}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00'},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),s=this.localize("Current Time"),e=fh(i,this.t.duration());e!==this.Mt&&(this.Mt=e,this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(pe);pe.registerComponent("CurrentTimeDisplay",vh);var ph=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}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> 0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.duration();if(i&&this.ct!==i){this.ct=i;var s=this.localize("Duration Time"),e=fh(i);this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(pe);pe.registerComponent("DurationDisplay",ph);var mh=function(t){function i(){return t.apply(this,arguments)||this}return be(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}(pe);pe.registerComponent("TimeDivider",mh);var gh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"durationchange",e.updateContent),e.on(i,"languagechange",e.updateContent),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Remaining Time")+"</span> -0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){if(this.t.duration()){var i=this.localize("Remaining Time"),s=fh(this.t.remainingTime());s!==this.Mt&&(this.Mt=s,this.S.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(pe);pe.registerComponent("RemainingTimeDisplay",gh);var yh=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}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.S=ns("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.Ct=ns("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.At=Di.createTextNode(this.localize("LIVE")),this.S.appendChild(this.Ct),this.S.appendChild(this.At),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.Ct.innerHTML=this.localize("Stream Type"),this.At.innerHTML=this.localize("LIVE")},i}(pe);pe.registerComponent("LiveDisplay",yh);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}be(i,t);var s=i.prototype;return s.createEl=function(i,s,e){return void 0===s&&(s={}),void 0===e&&(e={}),s.className=s.className+" vjs-slider",s=qi({tabIndex:0},s),e=qi({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),t.prototype.createEl.call(this,i,s,e)},s.handleMouseDown=function(t){var i=this.bar.v.ownerDocument;t.preventDefault(),Di.body.focus(),Di.onselectstart=function(){return!1},this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove),this.on(i,"mouseup",this.handleMouseUp),this.on(i,"touchmove",this.handleMouseMove),this.on(i,"touchend",this.handleMouseUp),this.handleMouseMove(t)},s.handleMouseMove=function(t){},s.handleMouseUp=function(){var t=this.bar.v.ownerDocument;Di.onselectstart=function(){return!0},this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},s.update=function(){if(this.v){var t=this.getPercent(),i=this.bar;if(i){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var s=(100*t).toFixed(2)+"%";this.vertical()?i.el().style.height=s:i.el().style.width=s}}},s.calculateDistance=function(t){var i=ws(this.v,t);return this.vertical()?i.y:i.x},s.handleFocus=function(){this.on(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},s.handleBlur=function(){this.off(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},s.vertical=function(t){return void 0===t?this.Pt||!1:(this.Pt=!!t,this.Pt?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(pe);function kh(t,i){if(!t||!i)return"";if("function"==typeof b.getComputedStyle){var s=b.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}pe.registerComponent("Slider",bh);var wh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Nt=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}be(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=ns("span",{innerHTML:this.localize("Loaded")}),this.Bt=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Et),this.Ct.appendChild(this.Bt),i.appendChild(this.Ct),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.Nt,r=function(t,i){var s=t/i||0;return 100*(s>=1?1:s)+"%"};this.v.style.width=r(e,s);for(var h=0;h<i.length;h++){var o=i.start(h),a=i.end(h),u=n[h];u||(u=this.v.appendChild(ns()),n[h]=u),u.style.left=r(o,e),u.style.width=r(a-o,e)}for(var c=n.length;c>i.length;c--)this.v.removeChild(n[c-1]);n.length=i.length},s.handleLanguagechange=function(){this.Et.innerHTML=this.localize("Loaded")},i}(pe);pe.registerComponent("LoadProgressBar",wh);var _h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(ge(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}be(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.It=ns("span",{innerHTML:this.localize("Progress")}),this.Ft=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",fh(i,this.t.duration()))},s.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(pe);pe.registerComponent("PlayProgressBar",_h);var xh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(ge(e),e.updateDataAttr)),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar"});return this.tooltip=ns("div",{className:"vjs-time-tooltip"}),this.It=ns("span",{innerHTML:this.localize("Progress")}),this.Ft=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=fh(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.It.innerHTML=this.localize("Progress")},i}(pe);pe.registerComponent("TooltipProgressBar",xh);var Ch=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateProgress),e.on(i,"ended",e.updateProgress),i.ready(n(ge(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}be(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},s.updateProgress=function(t){if(this.updateAriaAttributes(this.v),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.v),this.tooltipProgressBar.v.style.width=this.bar.v.style.width;var i=C(kh(this.player().el(),"width")),s=C(kh(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=_.floor(i-s/2)+"px",e.minWidth=_.ceil(s/2)+"px",e.right="-"+s/2+"px"}},s.updateAriaAttributes=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",fh(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);Ch.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},Ch.prototype.playerEvent="timeupdate",pe.registerComponent("SeekBar",Ch);var Sh=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltip=ns("div",{className:"vjs-time-tooltip"}),e.el().appendChild(e.tooltip),e.addClass("vjs-keep-tooltips-inside")),e.update(0,0),i.on("ready",(function(){e.on(i.controlBar.progressControl.el(),"mousemove",function(t,i){var s=Date.now();return function(){var e=Date.now();e-s>=i&&(t.apply(void 0,arguments),s=e)}}(n(ge(e),e.handleMouseMove),25))})),e}be(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},s.handleMouseMove=function(t){var i=this.t.duration(),s=this.calculateDistance(t)*i,e=t.pageX-ks(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=fh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Dt(i)+1,n=C(kh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return ws(this.el().parentNode,t).x},s.Dt=function(t){if(!this.keepTooltipsInside)return t;var i=C(kh(this.player().el(),"width")),s=C(kh(this.tooltip,"width"))/2,e=t;return t<s?e=_.ceil(s):t>i-s&&(e=_.floor(i-s)),e},i}(pe);pe.registerComponent("MouseTimeDisplay",Sh);var jh=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(pe);jh.prototype.h={children:["seekBar"]},pe.registerComponent("ProgressControl",jh);var Th=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}be(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}(uh);Th.prototype.St="Fullscreen",pe.registerComponent("FullscreenToggle",Th);var Mh=function(t){function i(){return t.apply(this,arguments)||this}return be(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}(pe);pe.registerComponent("VolumeLevel",Mh);var Ah=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(n(ge(e),e.updateARIAAttributes)),e}be(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);Ah.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Ah.prototype.playerEvent="volumechange",pe.registerComponent("VolumeBar",Ah);var Ph=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 be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(pe);Ph.prototype.h={children:["volumeBar"]},pe.registerComponent("VolumeControl",Ph);var Nh=function(t){function i(){return t.apply(this,arguments)||this}be(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=ns(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),ee(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(pe);pe.registerComponent("Popup",Nh);var Eh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}be(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}(ih);pe.registerComponent("PopupButton",Eh);var Bh=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}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.muted(!this.t.muted())},s.update=function(t){var i=this.t.volume(),s=3;this.t.muted()?s=0:i<.33?s=1:i<.67&&(s=2);var e=this.t.muted()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e);for(var n=0;n<4;n++)vs(this.v,"vjs-vol-"+n);fs(this.v,"vjs-vol-"+s)},i}(uh);Bh.prototype.St="Mute",pe.registerComponent("MuteToggle",Bh);var Ih=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(ge(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}be(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 Nh(this.t,{contentElType:"div"}),i=new Ah(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Bh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],n(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Eh);Ih.prototype.volumeUpdate=Bh.prototype.update,Ih.prototype.St="Mute",pe.registerComponent("VolumeMenuButton",Ih);var Fh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}be(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=ns(i,{className:"vjs-menu-content"}),this.S.setAttribute("role","menu");var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.setAttribute("role","presentation"),s.appendChild(this.S),ee(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},s.stepForward=function(){var t=0;void 0!==this.$t&&(t=this.$t+1),this.focus(t)},s.stepBack=function(){var t=0;void 0!==this.$t&&(t=this.$t-1),this.focus(t)},s.focus=function(t){void 0===t&&(t=0);var i=this.children().slice();i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className)&&i.shift(),i.length>0&&(t<0?t=0:t>=i.length&&(t=i.length-1),this.$t=t,i[t].v.focus())},i}(pe);pe.registerComponent("Menu",Fh);var Dh=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}be(i,t);var s=i.prototype;return s.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.Ut=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Ot?this.hide():this.show()},s.createMenu=function(){var t=new Fh(this.t);if(this.Ot=0,this.h.title){var i=ns("li",{className:"vjs-menu-title",innerHTML:fe(this.h.title),tabIndex:-1});this.Ot+=1,t.m.unshift(i),hs(i,t.contentEl())}if(this.items=this.createItems(),this.items)for(var s=0;s<this.items.length;s++)t.addItem(this.items[s]);return t},s.createItems=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",n(this,(function(t){this.unpressButton(),this.v.blur()}))),this.Ut?this.unpressButton():this.pressButton()},s.handleKeyPress=function(i){27===i.which||9===i.which?(this.Ut&&this.unpressButton(),9!==i.which&&i.preventDefault()):38===i.which||40===i.which?this.Ut||(this.pressButton(),i.preventDefault()):t.prototype.handleKeyPress.call(this,i)},s.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.Ut&&this.unpressButton(),9!==t.which&&t.preventDefault())},s.pressButton=function(){this.Rt&&(this.Ut=!0,this.menu.lockShowing(),this.v.setAttribute("aria-expanded","true"),this.menu.focus())},s.unpressButton=function(){this.Rt&&(this.Ut=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.v.focus())},s.disable=function(){return this.Ut=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.Rt=!1,t.prototype.disable.call(this)},s.enable=function(){return this.Rt=!0,t.prototype.enable.call(this)},i}(ih);pe.registerComponent("MenuButton",Dh);var $h=function(t){function i(i,s){var e,r=s.tracks;if((e=t.call(this,i,s)||this).items.length<=1&&e.hide(),!r)return ge(e);var h=n(ge(e),e.update);return r.addEventListener("removetrack",h),r.addEventListener("addtrack",h),e.t.on("dispose",(function(){r.removeEventListener("removetrack",h),r.removeEventListener("addtrack",h)})),e}return be(i,t),i}(Dh);pe.registerComponent("TrackButton",$h);var Rh=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}be(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",qi({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Vt=Di.createTextNode(this.localize(this.h.label)),n.appendChild(this.Vt),n},s.handleClick=function(t){this.selected(!0)},s.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.v.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.v.setAttribute("aria-checked","false"),this.controlText("")))},s.handleLanguagechange=function(){t.prototype.handleLanguagechange.call(this),this.Vt.innerHTML=this.localize(this.h.label)},i}(ih);pe.registerComponent("MenuItem",Rh);var Uh=function(t){function i(i,s){var e,r,h=s.track,o=i.textTracks();if(s.label=h.label||h.language||"Unknown",s.selected=h.default||"showing"===h.mode,(e=t.call(this,i,s)||this).track=h,o){var a=n(ge(e),e.handleTracksChange);i.on(["loadstart","texttrackchange"],a),o.addEventListener("change",a),e.on("dispose",(function(){o.removeEventListener("change",a)}))}o&&void 0===o.onchange&&e.on(["tap","click"],(function(){if("object"!=typeof b.Event)try{r=new b.Event("change")}catch(t){}r||(r=Di.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(r)}));return e}be(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}(Rh);pe.registerComponent("TextTrackMenuItem",Uh);var Oh=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 be(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}(Uh);pe.registerComponent("OffTextTrackMenuItem",Oh);var Vh=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return be(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new Oh(this.t,{kind:this.Lt})),this.Ot+=1;var i=this.t.textTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];e.kind===this.Lt&&t.push(new Uh(this.t,{track:e,selectable:!0}))}return t},i}($h);pe.registerComponent("TextTrackButton",Vh);var Lh=function(t){function i(i,s){var e,r=s.track,h=s.cue,o=i.currentTime();return s.selectable=!0,s.label=h.text,s.selected=h.startTime<=o&&o<h.endTime,(e=t.call(this,i,s)||this).track=r,e.cue=h,r.addEventListener("cuechange",n(ge(e),e.update)),e}be(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}(Rh);pe.registerComponent("ChaptersTrackMenuItem",Lh);var Hh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Chapters Menu"),n}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},s.update=function(i){this.Ht&&(!i||"addtrack"!==i.type&&"removetrack"!==i.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},s.setTrack=function(t){if(this.Ht!==t){if(this.qt||(this.qt=this.update.bind(this)),this.Ht){var i=this.t.remoteTextTrackEls().Y(this.Ht);i&&i.removeEventListener("load",this.qt),this.Ht=null}if(this.Ht=t,this.Ht){this.Ht.mode="hidden";var s=this.t.remoteTextTrackEls().Y(this.Ht);s&&s.addEventListener("load",this.qt)}}},s.findChaptersTrack=function(){for(var t=this.t.textTracks()||[],i=t.length-1;i>=0;i--){var s=t[i];if(s.kind===this.Lt)return s}},s.getMenuCaption=function(){return this.Ht&&this.Ht.label?this.Ht.label:this.localize(fe(this.Lt))},s.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.Ht)return t;var i=this.Ht.cues;if(!i)return t;for(var s=0,e=i.length;s<e;s++){var n=i[s],r=new Lh(this.t,{track:this.Ht,cue:n});t.push(r)}return t},i}(Vh);Hh.prototype.Lt="chapters",Hh.prototype.St="Chapters",pe.registerComponent("ChaptersButton",Hh);var qh=function(t){function i(i,s,e){var r;(r=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Descriptions Menu");var h=i.textTracks();if(h){var o=n(ge(r),r.handleTracksChange);h.addEventListener("change",o),r.on("dispose",(function(){h.removeEventListener("change",o)}))}return r}be(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}(Vh);qh.prototype.Lt="descriptions",qh.prototype.St="Descriptions",pe.registerComponent("DescriptionsButton",qh);var zh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Subtitles Menu"),n}return be(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(Vh);zh.prototype.Lt="subtitles",zh.prototype.St="Subtitles",pe.registerComponent("SubtitlesButton",zh);var Wh=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 be(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").v.focus()},i}(Uh);pe.registerComponent("CaptionSettingsMenuItem",Wh);var Gh=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}be(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 Wh(this.t,{kind:this.Lt})),this.Ot+=1),t.prototype.createItems.call(this,i)},i}(Vh);Gh.prototype.Lt="captions",Gh.prototype.St="Captions",pe.registerComponent("CaptionsButton",Gh);var Xh=function(t){function i(i,s){var e,r=s.track,h=i.audioTracks();if(s.label=r.label||r.language||"Unknown",s.selected=r.enabled,(e=t.call(this,i,s)||this).track=r,h){var o=n(ge(e),e.handleTracksChange);h.addEventListener("change",o),e.on("dispose",(function(){h.removeEventListener("change",o)}))}return e}be(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}(Rh);pe.registerComponent("AudioTrackMenuItem",Xh);var Jh=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}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(t){void 0===t&&(t=[]),this.Ot=1;var i=this.t.audioTracks&&this.t.audioTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];t.push(new Xh(this.t,{track:e,selectable:!0}))}return t},i}($h);Jh.prototype.St="Audio Track",pe.registerComponent("AudioTrackButton",Jh);var Qh=function(t){function i(i,s){var e,n=s.rate,r=C(n,10);return s.label=n,s.selected=1===r,s.selectable=!0,(e=t.call(this,i,s)||this).label=n,e.rate=r,e.on(i,"ratechange",e.update),e}be(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}(Rh);Qh.prototype.contentElType="button",pe.registerComponent("PlaybackRateMenuItem",Qh);var Yh=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}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Vt=ns("div",{className:"vjs-playback-rate-value",innerHTML:1}),i.appendChild(this.Vt),i},s.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},s.createMenu=function(){var t=new Fh(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new Qh(this.player(),{rate:i[s]+"x"}));return t},s.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},s.handleClick=function(t){for(var i=this.player().playbackRate(),s=this.playbackRates(),e=s[0],n=0;n<s.length;n++)if(s[n]>i){e=s[n];break}this.player().playbackRate(e)},s.playbackRates=function(){return this.h.playbackRates||this.h.playerOptions&&this.h.playerOptions.playbackRates},s.playbackRateSupported=function(){return this.player().H&&this.player().H.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},s.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},s.updateLabel=function(t){this.playbackRateSupported()&&(this.Vt.innerHTML=this.player().playbackRate()+"x")},i}(Dh);Yh.prototype.St="Playback Rate",pe.registerComponent("PlaybackRateMenuButton",Yh);var Kh=function(t){function i(){return t.apply(this,arguments)||this}be(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}(pe);pe.registerComponent("Spacer",Kh);var Zh=function(t){function i(){return t.apply(this,arguments)||this}be(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}(Kh);pe.registerComponent("CustomControlSpacer",Zh);var to=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(pe);to.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},pe.registerComponent("ControlBar",to);var io=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}be(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}($e);io.prototype.h=ve($e.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),pe.registerComponent("ErrorDisplay",io);var so="vjs-text-track-settings",eo=["#000","Black"],no=["#00F","Blue"],ro=["#0FF","Cyan"],ho=["#0F0","Green"],oo=["#F0F","Magenta"],ao=["#F00","Red"],uo=["#FFF","White"],co=["#FF0","Yellow"],lo=["1","Opaque"],fo=["0.5","Semi-Transparent"],vo=["0","Transparent"],po={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[eo,uo,ao,ho,no,co,oo,ro]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[lo,fo,vo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[uo,eo,ao,ho,no,co,oo,ro]},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:[lo,fo]},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:[vo,fo,lo]}};function mo(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}po.windowColor.options=po.backgroundColor.options;var go,yo=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=n(ge(e),e.updateDisplay),void 0===s.persistTextTrackSettings&&(e.h.persistTextTrackSettings=e.h.playerOptions.persistTextTrackSettings),e.on(e.$(".vjs-done-button"),"click",(function(){e.saveSettings(),e.hide()})),e.on(e.$(".vjs-default-button"),"click",(function(){e.setDefaults(),e.updateDisplay()})),Hi(po,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.h.persistTextTrackSettings&&e.restoreSettings(),e}be(i,t);var s=i.prototype;return s.zt=function(t){var i=this,s=po[t],e=s.id.replace("%s",this.o);return[ns("label",{className:"vjs-label",textContent:s.label},{for:e}),ns("select",{id:e},void 0,s.options.map((function(t){return ns("option",{textContent:i.localize(t[1]),value:t[0]})})))]},s.Wt=function(){var t=ns("legend",{textContent:this.localize("Text")}),i=this.zt("color"),s=ns("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.zt("textOpacity"));return ns("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Gt=function(){var t=ns("legend",{textContent:this.localize("Background")}),i=this.zt("backgroundColor"),s=ns("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.zt("backgroundOpacity"));return ns("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=ns("legend",{textContent:this.localize("Window")}),i=this.zt("windowColor"),s=ns("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.zt("windowOpacity"));return ns("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return ns("div",{className:"vjs-tracksettings-colors"},void 0,[this.Wt(),this.Gt(),this.Xt()])},s.Qt=function(){var t=ns("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.zt("fontPercent")),i=ns("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.zt("edgeStyle")),s=ns("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.zt("fontFamily"));return ns("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Yt=function(){var t=ns("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=ns("button",{className:"vjs-done-button",textContent:"Done"});return ns("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=ns("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=ns("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=ns("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=ns("div",void 0,{role:"document"},[i,s,t]);return ns("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},s.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),Li(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(po,(function(i,s,e){var n=function(t,i){return mo(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i}),{})},s.setValues=function(t){var i=this;Hi(po,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(mo(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},s.setDefaults=function(){var t=this;Hi(po,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},s.restoreSettings=function(){var t;try{t=JSON.parse(b.localStorage.getItem(so))}catch(t){Xi.warn(t)}t&&this.setValues(t)},s.saveSettings=function(){if(this.h.persistTextTrackSettings){var t=this.getValues();try{w.keys(t).length?b.localStorage.setItem(so,JSON.stringify(t)):b.localStorage.removeItem(so)}catch(t){Xi.warn(t)}}},s.updateDisplay=function(){var t=this.t.getChild("textTrackDisplay");t&&t.updateDisplay()},i}(pe);pe.registerComponent("TextTrackSettings",yo);var bo,ko=function(t){function i(i,s){var e;e=t.call(this,i,s)||this;var r=i.source,h=!1;if(r&&(e.v.currentSrc!==r.src||i.tag&&3===i.tag.Kt)?e.setSource(r):e.Zt(e.v),e.v.hasChildNodes()){for(var o=e.v.childNodes,a=o.length,u=[];a--;){var c=o[a];"track"===c.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().J(c),e.remoteTextTracks().tt(c.track),h||e.v.hasAttribute("crossorigin")||!ze(c.src)||(h=!0)):u.push(c))}for(var l=0;l<u.length;l++)e.v.removeChild(u[l])}return["audio","video"].forEach((function(t){var i=e.el()[t+"Tracks"],s=e[t+"Tracks"](),n=fe(t);e["featuresNative"+n+"Tracks"]&&i&&i.addEventListener&&(e["handle"+n+"ti"]=function(t){s.trigger({type:"change",target:s,currentTarget:s,srcElement:s})},e["handle"+n+"ii"]=function(t){return s.addTrack(t.track)},e["handle"+n+"si"]=function(t){return s.removeTrack(t.track)},i.addEventListener("change",e["handle"+n+"ti"]),i.addEventListener("addtrack",e["handle"+n+"ii"]),i.addEventListener("removetrack",e["handle"+n+"si"]),e["removeOld"+n+"ei"]=function(t){return e.ni(s,i)},e.on("loadstart",e["removeOld"+n+"ei"]))})),e.featuresNativeTextTracks&&(h&&Xi.warn(Ki(go||(go=$i(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."])))),e.ri=n(ge(e),e.handleTextTrackChange),e.hi=n(ge(e),e.handleTextTrackAdd),e.oi=n(ge(e),e.handleTextTrackRemove),e.ai()),e.ci(),(Js||Bs||Os)&&!0===i.nativeControlsForTouch&&e.setControls(!0),e.di(),e.triggerReady(),e}be(i,t);var s=i.prototype;return s.dispose=function(){var s=this;["audio","video","text"].forEach((function(t){var i=fe(t),e=s.v[t+"Tracks"];e&&e.removeEventListener&&(e.removeEventListener("change",s["handle"+i+"ti"]),e.removeEventListener("addtrack",s["handle"+i+"ii"]),e.removeEventListener("removetrack",s["handle"+i+"si"])),e&&s.off("loadstart",s["removeOld"+i+"ei"])})),i.disposeMediaElement(this.v),t.prototype.dispose.call(this)},s.ci=function(){var t,i=this.textTracks(),s=function(){t=[];for(var s=0;s<i.length;s++){var e=i[s];"metadata"===e.kind&&t.push({track:e,storedMode:e.mode})}};s(),i.addEventListener("change",s);var e=function s(){for(var e=0;e<t.length;e++){var n=t[e];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}i.removeEventListener("change",s)};this.on("webkitbeginfullscreen",(function(){i.removeEventListener("change",s),i.removeEventListener("change",e),i.addEventListener("change",e)})),this.on("webkitendfullscreen",(function(){i.removeEventListener("change",s),i.addEventListener("change",s),i.removeEventListener("change",e)}))},s.createEl=function(){var t=this.h.tag;if(!t||!this.h.playerElIngest&&!this.movingMediaElementInDOM){if(t){var s=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(s,t),i.disposeMediaElement(t),t=s}else{t=Di.createElement("video");var e=ve({},this.h.tag&&gs(this.h.tag));Js&&!0===this.h.nativeControlsForTouch||delete e.controls,ms(t,qi(e,{id:this.h.techId,class:"vjs-tech"}))}t.playerId=this.h.playerId}void 0!==this.h.preload&&ys(t,"preload",this.h.preload);for(var n=["loop","muted","playsinline","autoplay"],r=n.length-1;r>=0;r--){var h=n[r],o=this.h[h];void 0!==o&&(o?ys(t,h,h):bs(t,h),t[h]=o)}return t},s.Zt=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var i=!1,s=function(){i=!0};this.on("loadstart",s);var e=function(){i||this.trigger("loadstart")};return this.on("loadedmetadata",e),void this.ready((function(){this.off("loadstart",s),this.off("loadedmetadata",e),i||this.trigger("loadstart")}))}var n=["loadstart"];n.push("loadedmetadata"),t.readyState>=2&&n.push("loadeddata"),t.readyState>=3&&n.push("canplay"),t.readyState>=4&&n.push("canplaythrough"),this.ready((function(){n.forEach((function(t){this.trigger(t)}),this)}))}},s.ai=function(){var t=this.el().textTracks;if(t){for(var i=0;i<t.length;i++)this.textTracks().tt(t[i]);t.addEventListener&&(t.addEventListener("change",this.ri),t.addEventListener("addtrack",this.hi),t.addEventListener("removetrack",this.oi)),this.on("loadstart",this.fi)}},s.handleTextTrackChange=function(t){var i=this.textTracks();this.textTracks().trigger({type:"change",target:i,currentTarget:i,srcElement:i})},s.handleTextTrackAdd=function(t){this.textTracks().tt(t.track)},s.handleTextTrackRemove=function(t){this.textTracks().it(t.track)},s.ni=function(t,i){var s=[];if(i){for(var e=0;e<t.length;e++){for(var n=t[e],r=!1,h=0;h<i.length;h++)if(i[h]===n){r=!0;break}r||s.push(n)}for(var o=0;o<s.length;o++){var a=s[o];t.it(a)}}},s.fi=function(t){var i=this.textTracks(),s=this.el().textTracks;this.ni(i,s)},s.play=function(){var t=this.v.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))},s.setCurrentTime=function(t){try{this.v.currentTime=t}catch(t){Xi(t,"Video is not ready. (Video.js)")}},s.duration=function(){var t=this;if(this.v.duration===1/0&&$s&&Hs&&0===this.v.currentTime){return this.on("timeupdate",(function i(){t.v.currentTime>0&&(t.v.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))})),NaN}return this.v.duration||NaN},s.width=function(){return this.v.offsetWidth},s.height=function(){return this.v.offsetHeight},s.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.v){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},s=function(){"webkitPresentationMode"in this.v&&"picture-in-picture"!==this.v.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",s),this.on("dispose",(function(){t.off("webkitbeginfullscreen",s),t.off("webkitendfullscreen",i)}))}},s.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var t=b.navigator&&b.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},s.enterFullScreen=function(){var t=this.v;t.paused&&t.networkState<=t.HAVE_METADATA?(this.v.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},s.exitFullScreen=function(){this.v.webkitExitFullScreen()},s.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},s.reset=function(){i.resetMediaElement(this.v)},s.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},s.setControls=function(t){this.v.controls=!!t},s.addTextTrack=function(i,s,e){return this.featuresNativeTextTracks?this.v.addTextTrack(i,s,e):t.prototype.addTextTrack.call(this,i,s,e)},s.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var s=Di.createElement("track");return i.kind&&(s.kind=i.kind),i.label&&(s.label=i.label),(i.language||i.srclang)&&(s.srclang=i.language||i.srclang),i.default&&(s.default=i.default),i.id&&(s.id=i.id),i.src&&(s.src=i.src),s},s.addRemoteTextTrack=function(i,s){var e=t.prototype.addRemoteTextTrack.call(this,i,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},s.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)i!==s[e]&&i!==s[e].track||this.el().removeChild(s[e])},s.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),b.performance&&"function"==typeof b.performance.now?t.creationTime=b.performance.now():b.performance&&b.performance.timing&&"number"==typeof b.performance.timing.navigationStart&&(t.creationTime=b.Date.now()-b.performance.timing.navigationStart),t},i}(Zr);is()&&(ko.TEST_VID=Di.createElement("video"),(bo=Di.createElement("track")).kind="captions",bo.srclang="en",bo.label="English",ko.TEST_VID.appendChild(bo)),ko.isSupported=function(){try{ko.TEST_VID.volume=.5}catch(t){return!1}return!(!ko.TEST_VID||!ko.TEST_VID.canPlayType)},ko.canControlVolume=function(){try{var t=ko.TEST_VID.volume;return ko.TEST_VID.volume=t/2+.1,t!==ko.TEST_VID.volume}catch(t){return!1}},ko.canControlPlaybackRate=function(){if($s&&Hs&&qs<58)return!1;try{var t=ko.TEST_VID.playbackRate;return ko.TEST_VID.playbackRate=t/2+.1,t!==ko.TEST_VID.playbackRate}catch(t){return!1}},ko.supportsNativeTextTracks=function(){return Xs},ko.supportsNativeVideoTracks=function(){return!(!ko.TEST_VID||!ko.TEST_VID.videoTracks)},ko.supportsNativeAudioTracks=function(){return!(!ko.TEST_VID||!ko.TEST_VID.audioTracks)},ko.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],ko.prototype.featuresVolumeControl=ko.canControlVolume(),ko.prototype.featuresPlaybackRate=ko.canControlPlaybackRate(),ko.prototype.movingMediaElementInDOM=!Fs,ko.prototype.featuresFullscreenResize=!0,ko.prototype.featuresProgressEvents=!0,ko.prototype.featuresTimeupdateEvents=!0,ko.prototype.featuresNativeTextTracks=ko.supportsNativeTextTracks(),ko.prototype.featuresNativeVideoTracks=ko.supportsNativeVideoTracks(),ko.prototype.featuresNativeAudioTracks=ko.supportsNativeAudioTracks();var wo=ko.TEST_VID&&ko.TEST_VID.constructor.prototype.canPlayType,_o=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,xo=/^video\/mp4/i;ko.patchCanPlayType=function(){Rs>=4&&!Vs?ko.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&_o.test(t)?"maybe":wo.call(this,t)}:Us&&(ko.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&xo.test(t)?"maybe":wo.call(this,t)})},ko.unpatchCanPlayType=function(){var t=ko.TEST_VID.constructor.prototype.canPlayType;return ko.TEST_VID.constructor.prototype.canPlayType=wo,t},ko.patchCanPlayType(),ko.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){}}()}}},ko.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){ko.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){ko.prototype["set"+fe(t)]=function(i){this.v[t]=i,i?this.v.setAttribute(t,t):this.v.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){ko.prototype[t]=function(){return this.v[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){ko.prototype["set"+fe(t)]=function(i){this.v[t]=i}})),["pause","load"].forEach((function(t){ko.prototype[t]=function(){return this.v[t]()}})),Zr.withSourceHandlers(ko),ko.nativeSourceHandler={},ko.nativeSourceHandler.canPlayType=function(t){try{return ko.TEST_VID.canPlayType(t)}catch(t){return""}},ko.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return ko.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 ko.nativeSourceHandler.canPlayType("video/"+s)}return""},ko.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},ko.nativeSourceHandler.dispose=function(){},ko.registerSourceHandler(ko.nativeSourceHandler),pe.registerComponent("Html5",ko),Zr.registerTech("Html5",ko);var Co=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],So=function(t){function i(s,e,n){var r;if(s.id=s.id||["vjs_video",Ui()].join("_"),(e=qi(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(gs(o).hasOwnProperty("lang")){e.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=t.call(this,null,e,n)||this).h||!r.h.techOrder||!r.h.techOrder.length)throw new m("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&&gs(s),r.language(r.h.language),e.languages){var a={};w.getOwnPropertyNames(e.languages).forEach((function(t){a[t.toLowerCase()]=e.languages[t]})),r.vi=a}else r.vi=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=ve(r.h);if(e.plugins){var c=e.plugins;w.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):Xi.error("Unable to find plugin:",t)}),ge(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"),Fs||r.addClass("vjs-workinghover"),i.players[r.o]=ge(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.ki(),r.on("fullscreenchange",r.wi),r.on("stageclick",r._i),r}be(i,t);var s=i.prototype;return s.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.xi&&this.xi.parentNode&&this.xi.parentNode.removeChild(this.xi),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.Ci=s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player");i=this.v=e?s.parentNode:t.prototype.createEl.call(this,"div"),s.setAttribute("tabindex","-1"),s.removeAttribute("width"),s.removeAttribute("height");var n=gs(s);if(w.getOwnPropertyNames(n).forEach((function(t){"class"===t?i.className+=" "+n[t]:i.setAttribute(t,n[t])})),s.playerId=s.id,s.id+="Si",s.className="vjs-tech",s.player=i.player=this,this.addClass("vjs-paused"),!0!==b.VIDEOJS_NO_DYNAMIC_STYLE){this.xi=le("vjs-styles-dimensions");var r=Ts(".vjs-styles-defaults"),h=Ts("head");h.insertBefore(this.xi,r?r.nextSibling:h.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var o=s.getElementsByTagName("a"),a=0;a<o.length;a++){var u=o.item(a);fs(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return s.Kt=s.networkState,s.parentNode&&!e&&s.parentNode.insertBefore(i,s),hs(s,i),this.m.unshift(s),this.v=i,i},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?"ji":"Ti";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=C(i);if(S(e))return Xi.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Mi(),this},s.fluid=function(t){if(void 0===t)return!!this.Ai;this.Ai=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Mi()},s.aspectRatio=function(t){if(void 0===t)return this.Pi;if(!/^\d+\:\d+$/.test(t))throw new m("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Pi=t,this.fluid(!0),this.Mi()},s.Mi=function(){if(!0!==b.VIDEOJS_NO_DYNAMIC_STYLE){var t,i,s,e=(void 0!==this.Pi&&"auto"!==this.Pi?this.Pi:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.ji?this.ji:void 0!==this.Ti?this.Ti/n:this.videoWidth()||300,i=void 0!==this.Ti?this.Ti:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),de(this.xi,"\n ."+s+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*n+"%;\n }\n ")}else{var r="number"==typeof this.ji?this.ji:this.h.width,h="number"==typeof this.Ti?this.Ti:this.h.height,o=this.H&&this.H.el();o&&(r>=0&&(o.width=r),h>=0&&(o.height=h))}},s._t=function(t,i){var s=this;this.H&&this.Ni(),"Html5"!==t&&this.tag&&(Zr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Ei=t,this.j=!1;var e=qi({source:i,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Bi",videoTracks:this.rt,textTracks:this.nt,audioTracks:this.ht,autoplay:this.h.autoplay,playsinline:this.h.playsinline,preload:this.h.preload,loop:this.h.loop,muted:this.h.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Ci||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(e.tag=this.tag),i&&(this.Ii=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 r=Zr.getTech(t);r||(r=pe.getComponent(t)),this.H=new r(e),this.H.ready(n(this,this.Fi),!0),Fe(this.Di||[],this.H),Co.forEach((function(t){s.on(s.H,t,s["handleTech"+fe(t)+"_"])})),this.on(this.H,"loadstart",this.$i),this.on(this.H,"waiting",this.Ri),this.on(this.H,"canplay",this.Ui),this.on(this.H,"canplaythrough",this.Oi),this.on(this.H,"playing",this.Vi),this.on(this.H,"ended",this.Li),this.on(this.H,"seeking",this.Hi),this.on(this.H,"seeked",this.qi),this.on(this.H,"play",this.zi),this.on(this.H,"firstplay",this.Wi),this.on(this.H,"pause",this.Gi),this.on(this.H,"durationchange",this.Xi),this.on(this.H,"fullscreenchange",this.Ji),this.on(this.H,"error",this.Qi),this.on(this.H,"loadedmetadata",this.Mi),this.on(this.H,"resize",this.Mi),this.on(this.H,"posterchange",this.Yi),this.on(this.H,"textdata",this.Ki),this.usingNativeControls(this.Zi("controls")),this.controls()&&!this.usingNativeControls()&&this.ts(),this.H.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||hs(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},s.Ni=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.Di=Ie(this.H),this.j=!1,this.H.dispose(),this.H=!1},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 b.alert(i),new m(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){Xi("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.zi=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.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},s.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},s.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},s.Hi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},s.qi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},s.Wi=function(){this.h.starttime&&(Xi.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.h.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},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.wi=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.j)this.H.ready((function(){this[t](i)}),!0);else try{this.H&&this.H[t](i)}catch(t){throw Xi(t),t}},s.Zi=function(t){if(this.H&&this.H.j)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?Xi("Video.js: "+t+" method not defined for "+this.Ei+" playback technology.",i):"TypeError"===i.name?(Xi("Video.js: "+t+" unavailable on "+this.Ei+" playback technology element.",i),this.H.j=!1):Xi(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=C(t))<0&&(t=1/0),t!==this.pi.duration&&(this.pi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},s.remainingTime=function(){return this.duration()-this.currentTime()},s.buffered=function(){var t=this.Zi("buffered");return t&&t.length||(t=_e(0,0)),t},s.bufferedPercent=function(){return xe(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=_.max(0,_.min(1,C(t))),this.pi.volume=i,this.us("setVolume",i),this):(i=C(this.Zi("volume")),S(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=Me;return this.isFullscreen(!0),s.requestFullscreen?(ee(Di,s.fullscreenchange,n(this,(function t(i){this.isFullscreen(Di[s.fullscreenElement]),!1===this.isFullscreen()&&ne(Di,s.fullscreenchange,t),this.trigger("fullscreenchange")}))),s.prefixed||(i=this.h.fullscreenOptions,void 0!==t&&(i=t)),this.v[s.requestFullscreen](i)):this.H.supportsFullScreen()?this.us("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},s.exitFullscreen=function(){var t=Me;return this.isFullscreen(!1),t.requestFullscreen?Di[t.exitFullscreen]():this.H.supportsFullScreen()?this.us("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},s.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=Di.documentElement.style.overflow,ee(Di,"keydown",n(this,this.fullWindowOnEscKey)),Di.documentElement.style.overflow="hidden",fs(Di.body,"vjs-full-window"),this.trigger("enterFullWindow")},s.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},s.exitFullWindow=function(){this.isFullWindow=!1,ne(Di,"keydown",this.fullWindowOnEscKey),Di.documentElement.style.overflow=this.docOrigOverflow,vs(Di.body,"vjs-full-window"),this.trigger("exitFullWindow")},s.canPlayType=function(t){for(var i,s=0,e=this.h.techOrder;s<e.length;s++){var n=fe(e[s]),r=Zr.getTech(n);if(r||(r=pe.getComponent(n)),r){if(r.isSupported()&&(i=r.canPlayType(t)))return i}else Xi.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(fe).map((function(t){return[t,Zr.getTech(t)||pe.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(Xi.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),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=Zr.getTech(this.Ei);return i||(i=pe.getComponent(this.Ei)),Array.isArray(t)?this.ls(t):"string"==typeof t?this.src({src:t}):t instanceof w&&(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.Ii=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(fe(this.h.techOrder[0]),null),this.us("reset"),this},s.currentSources=function(){var t=this.currentSource(),i=[];return 0!==w.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.Ii||""},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.ds!==t&&(this.ds=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.ds},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 Ne(t),this.addClass("vjs-error"),Xi.error("(CODE:"+this.lt.code+" "+Ne.errorTypes[this.lt.code]+")",this.lt.message,this.lt),this.trigger("error"),this)},s.reportUserActivity=function(t){this.fs=!0},s.userActive=function(t){return void 0!==t?((t=!!t)!==this.vs&&(this.vs=t,t?(this.fs=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.fs=!1,this.H&&this.H.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.vs},s.ki=function(){var t,i,s,e,r=n(this,this.reportUserActivity);this.on("mousedown",(function(){r(),this.clearInterval(t),t=this.setInterval(r,250)})),this.on("mousemove",(function(t){t.screenX===i&&t.screenY===s||(i=t.screenX,s=t.screenY,r())})),this.on("mouseup",(function(i){r(),this.clearInterval(t)})),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.fs){this.fs=!1,this.userActive(!0),this.clearTimeout(e);var t=this.h.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.fs||this.userActive(!1)}),t))}}),250)},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 Jr,this.rt)},s.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new Yr,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 ve(i.prototype.h.languages,this.vi)},s.toJSON=function(){var t=ve(this.h),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=ve(e)).player=void 0,t.tracks[s]=e}return t},s.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new $e(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},i.getTagSettings=function(t){var i={sources:[],tracks:[]},s=gs(t),e=s["data-setup"];if(ds(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=Ee(e||"{}"),r=n[0],h=n[1];r&&Xi.error(r),qi(s,h)}if(qi(i,s),t.hasChildNodes())for(var o=t.childNodes,a=0,u=o.length;a<u;a++){var c=o[a],l=c.nodeName.toLowerCase();"source"===l?i.sources.push(gs(c)):"track"===l&&i.tracks.push(gs(c))}return i},s.bi=function(){var t=Di.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},i}(pe);So.players={};var jo=b.navigator;So.prototype.h={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:jo&&(jo.languages&&jo.languages[0]||jo.userLanguage||jo.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreenOptions:{navigationUI:"hide"}},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){So.prototype[t]=function(){return this.Zi(t)}})),Co.forEach((function(t){So.prototype["handleTech"+fe(t)+"_"]=function(){return this.trigger(t)}})),pe.registerComponent("Player",So);var To,Mo,Ao=function(t){function i(s){var e;void 0===s&&(s={});var n=ve(s,{kind:Oe[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(zs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.defineProperty(r,"enabled",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("enabledchange"))}}),n.enabled&&(r.enabled=n.enabled),r.W=!0,r||ge(e)}return be(i,t),i}(He),Po=function(t){function i(s){var e;void 0===s&&(s={});var n=ve(s,{kind:Ue[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(zs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.defineProperty(r,"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||ge(e)}return be(i,t),i}(He);function No(t,i,s){var e;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),No.getPlayers()[t])return i&&Xi.warn('Player "'+t+'" is already initialised. Options will not be applied.'),s&&No.getPlayers()[t].ready(s),No.getPlayers()[t];e=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),Di.getElementById(t)}(t)}else e=t;if(!e||!e.nodeName)throw new g("The element or ID supplied is not valid. (videojs)");if(e.player||So.players[e.playerId])return e.player||So.players[e.playerId];i=i||{},No.hooks("beforesetup").forEach((function(t){var s=t(e,ve(i));zi(s)&&!Array.isArray(s)?i=ve(i,s):Xi.error("please return an object in beforesetup hooks")}));var n=new(pe.getComponent("Player"))(e,i,s);return No.hooks("setup").forEach((function(t){return t(n)})),n}"undefined"==typeof HTMLVideoElement&&is()&&(Di.createElement("video"),Di.createElement("audio"),Di.createElement("track")),No.ys={},No.hooks=function(t,i){return No.ys[t]=No.ys[t]||[],i&&(No.ys[t]=No.ys[t].concat(i)),No.ys[t]},No.hook=function(t,i){No.hooks(t,i)},No.removeHook=function(t,i){var s=No.hooks(t).indexOf(i);return!(s<=-1)&&(No.ys[t]=No.ys[t].slice(),No.ys[t].splice(s,1),!0)},!0!==b.VIDEOJS_NO_DYNAMIC_STYLE&&is()&&((To=Ts(".vjs-styles-defaults"))||(To=le("vjs-styles-defaults"),(Mo=Ts("head"))&&Mo.insertBefore(To,Mo.firstChild),de(To,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),ce(1,No),No.VERSION="5.20.6-opentelly.14",No.options=So.prototype.h,No.getPlayers=function(){return So.players},No.players=So.players,No.getComponent=pe.getComponent,No.registerComponent=function(t,i){Zr.isTech(i)&&Xi.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),pe.registerComponent.call(pe,t,i)},No.getTech=Zr.getTech,No.registerTech=Zr.registerTech,No.browser=Ys,No.TOUCH_ENABLED=Js,No.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in zi(i)?("function"==typeof i.init&&(Xi.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==w.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new g("Super expression must either be null or a function, not "+typeof i);t.prototype=w.create(i&&i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i&&(t.bs=i)}(s,t),e)e.hasOwnProperty(n)&&(s.prototype[n]=e[n]);return s},No.mergeOptions=ve,No.bind=n,No.plugin=function(t,i){So.prototype[t]=i},No.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),No.options.languages=ve(No.options.languages,((s={})[t]=i,s)),No.options.languages[t]},No.log=Xi,No.createTimeRange=No.createTimeRanges=_e,No.formatTime=fh,No.parseUrl=qe,No.isCrossOrigin=ze,No.EventTarget=me,No.on=ee,No.one=he,No.off=ne,No.trigger=re,No.xhr=$r,No.TextTrack=Lr,No.AudioTrack=Ao,No.VideoTrack=Po,No.isEl=ss,No.isTextNode=_s,No.createEl=ns,No.hasClass=ds,No.addClass=fs,No.removeClass=vs,No.toggleClass=ps,No.setAttributes=ms,No.getAttributes=gs,No.emptyEl=xs,No.appendContent=Cs,No.insertContent=Ss,No.computedStyle=kh,f(),f();var Eo=10;function Bo(t){const i=t.duration;if(S(i)){var s;const i=null==(s=t.source)?void 0:s.streamType;return"live"===i||"dvr"===i}return i===1/0}function Io(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Fo(t){const i=Ro(t);return Bo(t)?i.end(i.length-1):i.start(0)}function Do(t){return Ro(t).start(0)}function $o(t){const i=Ro(t);return i.end(i.length-1)-i.start(0)}function Ro(t){const i=t.seekable;if(i&&i.length)return i;let s=t.duration;return s=isFinite(s)?s:0,new Wt([0,s]).ks()}function Uo(t,i){void 0===i&&(i=t);const s=t<0?"-":"";t=_.abs(t);let e=_.floor(t%60),n=_.floor(t/60%60),r=_.floor(t/3600);const h=_.floor(i/60%60),o=_.floor(i/3600);return(S(t)||t===1/0)&&(r=n=e="-"),r=Number(r)>0||o>0?r+":":"",n=((r||h>=10)&&Number(n)<10?"0"+n:n)+":",e=Number(e)<10?"0"+e:e,s+r+n+e}function Oo(t){return class extends t{get ws(){var t;return null!=(t=this._s)?t:this._s=Vo(this.player())}dispose(){this._s=void 0,super.dispose()}constructor(...t){super(...t),this._s=void 0}}}function Vo(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function Lo(t){const i=Vo(t),s=()=>{const s=Io(t);t.toggleClass("theo-at-live",function(t,i){if(Bo(t)){const s=t.seekable;return 0===s.length||s.end(s.length-1)-i<Eo}return!1}(i,s)),t.toggleClass("vjs-live",Bo(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===Pt(t.duration,t.seekable,null==(i=t.source)?void 0:i.streamType)}(i))};t.on("emptied",s),t.on("timeupdate",s),t.on("durationchange",s)}f(),f();var Ho="theo-ad-playing",qo="theo-dai-ad-playing";function zo(t,i,s){t.toggleClass(Ho,i),t.toggleClass(qo,i&&s)}function Wo(){this.userActive(!1)}f(),f(),f();var Go=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}},Xo=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],Jo=No.getTech("Tech"),Qo=No.getTech("Html5"),Yo=class extends Jo{xs(){var t;for(const t of Xo)this.ws.addEventListener(t,this.Cs);this.ws.addEventListener("error",this.Ss),this.ws.addEventListener("contentprotectionerror",this.Ss),this.ws.addEventListener("sourcechange",this.js),this.ws.addEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.addEventListener(Ai.MODE_CHANGE,this.Ms),this.ws.textTracks.addEventListener("addtrack",this.As),this.ws.textTracks.addEventListener("removetrack",this.Ps),this.ws.textTracks.addEventListener("change",this.Ns),this.ws.audioTracks.addEventListener("addtrack",this.Es),this.ws.audioTracks.addEventListener("removetrack",this.Bs),this.ws.audioTracks.addEventListener("change",this.Is)}Fs(){var t;for(const t of Xo)this.ws.removeEventListener(t,this.Cs);this.ws.removeEventListener("error",this.Ss),this.ws.removeEventListener("contentprotectionerror",this.Ss),this.ws.removeEventListener("sourcechange",this.js),this.ws.removeEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.removeEventListener(Ai.MODE_CHANGE,this.Ms),this.ws.textTracks.removeEventListener("addtrack",this.As),this.ws.textTracks.removeEventListener("removetrack",this.Ps),this.ws.textTracks.removeEventListener("change",this.Ns),this.ws.audioTracks.removeEventListener("addtrack",this.Es),this.ws.audioTracks.removeEventListener("removetrack",this.Bs),this.ws.audioTracks.removeEventListener("change",this.Is)}Ds(t){this.trigger(new Go(t,this))}createEl(){const t=this.h,i=t.player;if(!i)throw new m(this.localize('Missing required tech option "player"'));const s=i.element;return No.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.ws}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.ws.buffered}played(){return this.ws.played}reset(){this.ws.stop()}play(){this.ws.play()}pause(){this.ws.pause()}paused(){return this.ws.paused}currentTime(){return this.ws.currentTime}setCurrentTime(t){this.ws.currentTime=t}duration(){return this.ws.duration}volume(){return this.ws.volume}setVolume(t){this.ws.volume=t}muted(){return this.ws.muted}setMuted(t){this.ws.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.ws.src)return this.ws.src;if(this.ws.source){if(!li(this.ws.source.ads))return this.ws.source.ads[0].sources;if(Gt(this.ws.source))return"This source is managed by the Uplynk integration extension.";if(qt(this.ws.source))return"This source is managed by the DAI integration extension.";if(Jt(this.ws.source))return"This source is managed by Millicast."}}}setSrc(t){return this.setSource({src:t})}setSource(t){this.lt=null,this.trigger("error")}currentSrc(){return this.ws.src}load(){this.setPreload("auto")}preload(){return this.ws.preload}setPreload(t){this.ws.preload=t}autoplay(){return this.ws.autoplay}setAutoplay(t){this.ws.autoplay=Boolean(t)}seeking(){return this.ws.seeking}seekable(){return this.ws.seekable}ended(){return this.ws.ended}playbackRate(){return this.ws.playbackRate}setPlaybackRate(t){this.ws.playbackRate=t}readyState(){return this.ws.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.ws.videoHeight}videoWidth(){return this.ws.videoWidth}supportsFullScreen(){return this.ws.presentation.supportsMode(ii.FULLSCREEN)}enterFullScreen(){this.ws.presentation.requestMode(ii.FULLSCREEN)}exitFullScreen(){this.ws.presentation.requestMode(ii.INLINE)}$s(){const t=this.ws.ads;if(t&&t.playing)return!0;const i=this.ws.vr;return!(!i||i.state===Ft.Rs)}initTextTrackListeners(){return this.on("touchend",(t=>{this.$s()&&(t.preventDefault=()=>{})})),super.initTextTrackListeners()}Zt(){if(!this.src())return;const t=this.readyState();if(0===t){let t=!1;const i=()=>{t=!0};this.on("loadstart",i);const 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")}))}const i=["loadstart"];i.push("loadedmetadata"),t>=2&&i.push("loadeddata"),t>=3&&i.push("canplay"),t>=4&&i.push("canplaythrough"),this.ready((()=>{for(const t of i)this.trigger(t)}))}dispose(){this.Fs(),this.ws=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return V}constructor(t={},i){super(t,i),this.Cs=t=>this.Ds(t),this.Us=!1,this.js=()=>{void 0===this.ws.errorObject&&(this.Ds(new Yt(this.ws.currentTime,this.ws.readyState)),this.Ds(new I),this.Ds(new Zt(this.ws.duration)))},this.Ts=()=>{this.Ds(new It(this.ws.currentTime))},this.As=t=>{this.textTracks().tt(t.track)},this.Es=t=>{this.audioTracks().tt(t.track)},this.Ps=t=>{this.textTracks().it(t.track)},this.Bs=t=>{this.audioTracks().it(t.track)},this.Ns=()=>{const t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Is=()=>{const t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Ms=()=>{if(!this.supportsFullScreen())return;const t=this.Us,i=this.ws.presentation.currentMode===ii.FULLSCREEN;t!==i&&(this.Us=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ss=()=>{const t=this.ws.errorObject,i=t&&yt(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.ws=this.h.player,this.xs();const s=!this.paused();s&&this.pause(),t.preload&&this.setPreload(t.preload),t.autoplay&&this.setAutoplay(t.autoplay),t.muted&&this.setMuted(t.muted),t.source?this.setSrc(t.source):this.Zt(),s&&this.ready((()=>this.play())),this.triggerReady()}};Yo.prototype.featuresFullscreenResize=Qo.prototype.featuresFullscreenResize,Yo.prototype.featuresPlaybackRate=Qo.prototype.featuresPlaybackRate,Yo.prototype.featuresProgressEvents=!0,Yo.prototype.featuresTimeupdateEvents=!0,Yo.prototype.featuresNativeTextTracks=!0,No.registerTech("THEOplayer",Yo),f(),f(),f(),f();var Ko=class{constructor(t){this.Os=t=>{si(this.Vs,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.Ls=t=>{ni(this.Vs,"theo-mobile-button-hover")},this.Hs=t=>{this.Vs.blur()},this.Vs=t,t.addEventListener("touchstart",this.Os),t.addEventListener("touchend",this.Ls),t.addEventListener("focusin",this.Hs)}};f(),f(),f(),f();var Zo=No.getComponent("Menu"),ta=class extends(Oo(Zo)){get qs(){return this.player().el()}zs(){si(this.qs,"theo-menu-opened")}Ws(){ni(this.qs,"theo-menu-opened")}constructor(t,i){super(t,i)}};f();var ia=No.getComponent("MenuItem"),sa=class extends(Oo(ia)){get parentMenu(){return this.Gs}buildCSSClass(){return"theo-menu-item vjs-menu-item"}createEl(){const t=super.createEl("li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){this.Xs||(this.parentMenu.Js(this),"tap"!==t.type&&"keydown"!==t.type||(this.Xs=!0,this.trigger("click"),this.Xs=!1))}dispose(){vi.Ys.Qs&&(this.el().removeEventListener("touchstart",this.Os),this.el().removeEventListener("touchend",this.Ls)),super.dispose()}constructor(t,i,s){super(t,z({selectable:!0},i)),this.Xs=!1,this.Os=t=>{si(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.Ls=t=>{ni(this.el(),"theo-mobile-menu-item-hover")},this.Gs=s,vi.Ys.Qs&&(this.el().addEventListener("touchstart",this.Os),this.el().addEventListener("touchend",this.Ls))}};f();var ea=No.getComponent("ClickableComponent"),na=class extends ea{get parentMenu(){return this.Gs}get Ks(){return this.Zs}set Ks(t){this.Zs=t,this.el().setAttribute("tabindex",this.Ks?"0":"-1"),this.te()}buildCSSClass(){return"theo-primary-background theo-menu-header"}createEl(){const t=super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){!this.Xs&&this.Ks&&(this.Gs.ie(),"tap"===t.type&&(this.Xs=!0,this.trigger("click"),this.Xs=!1))}te(){this.Ks?this.el().setAttribute("aria-label",this.localize("Go back to the previous menu")):this.el().setAttribute("aria-label","")}constructor(t,i,s){super(t,i),this.Xs=!1,this.Zs=!1,this.Gs=s,this.on(t,"languagechange",this.te)}},ra=class extends ta{get menuHeader(){return this.se}get menuItems(){return this.children()}addMenuItem(t){t=z({playerOptions:this.h.playerOptions},t);const i=new sa(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=z({playerOptions:this.h.playerOptions},t);const i=this.ee(this.player(),t);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}removeMenuItem(t){this.removeChild(t),this.trigger("menuchange")}buildCSSClass(){return"theo-menu vjs-menu"}zs(){super.zs(),s.removeEventListener("resize",this.ne),s.addEventListener("resize",this.ne),this.show()}re(){const t=this.he();if(!t)return;const i=t.getClientRects();vi.Ys.Qs?this.oe(t,i):this.ae(t,i)}he(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ae(t,i){}oe(t,i){}Ws(){s.removeEventListener("resize",this.ne),super.Ws(),this.hide(),vi.Ys.Qs&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){const t=super.createEl();t.className=this.buildCSSClass();const i=this.contentEl();si(i,"theo-menu-content");const s=new na(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.se=s,t}Js(t){}show(){return this.re(),super.show()}dispose(){this.se&&this.se.dispose(),super.dispose()}constructor(t,i){super(t,i),this.ne=()=>this.re(),this.ue=this.player().el(),this.hide(),this.on("menuchange",this.re)}},ha=class extends ra{get ce(){return this.le}set ce(t){this.le&&this.le.de(this),this.le=t,t&&t.fe(this)}ve(t){this.ce.pe(t,"replace")}me(t){t.ce.pe(this,"restore")}ge(){ni(this.ye,"vjs-hidden"),this.ye.style.opacity="1",super.show()}be(){si(this.ye,"vjs-hidden")}zs(){this.ce&&this.ce.zs(),super.zs()}Ws(){this.ce&&this.ce.Ws(),super.Ws(),si(this.ye,"vjs-hidden")}he(){if(this.ce&&this.ce.ke)return this.ce.ke.ye}ae(t,i){if(i.length>0){const t=i[0].height,s=i[0].width;this.le.we.style.height=t+"px",this.le.we.style.width=s+"px"}super.ae(t,i)}constructor(t,i){super(t,i)}};f();var oa=class{get we(){return this.Vs}get ke(){return this._e}fe(t){t.be(),this.Vs.appendChild(t.ye)}de(t){this.Vs.removeChild(t.ye)}pe(t,i){if(t==this._e)return;const s=this._e;if(this._e=t,this._e.ge(),this.ke.focus(),vi.Ys.Qs)s.be();else{const t="translateX(100%)",e="translateX(-100%)",n=bi("transform");s.ye.style.opacity="0",s.ye.style[n]="replace"===i?e:t,this._e.ye.style.opacity="1",this._e.ye.style[n]="",u((()=>{s.be(),s.ye.style[n]=""}),300)}}zs(){this.xe(),this._e.ge(),this.Ce()}Ws(){this.xe(),this._e.be(),this.Se.be(),this._e=this.Se,this.Ce()}Ce(){fi((()=>{ni(this.Vs,"theo-no-transition"),ni(this._e.ye,"theo-no-transition")}))}xe(){si(this.Vs,"theo-no-transition"),si(this._e.ye,"theo-no-transition")}constructor(t){this.Se=this._e=t,this.Vs=h.createElement("div"),this.Vs.className="theo-tertiary-background theo-menu-animation-container",this.Vs.appendChild(this.Se.ye),this.ue=this._e.player().el()}};f(),f();var aa=class extends ha{get ye(){return this.el()}get parentMenu(){return this.je}ee(t,i){const s=new ua(t,i,this);return s.subMenu.ce=this.ce,s}ie(){this.Te()}Js(t){super.Js(t),this.Te()}Te(){this.parentMenu.me(this)}buildCSSClass(){return"theo-submenu "+(this.Me?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Me=!0;const i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Me=!1,this.je=s,this.menuHeader.Ks=!0}},ua=class extends sa{get subMenu(){return this.Ae}handleClick(t){this.parentMenu.ve(this.subMenu)}constructor(t,i,s){super(t,z({selectable:!1},i),s),this.Ae=new aa(t,i,s)}},ca=class extends ha{get menuButton(){return this.Pe}createEl(){const t=No.createEl("div",{className:this.buildCSSClass()});return this.Ne=super.createEl(),this.Ne.className=super.buildCSSClass(),si(this.Ne,"theo-menu-content-animatable"),t.appendChild(this.Ne),this.ce=new oa(this),t.appendChild(this.ce.we),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}ee(t,i){const s=new ua(t,i,this);return s.subMenu.ce=this.ce,s}ae(t,i){super.ae(t,i);const s=this.ue.getClientRects(),e=s.length>0?s[0]:void 0,n=C(getComputedStyle(this.el()).fontSize);Q(this.el(),this.Pe.el(),e,n)}get ye(){return this.Ne}ie(){this.Pe.closeMenu()}dispose(){this.Ee||(this.Ee=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ee=!1,this.Pe=s}};f();var la=class{set Be(t){this.Ie.innerHTML=this.Fe.localize(t),this.De()&&this.$e(),ci(this.Fe.el())}get Be(){return this.Ie.textContent||""}De(){return!ti(this.Ie,"vjs-hidden")}Re(){this.Fe.off("mouseover",this.$e),this.Fe.off("mouseout",this.Ue),this.Fe.off("dispose",this.Oe),Qt(this.Ie)}constructor(t,i){this.$e=()=>{ni(this.Ie,"vjs-hidden");const t=this.Fe.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=C(getComputedStyle(this.Ie).fontSize);Q(this.Ie,this.Fe.el(),i,s)},this.Ue=()=>{si(this.Ie,"vjs-hidden")},this.Oe=()=>this.Re(),this.Fe=t,ci(t.el()),di(t.el()),this.Ie=h.createElement("span"),this.Ie.innerHTML=this.Fe.localize(i),this.Ie.className="theo-button-tooltip vjs-hidden",this.Ie.setAttribute("aria-hidden","true"),this.Fe.el().appendChild(this.Ie),this.Fe.on("mouseover",this.$e),this.Fe.on("mouseout",this.Ue),this.Fe.on("dispose",this.Oe)}},da=No.getComponent("Button"),fa=class extends(Oo(da)){get Ve(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.Le}isMenuOpen(){return this.He}openMenu(){this.qe&&!this.He&&(this.Le.zs(),this.el().setAttribute("aria-expanded","true"),this.He=!0,this.Le.focus())}closeMenu(){this.qe&&this.He&&(this.Le.Ws(),this.el().setAttribute("aria-expanded","false"),this.He=!1)}set minimumMenuItems(t){this.ze=t,this.We()}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.He?this.closeMenu():this.openMenu()}enable(){return this.qe=!0,super.enable()}disable(){return this.closeMenu(),this.qe=!1,super.disable()}te(){this.Ie.Be=this.controlText()}dispose(){this.player().removeChild(this.Le),this.Le.dispose(),this.Ie.Re(),this.ws.removeEventListener("seeking",this.Ge),super.dispose()}constructor(t,i){super(t,i),this.He=!1,this.ze=1,this.qe=!0,this.Xe=t=>{const i=this.el().contains(t.target),s=this.Le.el().contains(t.target);let e=!1;var n;vi.Ys.Qs&&this.Ve&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.He||(e&&t.preventDefault(),this.closeMenu())},this.Je=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.Ge=()=>{this.He&&this.closeMenu()},this.We=()=>{this.Le.menuItems.length>=this.ze?this.show():(this.closeMenu(),this.hide())},this.Le=new ca(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.Le),this.Ie=new la(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),vi.Ys.Qe?(this.on(h,"touchend",this.Xe),new Ko(this.el())):(this.on(h,"click",this.Xe),this.on(h,"keydown",this.Je),Si&&this.on(h,Si.Ye,this.closeMenu)),this.ws.addEventListener("seeking",this.Ge),this.on(this.Le,"menuchange",this.We),this.on(t,"languagechange",this.te),this.We()}},va=No.getComponent("Component"),pa=class extends(No.getComponent("ControlBar")){addMenuButton(t){t=z({playerOptions:this.h.playerOptions},t);const i=new fa(this.player(),t);return this.addChild(i),i}removeMenuButton(t){this.removeChild(t)}createEl(){const 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)}};No.registerComponent("THEOControlBarShadow",class extends va{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}}),f(),f();var ma=No.getComponent("VolumeBar"),ga=class extends ma{handleFocus(t){super.handleFocus(t),this.Ke.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.Ke.removeClass("focus-within")}constructor(t,i){super(t,i),this.Ke=i.Ze}};f();var ya=No.getComponent("VolumeControl"),ba=class extends ya{constructor(t,i){super(t,i),this.tn=new ga(t,{Ze:this}),this.addChild(this.tn)}};ba.prototype.h=z({},ya.prototype.h,{children:[]}),No.registerComponent("VolumeControl",ba);var ka=class extends(Oo(pa)){sn(){this.nn(this.rn())}hn(){0===this.an&&(this.an=u(this.un,100))}cn(t){"opacity"===t.propertyName&&(0!==this.an&&(c(this.an),this.an=0),this.nn(!0))}ln(t){"opacity"===t.propertyName&&(this.rn()||this.nn(!1))}rn(){return"0"!==s.getComputedStyle(this.el()).opacity}nn(t){this.dn!==t&&(this.dn=t,t?this.fn():this.ws.textTrackStyle.marginBottom=void 0)}fn(){const t=this.el().getBoundingClientRect().height;this.ws.textTrackStyle.marginBottom!==t&&(this.ws.textTrackStyle.marginBottom=t)}dispose(){c(this.an),this.an=0,this.pn.vn(pi.mn,this.gn),this.pn.yn(),super.dispose()}constructor(t,i){super(t,i),this.dn=!1,this.an=0,this.un=()=>{0!==this.an&&(this.an=0,this.nn(this.rn()))},this.gn=()=>{this.dn&&this.fn()},this.on(t,"ready",this.sn),this.on(t,"pause",this.sn),this.on(t,"useractive",this.sn),this.on(t,"firstplay",this.hn),this.on(t,"play",this.hn),this.on(t,"userinactive",this.hn),this.on("transitionstart",this.cn),this.on("transitionend",this.ln),this.pn=new wi(this.el()),this.pn.bn(pi.mn,this.gn),this.pn.kn(!0)}};ka.prototype.h=z({},pa.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),No.registerComponent("ControlBar",ka),f();var wa=class extends pa{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};wa.prototype.h=z({},pa.prototype.h,{children:[]}),No.registerComponent("TopControlBar",wa),f();var _a=No.getComponent("CurrentTimeDisplay"),xa=class extends(Oo(_a)){updateContent(){const t=Io(this.player()),i=this.ws,s=Do(i),e=this.localize("Current Time"),n=Uo(_.max(0,t-s),$o(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)}};No.registerComponent("CurrentTimeDisplay",xa),f();var Ca=No.getComponent("DurationDisplay"),Sa=class extends(Oo(Ca)){updateContent(){const t=this.ws,i=S(t.duration)?NaN:$o(t),s=t.clip.endTime-t.clip.startTime,e=_.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=Uo(e);this.S.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}dispose(){var t;null==(t=this.ws)||t.clip.removeEventListener("change",this.wn),super.dispose()}constructor(t,i){var s;super(t,i),this.wn=()=>this.updateContent(),this.off(t,"durationchange",this.updateContent),this.on(t,"durationchange",this.updateContent),this.off(t,"timeupdate",this.updateContent),this.on(t,"timeupdate",this.updateContent),this.off(t,"emptied",this.updateContent),this.on(t,"emptied",this.updateContent),null==(s=this.ws)||s.clip.addEventListener("change",this.wn)}};No.registerComponent("DurationDisplay",Sa),f();var ja=No.getComponent("Button"),Ta=class extends(Oo(ja)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){const t=super.createEl("button",{},{"aria-live":"off"});return this._n=No.createEl("span",{className:"theo-live-control-indicator"}),Kt(t,this._n),t}createControlTextEl(t){const i=super.createControlTextEl(t);return No.removeClass(i,"vjs-control-text"),No.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.ws;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Fo(i)),t.play()}}xn(){Bo(this.ws)?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),vi.Ys.Qe&&new Ko(this.el())}};No.registerComponent("LiveDisplay",Ta),f();var Ma=No.getComponent("LoadingSpinner");No.registerComponent("LoadingSpinner",class extends Ma{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){const t=super.createEl();t.className=this.buildCSSClass();const i=No.createEl("div",{className:"theo-loading-spinner-rotator"}),s=No.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=No.createEl("div",{className:"theo-loading-spinner-circle-right"});return i.appendChild(s),i.appendChild(e),t.appendChild(i),t}constructor(t,i){super(t,i)}}),f();var Aa=No.getComponent("LoadProgressBar"),Pa=class extends(Oo(Aa)){update(){const t=this.ws,i=Wt.Cn(Ro(t)),s=i.Sn(0),e=Wt.Cn(t.buffered).jn(i),n=i.Tn(0)-s;let r=e.V&&e.Tn(e.V-1)||0;r=_.max(0,r-s);const o=this.el(),a=this.Mn;o.style.width=Na(r,n);for(let t=0;t<e.V;t++){const i=e.Sn(t),n=e.Tn(t);let u=a[t];u||(u=h.createElement("div"),a.push(u),o.appendChild(u)),u.style.left=Na(i-s,r),u.style.width=Na(n-i,r)}for(let t=a.length;t>e.V;t--)o.removeChild(a[t-1]);a.length=e.V}constructor(t,i){super(t,i),this.Mn=[],this.on(t,"emptied",this.update)}};function Na(t,i){const s=t/i||0;return 100*(s>=1?1:s)+"%"}No.registerComponent("LoadProgressBar",Pa),f();var Ea=No.getComponent("MouseTimeDisplay"),Ba=class extends(Oo(Ea)){handleMouseMove(t){const i=t,s=this.ws,e=Do(s)+this.calculateDistance(i)*$o(s),n=i.pageX-X(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){const i=t,s=this.ws,e=Do(s)+this.calculateDistance(i)*$o(s),n=i.touches[0].pageX-X(this.el().parentNode).left;this.update(e,n+"px")}createEl(){const t=super.createEl();return this.An=No.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.Pn=t;const s=this.Nn(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(d(this.An,s),this.En())}En(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){const t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=C(getComputedStyle(t).fontSize);Q(this.tooltip,this.el(),s,e)}}Nn(t){const i=this.ws,s=t-Fo(i);return Uo(Bo(i)?_.min(s,0):s,$o(i))}dispose(){var t;this.ws.removeEventListener("dimensionchange",this.Bn),null==(t=this.ws.presentation)||t.removeEventListener(Ai.MODE_CHANGE,this.Bn),super.dispose()}constructor(t,i){var s;(super(t,i),this.Pn=NaN,this.Bn=()=>{const t=Io(this.player()),i=this.ws;let s=(t-Do(i))/$o(i)||0;s=Ci(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(No.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.An)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),Dt.Qs)&&(this.on(t,"firstplay",this.Bn),this.on(t,"play",this.Bn),this.on(t,"seeking",this.Bn),this.on(t,"seeked",this.Bn),this.on(t,"timeupdate",this.Bn),this.ws.addEventListener("dimensionchange",this.Bn),null==(s=this.ws.presentation)||s.addEventListener(Ai.MODE_CHANGE,this.Bn),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",yi((t=>this.handleTouchMove(t)),25)),this.Bn()})))}};No.registerComponent("MouseTimeDisplay",Ba),f();var Ia=No.getComponent("PlayProgressBar"),Fa=class extends(Oo(Ia)){updateDataAttr(){const t=Io(this.player());this.el().setAttribute("data-current-time",this.Nn(t))}Nn(t){const i=this.ws;return Uo(t-Fo(i),$o(i))}createEl(){const 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)}};No.registerComponent("PlayProgressBar",Fa),f();var Da=No.getComponent("RemainingTimeDisplay"),$a=class extends(Oo(Da)){updateContent(){const t=this.ws,i=$o(t);if(i){const s=Ro(t).end(0),e=this.localize("Remaining Time"),n=Uo(_.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)}};No.registerComponent("RemainingTimeDisplay",$a),f(),f();var Ra=class{get ws(){var t;return null!=(t=this._s)?t:this._s=Vo(this.In)}Fn(){const t=this.Dn;if(!t)return;const i=this.ws;if(0===i.seekable.length)return;const s=t.cues.slice();this.Rn.$n(s);for(let t=0;t<s.length;t++){const e=s[t],n=s[t+1],r=!n||e.endTime!==n.startTime,h=new Ua(e,i,r);this.Un.push(h),this.On.appendChild(h.we)}}Vn(){this.ws.addEventListener("loadedmetadata",this.Ln),this.ws.addEventListener("loadeddata",this.Ln),this.ws.addEventListener("sourcechange",this.Ln),this.ws.addEventListener("durationchange",this.Hn),this.ws.clip.addEventListener("change",this.Hn),this.ws.textTracks.addEventListener("addtrack",this.qn),this.ws.textTracks.addEventListener("removetrack",this.zn),this.ws.textTracks.addEventListener("change",this.Ln)}Wn(){this.ws.removeEventListener("loadedmetadata",this.Ln),this.ws.removeEventListener("loadeddata",this.Ln),this.ws.removeEventListener("sourcechange",this.Ln),this.ws.removeEventListener("durationchange",this.Hn),this.ws.clip.removeEventListener("change",this.Hn),this.ws.textTracks.removeEventListener("addtrack",this.qn),this.ws.textTracks.removeEventListener("removetrack",this.zn),this.ws.textTracks.removeEventListener("change",this.Ln)}Gn(){if(!(this.ws.readyState<Et.Xn))for(const t of this.ws.textTracks)if(t.kind===jt.Jn&&t.mode===Ct.Qn&&t.cues.length>0&&t.readyState!==kt.ERROR)return t}Yn(t){const i=this.Dn;t!==i&&(i&&(this.Kn(),i.removeEventListener("cuechange",this.Zn)),this.Dn=t,t&&(t.addEventListener("cuechange",this.Zn),this.Hn()))}tr(t){this.Rn.ir(t)}sr(){this.Rn.ge()}er(){this.Rn.be()}Kn(){for(const t of this.Un)t.Re();this.Rn.nr(),this.Un=[],this.rr=void 0}Re(){this.Wn(),this.hr.removeEventListener("mousemove",this.ar),this.hr.removeEventListener("mouseenter",this.ur),this.hr.removeEventListener("mouseleave",this.cr),this.Yn(void 0),this.Rn.Re(),this._s=void 0}constructor(t,i){this.In=i,this.Un=[],this._s=void 0,this.Ln=()=>{this.Yn(this.Gn())},this.qn=t=>{const i=t.track;i.kind===jt.Jn&&(i.addEventListener("addcue",this.Ln),i.addEventListener("removecue",this.Ln),i.addEventListener("readystatechange",this.Ln)),this.Ln()},this.zn=t=>{const i=t.track;i.kind===jt.Jn&&(i.removeEventListener("addcue",this.Ln),i.removeEventListener("removecue",this.Ln),i.removeEventListener("readystatechange",this.Ln)),this.Ln()},this.ar=t=>{const i=this.ws,s=function(t,i){const s=X(t),e=t.offsetWidth,n=t.offsetHeight,r=s.top,h=s.left;let o,a;!function(t){return void 0!==t.changedTouches}(i)?(a=i.pageX,o=i.pageY):(a=i.changedTouches[0].pageX,o=i.changedTouches[0].pageY);const u=Ci((r-o+n)/n,0,1),c=Ci((a-h)/e,0,1);return{x:c,y:u}}(this.On,t);let e=Do(i)+s.x*$o(i);e===i.duration&&(e-=.1),this.tr(e)},this.cr=()=>{this.Rn.be()},this.ur=()=>{this.Rn.ge()},this.Hn=()=>{this.Dn&&(this.Kn(),this.Fn(),this.Zn())},this.Zn=()=>{var t,i,s;const e=null==(i=this.Dn)||null==(t=i.activeCues)?void 0:t[0],n=Pi(this.Un,(t=>t.lr===e));n!==this.rr&&(null==(s=this.rr)||s.dr(),this.rr=n,null==n||n.pr())},this.hr=t,this.Rn=new Oa,this.In.contentEl().appendChild(this.Rn.we),this.On=h.createElement("div"),si(this.On,"theoplayer-chapterbar"),this.hr.appendChild(this.On),this.hr.addEventListener("mousemove",this.ar),this.hr.addEventListener("mouseenter",this.ur),this.hr.addEventListener("mouseleave",this.cr),this.Vn()}},Ua=class{get we(){return this.Vs}pr(){si(this.Vs,"theoplayer-chapter-indicator-active")}dr(){ni(this.Vs,"theoplayer-chapter-indicator-active")}mr(t,i){const s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1),n=e-s,r=this.lr.startTime,o=this.lr.endTime,a=o>=s&&r<=e,u=Ci(r-s,0,n),c=Ci(o-s,0,n),l=_.max(0,c-u),d=h.createElement("div");si(d,"theoplayer-chapter-indicator");const f=h.createElement("div");si(f,"theoplayer-chapter-indicator-highlight"),d.appendChild(f),i&&si(d,"theoplayer-chapter-indicator-discontinuous");const v=u/n*100,p=l/n*100;return d.style.display=a?"":"none",d.style.width=p+"%",d.style.left=v+"%",d}Re(){Qt(this.Vs)}constructor(t,i,s){this.lr=t,this.Vs=this.mr(i,s)}},Oa=class{be(){this.gr--,0===this.gr&&ni(this.we,"theoplayer-chapter-hovering")}$n(t){this.yr=t||[],this.yr.length>0&&(this.we.style.display="")}br(t){d(this.kr,t.content)}nr(){this.yr=[],d(this.kr,""),this.we.style.display="none"}ge(){this.gr++,this.gr>0&&si(this.we,"theoplayer-chapter-hovering")}ir(t){for(const i of this.yr)if(Va(i,t)){this.br(i);break}}Re(){Qt(this.we)}constructor(){this.yr=[],this.gr=0,this.we=h.createElement("div"),si(this.we,"theoplayer-chaptertitle"),this.we.style.display="none",this.kr=h.createElement("p"),this.we.appendChild(this.kr)}};function Va(t,i){return new Wt([t.startTime,t.endTime]).wr(i)}var La=No.getComponent("SeekBar"),Ha=class extends(Oo(La)){updateAriaAttributes(t){const i=Io(this.player()),s=this.ws;t.setAttribute("aria-valuenow",(100*this._r(i)).toFixed(2)),t.setAttribute("aria-valuetext",Uo(i-Fo(s),$o(s)))}getPercent(){return this._r(this.player().currentTime())}handleMouseMove(t){if(this.ws&&this.ws.ads&&this.ws.ads.playing)return;const i=this.ws;let s=Do(i)+this.calculateDistance(t)*$o(i);s>=i.duration&&(s=i.duration-.1),this.On.tr(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.On.sr(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.On.er(),super.handleMouseUp(t)}_r(t){const i=this.ws,s=(t-Do(i))/$o(i);return Ci(s,0,1)}dispose(){this.On.Re(),B(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.On=new Ra(this.el(),t)}};No.registerComponent("SeekBar",Ha),f();var qa=No.getComponent("ProgressControl");vi.Ys.Qs&&No.registerComponent("ProgressControl",class extends qa{createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(t){this.seekBar.handleMouseMove(t)}handleMouseDown(t){this.seekBar.handleMouseDown(t)}constructor(t,i){super(t,i),this.on(this,"touchmove",this.handleMouseMove),this.on("touchstart",this.handleMouseDown),this.seekBar.off(["touchmove","touchstart"])}}),f();var za=No.getComponent("TooltipProgressBar"),Wa=class extends(Oo(za)){updateDataAttr(){const t=Io(this.player()),i=this.Nn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}Nn(t){const i=this.ws;return Uo(t-Fo(i),$o(i))}createEl(){const 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 Ga(t){for(const i of t)if(i.enabled)return i}function Xa(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:Ja(t),description:Qa(t),hd:!!t.height&&t.height>=720}}function Ja(t){return t.height?t.height+"p":t.bandwidth?Qa(t):""}function Qa(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":""}No.registerComponent("TooltipProgressBar",Wa),f(),f(),f(),f(),f();var Ya=class{get Cr(){return this.Sr}set Cr(t){const i=this.Sr;for(let s=i.length-1;s>=0;s--){const e=i[s];N(t,e)||this.jr(e)}for(const i of t)this.Tr(i);this.Mr.re()}get Ar(){return this.Mr.menuItems}Pr(t){const i=this.Ar;if(i)for(const s of i)if(s.Nr===t)return s}Er(t){const i=this.Mr.addMenuItem();return i.Nr=t,i.on("click",(()=>this.Br(i))),i.el().setAttribute("role","menuitemradio"),i}Ir(t){t.dispose()}Fr(t){return!0}Tr(t){if(this.Fr(t)){N(this.Sr,t)||this.Sr.push(t);const i=this.Pr(t)||this.Er(t);return this.Dr(i),i}this.jr(t)}jr(t){const i=this.Pr(t);i&&(this.Mr.removeMenuItem(i),this.Ir(i)),A(this.Sr,t)}Re(){const t=[];for(const i of this.Sr)t.push(i);for(const i of t)this.jr(i);B(t)}constructor(t){this.Sr=[],this.Mr=t}},Ka=class extends Ya{$r(){return this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",d(this.Rr,this.Ur.localize("Quality")),this.Rr}Or(){return this.Vr=h.createElement("span"),this.Vr.className="theo-settings-control-menu-quality-automatic",d(this.Vr,this.Ur.localize("Automatic")),this.Vr}Lr(){return this.Hr=h.createElement("span"),d(this.Hr,this.Ur.localize("Automatic")),this.Hr}qr(){return this.zr=h.createElement("span"),this.zr.className="theo-primary-color theo-settings-control-menu-item-hd-label",d(this.zr,this.Ur.localize("HD")),this.zr}Wr(){const t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Vr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Hr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.zr),this.Gr.el().appendChild(this.Rr),this.Gr.el().appendChild(t),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video quality settings menu"))}Xr(){const t=this.Jr,i=t&&ru(t.targetQuality),s=t&&t.activeQuality,e=Xa(this.Qr(i||s))||{name:this.Ur.localize("Automatic")};d(this.Hr,e.name),hi(this.Vr,"vjs-hidden",Boolean(i)),hi(this.zr,"vjs-hidden",!e.hd)}Dr(t){const i=Xa(t.Nr)||{name:this.Ur.localize("Automatic")};let s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.Ur.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.Ur.localize("Set video quality to ")+i.name),t.Nr?t.selected(t.Nr===this.Yr):t.selected(!this.Yr)}Br(t){this.Jr&&(this.Jr.targetQuality=t.Nr&&t.Nr.videoQualities)}Qr(t,i){const s=i||this.Cr;for(const i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Re(){this._s.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Kr),this.Ur.off("languagechange",this.te),this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr.removeEventListener("targetqualitychanged",this.th),this.Jr.removeEventListener("update",this.ih)),super.Re()}constructor(t,i,s){super(t.subMenu),this.Jr=void 0,this.Yr=void 0,this.Kr=()=>{const t=Ga(this._s.videoTracks);if(t===this.Jr)return;let i=[];if(this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr.removeEventListener("targetqualitychanged",this.th),this.Jr.removeEventListener("update",this.ih)),this.Jr=t,t){t.addEventListener("activequalitychanged",this.Zr),t.addEventListener("targetqualitychanged",this.th),t.addEventListener("update",this.ih);const s=tu(eu(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.Cr=i,this.th(),this.Zr()},this.ih=t=>{const i=t.track;if(i!==this.Jr)return;const s=tu(eu(i.qualities.filter((t=>t.available)))),e=i&&ru(i.targetQuality);let n;this.Yr=this.Qr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.Cr=n,this.Xr()},this.Zr=()=>{this.Tr(void 0),this.Xr()},this.th=()=>{const t=Ga(this._s.videoTracks),i=t&&ru(t.targetQuality),s=this.Qr(i),e=this.Yr;s!==e&&(this.Yr=s,s&&e||this.Tr(void 0),e&&N(this.Cr,e)&&this.Tr(e),i&&this.Tr(s),this.Xr())},this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Quality")),d(this.Rr,this.Ur.localize("Quality")),d(this.Vr,this.Ur.localize("Automatic")),d(this.Hr,this.Ur.localize("Automatic")),d(this.zr,this.Ur.localize("HD")),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video quality settings menu"));for(const t of this.Ar)this.Dr(t);this.Xr()},this.Gr=t,this._s=i,this.Ur=s,this.Rr=this.$r(),this.Vr=this.Or(),this.Hr=this.Lr(),this.zr=this.qr(),this.Wr(),d(this.Mr.menuHeader.el(),this.Ur.localize("Quality")),this.Cr=[void 0],this._s.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Kr),this.Ur.on("languagechange",this.te),this.Kr()}},Za=class{get height(){return this.sh[0].height}get bandwidth(){return this.sh[0].bandwidth}get videoQualities(){return this.sh}get label(){return this.sh[0].label}add(t){this.sh.push(t)}constructor(t){this.sh=t}};function tu(t){const i=[];for(const s of t){const t=s;let e=!1;for(const s of i)if(nu(s,t)){s.add(t),e=!0;break}e||i.push(new Za([t]))}return i}function iu(t,i){return t&&i?Mi(t,i):ji.eh}function su(t,i){return t===i?ji.eh:iu(t.height,i.height)||iu(t.width,i.width)||iu(t.bandwidth,i.bandwidth)}function eu(t){return _i(t,su).reverse()}function nu(t,i){return t.label&&i.label&&t.label===i.label||ct(Xa(t),Xa(i))}function ru(t){return Lt(t)?1===t.length?t[0]:void 0:t}function hu(t){return 1===t?"Normal":""+_.round(100*t)/100}f();var ou=class extends Ya{$r(){return this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",d(this.Rr,this.Ur.localize("Speed")),this.Rr}Wr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Gr.el().appendChild(this.Rr),this.Gr.el().appendChild(t),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video speed settings menu")),t}Er(t){const i=super.Er(t);return this.Dr(i),i}Dr(t){const i=t.Nr,s=this.Ur.localize(hu(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Ur.localize("Set video speed to ")+s),t.selected(t.Nr===this._s.playbackRate)}Br(t){this._s.playbackRate=t.Nr}Re(){this._s.removeEventListener("ratechange",this.nh),this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.rh=void 0,this.nh=()=>{this.rh&&this.Tr(this.rh);const t=this._s.playbackRate;this.rh=t,d(this.hh,this.Ur.localize(hu(t))),t&&this.Tr(t)},this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Speed")),d(this.Rr,this.Ur.localize("Speed")),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video speed settings menu"));for(const t of this.Ar)this.Dr(t);this.nh()},this.Gr=t,this._s=i,this.Ur=s,this.Rr=this.$r(),this.hh=this.Wr(),d(this.Mr.menuHeader.el(),this.Ur.localize("Speed")),this.Cr=e,this._s.addEventListener("ratechange",this.nh),this.Ur.on("languagechange",this.te),this.nh()}};No.registerComponent("SettingsButton",class extends fa{createEl(){const t=super.createEl();return this.oh=No.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),d(this.oh,this.localize("HD")),t.appendChild(this.oh),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}te(){super.te(),d(this.oh,this.localize("HD")),d(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr=void 0),this.ws.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.ah),this.uh.Re(),this.lh.Re(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.Jr=void 0,this.ah=()=>{const t=Ga(this.ws.videoTracks);t!==this.Jr&&(this.Jr&&this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr=t,t&&t.addEventListener("activequalitychanged",this.Zr),this.Zr())},this.Zr=()=>{var t;const i=null==(t=this.Jr)?void 0:t.activeQuality,s=Boolean(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},si(this.menu.el(),"theo-settings-control-menu"),d(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Ie.Be=this.controlText(),this.dh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.uh=new Ka(this.dh,this.ws,t);const n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.fh=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.lh=new ou(this.fh,this.ws,t,n),this.ws.videoTracks.addEventListener(["addtrack","removetrack","change"],this.ah),this.ah()}}),f(),f(),f();var au=class extends Ya{ph(t){const i=t.label;if(i)return i;const s=t.language;if(s){const t=St(s);if(t)return t.mh}return s||""}gh(){this.Cr=this.yh}Re(){this.yh.removeEventListener("addtrack",this.bh),this.yh.removeEventListener("removetrack",this.kh),this.yh.removeEventListener("change",this.wh),super.Re()}constructor(t,i){super(t),this.bh=t=>{const i=t.track;this.Tr(i),i.addEventListener("update",this._h)},this.kh=t=>{const i=t.track;this.jr(i),i.removeEventListener("update",this._h)},this.wh=t=>this.gh(),this._h=()=>{for(const t of this.Cr)this.Tr(t)},this.yh=i,this.yh.addEventListener("addtrack",this.bh),this.yh.addEventListener("removetrack",this.kh),this.yh.addEventListener("change",this.wh),this.gh()}},uu=class extends au{Dr(t){const i=t.Nr,s=this.Ur.localize(this.ph(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Ur.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Br(t){const i=t.Nr;for(const t of this.ws.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Re(){this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.audioTracks),this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Language"));for(const t of this.Ar)this.Dr(t)},this.ws=i,this.Ur=s,d(this.Mr.menuHeader.el(),this.Ur.localize("Language")),this.Ur.on("languagechange",this.te)}};No.registerComponent("audioTrackButton",class extends fa{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.xh.Re(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.xh=new uu(this.menu,this.ws,t),this.controlText("Language"),this.Ie.Be=this.controlText()}}),f(),f();var cu=class extends au{Fr(t){return!!super.Fr(t)&&(!t.forced&&At(t.kind))}Er(t){const i=super.Er(t);si(i.el(),"theo-text-track-menu-item");const s=h.createElement("span");i.Ch=s;const e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.Sh=e;const n=t=>this.jh(t,i);i.Th=n,e.addEventListener("click",n);const 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}Dr(t){const i=t,s=i.Nr,e=this.Ur.localize(this.ph(s));d(i.Ch,e),i.el().setAttribute("aria-label",this.Ur.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===Ct.Qn)}Ir(t){const i=t;i.Sh.removeEventListener("click",i.Th),super.Ir(t)}Br(t){const i=t.Nr;for(const t of this.ws.textTracks)t!==i&&T(t.kind,i.kind)&&(t.mode=Ct.Mh);i.mode!==Ct.Qn?i.mode=Ct.Qn:i.mode=Ct.Mh}jh(t,i){t.stopImmediatePropagation(),this.Br(i)}Re(){this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.textTracks),this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Subtitles"));for(const t of this.Ar)this.Dr(t)},this.ws=i,this.Ur=s,d(this.Mr.menuHeader.el(),s.localize("Subtitles")),this.Ur.on("languagechange",this.te)}};No.registerComponent("subtitlesButton",class extends fa{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.xh.Re(),super.dispose()}constructor(t,i){super(t,i),this.xh=new cu(this.menu,this.ws,t),this.controlText("Subtitles"),this.Ie.Be=this.controlText()}}),f();var lu=No.getComponent("playToggle"),du=class extends(Oo(lu)){handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Ie.Be=this.controlText()}handlePause(t){this.ws.ended||(super.handlePause(t),this.controlText("Play"),this.Ie.Be=this.controlText())}te(){this.Ie.Be=this.controlText()}dispose(){this.Ie.Re(),this.ws.removeEventListener("ended",this.Ah),super.dispose()}constructor(t,i){super(t,i),this.Ah=()=>{this.controlText("Replay"),this.Ie.Be=this.controlText()},this.controlText("Play"),this.Ie=new la(this,this.controlText()),this.ws.addEventListener("ended",this.Ah),this.on(t,"languagechange",this.te),vi.Ys.Qe&&new Ko(this.el())}};No.registerComponent("playToggle",du),f();var fu=No.getComponent("fullscreenToggle"),vu=class extends(Oo(fu)){handleClick(t){this.ws.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.Ie.Be=this.controlText()}dispose(){this.Ie.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Ie=new la(this,this.controlText()),vi.Ys.Qe&&new Ko(this.el()),this.on(t,"languagechange",this.updateContent)}};No.registerComponent("fullscreenToggle",vu),f();var pu=No.getComponent("muteToggle"),mu=class extends(Oo(pu)){handleClick(t){this.ws.muted&&!this.ws.paused&&this.ws.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.te()}te(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Ie.Be=this.controlText()}dispose(){this.Ie.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Ie=new la(this,this.controlText()),vi.Ys.Qe&&new Ko(this.el()),this.on(t,"languagechange",this.te),U&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};No.registerComponent("muteToggle",mu),f();var gu=No.getComponent("BigPlayButton"),yu="theo-play-svg-circle",bu='<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="'+yu+'" 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>',ku=class extends(Oo(gu)){createEl(){const t=super.createEl(),i=No.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML=bu,t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t),void 0!==this.ws.vr&&"unavailable"!==this.ws.vr.state&&(this.ws.vr.useDeviceMotionControls=!0)}};No.registerComponent("BigPlayButton",ku),f();var wu=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;No.registerComponent("MouseTimeDisplay",class extends Ba{Ph(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Nh&&(this.Nh=i,this.Eh=i.src?vi.Bh(i.src).href:void 0,this.Nh.addEventListener(["addcue","removecue"],this.Ih),this.Fh())}Dh(t){t.track===this.Nh&&this.$h()}createEl(){const t=super.createEl();return this.Rh=No.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Uh=No.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Oh(t)}Oh(t){let i;if(this.Nh&&this.Nh.cues){const s=function(t,i){let s=t[0];for(const e of t)if(e.startTime<=i)s=e;else if(i>=e.endTime)return s;return s}(this.Nh.cues,t);i=s&&s.content}if(i===this.Vh)return;if(this.Vh=i,No.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",Boolean(i)),!i)return void this.Lh();const s=i.match(wu);if(s){let[,t,i,e,n,r]=s;t=this.Hh(t);const h={qh:Number(i),zh:Number(e),ji:Number(n),Ti:Number(r)};this.Wh(t,h)}else{const t=this.Hh(i);this.Wh(t)}}Fh(){S(this.Pn)||this.Oh(this.Pn)}Hh(t){return this.Nh&&this.Eh?vi.Bh(t,this.Eh).href:t}Wh(t,i){this.Rh&&(this.Rh.src!==t?(this.Rh.onload=()=>{this.Gh(i)},this.Rh.src="",this.Rh.src=t):this.Gh(i))}Gh(t){if(!this.Uh||!this.Rh)return;const i=this.Uh.getContext("2d");i&&(null!=t||(t={qh:0,zh:0,ji:this.Rh.naturalWidth,Ti:this.Rh.naturalHeight}),this.Uh.width=t.ji,this.Uh.height=t.Ti,i.drawImage(this.Rh,t.qh,t.zh,t.ji,t.Ti,0,0,t.ji,t.Ti),this.Xh(this.Uh))}Xh(t){this.Jh||(Kt(this.tooltip,t),this.Jh=t),this.En()}Lh(){this.Jh&&(this.tooltip.removeChild(this.Jh),this.Jh=void 0,this.En())}$h(){void 0!==this.Nh&&(this.Nh.removeEventListener(["addcue","removecue"],this.Ih),this.Nh=void 0),this.Eh=void 0,this.Lh(),this.Vh=void 0}dispose(){this.$h(),super.dispose()}constructor(t,i){super(t,i),this.Jh=void 0,this.Nh=void 0,this.Eh=void 0,this.Qh=t=>this.Ph(t),this.Yh=t=>this.Dh(t),this.Ih=t=>this.Fh(),this.showThumbnails=()=>{this.Jh&&this.Jh.hidden&&(this.Jh.hidden=!1,this.En())},this.hideThumbnails=()=>{!this.Jh||this.Jh.hidden||this.player().scrubbing()||(this.Jh.hidden=!0,this.En())},this.on(this.player().textTracks(),"addtrack",this.Qh),this.on(this.player().textTracks(),"removetrack",this.Yh),Dt.Qs&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}}),f();var _u=No.getComponent("VolumeLevel");No.registerComponent("VolumeLevel",class extends _u{createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}}),f(),f();var xu=No.getComponent("Component"),Cu=class extends xu{createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};Cu.prototype.h=z({},Cu.prototype.h,{children:[]}),No.registerComponent("controlBarMenuContainer",Cu);var Su=No.getComponent("Player"),ju=class extends Su{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),Qt(i),this.Ci&&s&&(e?s.insertBefore(t,e):s.appendChild(t)),h.body.removeEventListener("keydown",this.handleKeyPress),h.body.removeEventListener("click",this.handleClick)}constructor(t,i,s){super(t,i,s),this.handleKeyPress=t=>{9===t.which&&this.addClass("theo-probably-keyboard-focus")},this.handleClick=t=>{0===t.x&&0===t.y||this.removeClass("theo-probably-keyboard-focus")},h.body.addEventListener("keydown",this.handleKeyPress),h.body.addEventListener("click",this.handleClick)}};ju.prototype.h=z({},Su.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),No.registerComponent("Player",ju),f(),f();var Tu=No.getComponent("Player"),Mu=Tu.prototype.es;Tu.prototype.es=function(t){if(!(this.H&&this.H.$s&&this.H.$s()))return Mu.call(this,t)};var Au=Tu.prototype.createEl;function Pu(t,i,e,n){const r=z({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},e);r.controlBar=z({progressControl:{keepTooltipsInside:!0}},r.controlBar);const h=r.techOrder||(r.techOrder=[]);-1===h.indexOf("THEOplayer")&&h.unshift("THEOplayer");(r.theoplayer||(r.theoplayer={})).player=t,e&&zt(e.language)&&(r.languages=z({},r.languages,{[xt]:e.language}),r.language=xt),i.setAttribute("data-vjs-player","");const o=i.getAttribute("style"),a=No(t.element,r,n);return a.ready((()=>{Lo(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===Tt.Kh;zo(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.uplynk){var s;const e=i=>{const s="adbreakbegin"===i.type;zo(t,s,!1)};null==(s=i.uplynk)||s.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",e),t.adBreak.addEventListener("adbreakend",e)}))}i.addEventListener("sourcechange",(()=>{zo(t,!1,!1)}))}}(a,t),function(t){t.on("mouseleave",Wo)}(a)})),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),vi.Ys.Qs&&(si(i,"theo-mobile"),function(t){const i=s.outerHeight,e=s.outerWidth,n=i>e;n?(ni(t,"theo-mobile-landscape"),si(t,"theo-mobile-portrait")):(ni(t,"theo-mobile-portrait"),si(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",(()=>{ti(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(a),a}Tu.prototype.createEl=function(){const t=Au.call(this),i=No.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t},f(),f(),f(),f();var Nu=No.getComponent("Button");var Eu="THEOPiPCloseButton";No.registerComponent(Eu,class extends Nu{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.io.Zh()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.io)}(i))throw new m("Invalid Picture-in-picture options.");this.io=i.io}});var Bu=class extends Y{get so(){return this.eo}get no(){return this.t.cs()}ro(){this.t.bn(it.ho,this.oo),this.ao||this.t.bn(it.uo,this.co),this.t.lo.on("languagechange",this.te)}do(){var t;return"theo-pip-"+(null!=(t=this.fo)?t:"bottom-right")}vo(t){const i=this.po;i&&!this.no&&(this.mo||this.yo(),this.bo(),si(i,"theo-pip"),si(i,this.do()),this.eo=!0,this.ko=t,this.wo=!1,this._o(new Ni(ii.PICTURE_IN_PICTURE)))}xo(t){const i=this.po;i&&(this.Co(),ni(i,"theo-pip"),ni(i,this.do()),this.eo=!1,this.wo=t,this.So=this.ko,this.ko=!1,this._o(new Ni(ii.INLINE)))}yo(){if(!this.mo){const t=this.t.lo;t.addChild(Eu,{io:this});const i=h.createElement("div");i.className="theo-pip-overlay",this.jo=h.createElement("div"),this.jo.className="theo-pip-overlay-text",d(this.jo,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.jo),Kt(t.el(),i),this.To=i,this.mo=!0}}Mo(){this.Ao&&!this.Po&&this.t.No&&(this.Eo=this.t.No.Bo(et,this.Io),this.Po=!0)}Fo(){this.Eo&&this.t.No&&(this.t.No.Do(this.Eo),this.Po=!1)}bo(){const t=this.t.lo.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"}Co(){const t=this.t.lo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}$o(){ni(this.po,"theo-pip"),this.so&&this.fo&&ni(this.po,"theo-pip-"+this.fo),this.To&&(Qt(this.To),this.To=void 0)}yn(){this.$o(),this.Fo(),this.Ro(),this.t.vn(it.ho,this.oo),this.t.vn(it.uo,this.co),this.t.lo.off("languagechange",this.te),this.t=void 0}constructor(t,i,s){super(),this.Uo=!1,this.eo=!1,this.wo=!1,this.ko=!1,this.mo=!1,this.Po=!1,this.So=!1,this.oo=()=>{this.Uo=!0,this.Ao&&!this.so&&this.Eo&&this.Oo&&this.Eo.Vo<=this.Oo&&this.vo(!1)},this.co=()=>{this.ao||(this.Uo=!1,this.Zh(),this.xo(!1))},this.te=()=>{if(this.jo){const t=this.t.lo;d(this.jo,t.localize("Video playing in Picture-in-Picture mode"))}},this.Io=t=>{!this.ko&&this.Ao&&(S(t)||(this.Oo&&t<=this.Oo||this.So?this.eo||this.wo||this.vo(!1):this.eo?this.xo(!1):this.wo=!1))},this.Oo=i.visibility,this.fo=i.position,this.ao=i.retainPresentationModeOnSourceChange,this.Ao=void 0!==this.Oo,this.t=t,this.po=t.Lo,this.Zh=s,this.ro()}},Iu=class extends E{Ho(){const t=super.Ho();return t===ii.INLINE&&this.qo.so?ii.PICTURE_IN_PICTURE:t}zo(t){return t===ii.PICTURE_IN_PICTURE||super.zo(t)}Wo(t){this.Go=this.Xo,t===ii.FULLSCREEN||t===ii.NATIVE_PICTURE_IN_PICTURE?this.qo.Fo():this.qo.Mo(),super.Wo(t)}Jo(t){super.Jo(t),t===ii.PICTURE_IN_PICTURE?$(this.Yo.Qo((t=>this.Ko(t)))):t===ii.FULLSCREEN?this.qo.xo(!1):this.qo.xo(!0)}async Ko(t){F(t),await Promise.all([this.Zo(),this.ta.xo()]).catch(mi),F(t),this.qo.vo(!this.ia),this._o(new Ni(this.Xo)),this.ia=!1,this.sa=!1}wi(){this.sa||(this.qo.so&&this.ea.cs?this.Wo(ii.FULLSCREEN):this.Go!==ii.PICTURE_IN_PICTURE||this.ea.cs?super.wi():(this.ia=!0,this.Wo(ii.PICTURE_IN_PICTURE)))}yn(){super.yn(),this.qo.yn(),this.na.vn(it.ho,this.ra),this.na=void 0}constructor(t,i,s,e){super(i,s),this.Go=ii.INLINE,this.ia=!1,this.Zh=()=>{this.Xo===ii.PICTURE_IN_PICTURE&&this.Wo(ii.INLINE)},this.ha=t=>{this.sa||(this.Xo!==ii.PICTURE_IN_PICTURE||this.qo.so?this.Xo!==ii.PICTURE_IN_PICTURE&&this.qo.so&&(this.ia=!0,this.Wo(ii.PICTURE_IN_PICTURE)):this.Wo(ii.INLINE))},this.ra=()=>{this.Ho()!==ii.PICTURE_IN_PICTURE&&this.Ho()!==ii.INLINE||this.qo.Mo(),this.na.vn(it.ho,this.ra)},this.na=t,this.qo=new Bu(t,e.pip,this.Zh),this.qo.bn(Ai.MODE_CHANGE,this.ha),this.na.bn(it.ho,this.ra)}};f();var Fu=class extends Y{get oa(){return Ti.aa(this.lo.el())||this.lo.supportsFullScreen()}get cs(){return this.lo.isFullscreen()||this.ua}vo(){this.lo.requestFullscreen()}xo(){this.lo.exitFullscreen(),this.ca.xo()}yn(){this.Ro(),this.lo.off("fullscreenchange",this.la),this.ca.vn(oi.da,this.la),this.ca.vn(oi.fa,this.Ds),this.lo.isFullWindow&&this.lo.exitFullscreen()}constructor(t,i){super(),this.Us=!1,this.ua=!1,this.va=!1,this.la=()=>{if(this.va)return;const t=this.Us,i=this.cs;t!==i&&(this.Us=i,this._o(new xi))},this.pa=()=>{this.ua=this.ca.cs,this.la()},this.ma=()=>{this.va||(this.lo.isFullWindow&&this.lo.supportsFullScreen()||this.ua&&!this.lo.supportsFullScreen())&&(this.va=!0,this.lo.exitFullscreen(),this.lo.requestFullscreen(),this.va=!1,this.la())},this.lo=t,this.ca=i,this.lo.on("fullscreenchange",this.la),this.ca.bn(oi.da,this.pa),this.ca.bn(oi.ga,this.ma),this.ca.bn(oi.fa,this.Ds),this.la()}};function Du(t){return class extends t{get No(){return this.ya}cs(){return this.ba.Ho()===ii.FULLSCREEN}ka(){return function(t,i){const s=w.create(t),e=i.lo;return at(s,{get controls(){return e.controls()},set controls(t){e.controls(vt(t))},get presentation(){return i.ba.wa},get presentationMode(){return i.ba.Ho()},set presentationMode(t){const s=ri(t);s&&i.ba.Wo(s)},get ui(){return e},get visibility(){return i.No.wa}})}(this._a,this)}yn(){super.yn(),this.ba.yn(),this.xa.yn(),this.lo.dispose(),this.ya.yn()}Ca(t){this.lo.src(""),super.Ca(t)}constructor(t,i,s){super(i,s),this.Lo=t,this.ya=new rt(t),this._a=super.ka(),w.defineProperty(this._a,"constructor",{value:lt}),this.lo=Pu(this._a,this.Lo,s.ui),this.xa=new Fu(this.lo,this.Sa),this.ba=new Iu(this,this.xa,this.Ta.ja(),s),this.ba.bn(Ai.MODE_CHANGE,this.Ds)}}}function $u(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(Ut(t)&&!S(t))return Ci(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=vt(t.retainPresentationModeOnSourceChange),t}f(),f();var Ru=ki((()=>{let t=Du(ut());return t=function(t){let i=t;for(const t of Ei)i=t(i);return i}(t),t}));function Uu(t,i){const s=function(t){const i=ei(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=$u(i.pip),i}(i),e=h.createElement("div");ai(e),t.appendChild(e);const n=new(Ru())(t,e,s);n.Ma=n;let r=n.wa;return n.Aa(),n.Pa(ot),w.defineProperty(r,"constructor",{value:Uu}),r=ht(r),Ht(n),function(t){for(const i of Ii)i(t)}(n),r}f(),f(),f();var Ou="theo-cast-",Vu=No.getComponent("Button"),Lu=class extends(Oo(Vu)){get Na(){throw new m("Ea")}get Ba(){return this.h.Ba}get Ia(){return this.h.Ia}buildCSSClass(){return Ou+"button theo-"+this.Ia+"-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=Ou+"svg-container",r.innerHTML=this.Ba,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.Fa===ui.AVAILABLE)null==(i=this.Na)||i.start();else if(this.Fa===ui.CONNECTED||this.Fa===ui.CONNECTING){var s;null==(s=this.Na)||s.stop()}}Da(t){ni(this.po,"theo-"+this.Ia+"-"+this.Fa),this.Fa=t,si(this.po,"theo-"+this.Ia+"-"+this.Fa),this.te()}te(){this.$a(this.Fa),this.Ie.Be=this.controlText()}$a(t){t===ui.CONNECTED?this.controlText("Stop Casting"):t===ui.AVAILABLE?this.controlText("Start Casting"):t===ui.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.po=t.el(),this.Fa=ui.UNAVAILABLE,this.controlText("Unavailable"),this.Ie=new la(this,this.controlText()),null==(s=this.Na)||s.addEventListener("statechange",(t=>{const i=t;this.Da(i.state)})),vi.Ys.Qe&&(this.Ra=new Ko(this.el())),this.Da(this.Na?this.Na.state:ui.UNAVAILABLE),this.on(t,"languagechange",this.te)}},Hu=0;function qu(){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-'+Hu+'">\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-'+Hu+')">\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 Hu++,t}No.registerComponent("chromecastButton",class extends Lu{get Na(){var t;return null==(t=this.ws.cast)?void 0:t.chromecast}constructor(t,i){super(t,z({},i,{Ia:"chromecast",Ba:qu()}))}}),f();var zu="theo-chromecast-",Wu=No.getComponent("Component"),Gu=class t extends(Oo(Wu)){buildCSSClass(){return zu+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();si(i,zu+"overlay");const s=No.createEl("div",{className:zu+"status-icon",innerHTML:t.ICON_SVG}),e=No.createEl("div",{className:zu+"status-info"});d(e,"Playing on");const n=No.createEl("div",{className:zu+"status-title"}),r=No.createEl("div",{className:zu+"status"});return this.kr=n,r.appendChild(s),r.appendChild(e),r.appendChild(n),i.appendChild(r),i}dispose(){var t;null==(t=this.Ua)||t.removeEventListener("statechange",this.update),this.Ua=void 0,this.ws.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.Ua?(this.kr&&d(this.kr,this.Ua.receiverName||""),this.Ua.state===ui.CONNECTED?this.show():this.hide()):this.hide()},this.Ua=null==(s=this.ws.cast)?void 0:s.chromecast,null==(e=this.Ua)||e.addEventListener("statechange",this.update),this.ws.addEventListener("play",this.update),this.update()}};Gu.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>',No.registerComponent("chromecastOverlay",Gu),f(),f();No.registerComponent("airplayButton",class extends Lu{dispose(){var t,i;null==(t=this.ws.ads)||t.removeEventListener("adbreakbegin",this.Oa),null==(i=this.ws.ads)||i.removeEventListener("adbreakend",this.Va),this.ws.removeEventListener("currentsourcechange",this.Va),super.dispose()}get Na(){var t;return null==(t=this.ws.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,z({},i,{Ia:"airplay",Ba:'\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.Va=()=>{this.enable()},this.Oa=()=>{this.disable()},null==(s=this.ws.ads)||s.addEventListener("adbreakbegin",this.Oa),null==(e=this.ws.ads)||e.addEventListener("adbreakend",this.Va),this.ws.addEventListener("currentsourcechange",this.Va)}}),f(),f(),f();var Xu=No.getComponent("Button"),Ju=class extends(Oo(Xu)){buildCSSClass(){return"theo-vr-button theo-controlbar-button "+super.buildCSSClass()}handleClick(){this.ws.vr.stereo=!this.ws.vr.stereo,this.te()}xn(){const t=this.ws.vr;t&&t.state!==Ft.Rs?(this.show(),t.canPresentVR?this.enable():this.disable()):this.hide(),this.te()}te(){const t=this.ws.vr;t&&t.state!==Ft.Rs&&(t.stereo?this.controlText("Stop watching in VR"):t.canPresentVR?this.controlText("Watch in VR"):this.controlText("No VR capable device found"),this.La.Be=this.controlText())}dispose(){var t;null==(t=this.ws.vr)||t.removeEventListener(["statechange","stereochange"],this.Ha),super.dispose()}constructor(t,i){var s;super(t,i),this.Ha=()=>this.xn(),this.controlText("Watch in VR"),this.La=new la(this,this.controlText()),null==(s=this.ws.vr)||s.addEventListener(["statechange","stereochange"],this.Ha),this.xn(),vi.Ys.Qe&&(this.Ra=new Ko(this.el())),this.on(t,"languagechange",this.te)}};No.registerComponent("vrButton",Ju),f();var Qu=No.getComponent("Component"),Yu=class extends Qu{createEl(){const t=super.createEl("div",{className:this.buildCSSClass()}),i=No.createEl("div",{className:"theo-360-fov"});return t.appendChild(i),this.qa=i,t}buildCSSClass(){return"theo-360-compass "+super.buildCSSClass()}xn(){this.ws.vr.state===Ft.Rs?this.hide():this.show()}za(){const t=-this.ws.vr.direction.yaw+40;this.qa.style[bi("transform")]="scale(0.875) rotate("+t+"deg) skew("+"-10deg)"}dispose(){this.ws.vr.removeEventListener("statechange",this.Ha),this.ws.vr.removeEventListener("directionchange",this.Wa),super.dispose()}constructor(t,i,s){super(t,i),this.Ha=()=>this.xn(),this.Wa=()=>this.za(),this.ws=s,this.ws.vr.addEventListener("statechange",this.Ha),this.ws.vr.addEventListener("directionchange",this.Wa),this.xn(),this.za()}};f();var Ku=No.getComponent("Component"),Zu=class extends Ku{Ga(){this.ws.vr.state===Ft.Xa?this.Ja():this.Qa()}Ja(){if(this.Ya)return;this.Ya=!0;const t=this.ws.element;this.Ka=t.style.zIndex||"",t.style.zIndex="2147483647",this.Za=this.player().isFullscreen(),this.player().requestFullscreen()}Qa(){if(!this.Ya)return;this.Ya=!1;this.ws.element.style.zIndex=this.Ka,this.Za?this.player().requestFullscreen():this.player().exitFullscreen()}dispose(){this.Qa(),this.ws.vr.removeEventListener("statechange",this.tu),super.dispose()}constructor(t,i,s){super(t,i),this.Ya=!1,this.Za=!1,this.Ka="",this.tu=()=>this.Ga(),this.ws=s,this.ws.vr.addEventListener("statechange",this.tu),this.Ga()}};Fi((function(t){const i=t.wa;if(!i.vr)return;const s=t.lo,e=new Yu(s,{},i);if(t.bn(it.uo,(()=>{var i;s.removeChild(e);const n=null==(i=t.iu())?void 0:i.vr;void 0===n||n.nativeVR||s.addChild(e)})),Dt.su){const t=new Zu(s,{},i);s.addChild(t)}})),f(),f(),f();var tc=class extends Z{constructor(){super("relatedchange")}},ic=["relatedchange"],sc=class extends Y{get wa(){return this.eu||(this.eu=function(t){let i;const s={get sources(){return t.nu},set sources(i){t.nu=i},addEventListener(t,s){i.bn(t,s)},removeEventListener(t,s){i.vn(t,s)}};return i=new P(ic,!0,s),i.ru(t),s}(this)),this.eu}get nu(){return this.hu}set nu(t){this.hu=function(t){return t.filter((t=>t&&(Xt(t.link)||dt(t,["source"]))))}(t),t.length>this.hu.length&&console.warn("One or more of the configured related content sources are invalid. Check if they have a source or a link."),this._o(new tc)}yn(){this.Ro(),this.hu=[]}constructor(...t){super(...t),this.hu=[]}};Ot((function(t){return class extends t{ka(){const t=this.ou;return at(super.ka(),{get related(){return t.wa}})}yn(){this.ou.yn(),super.yn()}constructor(t,i){super(t,i),this.ou=new sc}}}),$t.au),f(),f();var ec=No.getComponent("Button"),nc=class extends ec{buildCSSClass(){return"vjs-icon-view-grid theo-related-button "+super.buildCSSClass()}handleClick(){this.cu.uu?this.cu.be():this.cu.ge()}te(){this.Ie.Be=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.po=t.el(),this.cu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText(this.localize("Related content")),this.Ie=new la(this,this.controlText()),this.on(t,"languagechange",this.te)}};f(),f();var rc=No.getComponent("Button"),hc=class extends rc{buildCSSClass(){return"theo-secondary-background theo-close-button"}handleClick(){this.lu.hide()}constructor(t,i){super(t),this.lu=i}},oc=(()=>{const t=h.createElement("div");return t.className="theo-related-grid-tile",t.innerHTML='<a class="theo-related-grid-tile-content"><div class="theo-related-grid-tile-image"></div><span class="theo-related-grid-tile-title theo-primary-border theo-tertiary-background"></span><span class="theo-related-grid-tile-duration"></span></a>',t})();function ac(t,i,s){const e=oc.cloneNode(!0),n=e.querySelector(".theo-related-grid-tile-content");dt(s,["source"])?(n.style.cursor="pointer",n.addEventListener("click",(()=>{t.source=s.source,i.be()}))):Xt(s.link)&&n.setAttribute("href",s.link);const r=e.querySelector(".theo-related-grid-tile-image");r.style.backgroundImage='url("'+J(s.image)+'")',r.removeAttribute("id");const h=e.querySelector(".theo-related-grid-tile-title");s.title?(d(h,s.title),h.removeAttribute("id")):Qt(h);const o=e.querySelector(".theo-related-grid-tile-duration");return s.duration?(d(o,s.duration),o.removeAttribute("id")):Qt(o),e}var uc=[15,12,9,8,6,4,3,2,1];var cc=class{get du(){return"theo-"+this.fu+"-item-grid"}vu(){this.pu.focus()}mu(t){this.gu(),function(t){if(t.length)for(const i of uc)if(t.length>=i){t.length=i;break}}(t),this.yu(t.length);for(const i of t){const t=ac(this.bu.wa,this.ku,i);this.wu.appendChild(t)}}gu(){this.wu.innerHTML=""}_u(){const t=h.createElement("div");t.className="theo-overlay-panel";const i=h.createElement("div");return i.className="theo-related-grid",this.xu.className="theo-related",this.pu.controlText("Close Related Content"),this.Cu.appendChild(this.xu),this.xu.appendChild(t),t.appendChild(this.pu.el()),t.appendChild(i),i}yu(t){ni(this.wu,this.du),this.fu=t,si(this.wu,this.du)}yn(){Qt(this.xu),this.Su.yn(),this.ju.yn(),this.pu.dispose(),this.bu=void 0}constructor(t,i,s,e,n){this.bu=t,this.Tu=i,this.ku=s,this.Cu=e,this.fu=12,this.Mu=t=>{this.wu.style.width=t.width+"px"},this.xu=h.createElement("div"),this.pu=new hc(this.Tu,{hide:()=>{this.ku.be()}}),this.wu=this._u(),this.ju=new lc(n),this.ju.bn(pi.mn,this.Mu),this.Su=new M(this.wu,this.ju),this.yu(12)}},lc=class extends Y{get Au(){return this.Pu||0}get Nu(){return this.Eu.Nu}yn(){this.Ro(),this.Eu.vn(pi.mn,this.Bu)}constructor(t){super(),this.Eu=t,this.Bu=t=>{let i=t.width;if(9*(t.width/16)>t.height){i=16*(t.height/9)}this.Pu=i,this._o(new gi(this.Au,t.height))},this.Eu.bn(pi.mn,this.Bu)}};f();var dc=class extends Z{constructor(){super("show")}};f();var fc=class extends Z{constructor(){super("hide")}},vc="theo-related-available",pc="theo-related-showing",mc=[...ic,"show","hide"],gc=class extends Y{get wa(){return this.eu||(this.eu=function(t){let i;const s={get sources(){return t.nu},set sources(i){t.nu=i},get showing(){return t.uu},show(){t.ge()},hide(){t.be()},addEventListener(t,s){i.bn(t,s)},removeEventListener(t,s){i.vn(t,s)}};return i=new P(mc,!0,s),i.ru(t),s}(this)),this.eu}get nu(){return this.Iu.nu}set nu(t){this.Iu.nu=t}get uu(){return this.Fu}ge(){const t=this.Fu;this.Fu=!0,this.Du(pc),this.$u.vu(),this.Tu.paused()?this.Ru=!0:this.Tu.pause(),t!==this.Fu&&this._o(new dc)}be(){const t=this.Fu;this.Fu=!1,this.Uu(pc),this.Ou.focus(),this.Ru||this.Tu.play(),this.Ru=!1,t!==this.Fu&&this._o(new fc)}Du(t){this.Tu.el().classList.add(t)}Uu(t){this.Tu.el().classList.remove(t)}yn(){this.Ro(),this.$u.yn()}constructor(t,i,s,e){super(),this.Fu=!1,this.Ru=!1,this.Vu=t=>{const i=this.nu;this.$u.mu(i),i.length?(this.Du(vc),this.Ou.show()):(this.Uu(vc),this.Ou.hide()),this._o(t)},this.Iu=i,this.Iu.bn("relatedchange",this.Vu),this.Tu=s,this.$u=new cc(t,this.Tu,this,s.contentEl(),e),this.Ou=new nc(s,this,{})}};Bi((function(t){return class extends t{ka(){const t=this.Lu;return at(super.ka(),{get related(){return t.wa}})}yn(){this.Lu.yn(),super.yn()}constructor(t,i,s){super(t,i,s),this.Lu=new gc(this,this.ou,this.lo,this.Hu)}}})),f(),f(),f();var yc=No.getComponent("Button"),bc=class extends yc{buildCSSClass(){return"vjs-icon-share theo-social-button "+super.buildCSSClass()}handleClick(){this.qu.showing?this.qu.hide():this.qu.show()}te(){this.Ie.Be=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.po=t.el(),this.qu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText("Share Video"),this.Ie=new la(this,this.controlText()),this.on(t,"languagechange",this.te)}};function kc(t,i,s){switch(i){case"iconurl":return function(t,i){const s=h.createElement("a");var e;s.className="theo-social-iconurl",s.title=null!=(e=t.label)?e:"",s.target="zu",s.href=i;const n=h.createElement("img");var r,o;return n.src=null!=(r=t.icon)?r:"",n.alt=null!=(o=t.label)?o:"",n.width=25,n.height=25,s.appendChild(n),s}(t,s);case"text":return function(t){const i=h.createElement("div");if(i.className="theo-social-text",t.label){const s=h.createElement("h5");s.className="theo-primary-background theo-social-label",d(s,t.label),i.appendChild(s)}const s=h.createElement("p");var e;return s.className="theo-social-content-container theo-tertiary-background",s.tabIndex=0,d(s,null!=(e=t.text)?e:""),i.appendChild(s),i}(t);case"texturl":return function(t,i){const s=h.createElement("div");if(s.className="theo-social-texturl",t.label){const i=h.createElement("h5");i.className="theo-primary-background theo-social-label",d(i,t.label),s.appendChild(i)}const e=h.createElement("div");e.className="theo-social-content-container theo-tertiary-background";const n=h.createElement("a");return n.target="zu",n.href=i,d(n,i),e.appendChild(n),s.appendChild(e),s}(t,s)}}f();var wc="<URL>";var _c=class{get we(){return this.xu}Wu(t){this.gu();for(const i of t)this.Gu(i)}vu(){this.pu.focus()}Gu(t){const i=function(t,i){return t.src?G(t.src,wc)?t.src.replace(wc,i):t.src:i}(t,this.ku.Xu),s=function(t){if(t)return t.icon?"iconurl":t.text?"text":"texturl"}(t),e=kc(t,s,i);e&&("iconurl"===s?this.Ju.appendChild(e):this.Qu.appendChild(e))}gu(){this.Ju.innerHTML="",this.Qu.innerHTML=""}yn(){Qt(this.xu),this.Yu.yn()}constructor(t,i,s,e){this.na=t,this.ku=i,this.Cu=s,this.Ku=e;const n=h.createElement("div");n.className="theo-overlay-panel",this.pu=new hc(this.na,this.ku.wa),this.pu.controlText("Close Share"),this.$u=h.createElement("div"),this.$u.className="theo-social-container",this.xu=h.createElement("div"),this.xu.className="theo-social",this.Ju=h.createElement("div"),this.Ju.className="theo-social-icon-container",this.Qu=h.createElement("div"),this.Qu.className="theo-social-text-container",this.Cu.appendChild(this.xu),this.xu.appendChild(n),this.$u.appendChild(this.Ju),this.$u.appendChild(this.Qu),n.appendChild(this.pu.el()),n.appendChild(this.$u),this.Yu=new M(this.xu,this.Ku)}},xc="theo-social-available",Cc="theo-social-showing",Sc=class{get wa(){return this.eu}get uu(){return this.Fu}get Zu(){return this.tc}set Zu(t){this.tc=t,this.$u.Wu(t),t.length?(this.Du(xc),this.Ou.show()):(this.Uu(xc),this.Ou.hide())}get Xu(){return this.ic||H()}set Xu(t){this.ic=t}ge(){this.Fu=!0,this.Du(Cc),this.$u.vu(),this.sc.paused()?this.Ru=!0:this.sc.pause()}be(){this.Fu=!1,this.Uu(Cc),this.Ou.focus(),this.Ru||this.sc.play(),this.Ru=!1}Du(t){this.sc.el().classList.add(t)}Uu(t){this.sc.el().classList.remove(t)}yn(){this.Ou.dispose(),this.$u.yn()}constructor(t,i){this.Fu=!1,this.tc=[],this.Ru=!1,this.eu=function(t){return{get showing(){return t.uu},get items(){return t.Zu},set items(i){t.Zu=i},get url(){return t.Xu},set url(i){t.Xu=i},show(){t.ge()},hide(){t.be()}}}(this),this.sc=t,this.$u=new _c(this.sc,this,t.contentEl(),i),this.Ou=new bc(t,this.eu,{})}};Bi((function(t){return class extends t{ka(){const t=this.qu;return at(super.ka(),{get social(){return t.wa}})}constructor(t,i,s){super(t,i,s),this.qu=new Sc(this.lo,this.Hu)}}})),f(),f();var jc=No.getComponent("Component"),Tc=class extends jc{createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-upnext-container "+super.buildCSSClass()}};Tc.prototype.h=z({},Tc.prototype.h,{children:[]}),No.registerComponent("upNextContainer",Tc),f(),f();var Mc="theo-upnext-bar-",Ac=No.getComponent("Component"),Pc=class extends Ac{get uu(){return this.Fu}set uu(t){this.Fu=t,this.ec&&(this.ec.tabIndex=t?0:-1)}get nc(){return this.rc}set nc(t){this.rc=t}Ca(t){this.gu(),this.hc(t)}hc(t){if(t&&t.link&&t.image){const i=h.createElement("div");si(i,Mc+"content"),i.onclick=()=>{this.oc.next()},i.onkeypress=t=>{13===t.which&&this.oc.next()};const s=h.createElement("div");if(s.style.backgroundImage='url("'+J(t.image)+'")',si(s,Mc+"image"),i.appendChild(s),t.duration){const i=h.createElement("span");si(i,Mc+"duration"),i.innerHTML=""+t.duration,s.appendChild(i)}const e=h.createElement("div");si(e,Mc+"text");const n=h.createElement("div");if(si(n,Mc+"upnext"),d(n,this.localize("Up Next")),e.appendChild(n),t.title){const i=h.createElement("div");si(i,Mc+"title"),d(i,t.title),e.appendChild(i)}i.appendChild(e),this.ec=i,this.ac=n,this.el().appendChild(this.ec)}}gu(){this.el().innerHTML="",this.ec=void 0,this.ac=void 0}te(){this.ac&&d(this.ac,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-bar "+super.buildCSSClass()}dispose(){this.Yu.yn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.ec=void 0,this.ac=void 0,this.oc=i,this.Yu=new M(this.el(),e),this.Fu=!1,this.rc=10,this.on(t,"languagechange",this.te)}};f();var Nc="theo-upnext-panel-",Ec=yu,Bc=No.getComponent("Component"),Ic=class extends Bc{get uu(){return this.Fu}set uu(t){this.Fu=t}get uc(){return this.cc}set uc(t){this.cc=t}get lc(){return this.dc}set lc(t){this.dc=t}Ca(t){this.gu(),this.fc(t)}fc(t){if(t&&t.link&&t.image){const i=h.createElement("div");i.className=Nc+"content";const s=h.createElement("div");s.style.backgroundImage='url("'+J(t.image)+'")',s.className=Nc+"image",i.appendChild(s);const e=h.createElement("div");e.className=Nc+"text";const n=h.createElement("div");if(n.className=Nc+"upnext",d(n,this.localize("Up Next")),e.appendChild(n),t.title){const i=h.createElement("div");i.className=Nc+"title",d(i,t.title),e.appendChild(i)}i.appendChild(e),this.vc=h.createElement("div"),this.vc.className=Nc+"autoplay",this.vc.innerHTML=bu;const r=this.vc.querySelector("svg");r.onclick=()=>{this.oc.next()},r.tabIndex=0,r.onkeypress=t=>{13===t.which&&this.oc.next()},this.mc=n,this.gc=this.vc.querySelector("."+Ec),i.appendChild(this.vc),this.el().appendChild(i)}}get yc(){return this.bc}set yc(t){this.bc=t,this.gc.style.strokeDashoffset=""+_.round(1e5*t)/1e5}gu(){this.el().innerHTML="",this.mc=void 0,this.gc=void 0}te(){this.mc&&d(this.mc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-panel "+super.buildCSSClass()}dispose(){this.Yu.yn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.bc=0,this.oc=i,this.Yu=new M(this.el(),e),this.Fu=!1,this.cc=10,this.dc=!0,this.on(t,"languagechange",this.te)}},Fc="theo-upnext-panel-showing",Dc="theo-upnext-bar-showing",$c=2*_.PI*73,Rc=class t{get wa(){return this.eu}get kc(){return this.wc}get _c(){return this.xc}get Cc(){return this.Sc}set Cc(t){this.Sc=t,this.$u.Ca(t),this.jc.Ca(t),this.sc.off("timeupdate",this.Tc),this.sc.off("ended",this.Mc),t&&(this.sc.on("timeupdate",this.Tc),this.sc.on("ended",this.Mc))}Ac(){this.$u.uc?this.Pc=mt(this.$u.uc):0===this.$u.uc?this.Pc=0:this.Pc=10,0!==this.Pc?(isFinite(this.Pc)&&(this.Nc=!0),this.$u.uu=!0,this.Du(Fc),this.Nc&&(this.$u.yc=$c-$c/this.Pc,this.Ec=v(this.Bc,1e3))):this.Ic()}Fc(){this.$u.uu=!1,this.Uu(Fc),this.Nc&&(p(this.Ec),this.Dc=1,this.$u.yc=$c)}$c(){this.jc.uu=!0,this.Du(Dc)}Rc(){this.jc.uu=!1,this.Uu(Dc)}Ic(){p(this.Ec),this.Cc&&(s.location.href=this.Cc.link)}Du(t){this.sc.el().classList.add(t)}Uu(t){this.sc.el().classList.remove(t)}Uc(t,i){const s=t>=i&&!(this.Oc&&this.Oc.Vc);this.jc.uu&&!s?this.Rc():!this.jc.uu&&s&&this.$c()}Lc(t,i){this.$u.uu&&t<i&&!this.sc.ended()&&this.Fc()}static Hc(t,i){const s=mt(t);if(!S(s))return i-s;const e=(""+t).match(/^([1-9]?\d|100)%$/);if(e){return i*(1-x(e[1],10)/100)}}yn(){this.Ec&&p(this.Ec),this.sc.getChild("upNextContainer").removeChild(this.$u),this.sc.getChild("upNextContainer").removeChild(this.jc),this.$u.dispose(),this.jc.dispose()}constructor(i,s,e){this.Sc=void 0,this.Pc=10,this.Dc=1,this.Ec=void 0,this.Nc=!0,this.Bc=()=>{this.Dc!==this.Pc?(this.$u.yc-=$c/this.Pc,this.Dc+=1):this.Ic()},this.Mc=()=>{this.$u.uu||this.Ac()},this.Tc=()=>{const i=this.sc.currentTime(),s=this.sc.duration(),e=s?t.Hc(this.jc.nc,s):void 0;void 0!==e&&this.Uc(i,e),this.$u.lc&&this.Lc(i,s)},this.eu=function(t){return{get source(){return t.Cc},set source(i){t.Cc=i},get bar(){return t.kc},get panel(){return t._c},next(){t.Ic()}}}(this),this.jc=new Pc(i,this.eu,{},s),this.$u=new Ic(i,this.eu,{},s),this.wc=function(t,i){return{get showing(){return i.uu},get offset(){return i.nc},set offset(t){i.nc=t},show(){t.$c()},hide(){t.Rc()}}}(this,this.jc),this.xc=function(t,i){return{get showing(){return i.uu},get countdownDuration(){return i.uc},set countdownDuration(t){i.uc=t},get showUpNextPanel(){return i.lc},set showUpNextPanel(t){i.lc=t},show(){t.Ac()},hide(){t.Fc()}}}(this,this.$u),this.sc=i,this.Oc=e,i.getChild("upNextContainer").addChild(this.jc,{}),i.getChild("upNextContainer").addChild(this.$u,{})}};Bi((function(t){return class extends t{ka(){const t=this.qc;return at(super.ka(),{get upnext(){return t.wa}})}yn(){this.qc.yn(),super.yn()}constructor(t,i,s){super(t,i,s),this.qc=new Rc(this.lo,this.Hu,this.zc)}}})),f(),f();var Uc=No.getComponent("Component"),Oc=class extends Uc{createEl(){const t=super.createEl("ul",{className:"theo-context-menu"}),i=h.createElement("li"),s=h.createElement("a"),e=h.createElement("div");s.className="theo-context-menu-a",i.appendChild(s),e.className="theo-context-menu-logo",e.innerHTML='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="507.262px" height="399.16px" viewBox="0 0.1 507.262 399.16" enable-background="new 0 0.1 507.262 399.16"\n\t xml:space="preserve" class=\'theo-context-menu-logo-svg\'>\n\t<g transform="matrix(1.90897, 0, 0, 1.90897, 212.4, 144.6)">\n\t\t<path fill="#FFFFFF" d="M-38.416-53.802C-53.351-38.867-60.82-20.814-60.82,0.353c0,21.253,7.466,39.392,22.404,54.413\n\t\t\tc6.83,6.658,13.827,11.778,20.996,15.363c5.122,2.561,10.583,4.397,16.388,5.507v1.024h-78.481\n\t\t\tc-21.168,0-31.752-10.584-31.752-31.752v-88.724c0-21.252,10.584-31.879,31.752-31.879h79.377v0.896\n\t\t\tc-6.145,1.196-11.95,3.116-17.411,5.762C-24.632-65.538-31.586-60.46-38.416-53.802"/>\n\t</g>\n\t<g transform="matrix(0.535073, 0, 0, 0.535073, 242.35, 104.7)">\n\t\t<path fill="#FFFFFF" d="M188.354,104.104c-32.941,23.472-75.492,49.679-127.641,78.61c-50.275,28.254-94.358,50.44-132.254,66.572l-41.989,15.616\n\t\t\tc-2.645-11.348-5.122-28.17-7.426-50.44c-5.205-44.383-7.809-93.375-7.809-146.975c0-49.079,3.538-94.947,10.622-137.631\n\t\t\tl10.249-49.034l44.551,14.978C-24.762-88.838,17.06-67.03,62.124-38.777c47.705,29.871,88.638,58.294,122.773,85.266\n\t\t\tc17.061,13.571,29.351,24.028,36.862,31.367L188.354,104.104"/>\n\t</g>\n\t<g transform="matrix(1.91028, 0, 0, 1.91028, 327.15, 144.6)">\n\t\t<path fill="#FFFFFF" d="M94.286-43.816v88.723c0,21.168-10.583,31.751-31.751,31.751h-80.018v-1.025\n\t\t\tc14.683-2.816,27.527-9.77,38.537-20.867c14.936-15.024,22.405-33.16,22.405-54.413c0-21.168-7.467-39.22-22.405-54.156\n\t\t\tC9.871-64.985-3.188-71.939-18.123-74.671v-1.024h80.658C83.702-75.696,94.286-65.069,94.286-43.816"/>\n\t</g>\n</svg>\n',s.appendChild(e);const n=h.createElement("div");return n.className="theo-context-version",d(n,"Powered by THEOplayer 9.8.0"),s.appendChild(n),s.href="https://www.theoplayer.com/player-referral",s.target="zu",t.appendChild(i),t}Wc(t){const i=t;i.preventDefault(),this.show(),this.el().style.left="0",this.el().style.top="0";const s=this.player().contentEl(),e=s.getClientRects(),n=e.length>0?e[0]:void 0,r=i.clientX-s.getBoundingClientRect().left,h=C(getComputedStyle(this.el()).fontSize);K(this.el(),r,n,h);const o=i.clientY-s.getBoundingClientRect().top;tt(this.el(),o,n,h),this.Gc()}Xc(){this.hide(),this.clearTimeout(this.Jc)}Gc(){this.Jc=this.setTimeout(this.Xc,4e3)}Qc(){this.clearTimeout(this.Jc)}dispose(){this.Xc(),this.off(this.player(),"contextmenu",this.Wc),this.el().removeEventListener("mousedown",Vc,!0),this.off(h,"mousedown",this.Xc),this.off("mouseout",this.Gc),this.off("mouseover",this.Qc),super.dispose()}constructor(t,i){super(t,i),this.Jc=0,this.on(this.player(),"contextmenu",this.Wc),this.el().addEventListener("mousedown",Vc,!0),this.on(h,"mousedown",this.Xc),this.on("mouseout",this.Gc),this.on("mouseover",this.Qc),this.Xc()}};function Vc(t){t.stopPropagation()}Fi((function(t){const i=new Oc(t.lo,{});t.lo.addChild(i),t.lo.on("dispose",(()=>{t.lo.removeChild(i),i.dispose()}))})),f(),f(),f(),f();var Lc={Default:"","Monospaced Serif":D.Yc,"Proportional Serif":D.Kc,"Monospaced Sans-Serif":D.Zc,"Proportional Sans-Serif":D.tl},Hc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},qc=[50,75,100,150,200];function zc(t){return{label:t+"%",value:t}}function Wc(t){return w.keys(t).map((i=>({label:i,value:t[i]})))}qc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var Gc=qc.map((function(t){return{label:t+"%",value:t+"%"}})),Xc=[25,50,75,100].map(zc),Jc=[0,25,50,75,100].map(zc),Qc=Wc(Hc),Yc=Wc(Lc),Kc=Wc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Zc=100,tl="#000000",il="#FFFFFF",sl="#000000";f();var el=class extends Ya{il(){const t=this.Ur.localize(this.sl);d(this.nl.subMenu.menuHeader.el(),t),this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",d(this.Rr,t);const i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",si(this.nl.el(),"theo-subtitle-options-menu-item"),this.nl.el().appendChild(this.Rr),this.nl.el().appendChild(i),i}rl(t){const i=this.Pr(t);i&&this.hl(i)}ol(){return this.Cr}Br(t){this.al(t.Nr)}hl(t){for(const t of this.Mr.menuItems)t.selected(!1);t?(t.selected(!0),this.cl(t.Nr.label)):this.cl("Custom")}cl(t){this.ll=t,d(this.dl,this.Ur.localize(t)),this.nl.parentMenu.re()}Er(t){const i=super.Er(t);return si(i.el(),"theo-subtitle-options-menu-item"),this.Dr(i),i}Dr(t){const i=this.Ur.localize(t.Nr.label);d(t.el(),i);const s=this.Ur.localize("Set "+this.sl+" to ")+i;t.el().setAttribute("aria-label",s)}Re(){this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.nl=t,this.Ur=e,this.ll="",this.te=()=>{const t=this.Ur.localize(this.sl);d(this.nl.subMenu.menuHeader.el(),t),d(this.Rr,t),this.cl(this.ll);for(const t of this.Ar)this.Dr(t)},this.sl=i,this.al=s.fl,this.dl=this.il(),this.Cr=s.vl,this.Ur.on("languagechange",this.te)}};f();var nl=class t{static pl(t,i,s,e){if(void 0===t&&void 0===i)return;return W(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.ml=i,this.gl=t=>{this.ml.fontFamily=t.value},this.yl=t=>{this.ml.fontSize=t.value},this.bl=i=>{this.kl=i.value,this.ml.fontColor=t.pl(this.wl,this.kl,il,Zc)},this._l=i=>{this.wl=i.value,this.ml.fontColor=t.pl(this.wl,this.kl,il,Zc)},this.xl=i=>{this.Cl=i.value,this.ml.backgroundColor=t.pl(this.Cl,this.Sl,tl,Zc)},this.jl=i=>{this.Sl=i.value,this.ml.backgroundColor=t.pl(this.Cl,this.Sl,tl,Zc)},this.Tl=i=>{this.Ml=i.value,this.ml.windowColor=t.pl(this.Ml,this.Al,sl,Zc)},this.Pl=i=>{this.Al=i.value,this.ml.windowColor=t.pl(this.Ml,this.Al,sl,Zc)},this.Nl=t=>{this.ml.edgeStyle=t.value}}};f();var rl=class{El(t,i){const s=this.Bl(t,i.ol());s&&i.rl(s)}Bl(t,i){return Pi(i,(i=>i.value===t))}Il(t,i,s){let e,n;if(void 0===t)e=this.Bl(void 0,i.ol()),n=this.Bl(void 0,s.ol());else if(t){const r=function(t){let i=q(t);i||(i=q(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=R(O(t),1));if(!i){const s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=R(O(Hc[s]),1)}return i}(t);if(r){const t=L(r),h=100*r.Fl;e=this.Bl(t,i.ol()),n=this.Bl(h,s.ol())}}e&&i.rl(e),n&&s.rl(n)}constructor(t,i){this.ml=t,this.Dl=i,this.$l=()=>{const t=this.ml.fontFamily;this.El(t,this.Dl["Font family"]);const i=this.ml.fontColor;this.Il(i,this.Dl["Font color"],this.Dl["Font opacity"]);const s=this.ml.fontSize;this.El(s,this.Dl["Font size"]);const e=this.ml.backgroundColor;this.Il(e,this.Dl["Background color"],this.Dl["Background opacity"]);const n=this.ml.windowColor;this.Il(n,this.Dl["Window color"],this.Dl["Window opacity"]);const r=this.ml.edgeStyle;this.El(r,this.Dl["Character edge style"])},this.ml.addEventListener("change",this.$l),this.$l()}};var hl=class extends Ya{Rl(){return{"Font family":{vl:ol(Yc),fl:this.Ul.gl},"Font color":{vl:ol(Qc),fl:this.Ul._l},"Font opacity":{vl:ol(Xc),fl:this.Ul.bl},"Font size":{vl:ol(Gc),fl:this.Ul.yl},"Background color":{vl:ol(Qc),fl:this.Ul.xl},"Background opacity":{vl:ol(Jc),fl:this.Ul.jl},"Window color":{vl:ol(Qc),fl:this.Ul.Tl},"Window opacity":{vl:ol(Jc),fl:this.Ul.Pl},"Character edge style":{vl:ol(Kc),fl:this.Ul.Nl}}}Ol(){this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",this.Vl=h.createElement("span"),this.Vl.className="theo-primary-color theo-settings-control-menu-item-value",this.Gr.el().appendChild(this.Rr),this.Gr.el().appendChild(this.Vl),this.te()}Er(t){const i=this.Mr.addSubMenuItem();return i.Nr=t,this.Dl[t]=new el(i,t,this.Ll[t],this.Ur),i}Dr(t){}Br(t){}Re(){this.Ur.off("languagechange",this.te),this.Hl.removeEventListener(["addtrack","removetrack"],this.ql),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.Gr=t,this.Hl=i,this.Ur=e,this.Dl={},this.ql=()=>{this.Hl.some((t=>At(t.kind)))?this.Gr.show():this.Gr.hide()},this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Subtitle Options")),d(this.Rr,this.Ur.localize("Subtitle")),d(this.Vl,this.Ur.localize("Options")),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the subtitle options menu"))},this.Ul=new nl(s),this.Ll=this.Rl(),this.Cr=w.keys(this.Ll),this.Ol(),this.zl=new rl(s,this.Dl),this.Ur.on("languagechange",this.te),this.Hl.addEventListener(["addtrack","removetrack"],this.ql),this.ql()}};function ol(t){const i=[{label:"Default",value:void 0}];for(const s of t)"Default"!==s.label&&i.push(s);return i}Fi((function(t){const i=t.lo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new hl(s,t.nt.wa,t.Wl.wa,t.lo);t.lo.on("dispose",(()=>{i.removeMenuItem(s),s.dispose(),e.Re(),i.dispose()}))})),f(),f();var al=No.getComponent("Component"),ul=class extends al{buildCSSClass(){return"theo-ad-control-panel"}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}constructor(t,i){super(t,i),t.adControlBar=this}};ul.prototype.h=z({},al.prototype.h,{children:[]}),No.registerComponent("AdControlPanel",ul),f(),f();var cl=No.getComponent("Component"),ll="theo-dai-countdown",dl=class extends cl{buildCSSClass(){return ll}createEl(t,i,s){const e=h.createElement("div");return e.className=ll,e}Gl(t,i){i.addEventListener("adbreakbegin",(()=>this.show())),i.addEventListener("adbreakend",(()=>this.hide())),t.addEventListener("timeupdate",this.te)}constructor(t,i,s){super(t,s),this.na=t,this.eu=i,this.te=()=>{const t=this.eu.ads;t.playing&&t.currentAdBreak&&t.currentAds.length&&d(this.contentEl(),function(t,i,s){const e=t.ads;let n="";const r=e.length;if(r>1){const t=e.indexOf(i)+1;n=s("Ad")+" "+t+"/"+r+". "}const h=_.ceil(t.maxRemainingDuration);return n+=s("The content will resume in {1} seconds.").replace("{1}",""+h),n}(t.currentAdBreak,t.currentAds[0],(t=>this.na.localize(t))))},this.po=t.el(),this.Gl(i,i.ads),this.on(t,"languagechange",this.te)}};f();var fl=No.getComponent("ClickableComponent"),vl=class extends fl{buildCSSClass(){return Vt}createEl(t,i,s){return this.h.wa.element.querySelector("."+Vt)}emitTapEvents(){}te(){d(this.el(),this.localize("Learn more"))}constructor(t,i){super(t,i),d(this.el(),t.localize("Learn more")),this.eu=i.wa,this.po=t.el(),this.on(t,"languagechange",this.te)}};Fi((function(t){if(t.wa.ads&&t.Xl){const i=t.lo,s=new dl(i,t.wa);i.adControlBar.addChild(s);if(t.wa.element.querySelector("."+Vt)){const s=new vl(i,{wa:t.wa});i.adControlBar.addChild(s)}}})),f(),f();var pl=No.getComponent("Component"),ml=["addtrack","removetrack","change"],gl=class extends(Oo(pl)){createEl(){const t=super.createEl();return this.qualityLabel=No.createEl("div",{className:"theo-quality-label-text"}),t.appendChild(this.qualityLabel),ci(this.qualityLabel),t}dispose(){this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Jl),this.Jr=void 0),this.ws.videoTracks.removeEventListener(ml,this.ah),super.dispose()}constructor(t,i){super(t,i),this.Jr=void 0,this.ah=()=>{const t=Ga(this.ws.videoTracks);t!==this.Jr&&(this.Jr&&this.Jr.removeEventListener("activequalitychanged",this.Jl),this.Jr=t,t&&t.addEventListener("activequalitychanged",this.Jl),this.Jl())},this.Jl=()=>{const t=this.Jr&&this.Jr.activeQuality;if(!this.qualityLabel||!t)return;const i=t.label?t.label:t.height?t.height+"p":void 0;i&&(d(this.qualityLabel,i),this.addClass("theo-quality-label-show"),this.hideActiveQualityLabel())},this.hideActiveQualityLabel=()=>{this.resetTimeout(),this.startFadeOutID=this.setTimeout(this.fadeoutLabel,3750),this.removeLabelClassesID=this.setTimeout(this.hideLabel,4e3)},this.resetTimeout=()=>{this.startFadeOutID&&this.clearTimeout(this.startFadeOutID),this.removeLabelClassesID&&this.clearTimeout(this.removeLabelClassesID)},this.fadeoutLabel=()=>{this.addClass("theo-quality-label-fadeout")},this.hideLabel=()=>{this.removeClass("theo-quality-label-show"),this.removeClass("theo-quality-label-fadeout")},super.addClass("theo-quality-label"),this.ws.videoTracks&&(this.ws.videoTracks.addEventListener(ml,this.ah),this.ah())}};No.registerComponent("activeQualityLabel",gl),f(),f();var yl="theo-upcoming-ad-notification",bl=["adbreakbegin","adbreakend","adadded","adloaded","adbegin","adend"],kl=class extends(Oo(va)){createEl(){const t=No.createEl("div",{className:yl});return this.notificationText=No.createEl("div",{className:yl+"text"}),t.appendChild(this.notificationText),t}Ql(){if(!this.ws.ads)return;const t=this.ws.ads.scheduledAdBreaks;let i,s=1/0;for(let e=0;e<t.length;e++){const n=t[e],r=n.timeOffset;-1!==r&&r<s&&(s=r,i=n)}this.currentAdBreak=i,this.currentAdBreakValid=void 0!==i&&void 0!==i.ads&&i.ads.some((t=>"linear"===t.type))}Yl(){if(!this.ws.ads||this.ws.ads.playing||!this.currentAdBreak||!this.currentAdBreakValid||0===this.currentAdBreak.timeOffset)return void this.Kl();const t=this.ws.currentTime;if(this.currentAdBreak.timeOffset>t+10)return void this.Kl();const i=_.ceil(this.currentAdBreak.timeOffset-t);i<0?this.Kl():this.Zl(i)}Zl(t){this.td!==t&&(d(this.notificationText,"Your video will be temporarily interrupted in 0:"+(t<10?"0"+t:t)),this.td=t,this.show())}Kl(){this.td=NaN,this.hide()}dispose(){var t;this.ws.removeEventListener("timeupdate",this.handleTimeUpdate),null==(t=this.ws.ads)||t.removeEventListener(bl,this.handleAdEvent),this.currentAdBreak=void 0,super.dispose()}constructor(t,i){super(t,i),this.currentAdBreak=void 0,this.currentAdBreakValid=!1,this.td=NaN,this.handleTimeUpdate=()=>{this.Yl()},this.handleAdEvent=()=>{this.Ql(),this.Yl()},this.ws.ads&&(this.hide(),this.ws.addEventListener("timeupdate",this.handleTimeUpdate),this.ws.ads.addEventListener(bl,this.handleAdEvent))}};No.registerComponent("upcomingAdNotificationText",kl),f(),f();var wl=No.getComponent("Component");No.registerComponent("UplynkAdBreakBar",class extends wl{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",t}get sd(){return this.h.adBreakProvider()}te(t,i){if(this.sd&&this.sd.endTime){const s=_.max(this.sd.endTime-t,0);d(i,"Content will resume in "+_.ceil(s)+"s"),this.show()}else this.hide()}constructor(t,i){super(t,i),this.ed=()=>{this.te(this.player().currentTime(),this.el())},this.on(t,"timeupdate",this.ed)}}),f();var _l=No.getComponent("ClickableComponent");No.registerComponent("UplynkAdSkipButton",class extends _l{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.nd=h.createElement("span"),t.appendChild(this.nd),this.te(t,this.nd),t}handleClick(){this.h.skipCallback()}te(t,i){this.rd<=_t.ad.od?(ni(t,"theoplayer-ad-skip-countdown"),si(t,"theoplayer-ad-skip-button"),d(i,"Skip ads")):d(i,"Skip ads in "+_.ceil(this.rd)+"s")}get rd(){return this.h.adBreak.startTime+this.h.adBreak.skipOffset-this.player().currentTime()}constructor(t,i){super(t,i),this.ed=()=>{this.te(this.el(),this.nd)},this.on(t,"timeupdate",this.ed)}}),f(),f();var xl=No.getComponent("Component"),Cl=class extends xl{buildCSSClass(){return"theo-uplynk-marker-bar"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}};No.registerComponent("UplynkAdBreakMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-adbreak"}}),f(),f();var Sl=No.getComponent("Component"),jl=class extends Sl{get startTime(){return this.h.startTime}get endTime(){return this.h.endTime}get seekable(){return this.player().seekable()}buildCSSClass(){return"theo-uplynk-marker"}createEl(t,i,s){const e=h.createElement("div");e.className=this.buildCSSClass();const n=this.seekable.start(0),r=this.seekable.end(this.seekable.length-1),o=_.max(this.startTime-n,0),a=void 0!==this.endTime?_.max(r-this.endTime,0):0,u=r-n;return e.style.left=o/u*100+"%",e.style.right=a/u*100+"%",e}constructor(t,i){super(t,i)}};No.registerComponent("UplynkAdBreakMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-adbreak"}}),f();No.registerComponent("UplynkAssetMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-asset"}}),f();No.registerComponent("UplynkAssetMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-asset"}}),f();var Tl=No.getComponent("Component");No.registerComponent("UplynkContentNotificationBar",class extends Tl{buildCSSClass(){const t="theo-uplynk-content-notification-bar";return t+(Dt.su||Dt.ud?" "+t+"-ios":"")}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}}),f();var Ml=No.getComponent("Component");function Al(t,i){const s=t.uplynk;return Boolean(t&&void 0===s)||Boolean(t&&s&&void 0===s.ui)||Boolean(t&&s&&s.ui&&void 0===s.ui[i])||Boolean(t&&s&&s.ui&&!0===s.ui[i])}No.registerComponent("UplynkContentNotification",class extends Ml{get ld(){return this.h.asset}buildCSSClass(){return"theo-uplynk-content-notification"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}yo(){const t=h.createElement("img");t.src=this.ld.posterUrl,t.className=this.buildCSSClass()+"-thumbnail",this.el().appendChild(t);const i=h.createElement("div");i.className=this.buildCSSClass()+"-description";const s=function(t){return"Next: "+t}(this.ld.description);d(i,s),this.el().appendChild(i),this.dd=h.createElement("div"),this.dd.className=this.buildCSSClass()+"-countdown",d(this.dd,this.fd),this.el().appendChild(this.dd)}get fd(){const t=_.min(10,this.vd);return"Starting in "+_.ceil(t)+" seconds"}get vd(){return _.max(0,this.ld.startTime-this.player().currentTime())}pd(){const t=this.vd;t>10||t<=0?this.hide():(d(this.dd,this.fd),this.show())}constructor(t,i){super(t,i),this.yo(),this.on(t,"timeupdate",this.pd),this.hide()}}),f(),Bi((function(t){return class extends t{get md(){return this.lo.controlBar.progressControl.seekBar}Ca(t){this.gd=!1,this.wa.removeEventListener("timeupdate",this.yd),this.lo.removeChild("UplynkAdBreakBar"),this.lo.removeChild("UplynkAdSkipButton"),this.md.removeChild("UplynkAdBreakMarkerBar"),this.md.removeChild("UplynkAssetMarkerBar"),this.lo.removeChild("UplynkContentNotificationBar"),super.Ca(t)}bd(){if(!function(t){return Al(t,"assetMarkers")}(this.kd)||!this.gd)return;const t=this.wa.uplynk.assets.map((t=>({name:"UplynkAssetMarker",startTime:t.startTime,endTime:t.endTime})));this.md.removeChild("UplynkAssetMarkerBar"),this.md.addChild("UplynkAssetMarkerBar",{children:t})}wd(){if(!function(t){return Al(t,"contentNotification")}(this.kd))return;const t=this.wa.uplynk.assets.map((t=>({name:"UplynkContentNotification",asset:t})));this.lo.removeChild("UplynkContentNotificationBar"),this.lo.addChild("UplynkContentNotificationBar",{children:t})}yn(){this.wa.removeEventListener("timeupdate",this.yd);const t=this.wa.uplynk;null==t||t.ads.adBreaks.removeEventListener("addadbreak",this._d),null==t||t.ads.adBreaks.removeEventListener("removeadbreak",this.xd),null==t||t.assets.removeEventListener("addasset",this.Cd),null==t||t.assets.removeEventListener("removeasset",this.Cd),this.wa.removeEventListener("loadeddata",this.Sd),super.yn()}constructor(t,i,s){super(t,i,s),this.gd=!1,this.Sd=()=>{this.gd=!0,isFinite(this.jd())||this.wa.addEventListener("timeupdate",this.yd),this.yd(),this.bd(),this.wd()},this._d=t=>{t.adBreak.addEventListener("adbreakbegin",this.Td),t.adBreak.addEventListener("adbreakend",this.Md),this.yd()},this.xd=t=>{t.adBreak.removeEventListener("adbreakbegin",this.Td),t.adBreak.removeEventListener("adbreakend",this.Md),this.yd()},this.yd=()=>{if(!function(t){return Al(t,"adBreakMarkers")}(this.kd)||!this.gd)return;const t=this.wa.uplynk,i=null==t?void 0:t.ads.adBreaks.map((t=>({name:"UplynkAdBreakMarker",startTime:t.startTime,endTime:t.endTime})));this.md.removeChild("UplynkAdBreakMarkerBar"),this.md.addChild("UplynkAdBreakMarkerBar",{children:i})},this.Td=()=>{if(function(t){return Al(t,"adNotification")}(this.kd)){const t=this.wa.uplynk,i=t.ads.currentAdBreak;this.lo.addChild("UplynkAdBreakBar",{adBreakProvider:this.Pd}),-1!==i.skipOffset&&this.lo.addChild("UplynkAdSkipButton",{adBreak:i,skipCallback:t.ads.skip})}},this.Pd=()=>this.wa.uplynk.ads.currentAdBreak,this.Md=()=>{this.lo.removeChild("UplynkAdBreakBar"),this.lo.removeChild("UplynkAdSkipButton")},this.Cd=()=>{this.bd(),this.wd()};const e=this.wa.uplynk;null==e||e.ads.adBreaks.addEventListener("addadbreak",this._d),null==e||e.ads.adBreaks.addEventListener("removeadbreak",this.xd),null==e||e.assets.addEventListener("addasset",this.Cd),null==e||e.assets.addEventListener("removeasset",this.Cd),this.wa.addEventListener("loadeddata",this.Sd)}}}));export{lt as ChromelessPlayer,nt as ErrorCategory,st as ErrorCode,Uu as Player,Rt as cache,Bt as cast,pt as features,bt as players,wt as registerContentProtectionIntegration,ft as utils,gt as version,No as videojs};
|
|
40
|
+
var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:void 0!==s?s:"undefined"!=typeof global?global:this,s=a.window,h=a.document,u=(a.location,a.navigator,a.setTimeout),c=a.clearTimeout,v=a.setInterval,p=a.clearInterval,m=a.Error,g=a.TypeError,k=a.SyntaxError,w=a.Object,_=a.Math,x=a.parseInt,C=a.parseFloat,S=a.isNaN,j=a.Uint8Array;a.Worker,a.WorkerGlobalScope,a.XMLHttpRequest;import{$ as T,$a as M,A,Aa as P,B as N,Ba as E,C as B,Ca as I,D as F,Da as D,E as $,Ea as R,F as U,Fa as O,G as V,Ga as L,H,Ha as q,I as z,Ia as W,J as G,Ja as X,K as J,Ka as Q,L as Y,La as K,M as Z,Ma as tt,N as it,Na as d,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 dt,Ta as ft,U as vt,Ua as pt,V as mt,Va as gt,W as yt,Wa as bt,X as kt,Xa as wt,Y as _t,Ya as xt,Z as Ct,Za as St,_ as jt,_a as Tt,a as Mt,aa as At,ab as Pt,b as Nt,ba as Et,bb as Bt,c as f,ca as It,cb as Ft,d as Dt,da as $t,db as Rt,e as Ut,ea as Ot,eb as Vt,f as Lt,fa as Ht,fb as qt,g as zt,ga as Wt,gb as Gt,h as Xt,ha as Jt,i as Qt,ia as Yt,j as Kt,ja as Zt,k as ti,ka as ii,l as si,la as ei,m as ni,ma as ri,n as hi,na as oi,o as ai,oa as ui,p as ci,pa as li,q as di,qa as fi,r as vi,ra as pi,s as mi,sa as gi,t as yi,ta as bi,u as ki,ua as wi,v as _i,va as xi,w as Ci,wa as Si,x as ji,xa as Ti,y as Mi,ya as Ai,z as Pi,za as Ni}from"./THEOplayer.common.esm.js";f(),f(),f(),f();var Ei=[];function Bi(t){Ei.push(t)}var Ii=[];function Fi(t){Ii.push(t)}f(),f(),f(),f();var b=void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Di=void 0!==h?h:{createElement:function(){}};function $i(t,i){return i||(i=t.slice(0)),t.raw=i,t}var Ri=1;function Ui(){return Ri++}var Oi,Vi=w.prototype.toString,Li=function(t){return zi(t)?w.keys(t):[]};function Hi(t,i){Li(t).forEach((function(s){return i(t[s],s)}))}function qi(t){for(var i=arguments.length,s=new Array(i>1?i-1:0),e=1;e<i;e++)s[e-1]=arguments[e];return w.assign?w.assign.apply(w,[t].concat(s)):(s.forEach((function(i){i&&Hi(i,(function(i,s){t[s]=i}))})),t)}function zi(t){return!!t&&"object"==typeof t}function Wi(t){return zi(t)&&"[object Object]"===Vi.call(t)&&t.constructor===w}var Gi=function(t,i,s){void 0===s&&(s=!!Ws&&Ws<11),"log"!==t&&i.unshift(t.toUpperCase()+":"),Oi.history.push(i),i.unshift("VIDEOJS:");var e=b.console&&b.console[t];e&&(s&&(i=i.map((function(t){if(zi(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(i){return String(t)}return String(t)})).join(" ")),e.apply?e[Array.isArray(i)?"apply":"call"](b.console,i):e(i))};(Oi=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];Gi("log",i)}).history=[],Oi.error=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Gi("error",i)},Oi.warn=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return Gi("warn",i)};var Xi=Oi,Ji="undefined"!=typeof globalThis?globalThis:void 0!==s?s:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Qi(t){return t.replace(/\n\r?\s*/g,"")}var Yi,Ki=function(t){for(var i="",s=0;s<arguments.length;s++)i+=Qi(t[s])+(arguments[s+1]||"");return i};function Zi(t){return"string"==typeof t&&/\S/.test(t)}function ts(t){if(/\s/.test(t))throw new m("class has illegal whitespace characters")}function is(){return Di===b.document&&void 0!==Di.createElement}function ss(t){return zi(t)&&1===t.nodeType}function es(t){return function(i,s){if(!Zi(i))return Di[t](null);Zi(s)&&(s=Di.querySelector(s));var e=ss(s)?s:Di;return e[t]&&e[t](i)}}function ns(t,i,s,e){void 0===t&&(t="div"),void 0===i&&(i={}),void 0===s&&(s={});var n=Di.createElement(t);return w.getOwnPropertyNames(i).forEach((function(t){var s=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Xi.warn(Ki(Yi||(Yi=$i(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."])),t,s)),n.setAttribute(t,s)):"textContent"===t?rs(n,s):n[t]=s})),w.getOwnPropertyNames(s).forEach((function(t){n.setAttribute(t,s[t])})),e&&Cs(n,e),n}function rs(t,i){return void 0===t.textContent?t.innerText=i:t.textContent=i,t}function hs(t,i){i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t)}var os={},as="vdata"+(new Date).getTime();function us(t){var i=t[as];return i||(i=t[as]=Ui()),os[i]||(os[i]={}),os[i]}function cs(t){var i=t[as];return!!i&&!!w.getOwnPropertyNames(os[i]).length}function ls(t){var i=t[as];if(i){delete os[i];try{delete t[as]}catch(i){t.removeAttribute?t.removeAttribute(as):t[as]=null}}}function ds(t,i){return ts(i),t.classList?t.classList.contains(i):function(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}(i).test(t.className)}function fs(t,i){return t.classList?t.classList.add(i):ds(t,i)||(t.className=(t.className+" "+i).trim()),t}function vs(t,i){return t.classList?t.classList.remove(i):(ts(i),t.className=t.className.split(/\s+/).filter((function(t){return t!==i})).join(" ")),t}function ps(t,i,s){var e=ds(t,i);if("function"==typeof s&&(s=s(t,i)),"boolean"!=typeof s&&(s=!e),s!==e)return s?fs(t,i):vs(t,i),t}function ms(t,i){w.getOwnPropertyNames(i).forEach((function(s){var e=i[s];null==e||!1===e?t.removeAttribute(s):t.setAttribute(s,!0===e?"":e)}))}function gs(t){var i={};if(t&&t.attributes&&t.attributes.length>0)for(var s=t.attributes,e=s.length-1;e>=0;e--){var n=s[e].name,r=s[e].value;"boolean"!=typeof t[n]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+",")||(r=null!==r),i[n]=r}return i}function ys(t,i,s){t.setAttribute(i,s)}function bs(t,i){t.removeAttribute(i)}function ks(t){var i;if(t.getBoundingClientRect&&t.parentNode&&(i=t.getBoundingClientRect()),!i)return{left:0,top:0};var s=Di.documentElement,e=Di.body,n=s.clientLeft||e.clientLeft||0,r=b.pageXOffset||e.scrollLeft,h=i.left+r-n,o=s.clientTop||e.clientTop||0,a=b.pageYOffset||e.scrollTop,u=i.top+a-o;return{left:_.round(h),top:_.round(u)}}function ws(t,i){var s={},e=ks(t),n=t.offsetWidth,r=t.offsetHeight,h=e.top,o=e.left,a=i.pageY,u=i.pageX;return i.changedTouches&&(u=i.changedTouches[0].pageX,a=i.changedTouches[0].pageY),s.y=_.max(0,_.min(1,(h-a+r)/r)),s.x=_.max(0,_.min(1,(u-o)/n)),s}function _s(t){return zi(t)&&3===t.nodeType}function xs(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function Cs(t,i){return function(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),ss(t)||_s(t)?t:"string"==typeof t&&/\S/.test(t)?Di.createTextNode(t):void 0})).filter((function(t){return t}))}(i).forEach((function(i){return t.appendChild(i)})),t}function Ss(t,i){return Cs(xs(t),i)}var js,Ts=es("querySelector"),Ms=es("querySelectorAll"),As=b.navigator&&b.navigator.userAgent||"",Ps=/AppleWebKit\/([\d.]+)/i.exec(As),Ns=Ps?C(Ps.pop()):null,Es=/iPad/i.test(As),Bs=/iPhone/i.test(As)&&!Es,Is=/iPod/i.test(As),Fs=Bs||Es||Is,Ds=(js=As.match(/OS (\d+)_/i))&&js[1]?js[1]:null,$s=/Android/i.test(As),Rs=function(){var t=As.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var i=t[1]&&C(t[1]),s=t[2]&&C(t[2]);return i&&s?C(t[1]+"."+t[2]):i||null}(),Us=$s&&/webkit/i.test(As)&&Rs<2.3,Os=$s&&Rs<5&&Ns<537,Vs=/Firefox/i.test(As),Ls=/Edge/i.test(As),Hs=!Ls&&/Chrome/i.test(As),qs=function(){var t=As.match(/Chrome\/(\d+)/);return t&&t[1]?C(t[1]):null}(),zs=/MSIE\s8\.0/.test(As),Ws=function(){var t=/MSIE\s(\d+)\.\d/.exec(As),i=t&&C(t[1]);return!i&&/Trident\/7.0/i.test(As)&&/rv:11.0/.test(As)&&(i=11),i}(),Gs=/Safari/i.test(As)&&!Hs&&!$s&&!Ls,Xs=Gs||Fs,Js=is()&&("ontouchstart"in b||b.DocumentTouch&&b.document instanceof b.DocumentTouch),Qs=is()&&"backgroundSize"in b.document.createElement("video").style,Ys=w.freeze({__proto__:null,IS_IPAD:Es,IS_IPHONE:Bs,IS_IPOD:Is,IS_IOS:Fs,IOS_VERSION:Ds,IS_ANDROID:$s,ANDROID_VERSION:Rs,IS_OLD_ANDROID:Us,IS_NATIVE_ANDROID:Os,IS_FIREFOX:Vs,IS_EDGE:Ls,IS_CHROME:Hs,CHROME_VERSION:qs,IS_IE8:zs,IE_VERSION:Ws,IS_SAFARI:Gs,IS_ANY_SAFARI:Xs,TOUCH_ENABLED:Js,BACKGROUND_SIZE_SUPPORTED:Qs});function Ks(t,i){var s=us(t);0===s.handlers[i].length&&(delete s.handlers[i],t.removeEventListener?t.removeEventListener(i,s.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+i,s.dispatcher)),w.getOwnPropertyNames(s.handlers).length<=0&&(delete s.handlers,delete s.dispatcher,delete s.disabled),0===w.getOwnPropertyNames(s).length&&ls(t)}function Zs(t,i,s,e){s.forEach((function(s){t(i,s,e)}))}function te(t){function i(){return!0}function s(){return!1}if(!t||!t.isPropagationStopped||!t.isImmediatePropagationStopped){var e=t||b.event;for(var n in t={},e)"layerX"!==n&&"layerY"!==n&&"keyLocation"!==n&&"webkitMovementX"!==n&&"webkitMovementY"!==n&&"path"!==n&&("returnValue"===n&&e.preventDefault||(t[n]=e[n]));if(t.target||(t.target=t.srcElement||Di),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){e.preventDefault&&e.preventDefault(),t.returnValue=!1,e.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){e.stopPropagation&&e.stopPropagation(),t.cancelBubble=!0,e.cancelBubble=!0,t.isPropagationStopped=i},t.isPropagationStopped=s,t.stopImmediatePropagation=function(){e.stopImmediatePropagation&&e.stopImmediatePropagation(),t.isImmediatePropagationStopped=i,t.stopPropagation()},t.isImmediatePropagationStopped=s,null!==t.clientX&&void 0!==t.clientX){var r=Di.documentElement,h=Di.body;t.pageX=t.clientX+(r&&r.scrollLeft||h&&h.scrollLeft||0)-(r&&r.clientLeft||h&&h.clientLeft||0),t.pageY=t.clientY+(r&&r.scrollTop||h&&h.scrollTop||0)-(r&&r.clientTop||h&&h.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var ie=!1;!function(){try{var t=w.defineProperty({},"passive",{get:function(){ie=!0}});b.addEventListener("test",null,t)}catch(t){}}();var se=["touchstart","touchmove"];function ee(t,i,s){if(Array.isArray(i))return Zs(ee,t,i,s);var e=us(t);if(e.handlers||(e.handlers={}),e.handlers[i]||(e.handlers[i]=[]),s.guid||(s.guid=Ui()),e.handlers[i].push(s),e.dispatcher||(e.disabled=!1,e.dispatcher=function(i,s){if(!e.disabled){i=te(i);var n=e.handlers[i.type];if(n)for(var r=n.slice(0),h=0,o=r.length;h<o&&!i.isImmediatePropagationStopped();h++)try{r[h].call(t,i,s)}catch(t){Xi.error(t)}}}),1===e.handlers[i].length)if(t.addEventListener){var n=!1;ie&&se.indexOf(i)>-1&&(n={passive:!0}),t.addEventListener(i,e.dispatcher,n)}else t.attachEvent&&t.attachEvent("on"+i,e.dispatcher)}function ne(t,i,s){if(cs(t)){var e=us(t);if(e.handlers){if(Array.isArray(i))return Zs(ne,t,i,s);var n=function(i){e.handlers[i]=[],Ks(t,i)};if(i){var r=e.handlers[i];if(r)if(s){if(s.guid)for(var h=0;h<r.length;h++)r[h].guid===s.guid&&r.splice(h--,1);Ks(t,i)}else n(i)}else for(var o in e.handlers)n(o)}}}function re(t,i,s){var e=cs(t)?us(t):{},n=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=te(i),e.dispatcher&&e.dispatcher.call(t,i,s),n&&!i.isPropagationStopped()&&!0===i.bubbles)re.call(null,n,i,s);else if(!n&&!i.defaultPrevented){var r=us(i.target);i.target[i.type]&&(r.disabled=!0,"function"==typeof i.target[i.type]&&i.target[i.type](),r.disabled=!1)}return!i.defaultPrevented}function he(t,i,s){if(Array.isArray(i))return Zs(he,t,i,s);var e=function e(){ne(t,i,e),s.apply(this,arguments)};e.guid=s.guid=s.guid||Ui(),ee(t,i,e)}var oe,ae=!1,ue=function(){if(is()){var t=Di.getElementsByTagName("video"),i=Di.getElementsByTagName("audio"),s=[];if(t&&t.length>0)for(var e=0,n=t.length;e<n;e++)s.push(t[e]);if(i&&i.length>0)for(var r=0,h=i.length;r<h;r++)s.push(i[r]);if(s&&s.length>0)for(var o=0,a=s.length;o<a;o++){var u=s[o];if(!u||!u.getAttribute){ce(1);break}void 0===u.player&&null!==u.getAttribute("data-setup")&&oe(u)}else ae||ce(1)}};function ce(t,i){i&&(oe=i),b.setTimeout(ue,t)}is()&&"complete"===Di.readyState?ae=!0:he(b,"load",(function(){ae=!0}));var le=function(t){var i=Di.createElement("style");return i.className=t,i},de=function(t,i){t.styleSheet?t.styleSheet.cssText=i:t.textContent=i},n=function(t,i,s){i.guid||(i.guid=Ui());var e=function(){return i.apply(t,arguments)};return e.guid=s?s+"_"+i.guid:i.guid,e};function fe(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function ve(){for(var t={},i=arguments.length,s=new Array(i),e=0;e<i;e++)s[e]=arguments[e];return s.forEach((function(i){i&&Hi(i,(function(i,s){Wi(i)?(Wi(t[s])||(t[s]={}),t[s]=ve(t[s],i)):t[s]=i}))})),t}var pe=function(){function t(t,i,s){if(!t&&this.play?this.t=t=this:this.t=t,this.h=ve({},this.h),i=this.h=ve(this.h,i),this.o=i.id||i.el&&i.el.id,!this.o){var e=t&&t.id&&t.id()||"no_player";this.o=e+"u"+Ui()}this.l=i.name||null,i.el?this.v=i.el:!1!==i.createEl&&(this.v=this.createEl()),this.m=[],this.k={},this.C={},!1!==i.initChildren&&this.initChildren(),this.ready(s),!1!==i.reportTouchActivity&&this.enableTouchActivity()}var i=t.prototype;return i.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.m)for(var t=this.m.length-1;t>=0;t--)this.m[t].dispose&&this.m[t].dispose();this.m=null,this.k=null,this.C=null,this.off(),this.v.parentNode&&this.v.parentNode.removeChild(this.v),ls(this.v),this.v=null},i.player=function(){return this.t},i.options=function(t){return Xi.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.h=ve(this.h,t),this.h):this.h},i.el=function(){return this.v},i.createEl=function(t,i,s){return ns(t,i,s)},i.localize=function(t){var i=this.t.language&&this.t.language(),s=this.t.languages&&this.t.languages();if(!i||!s)return t;var e=s[i];if(e&&e[t])return e[t];var n=s[i.split("-")[0]];return n&&n[t]?n[t]:t},i.contentEl=function(){return this.S||this.v},i.id=function(){return this.o},i.name=function(){return this.l},i.children=function(){return this.m},i.getChildById=function(t){return this.k[t]},i.getChild=function(t){if(t)return t=fe(t),this.C[t]},i.addChild=function(i,s,e){var n,r;if(void 0===s&&(s={}),void 0===e&&(e=this.m.length),"string"==typeof i){r=fe(i),s||(s={}),!0===s&&(Xi.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),s={});var h=s.componentClass||r;s.name=r;var o=t.getComponent(h);if(!o)throw new m("Component "+h+" does not exist");if("function"!=typeof o)return null;n=new o(this.t||this,s)}else n=i;if(this.m.splice(e,0,n),"function"==typeof n.id&&(this.k[n.id()]=n),(r=r||n.name&&fe(n.name()))&&(this.C[r]=n),"function"==typeof n.el&&n.el()){var a=this.contentEl().children[e]||null;this.contentEl().insertBefore(n.el(),a)}return n},i.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.m){for(var i=!1,s=this.m.length-1;s>=0;s--)if(this.m[s]===t){i=!0,this.m.splice(s,1);break}if(i){this.k[t.id()]=null,this.C[t.name()]=null;var e=t.el();e&&e.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},i.initChildren=function(){var i=this,s=this.h.children;if(s){var e,n=this.h,r=t.getComponent("Tech");(e=Array.isArray(s)?s:w.keys(s)).concat(w.keys(this.h).filter((function(t){return!e.some((function(i){return"string"==typeof i?t===i:t===i.name}))}))).map((function(t){var e,n;return"string"==typeof t?n=s[e=t]||i.h[e]||{}:(e=t.name,n=t),{name:e,opts:n}})).filter((function(i){var s=t.getComponent(i.opts.componentClass||fe(i.name));return s&&!r.isTech(s)})).forEach((function(t){var s=t.name,e=t.opts;if(void 0!==n[s]&&(e=n[s]),!1!==e){!0===e&&(e={}),e.playerOptions=i.h.playerOptions;var r=i.addChild(s,e);r&&(i[s]=r)}}))}},i.buildCSSClass=function(){return""},i.on=function(t,i,s){var e=this;if("string"==typeof t||Array.isArray(t))ee(this.v,t,n(this,i));else{var r=t,h=i,o=n(this,s),a=function(){return e.off(r,h,o)};a.guid=o.guid,this.on("dispose",a);var u=function(){return e.off("dispose",a)};u.guid=o.guid,t.nodeName?(ee(r,h,o),ee(r,"dispose",u)):"function"==typeof t.on&&(r.on(h,o),r.on("dispose",u))}return this},i.off=function(t,i,s){if(!t||"string"==typeof t||Array.isArray(t))ne(this.v,t,i);else{var e=t,r=i,h=n(this,s);this.off("dispose",h),t.nodeName?(ne(e,r,h),ne(e,"dispose",h)):(e.off(r,h),e.off("dispose",h))}return this},i.one=function(t,i,s){var e=arguments,r=this;if("string"==typeof t||Array.isArray(t))he(this.v,t,n(this,i));else{var h=t,o=i,a=n(this,s),u=function t(){r.off(h,o,t),a.apply(null,e)};u.guid=a.guid,this.on(h,o,u)}return this},i.trigger=function(t,i){return re(this.v,t,i),this},i.ready=function(t,i){return void 0===i&&(i=!1),t&&(this.j?i?t.call(this):this.setTimeout(t,1):(this.T=this.T||[],this.T.push(t))),this},i.triggerReady=function(){this.j=!0,this.setTimeout((function(){var t=this.T;this.T=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},i.$=function(t,i){return Ts(t,i||this.contentEl())},i.$$=function(t,i){return Ms(t,i||this.contentEl())},i.hasClass=function(t){return ds(this.v,t)},i.addClass=function(t){return fs(this.v,t),this},i.removeClass=function(t){return vs(this.v,t),this},i.toggleClass=function(t,i){return ps(this.v,t,i),this},i.show=function(){return this.removeClass("vjs-hidden"),this},i.hide=function(){return this.addClass("vjs-hidden"),this},i.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},i.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},i.getAttribute=function(t){return function(t,i){return t.getAttribute(i)}(this.v,t)},i.setAttribute=function(t,i){return ys(this.v,t,i),this},i.removeAttribute=function(t){return bs(this.v,t),this},i.width=function(t,i){return this.dimension("width",t,i)},i.height=function(t,i){return this.dimension("height",t,i)},i.dimensions=function(t,i){return this.width(t,!0).height(i)},i.dimension=function(t,i,s){if(void 0!==i)return null!==i&&i==i||(i=0),-1!==(""+i).indexOf("%")||-1!==(""+i).indexOf("px")?this.v.style[t]=i:this.v.style[t]="auto"===i?"":i+"px",s||this.trigger("resize"),this;if(!this.v)return 0;var e=this.v.style[t],n=e.indexOf("px");return x(-1!==n?e.slice(0,n):this.v["offset"+fe(t)],10)},i.currentDimension=function(t){var i=0;if("width"!==t&&"height"!==t)throw new m("currentDimension only accepts width or height value");if("function"==typeof b.getComputedStyle){var s=b.getComputedStyle(this.v);i=s.getPropertyValue(t)||s[t]}if(0===(i=C(i))){var e="offset"+fe(t);i=this.v[e]}return i},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.v.focus()},i.blur=function(){this.v.blur()},i.emitTapEvents=function(){var t,i=0,s=null;this.on("touchstart",(function(e){1===e.touches.length&&(s={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY},i=(new Date).getTime(),t=!0)})),this.on("touchmove",(function(i){if(i.touches.length>1)t=!1;else if(s){var e=i.touches[0].pageX-s.pageX,n=i.touches[0].pageY-s.pageY;_.sqrt(e*e+n*n)>10&&(t=!1)}}));var e=function(){t=!1};this.on("touchleave",e),this.on("touchcancel",e),this.on("touchend",(function(e){(s=null,!0===t)&&((new Date).getTime()-i<200&&(e.preventDefault(),this.trigger("tap")))}))},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,i=n(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){i(),this.clearInterval(t),t=this.setInterval(i,250)}));var s=function(s){i(),this.clearInterval(t)};this.on("touchmove",i),this.on("touchend",s),this.on("touchcancel",s)}},i.setTimeout=function(t,i){t=n(this,t);var s=b.setTimeout(t,i),e=function(){this.clearTimeout(s)};return e.guid="vjs-timeout-"+s,this.on("dispose",e),s},i.clearTimeout=function(t){b.clearTimeout(t);var i=function(){};return i.guid="vjs-timeout-"+t,this.off("dispose",i),t},i.setInterval=function(t,i){t=n(this,t);var s=b.setInterval(t,i),e=function(){this.clearInterval(s)};return e.guid="vjs-interval-"+s,this.on("dispose",e),s},i.clearInterval=function(t){b.clearInterval(t);var i=function(){};return i.guid="vjs-interval-"+t,this.off("dispose",i),t},t.registerComponent=function(i,s){if(i){if(i=fe(i),t.M||(t.M={}),"Player"===i&&t.M[i]){var e=t.M[i];if(e.players&&w.keys(e.players).length>0&&w.keys(e.players).map((function(t){return e.players[t]})).every(Boolean))throw new m("Can not register Player component after player has been created")}return t.M[i]=s,s}},t.getComponent=function(i){if(i)return i=fe(i),t.M&&t.M[i]?t.M[i]:b&&b.videojs&&b.videojs[i]?(Xi.warn("The "+i+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),b.videojs[i]):void 0},t.extend=function(i){i=i||{},Xi.warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");var s=i.init||i.init||this.prototype.init||this.prototype.init||function(){},e=function(){s.apply(this,arguments)};for(var n in(e.prototype=w.create(this.prototype)).constructor=e,e.extend=t.extend,i)i.hasOwnProperty(n)&&(e.prototype[n]=i[n]);return e},t}();pe.registerComponent("Component",pe);var me=function(){};function ge(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ye(t,i){return(ye=w.setPrototypeOf?w.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t})(t,i)}function be(t,i){t.prototype=w.create(i.prototype),t.prototype.constructor=t,ye(t,i)}function ke(t,i,s,e){return void 0===e&&(Xi.warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),e=0),function(t,i,s){if(i<0||i>s)throw new m("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 we(t){return void 0===t||0===t.length?{length:0,start:function(){throw new m("This TimeRanges object is empty")},end:function(){throw new m("This TimeRanges object is empty")}}:{length:t.length,start:ke.bind(null,"start",0,t),end:ke.bind(null,"end",1,t)}}function _e(t,i){return Array.isArray(t)?we(t):void 0===t||void 0===i?we():we([[t,i]])}function xe(t,i){var s,e,n=0;if(!i)return 0;t&&t.length||(t=_e(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}me.prototype.A={},me.prototype.on=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},ee(this,t,i),this.addEventListener=s},me.prototype.addEventListener=me.prototype.on,me.prototype.off=function(t,i){ne(this,t,i)},me.prototype.removeEventListener=me.prototype.off,me.prototype.one=function(t,i){var s=this.addEventListener;this.addEventListener=function(){},he(this,t,i),this.addEventListener=s},me.prototype.trigger=function(t){var i=t.type||t;"string"==typeof t&&(t={type:i}),t=te(t),this.A[i]&&this["on"+i]&&this["on"+i](t),re(this,t)},me.prototype.dispatchEvent=me.prototype.trigger;var Ce,Se,je,Te,Me={prefixed:!0},Ae=[["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"]],Pe=Ae[0];for(Se=0;Se<Ae.length;Se++)if(Ae[Se][1]in Di){Ce=Ae[Se];break}if(Ce){for(je=0;je<Ce.length;je++)Me[Pe[je]]=Ce[je];Me.prefixed=Ce[0]!==Pe[0]}function Ne(t){if(t instanceof Ne)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:zi(t)&&("number"==typeof t.code&&(this.code=t.code),qi(this,t)),this.message||(this.message=Ne.defaultMessages[this.code]||"")}for(Ne.prototype.code=0,Ne.prototype.message="",Ne.prototype.status=null,Ne.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Ne.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."},Te=0;Te<Ne.errorTypes.length;Te++)Ne[Ne.errorTypes[Te]]=Te,Ne.prototype[Ne.errorTypes[Te]]=Te;var Ee=function(t,i){var s,e=null;try{s=JSON.parse(t,i)}catch(t){e=t}return[e,s]};var Be=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(i,s,e){return t[s]&&(i[s]=t[s]),i}),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},Ie=function(t){var i=t.$$("track"),s=Array.prototype.map.call(i,(function(t){return t.track}));return Array.prototype.map.call(i,(function(t){var i=Be(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(Be))},Fe=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()},De="vjs-modal-dialog",$e=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).P=e.N=e.B=!1,e.closeable(!e.h.uncloseable),e.content(e.h.content),e.S=ns("div",{className:De+"-content"},{role:"document"}),e.I=ns("p",{className:De+"-description vjs-offscreen",id:e.el().getAttribute("aria-describedby")}),rs(e.I,e.description()),e.v.appendChild(e.I),e.v.appendChild(e.S),e.on(i,"languagechange",e.handleLanguagechange),e}be(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 De+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},s.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},s.label=function(){return this.h.label||this.localize("Modal Window")},s.description=function(){var t=this.h.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},s.open=function(){if(!this.P){var t=this.player();this.trigger("beforemodalopen"),this.P=!0,(this.h.fillAlways||!this.N&&!this.B)&&this.fill(),this.D=!t.paused(),this.h.pauseOnOpen&&this.D&&t.pause(),this.closeable()&&this.on(this.v.ownerDocument,"keydown",n(this,this.handleKeyPress)),t.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.N=!0}return this},s.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.P},s.close=function(){if(this.P){var t=this.player();this.trigger("beforemodalclose"),this.P=!1,this.D&&this.h.pauseOnOpen&&t.play(),this.closeable()&&this.off(this.v.ownerDocument,"keydown",n(this,this.handleKeyPress)),t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.h.temporary&&this.dispose()}return this},s.closeable=function(t){if("boolean"==typeof t){var i=this.R=!!t,s=this.getChild("closeButton");if(i&&!s){var e=this.S;this.S=this.v,s=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.S=e,this.on(s,"close",this.close)}!i&&s&&(this.off(s,"close",this.close),this.removeChild(s),s.dispose())}return this.R},s.fill=function(){return this.fillWith(this.content())},s.fillWith=function(t){var i=this.contentEl(),s=i.parentNode,e=i.nextSibling;return this.trigger("beforemodalfill"),this.B=!0,s.removeChild(i),this.empty(),Ss(i,t),this.trigger("modalfill"),e?s.insertBefore(i,e):s.appendChild(i),this},s.empty=function(){return this.trigger("beforemodalempty"),xs(this.contentEl()),this.trigger("modalempty"),this},s.content=function(t){return void 0!==t&&(this.U=t),this.U},s.handleLanguagechange=function(){this.v.setAttribute("aria-label",this.label()),rs(this.I,this.description()),this.opened()?this.fill():(this.N||this.B)&&(this.N=!1,this.B=!1,this.empty())},i}(pe);$e.prototype.h={pauseOnOpen:!0,temporary:!0},pe.registerComponent("ModalDialog",$e);var Re=function(){function t(i){var s=this;if(zs)for(var e in s=Di.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);if(t.prototype.O.call(s,i),w.defineProperty(s,"length",{get:function(){return this.V}}),zs)return s}var i=t.prototype;return i.O=function(t){var i=this.length||0,s=0,e=t.length;this.L=t,this.V=t.length;var n=function(t){""+t in this||w.defineProperty(this,""+t,{get:function(){return this.L[t]}})};if(i<e)for(s=i;s<e;s++)n.call(this,s)},i.getCueById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},t}(),Ue={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Oe={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Ve={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Le={disabled:"disabled",hidden:"hidden",showing:"showing"},He=function(t){function i(s){var e;void 0===s&&(s={});var n=ge(e=t.call(this)||this);if(zs)for(var r in n=Di.createElement("custom"),i.prototype)"constructor"!==r&&(n[r]=i.prototype[r]);var h={id:s.id||["vjs_track",Ui()].join("_"),kind:s.kind||"",label:s.label||"",language:s.language||""},o=function(t){w.defineProperty(n,t,{get:function(){return h[t]},set:function(){}})};for(var a in h)o(a);return n||ge(e)}return be(i,t),i}(me),qe=function(t){var i=["protocol","hostname","port","pathname","search","hash","host"],s=Di.createElement("a");s.href=t;var e,n=""===s.host&&"file:"!==s.protocol;n&&((e=Di.createElement("div")).innerHTML='<a href="'+t+'"></a>',s=e.firstChild,e.setAttribute("style","display:none; position:absolute;"),Di.body.appendChild(e));for(var r={},h=0;h<i.length;h++)r[i[h]]=s[i[h]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),n&&Di.body.removeChild(e),r},ze=function(t){var i=b.location,s=qe(t);return(":"===s.protocol?i.protocol:s.protocol)+s.host!==i.protocol+i.host},We={exports:{}};void 0!==s?We.exports=s:void 0!==Ji?We.exports=Ji:"undefined"!=typeof self?We.exports=self:We.exports={};var Ge=function(t){var i=Xe.call(t);return"[object Function]"===i||"function"==typeof t&&"[object RegExp]"!==i||void 0!==s&&(t===s.setTimeout||t===s.alert||t===s.confirm||t===s.prompt)},Xe=w.prototype.toString;var Je,Qe,Ye,Ke,Ze,tn,sn,en,nn,rn,hn,on,an=Array.prototype.slice,un=w.prototype.toString,cn=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==un.call(i))throw new g("Function.prototype.bind called on incompatible "+i);for(var s,e=an.call(arguments,1),n=_.max(0,i.length-e.length),r=[],h=0;h<n;h++)r.push("$"+h);if(s=Function("binder","return function ("+r.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof s){var n=i.apply(this,e.concat(an.call(arguments)));return w(n)===n?n:this}return i.apply(t,e.concat(an.call(arguments)))})),i.prototype){var o=function(){};o.prototype=i.prototype,s.prototype=new o,o.prototype=null}return s},ln=Function.prototype.bind||cn,dn=w.prototype.toString,fn=function(t){var i=dn.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]"===dn.call(t.callee)),s};w.keys||(Qe=w.prototype.hasOwnProperty,Ye=w.prototype.toString,Ke=fn,Ze=w.prototype.propertyIsEnumerable,tn=!Ze.call({toString:null},"toString"),sn=Ze.call((function(){}),"prototype"),en=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],nn=function(t){var i=t.constructor;return i&&i.prototype===t},rn={$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},hn=function(){if(void 0===s)return!1;for(var t in s)try{if(!rn["$"+t]&&Qe.call(s,t)&&null!==s[t]&&"object"==typeof s[t])try{nn(s[t])}catch(t){return!0}}catch(t){return!0}return!1}(),on=function(t){if(void 0===s||!hn)return nn(t);try{return nn(t)}catch(t){return!1}},Je=function(t){var i=null!==t&&"object"==typeof t,s="[object Function]"===Ye.call(t),e=Ke(t),n=i&&"[object String]"===Ye.call(t),r=[];if(!i&&!s&&!e)throw new g("Object.keys called on a non-object");var h=sn&&s;if(n&&t.length>0&&!Qe.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||!Qe.call(t,u)||r.push(String(u));if(tn)for(var c=on(t),l=0;l<en.length;++l)c&&"constructor"===en[l]||!Qe.call(t,en[l])||r.push(en[l]);return r});var vn=Je,pn=Array.prototype.slice,mn=fn,gn=w.keys,yn=gn?function(t){return gn(t)}:vn,bn=w.keys;yn.shim=function(){if(w.keys){var t=function(){var t=w.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(w.keys=function(t){return mn(t)?bn(pn.call(t)):bn(t)})}else w.keys=yn;return w.keys||yn};var kn=yn,wn="function"==typeof Mt&&"symbol"==typeof Mt("foo"),_n=w.prototype.toString,xn=Array.prototype.concat,Cn=w.defineProperty,Sn=Cn&&function(){var t={};try{for(var i in Cn(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),jn=function(t,i,s,e){(!(i in t)||function(t){return"function"==typeof t&&"[object Function]"===_n.call(t)}(e)&&e())&&(Sn?Cn(t,i,{configurable:!0,enumerable:!1,value:s,writable:!0}):t[i]=s)},Tn=function(t,i){var s=arguments.length>2?arguments[2]:{},e=kn(i);wn&&(e=xn.call(e,w.getOwnPropertySymbols(i)));for(var n=0;n<e.length;n+=1)jn(t,e[n],i[e[n]],s[e[n]])};Tn.supportsDescriptors=!!Sn;var Mn,An=Tn,Pn=w.getOwnPropertyDescriptor?function(){return w.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new g},Nn="function"==typeof Mt&&"symbol"==typeof Nt,En=w.getPrototypeOf||function(t){return t.__proto__},Bn=void 0===j?Mn:En(j),In={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"==typeof ArrayBuffer?Mn:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?Mn:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":Nn?En([][Nt]()):Mn,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":Mn,"$ %AsyncFunction%":undefined,"$ %AsyncFunctionPrototype%":Mn,"$ %AsyncGenerator%":Mn,"$ %AsyncGeneratorFunction%":undefined,"$ %AsyncGeneratorPrototype%":Mn,"$ %AsyncIteratorPrototype%":Mn,"$ %Atomics%":"undefined"==typeof Atomics?Mn:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"==typeof DataView?Mn:DataView,"$ %DataViewPrototype%":"undefined"==typeof DataView?Mn:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":m,"$ %ErrorPrototype%":m.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"==typeof Float32Array?Mn:Float32Array,"$ %Float32ArrayPrototype%":"undefined"==typeof Float32Array?Mn:Float32Array.prototype,"$ %Float64Array%":"undefined"==typeof Float64Array?Mn:Float64Array,"$ %Float64ArrayPrototype%":"undefined"==typeof Float64Array?Mn:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":Mn,"$ %GeneratorFunction%":undefined,"$ %GeneratorPrototype%":Mn,"$ %Int8Array%":"undefined"==typeof Int8Array?Mn:Int8Array,"$ %Int8ArrayPrototype%":"undefined"==typeof Int8Array?Mn:Int8Array.prototype,"$ %Int16Array%":"undefined"==typeof Int16Array?Mn:Int16Array,"$ %Int16ArrayPrototype%":"undefined"==typeof Int16Array?Mn:Int8Array.prototype,"$ %Int32Array%":"undefined"==typeof Int32Array?Mn:Int32Array,"$ %Int32ArrayPrototype%":"undefined"==typeof Int32Array?Mn:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":S,"$ %IteratorPrototype%":Nn?En(En([][Nt]())):Mn,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"==typeof Map?Mn:Map,"$ %MapIteratorPrototype%":"undefined"!=typeof Map&&Nn?En((new Map)[Nt]()):Mn,"$ %MapPrototype%":"undefined"==typeof Map?Mn:Map.prototype,"$ %Math%":_,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":w,"$ %ObjectPrototype%":w.prototype,"$ %ObjProto_toString%":w.prototype.toString,"$ %ObjProto_valueOf%":w.prototype.valueOf,"$ %parseFloat%":C,"$ %parseInt%":x,"$ %Promise%":"undefined"==typeof Promise?Mn:Promise,"$ %PromisePrototype%":"undefined"==typeof Promise?Mn:Promise.prototype,"$ %PromiseProto_then%":"undefined"==typeof Promise?Mn:Promise.prototype.then,"$ %Promise_all%":"undefined"==typeof Promise?Mn:Promise.all,"$ %Promise_reject%":"undefined"==typeof Promise?Mn:Promise.reject,"$ %Promise_resolve%":"undefined"==typeof Promise?Mn:Promise.resolve,"$ %Proxy%":"undefined"==typeof Proxy?Mn:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"==typeof Reflect?Mn:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"==typeof Set?Mn:Set,"$ %SetIteratorPrototype%":"undefined"!=typeof Set&&Nn?En((new Set)[Nt]()):Mn,"$ %SetPrototype%":"undefined"==typeof Set?Mn:Set.prototype,"$ %SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Mn:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?Mn:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":Nn?En(""[Nt]()):Mn,"$ %StringPrototype%":String.prototype,"$ %Symbol%":Nn?Mt:Mn,"$ %SymbolPrototype%":Nn?Mt.prototype:Mn,"$ %SyntaxError%":k,"$ %SyntaxErrorPrototype%":k.prototype,"$ %ThrowTypeError%":Pn,"$ %TypedArray%":Bn,"$ %TypedArrayPrototype%":Bn?Bn.prototype:Mn,"$ %TypeError%":g,"$ %TypeErrorPrototype%":g.prototype,"$ %Uint8Array%":void 0===j?Mn:j,"$ %Uint8ArrayPrototype%":void 0===j?Mn:j.prototype,"$ %Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Mn:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?Mn:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"==typeof Uint16Array?Mn:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?Mn:Uint16Array.prototype,"$ %Uint32Array%":"undefined"==typeof Uint32Array?Mn:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?Mn:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"==typeof WeakMap?Mn:WeakMap,"$ %WeakMapPrototype%":"undefined"==typeof WeakMap?Mn:WeakMap.prototype,"$ %WeakSet%":"undefined"==typeof WeakSet?Mn:WeakSet,"$ %WeakSetPrototype%":"undefined"==typeof WeakSet?Mn:WeakSet.prototype},Fn=function(t,i){if(arguments.length>1&&"boolean"!=typeof i)throw new g('"allowMissing" argument must be a boolean');var s="$ "+t;if(!(s in In))throw new k("intrinsic "+t+" does not exist!");if(void 0===In[s]&&!i)throw new g("intrinsic "+t+" exists, but is not available. Please file an issue!");return In[s]},Dn=ln.call(Function.call,w.prototype.hasOwnProperty),$n=Fn,Rn=$n("%TypeError%"),Un=$n("%SyntaxError%"),On=Dn,Vn={"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(On(i,e)&&!s[e])return!1;var n=On(i,"[[Value]]"),r=On(i,"[[Get]]")||On(i,"[[Set]]");if(n&&r)throw new Rn("Property Descriptors may not be both accessor and data descriptors");return!0}},Ln=Number.isNaN||function(t){return t!=t},Hn=Number.isNaN||function(t){return t!=t},qn=Number.isFinite||function(t){return"number"==typeof t&&!Hn(t)&&t!==1/0&&t!==-1/0},zn=Function.prototype.toString,Wn=/^\s*class\b/,Gn=function(t){try{var i=zn.call(t);return Wn.test(i)}catch(t){return!1}},Xn=w.prototype.toString,Jn="function"==typeof Mt&&"symbol"==typeof Mt.toStringTag,Qn=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(Jn)return function(t){try{return!Gn(t)&&(zn.call(t),!0)}catch(t){return!1}}(t);if(Gn(t))return!1;var i=Xn.call(t);return"[object Function]"===i||"[object GeneratorFunction]"===i},Yn=w.prototype.toString,Kn=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},Zn=Qn,tr=function(t){var i;if((i=arguments.length>1?arguments[1]:"[object Date]"===Yn.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(Zn(t[n[e]])&&(s=t[n[e]](),Kn(s)))return s;throw new g("No default value")}throw new g("invalid [[DefaultValue]] hint supplied")},ir=Fn,sr=ir("%Object%"),er=ir("%TypeError%"),nr=ir("%String%"),rr=function(t,i,s,e){var n=Vn[i];if("function"!=typeof n)throw new Un("unknown record type: "+i);if(!n(t,e))throw new Rn(s+" must be a "+i);console.log(n(t,e),e)},hr=Ln,or=qn,ar=function(t){return t>=0?1:-1},ur=function(t,i){var s=t%i;return _.floor(s>=0?s:s+i)},cr=Dn,lr={ToPrimitive:function(t){return Kn(t)?t:arguments.length>1?tr(t,arguments[1]):tr(t)},ToBoolean:function(t){return!!t},ToNumber:function(t){return+t},ToInteger:function(t){var i=this.ToNumber(t);return hr(i)?0:0!==i&&or(i)?ar(i)*_.floor(_.abs(i)):i},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var i=this.ToNumber(t);if(hr(i)||0===i||!or(i))return 0;var s=ar(i)*_.floor(_.abs(i));return ur(s,65536)},ToString:function(t){return nr(t)},ToObject:function(t){return this.CheckObjectCoercible(t),sr(t)},CheckObjectCoercible:function(t,i){if(null==t)throw new er(i||"Cannot call method on "+t);return t},IsCallable:Qn,SameValue:function(t,i){return t===i?0!==t||1/t==1/i:hr(t)&&hr(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 er("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){return void 0!==t&&(rr(this,"Property Descriptor","Desc",t),!(!cr(t,"[[Get]]")&&!cr(t,"[[Set]]")))},IsDataDescriptor:function(t){return void 0!==t&&(rr(this,"Property Descriptor","Desc",t),!(!cr(t,"[[Value]]")&&!cr(t,"[[Writable]]")))},IsGenericDescriptor:function(t){return void 0!==t&&(rr(this,"Property Descriptor","Desc",t),!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t))},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(rr(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 er("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new er("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 g("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 er("setter must be a function");i["[[Set]]"]=e}if((cr(i,"[[Get]]")||cr(i,"[[Set]]"))&&(cr(i,"[[Value]]")||cr(i,"[[Writable]]")))throw new er("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return i}},dr=ln.call(Function.call,String.prototype.replace),fr=/^[\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]+/,vr=/[\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]+$/,pr=function(){var t=lr.ToString(lr.CheckObjectCoercible(this));return dr(dr(t,fr,""),vr,"")},mr=pr,gr=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:mr},yr=An,br=gr,kr=An,wr=pr,_r=gr,xr=function(){var t=br();return yr(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t},Cr=ln.call(Function.call,_r());kr(Cr,{getPolyfill:_r,implementation:wr,shim:xr});var Sr=Cr,jr=Qn,Tr=w.prototype.toString,Mr=w.prototype.hasOwnProperty,Ar=Sr,Pr=function(t,i,s){if(!jr(i))throw new g("iterator must be a function");var e;arguments.length>=3&&(e=s),"[object Array]"===Tr.call(t)?function(t,i,s){for(var e=0,n=t.length;e<n;e++)Mr.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)Mr.call(t,e)&&(null==s?i(t[e],e,t):i.call(s,t[e],e,t))}(t,i,e)},Nr=function(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var e in s)Er.call(s,e)&&(t[e]=s[e])}return t},Er=w.prototype.hasOwnProperty;var Br=We.exports,Ir=Ge,Fr=function(t){if(!t)return{};var i={};return Pr(Ar(t).split("\n"),(function(t){var s=t.indexOf(":"),e=Ar(t.slice(0,s)).toLowerCase(),n=Ar(t.slice(s+1));void 0===i[e]?i[e]=n:!function(t){return"[object Array]"===w.prototype.toString.call(t)}(i[e])?i[e]=[i[e],n]:i[e].push(n)})),i},Dr=Nr,$r=Ur;function Rr(t,i,s){var e=t;return Ir(i)?(s=i,"string"==typeof t&&(e={uri:t})):e=Dr(i,{uri:t}),e.callback=s,e}function Ur(t,i,s){return Or(i=Rr(t,i,s))}function Or(t){if(void 0===t.callback)throw new m("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:v,url:f,rawRequest:l};function r(t){return c(d),t instanceof m||(t=new m(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,n)}function h(){if(!a){var i;c(d),i=t.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var r=n,h=null;return 0!==i?(r={body:e(),statusCode:i,method:v,headers:{},url:f,rawRequest:l},l.getAllResponseHeaders&&(r.headers=Fr(l.getAllResponseHeaders()))):h=new m("Internal XMLHttpRequest Error"),s(h,r,r.body)}}var o,a,l=t.xhr||null;l||(l=t.cors||t.useXDR?new Ur.XDomainRequest:new Ur.XMLHttpRequest);var d,f=l.url=t.uri||t.url,v=l.method=t.method||"GET",p=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"!==v&&"HEAD"!==v&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),p=JSON.stringify(t.json))),l.onreadystatechange=function(){4===l.readyState&&h()},l.onload=h,l.onerror=r,l.onprogress=function(){},l.ontimeout=r,l.open(v,f,!y,t.username,t.password),y||(l.withCredentials=!!t.withCredentials),!y&&t.timeout>0&&(d=u((function(){a=!0,l.abort("timeout");var t=new m("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 m("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(l.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(l),l.send(p),l}Ur.XMLHttpRequest=Br.XMLHttpRequest||function(){},Ur.XDomainRequest="withCredentials"in new Ur.XMLHttpRequest?Ur.XMLHttpRequest:Br.XDomainRequest,function(t,i){for(var s=0;s<t.length;s++)i(t[s])}(["get","put","post","patch","head","delete"],(function(t){Ur["delete"===t?"del":t]=function(i,s,e){return(s=Rr(i,s,e)).method=t.toUpperCase(),Or(s)}}));var Vr=function(t,i){var s=new b.WebVTT.Parser(b,b.vttjs,b.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&&(b.console&&b.console.groupCollapsed&&b.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach((function(t){return Xi.error(t)})),b.console&&b.console.groupEnd&&b.console.groupEnd()),s.flush()},Lr=function(t){function i(s){var e;if(void 0===s&&(s={}),!s.tech)throw new m("A tech was not provided.");var r=ve(s,{kind:Ve[s.kind]||"subtitles",language:s.language||s.srclang||""}),h=Le[r.mode]||"disabled",o=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(h="hidden");var a=e=t.call(this,r)||this;if(a.H=r.tech,zs)for(var u in i.prototype)"constructor"!==u&&(a[u]=i.prototype[u]);a.L=[],a.q=[];var c=new Re(a.L),l=new Re(a.q),d=!1,f=n(a,(function(){this.activeCues,d&&(this.trigger("cuechange"),d=!1)}));return"disabled"!==h&&a.H.ready((function(){a.H.on("timeupdate",f)}),!0),w.defineProperty(a,"default",{get:function(){return o},set:function(){}}),w.defineProperty(a,"mode",{get:function(){return h},set:function(t){var i=this;Le[t]&&("showing"===(h=t)&&this.H.ready((function(){i.H.on("timeupdate",f)}),!0),this.trigger("modechange"))}}),w.defineProperty(a,"cues",{get:function(){return this.W?c:null},set:function(){}}),w.defineProperty(a,"activeCues",{get:function(){if(!this.W)return null;if(0===this.cues.length)return l;for(var t=this.H.currentTime(),i=[],s=0,e=this.cues.length;s<e;s++){var n=this.cues[s];(n.startTime<=t&&n.endTime>=t||n.startTime===n.endTime&&n.startTime<=t&&n.startTime+.5>=t)&&i.push(n)}if(d=!1,i.length!==this.q.length)d=!0;else for(var r=0;r<i.length;r++)-1===this.q.indexOf(i[r])&&(d=!0);return this.q=i,l.O(this.q),l},set:function(){}}),r.src?(a.src=r.src,function(t,i){var s={uri:t},e=ze(t);e&&(s.cors=e),$r(s,n(this,(function(t,s,e){if(t)return Xi.error(t,s);if(i.W=!0,"function"!=typeof b.WebVTT){if(i.H){var n=function(){return Vr(e,i)};i.H.on("vttjsloaded",n),i.H.on("vttjserror",(function(){Xi.error("vttjs failed to load, stopping trying to process "+i.src),i.H.off("vttjsloaded",n)}))}}else Vr(e,i)})))}(r.src,a)):a.W=!0,a||ge(e)}be(i,t);var s=i.prototype;return s.addCue=function(t){var i=t;if(b.vttjs&&!(t instanceof b.vttjs.VTTCue)){for(var s in i=new b.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)s in i||(i[s]=t[s]);i.id=t.id,i.G=t}var e=this.H.textTracks();if(e)for(var n=0;n<e.length;n++)e[n]!==this&&e[n].removeCue(i);this.L.push(i),this.cues.O(this.L)},s.removeCue=function(t){for(var i=this.L.length;i--;){var s=this.L[i];if(s===t||s.G&&s.G===t){this.L.splice(i,1),this.cues.O(this.L);break}}},i}(He);Lr.prototype.A={cuechange:"cuechange"};var Hr=function(t){function i(s){var e,n;void 0===s&&(s={});var r=ge(e=t.call(this)||this);if(zs)for(var h in r=Di.createElement("custom"),i.prototype)"constructor"!==h&&(r[h]=i.prototype[h]);var o=new Lr(s);return r.kind=o.kind,r.src=o.src,r.srclang=o.language,r.label=o.label,r.default=o.default,w.defineProperty(r,"readyState",{get:function(){return n}}),w.defineProperty(r,"track",{get:function(){return o}}),n=0,o.addEventListener("loadeddata",(function(){n=2,r.trigger({type:"load",target:r})})),zs?r||ge(e):e}return be(i,t),i}(me);Hr.prototype.A={load:"load"},Hr.NONE=0,Hr.LOADING=1,Hr.LOADED=2,Hr.ERROR=3;var qr,zr=function(){function t(i){void 0===i&&(i=[]);var s=this;if(zs)for(var e in s=Di.createElement("custom"),t.prototype)"constructor"!==e&&(s[e]=t.prototype[e]);s.X=[],w.defineProperty(s,"length",{get:function(){return this.X.length}});for(var n=0,r=i.length;n<r;n++)s.J(i[n]);if(zs)return s}var i=t.prototype;return i.J=function(t){var i=this.X.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.X[i]}}),-1===this.X.indexOf(t)&&this.X.push(t)},i.Y=function(t){for(var i,s=0,e=this.X.length;s<e;s++)if(t===this.X[s].track){i=this.X[s];break}return i},i.K=function(t){for(var i=0,s=this.X.length;i<s;i++)if(t===this.X[i]){this.X.splice(i,1);break}},t}(),Wr=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=ge(n),zs))for(var r in e=Di.createElement("custom"),i.prototype)"constructor"!==r&&(e[r]=i.prototype[r]);e.Z=[],w.defineProperty(e,"length",{get:function(){return this.Z.length}});for(var h=0;h<s.length;h++)e.tt(s[h]);return e||ge(n)}be(i,t);var s=i.prototype;return s.tt=function(t){var i=this.Z.length;""+i in this||w.defineProperty(this,i,{get:function(){return this.Z[i]}}),-1===this.Z.indexOf(t)&&(this.Z.push(t),this.trigger({track:t,type:"addtrack"}))},s.it=function(t){for(var i,s=0,e=this.length;s<e;s++)if(this[s]===t){(i=this[s]).off&&i.off(),this.Z.splice(s,1);break}i&&this.trigger({track:i,type:"removetrack"})},s.getTrackById=function(t){for(var i=null,s=0,e=this.length;s<e;s++){var n=this[s];if(n.id===t){i=n;break}}return i},i}(me);for(qr in Wr.prototype.A={change:"change",addtrack:"addtrack",removetrack:"removetrack"},Wr.prototype.A)Wr.prototype["on"+qr]=null;var Gr=function(t){function i(s){var e,n;if(void 0===s&&(s=[]),zs){for(var r in n=Di.createElement("custom"),Wr.prototype)"constructor"!==r&&(n[r]=Wr.prototype[r]);for(var h in i.prototype)"constructor"!==h&&(n[h]=i.prototype[h])}return(n=e=t.call(this,s,n)||this)||ge(e)}return be(i,t),i.prototype.tt=function(i){t.prototype.tt.call(this,i),i.addEventListener("modechange",n(this,(function(){this.trigger("change")})))},i}(Wr),Xr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].selected=!1)},Jr=function(t){function i(s){var e,n;void 0===s&&(s=[]);for(var r=s.length-1;r>=0;r--)if(s[r].selected){Xr(s,s[r]);break}if(zs){for(var h in n=Di.createElement("custom"),Wr.prototype)"constructor"!==h&&(n[h]=Wr.prototype[h]);for(var o in i.prototype)"constructor"!==o&&(n[o]=i.prototype[o])}return(n=e=t.call(this,s,n)||this).st=!1,w.defineProperty(n,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),n||ge(e)}be(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.selected&&Xr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("selectedchange",(function(){s.st||(s.st=!0,Xr(s,i),s.st=!1,s.trigger("change"))}))},s.addTrack=function(t){this.tt(t)},s.removeTrack=function(i){t.prototype.it.call(this,i)},i}(Wr),Qr=function(t,i){for(var s=0;s<t.length;s++)i.id!==t[s].id&&(t[s].enabled=!1)},Yr=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){Qr(s,s[r]);break}if(zs){for(var h in n=Di.createElement("custom"),Wr.prototype)"constructor"!==h&&(n[h]=Wr.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||ge(e)}be(i,t);var s=i.prototype;return s.tt=function(i){var s=this;i.enabled&&Qr(this,i),t.prototype.tt.call(this,i),i.addEventListener&&i.addEventListener("enabledchange",(function(){s.st||(s.st=!0,Qr(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}(Wr),Kr=void 0;var Zr=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 Gr,e.initTextTrackListeners(),e.initTrackListeners(),i.nativeControlsForTouch||e.emitTapEvents(),e.constructor&&(e.l=e.constructor.name||"Unknown Tech"),e}be(i,t);var s=i.prototype;return s.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},s.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},s.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(n(this,(function(){var t=this.bufferedPercent();this.ut!==t&&this.trigger("progress"),this.ut=t,1===t&&this.stopTrackingProgress()})),500)},s.onDurationChange=function(t){this.ct=this.duration()},s.buffered=function(){return _e(0,0)},s.bufferedPercent=function(){return xe(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 Ne(t),this.trigger("error")),this.lt},s.played=function(){return this.et?_e(0,0):_e()},s.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},s.initTextTrackListeners=function(){var t=n(this,(function(){this.trigger("texttrackchange")})),i=this.textTracks();i&&(i.addEventListener("removetrack",t),i.addEventListener("addtrack",t),this.on("dispose",n(this,(function(){i.removeEventListener("removetrack",t),i.removeEventListener("addtrack",t)}))))},s.initTrackListeners=function(){var t=this;["video","audio"].forEach((function(i){var s=function(){t.trigger(i+"trackchange")},e=t[i+"Tracks"]();e.addEventListener("removetrack",s),e.addEventListener("addtrack",s),t.on("dispose",(function(){e.removeEventListener("removetrack",s),e.removeEventListener("addtrack",s)}))}))},s.dt=function(){var t=this;if(!b.WebVTT)if(Di.body.contains(this.el())){if(!this.h["vtt.js"]&&Wi(Kr)&&w.keys(Kr).length>0)return void this.trigger("vttjsloaded");var i=Di.createElement("script");i.src=this.h["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",i.onload=function(){t.trigger("vttjsloaded")},i.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){i.onload=null,i.onerror=null})),b.WebVTT=!0,this.el().parentNode.appendChild(i)}else this.ready(this.dt)},s.emulateTextTracks=function(){var t=this,i=this.textTracks();if(i){var s=this.remoteTextTracks(),e=function(t){return i.tt(t.track)},n=function(t){return i.it(t.track)};s.on("addtrack",e),s.on("removetrack",n),this.dt();var r=function(){return t.trigger("texttrackchange")},h=function(){r();for(var t=0;t<i.length;t++){var s=i[t];s.removeEventListener("cuechange",r),"showing"===s.mode&&s.addEventListener("cuechange",r)}};h(),i.addEventListener("change",h),i.addEventListener("addtrack",h),i.addEventListener("removetrack",h),this.on("dispose",(function(){s.off("addtrack",e),s.off("removetrack",n),i.removeEventListener("change",h),i.removeEventListener("addtrack",h),i.removeEventListener("removetrack",h);for(var t=0;t<i.length;t++){i[t].removeEventListener("cuechange",r)}}))}},s.videoTracks=function(){return this.rt=this.rt||new Jr,this.rt},s.audioTracks=function(){return this.ht=this.ht||new Yr,this.ht},s.textTracks=function(){return this.nt=this.nt||new Gr,this.nt},s.remoteTextTracks=function(){return this.ft=this.ft||new Gr,this.ft},s.remoteTextTrackEls=function(){return this.vt=this.vt||new zr,this.vt},s.addTextTrack=function(t,i,s){if(!t)throw new m("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 Lr(n);return r.tt(h),h}(this,t,i,s)},s.createRemoteTextTrack=function(t){var i=ve(t,{tech:this});return new Hr(i)},s.addRemoteTextTrack=function(t,i){void 0===t&&(t={});var s=this.createRemoteTextTrack(t);return!0!==i&&!1!==i&&(Xi.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),i=!0),this.remoteTextTrackEls().J(s),this.remoteTextTracks().tt(s.track),!0!==i&&this.ot.tt(s.track),s},s.removeRemoteTextTrack=function(t){var i=this.remoteTextTrackEls().Y(t);this.remoteTextTrackEls().K(i),this.remoteTextTracks().it(t),this.ot.it(t)},s.getVideoPlaybackQuality=function(){return{}},s.setPoster=function(){},s.playsinline=function(){},s.setPlaysinline=function(){},s.canPlayType=function(){return""},i.isTech=function(t){return t.prototype instanceof i||t instanceof i||t===i},i.registerTech=function(t,s){if(i.gt||(i.gt={}),!i.isTech(s))throw new m("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]:b&&b.videojs&&b.videojs[t]?(Xi.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),b.videojs[t]):void 0},i}(pe);Zr.prototype.nt,Zr.prototype.ht,Zr.prototype.rt,Zr.prototype.featuresVolumeControl=!0,Zr.prototype.featuresFullscreenResize=!1,Zr.prototype.featuresPlaybackRate=!1,Zr.prototype.featuresProgressEvents=!1,Zr.prototype.featuresTimeupdateEvents=!1,Zr.prototype.featuresNativeTextTracks=!1,Zr.withSourceHandlers=function(t){t.registerSourceHandler=function(i,s){var e=t.sourceHandlers;e||(e=t.sourceHandlers=[]),void 0===s&&(s=e.length),e.splice(s,0,i)},t.canPlayType=function(i){for(var s,e=t.sourceHandlers||[],n=0;n<e.length;n++)if(s=e[n].canPlayType(i))return s;return""},t.selectSourceHandler=function(i,s){for(var e=t.sourceHandlers||[],n=0;n<e.length;n++)if(e[n].canHandleSource(i,s))return e[n];return null},t.canPlaySource=function(i,s){var e=t.selectSourceHandler(i,s);return e?e.canHandleSource(i,s):""};["seekable","duration"].forEach((function(t){var i=this[t];"function"==typeof i&&(this[t]=function(){return this.yt&&this.yt[t]?this.yt[t].apply(this.yt,arguments):i.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(i){var s=t.selectSourceHandler(i,this.h);return s||(t.nativeSourceHandler?s=t.nativeSourceHandler:Xi.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),s!==t.nativeSourceHandler&&(this.bt=i,this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.one(this.v,"loadstart",t.prototype.kt)),this.yt=s.handleSource(i,this,this.h),this.on("dispose",this.disposeSourceHandler),this},t.prototype.kt=function(){this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.wt=function(){this.disposeSourceHandler(),this.one(this.v,"loadstart",t.prototype.wt)},t.prototype.disposeSourceHandler=function(){this.bt&&(this.clearTracks(["audio","video"]),this.bt=null),this.cleanupAutoTextTracks(),this.yt&&(this.off(this.v,"loadstart",t.prototype.kt),this.off(this.v,"loadstart",t.prototype.wt),this.yt.dispose&&this.yt.dispose(),this.yt=null)}},pe.registerComponent("Tech",Zr),pe.registerComponent("MediaTechController",Zr),Zr.registerTech("Tech",Zr);var th=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=fe(h[r]),a=Zr.getTech(o);if(o||(a=pe.getComponent(o)),a&&a.isSupported()){i._t(o);break}}return n}return be(i,t),i}(pe);pe.registerComponent("MediaLoader",th);var ih=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}be(i,t);var s=i.prototype;return s.createEl=function(i,s,e){void 0===i&&(i="div"),void 0===s&&(s={}),void 0===e&&(e={}),s=qi({className:this.buildCSSClass(),tabIndex:0},s),"button"===i&&Xi.error("Creating a ClickableComponent with an HTML element of "+i+" is not supported; use a Button instead."),e=qi({role:"button","aria-live":"polite"},e),this.xt=s.tabIndex;var n=t.prototype.createEl.call(this,i,s,e);return this.createControlTextEl(n),n},s.createControlTextEl=function(t){return this.Ct=ns("span",{className:"vjs-control-text"}),t&&t.appendChild(this.Ct),this.controlText(this.St,t),this.Ct},s.controlText=function(t,i){if(void 0===i&&(i=this.el()),void 0===t)return this.St||"Need Text";var s=this.localize(t);return this.St=t,this.Ct.innerHTML=s,this.nonIconControl||i.setAttribute("title",s),this},s.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},s.enable=function(){return this.removeClass("vjs-disabled"),this.v.setAttribute("aria-disabled","false"),void 0!==this.xt&&this.v.setAttribute("tabIndex",this.xt),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this},s.disable=function(){return this.addClass("vjs-disabled"),this.v.setAttribute("aria-disabled","true"),void 0!==this.xt&&this.v.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this},s.handleLanguagechange=function(){this.controlText(this.St)},s.handleClick=function(t){},s.handleFocus=function(t){ee(Di,"keydown",n(this,this.handleKeyPress))},s.handleKeyPress=function(i){32===i.which||13===i.which?(i.preventDefault(),this.handleClick(i)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,i)},s.handleBlur=function(t){ne(Di,"keydown",n(this,this.handleKeyPress))},i}(pe);pe.registerComponent("ClickableComponent",ih);var sh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).update(),i.on("posterchange",n(ge(e),e.update)),e}be(i,t);var s=i.prototype;return s.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},s.createEl=function(){var t=ns("div",{className:"vjs-poster",tabIndex:-1});return Qs||(this.jt=ns("img"),t.appendChild(this.jt)),t},s.update=function(t){var i=this.player().poster();this.setSrc(i),i?this.show():this.hide()},s.setSrc=function(t){if(this.jt)this.jt.src=t;else{var i="";t&&(i='url("'+t+'")'),this.v.style.backgroundImage=i}},s.handleClick=function(t){this.t.controls()&&(this.t.paused()?this.t.play():this.t.pause())},i}(ih);pe.registerComponent("PosterImage",sh);var eh="#222",nh={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 rh(t,i){return"rgba("+x(t[1]+t[1],16)+","+x(t[2]+t[2],16)+","+x(t[3]+t[3],16)+","+i+")"}function hh(t,i,s){try{t.style[i]=s}catch(t){return}}var oh=function(t){function i(i,s,e){var r;return r=t.call(this,i,s,e)||this,i.on("loadstart",n(ge(r),r.toggleDisplay)),i.on("texttrackchange",n(ge(r),r.updateDisplay)),i.ready(n(ge(r),(function(){if(i.H&&i.H.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",n(this,this.updateDisplay));for(var t=this.h.playerOptions.tracks||[],s=0;s<t.length;s++)this.t.addRemoteTextTrack(t[s],!0);var e,r,h={captions:1,subtitles:1},o=this.t.textTracks();if(o){for(var a=0;a<o.length;a++){var u=o[a];u.default&&("descriptions"!==u.kind||e?u.kind in h&&!r&&(r=u):e=u)}r?r.mode="showing":e&&(e.mode="showing")}}}))),r}be(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 b.WebVTT&&b.WebVTT.processCues(b,[],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 b.WebVTT&&t.activeCues){for(var i=this.t.textTrackSettings.getValues(),s=[],e=0;e<t.activeCues.length;e++)s.push(t.activeCues[e]);b.WebVTT.processCues(b,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&&hh(h.firstChild,"color",rh(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(h.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&hh(h.firstChild,"backgroundColor",rh(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?hh(h,"backgroundColor",rh(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 "+eh:"raised"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+eh:"depressed"===i.edgeStyle?h.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+eh:"uniform"===i.edgeStyle&&(h.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+eh)),i.fontPercent&&1!==i.fontPercent){var o=b.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=nh[i.fontFamily])}}}},i}(pe);pe.registerComponent("TextTrackDisplay",oh);var ah=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},i}(pe);pe.registerComponent("LoadingSpinner",ah);var uh=function(t){function i(){return t.apply(this,arguments)||this}be(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=qi({className:this.buildCSSClass()},i),"button"!==t&&(Xi.warn("Creating a Button with an HTML element of "+t+" is deprecated; use ClickableComponent instead."),i=qi({tabIndex:0},i),s=qi({role:"button"},s)),s=qi({type:"button","aria-live":"polite"},s);var e=pe.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 Xi.warn("Adding an actionable (user controllable) child to a Button ("+s+") is not supported; use a ClickableComponent instead."),pe.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}(ih);pe.registerComponent("Button",uh);var ch=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Tt=!1,e.on("mousedown",e.handleMouseDown),e}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-big-play-button"},s.handleClick=function(t){var i=this;if(this.Tt&&t.clientX&&t.clientY)this.t.play();else{var s=this.t.getChild("controlBar"),e=s&&s.getChild("playToggle");this.one(this.t,"play",(function(){e?e.focus():i.t.focus()})),this.t.play()}},s.handleKeyPress=function(i){this.Tt=!1,t.prototype.handleKeyPress.call(this,i)},s.handleMouseDown=function(t){this.Tt=!0},i}(uh);ch.prototype.St="Play Video",pe.registerComponent("BigPlayButton",ch);var lh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).controlText(s&&s.controlText||"Close"),e}be(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}(uh);pe.registerComponent("CloseButton",lh);var dh=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}be(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}(uh);function fh(t,i){void 0===i&&(i=t),t=t<0?0:t;var s=_.floor(t%60),e=_.floor(t/60%60),n=_.floor(t/3600),r=_.floor(i/60%60),h=_.floor(i/3600);return(S(t)||t===1/0)&&(n=e=s="-"),(n=n>0||h>0?n+":":"")+(e=((n||r>=10)&&e<10?"0"+e:e)+":")+(s=s<10?"0"+s:s)}dh.prototype.St="Play",pe.registerComponent("PlayToggle",dh);var vh=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}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00'},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime(),s=this.localize("Current Time"),e=fh(i,this.t.duration());e!==this.Mt&&(this.Mt=e,this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e)},i}(pe);pe.registerComponent("CurrentTimeDisplay",vh);var ph=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}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> 0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){var i=this.t.duration();if(i&&this.ct!==i){this.ct=i;var s=this.localize("Duration Time"),e=fh(i);this.S.innerHTML='<span class="vjs-control-text">'+s+"</span> "+e}},i}(pe);pe.registerComponent("DurationDisplay",ph);var mh=function(t){function i(){return t.apply(this,arguments)||this}return be(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}(pe);pe.registerComponent("TimeDivider",mh);var gh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateContent),e.on(i,"durationchange",e.updateContent),e.on(i,"languagechange",e.updateContent),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.S=ns("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Remaining Time")+"</span> -0:00"},{"aria-live":"off"}),i.appendChild(this.S),i},s.updateContent=function(t){if(this.t.duration()){var i=this.localize("Remaining Time"),s=fh(this.t.remainingTime());s!==this.Mt&&(this.Mt=s,this.S.innerHTML='<span class="vjs-control-text">'+i+"</span> -"+s)}},i}(pe);pe.registerComponent("RemainingTimeDisplay",gh);var yh=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}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.S=ns("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.Ct=ns("span",{className:"vjs-control-text",innerHTML:this.localize("Stream Type")}),this.At=Di.createTextNode(this.localize("LIVE")),this.S.appendChild(this.Ct),this.S.appendChild(this.At),i.appendChild(this.S),i},s.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},s.handleLanguagechange=function(){this.Ct.innerHTML=this.localize("Stream Type"),this.At.innerHTML=this.localize("LIVE")},i}(pe);pe.registerComponent("LiveDisplay",yh);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}be(i,t);var s=i.prototype;return s.createEl=function(i,s,e){return void 0===s&&(s={}),void 0===e&&(e={}),s.className=s.className+" vjs-slider",s=qi({tabIndex:0},s),e=qi({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},e),t.prototype.createEl.call(this,i,s,e)},s.handleMouseDown=function(t){var i=this.bar.v.ownerDocument;t.preventDefault(),Di.body.focus(),Di.onselectstart=function(){return!1},this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove),this.on(i,"mouseup",this.handleMouseUp),this.on(i,"touchmove",this.handleMouseMove),this.on(i,"touchend",this.handleMouseUp),this.handleMouseMove(t)},s.handleMouseMove=function(t){},s.handleMouseUp=function(){var t=this.bar.v.ownerDocument;Di.onselectstart=function(){return!0},this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},s.update=function(){if(this.v){var t=this.getPercent(),i=this.bar;if(i){("number"!=typeof t||t!=t||t<0||t===1/0)&&(t=0);var s=(100*t).toFixed(2)+"%";this.vertical()?i.el().style.height=s:i.el().style.width=s}}},s.calculateDistance=function(t){var i=ws(this.v,t);return this.vertical()?i.y:i.x},s.handleFocus=function(){this.on(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},s.handleBlur=function(){this.off(this.bar.v.ownerDocument,"keydown",this.handleKeyPress)},s.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},s.vertical=function(t){return void 0===t?this.Pt||!1:(this.Pt=!!t,this.Pt?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},i}(pe);function kh(t,i){if(!t||!i)return"";if("function"==typeof b.getComputedStyle){var s=b.getComputedStyle(t);return s?s[i]:""}return t.currentStyle[i]||""}pe.registerComponent("Slider",bh);var wh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).Nt=[],e.on(i,"progress",e.update),e.on(i,"languagechange",e.handleLanguagechange),e}be(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=ns("span",{innerHTML:this.localize("Loaded")}),this.Bt=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.Et),this.Ct.appendChild(this.Bt),i.appendChild(this.Ct),i},s.update=function(t){var i=this.t.buffered(),s=this.t.duration(),e=this.t.bufferedEnd(),n=this.Nt,r=function(t,i){var s=t/i||0;return 100*(s>=1?1:s)+"%"};this.v.style.width=r(e,s);for(var h=0;h<i.length;h++){var o=i.start(h),a=i.end(h),u=n[h];u||(u=this.v.appendChild(ns()),n[h]=u),u.style.left=r(o,e),u.style.width=r(a-o,e)}for(var c=n.length;c>i.length;c--)this.v.removeChild(n[c-1]);n.length=i.length},s.handleLanguagechange=function(){this.Et.innerHTML=this.localize("Loaded")},i}(pe);pe.registerComponent("LoadProgressBar",wh);var _h=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(ge(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}be(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.It=ns("span",{innerHTML:this.localize("Progress")}),this.Ft=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();this.v.setAttribute("data-current-time",fh(i,this.t.duration()))},s.handleLanguagechange=function(){this.It.innerHTML=this.localize("Progress")},i}(pe);pe.registerComponent("PlayProgressBar",_h);var xh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).updateDataAttr(),e.on(i,"timeupdate",e.updateDataAttr),e.on(i,"languagechange",e.handleLanguagechange),i.ready(n(ge(e),e.updateDataAttr)),e}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar"});return this.tooltip=ns("div",{className:"vjs-time-tooltip"}),this.It=ns("span",{innerHTML:this.localize("Progress")}),this.Ft=Di.createTextNode(": 0%"),this.Ct=ns("span",{className:"vjs-control-text"}),this.Ct.appendChild(this.It),this.Ct.appendChild(this.Ft),i.appendChild(this.tooltip),i.appendChild(this.Ct),i},s.updateDataAttr=function(t){var i=fh(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.It.innerHTML=this.localize("Progress")},i}(pe);pe.registerComponent("TooltipProgressBar",xh);var Ch=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"timeupdate",e.updateProgress),e.on(i,"ended",e.updateProgress),i.ready(n(ge(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}be(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},s.updateProgress=function(t){if(this.updateAriaAttributes(this.v),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.v),this.tooltipProgressBar.v.style.width=this.bar.v.style.width;var i=C(kh(this.player().el(),"width")),s=C(kh(this.tooltipProgressBar.tooltip,"width")),e=this.tooltipProgressBar.el().style;e.maxWidth=_.floor(i-s/2)+"px",e.minWidth=_.ceil(s/2)+"px",e.right="-"+s/2+"px"}},s.updateAriaAttributes=function(t){var i=this.t.scrubbing()?this.t.getCache().currentTime:this.t.currentTime();t.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),t.setAttribute("aria-valuetext",fh(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);Ch.prototype.h={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},Ch.prototype.playerEvent="timeupdate",pe.registerComponent("SeekBar",Ch);var Sh=function(t){function i(i,s){var e;return e=t.call(this,i,s)||this,s.playerOptions&&s.playerOptions.controlBar&&s.playerOptions.controlBar.progressControl&&s.playerOptions.controlBar.progressControl.keepTooltipsInside&&(e.keepTooltipsInside=s.playerOptions.controlBar.progressControl.keepTooltipsInside),e.keepTooltipsInside&&(e.tooltip=ns("div",{className:"vjs-time-tooltip"}),e.el().appendChild(e.tooltip),e.addClass("vjs-keep-tooltips-inside")),e.update(0,0),i.on("ready",(function(){e.on(i.controlBar.progressControl.el(),"mousemove",function(t,i){var s=Date.now();return function(){var e=Date.now();e-s>=i&&(t.apply(void 0,arguments),s=e)}}(n(ge(e),e.handleMouseMove),25))})),e}be(i,t);var s=i.prototype;return s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},s.handleMouseMove=function(t){var i=this.t.duration(),s=this.calculateDistance(t)*i,e=t.pageX-ks(this.el().parentNode).left;this.update(s,e)},s.update=function(t,i){var s=fh(t,this.t.duration());if(this.el().style.left=i+"px",this.el().setAttribute("data-current-time",s),this.keepTooltipsInside){var e=i-this.Dt(i)+1,n=C(kh(this.tooltip,"width"))/2;this.tooltip.innerHTML=s,this.tooltip.style.right="-"+(n-e)+"px"}},s.calculateDistance=function(t){return ws(this.el().parentNode,t).x},s.Dt=function(t){if(!this.keepTooltipsInside)return t;var i=C(kh(this.player().el(),"width")),s=C(kh(this.tooltip,"width"))/2,e=t;return t<s?e=_.ceil(s):t>i-s&&(e=_.floor(i-s)),e},i}(pe);pe.registerComponent("MouseTimeDisplay",Sh);var jh=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i}(pe);jh.prototype.h={children:["seekBar"]},pe.registerComponent("ProgressControl",jh);var Th=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"fullscreenchange",e.handleFullscreenChange),e}be(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}(uh);Th.prototype.St="Fullscreen",pe.registerComponent("FullscreenToggle",Th);var Mh=function(t){function i(){return t.apply(this,arguments)||this}return be(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}(pe);pe.registerComponent("VolumeLevel",Mh);var Ah=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"volumechange",e.updateARIAAttributes),i.ready(n(ge(e),e.updateARIAAttributes)),e}be(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);Ah.prototype.h={children:["volumeLevel"],barName:"volumeLevel"},Ah.prototype.playerEvent="volumechange",pe.registerComponent("VolumeBar",Ah);var Ph=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 be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},i}(pe);Ph.prototype.h={children:["volumeBar"]},pe.registerComponent("VolumeControl",Ph);var Nh=function(t){function i(){return t.apply(this,arguments)||this}be(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,(function(){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=ns(i,{className:"vjs-menu-content"});var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.appendChild(this.S),ee(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},i}(pe);pe.registerComponent("Popup",Nh);var Eh=function(t){function i(i,s){var e;return void 0===s&&(s={}),(e=t.call(this,i,s)||this).update(),e}be(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}(ih);pe.registerComponent("PopupButton",Eh);var Bh=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}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.t.muted(!this.t.muted())},s.update=function(t){var i=this.t.volume(),s=3;this.t.muted()?s=0:i<.33?s=1:i<.67&&(s=2);var e=this.t.muted()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e);for(var n=0;n<4;n++)vs(this.v,"vjs-vol-"+n);fs(this.v,"vjs-vol-"+s)},i}(uh);Bh.prototype.St="Mute",pe.registerComponent("MuteToggle",Bh);var Ih=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(ge(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}be(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 Nh(this.t,{contentElType:"div"}),i=new Ah(this.t,this.h.volumeBar);return t.addChild(i),this.menuContent=t,this.volumeBar=i,this.attachVolumeBarEvents(),t},s.handleClick=function(i){Bh.prototype.handleClick.call(this),t.prototype.handleClick.call(this)},s.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],n(this,this.handleMouseDown))},s.handleMouseDown=function(t){this.on(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.v.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},s.handleMouseUp=function(t){this.off(["mousemove","touchmove"],n(this.volumeBar,this.volumeBar.handleMouseMove))},i}(Eh);Ih.prototype.volumeUpdate=Bh.prototype.update,Ih.prototype.St="Mute",pe.registerComponent("VolumeMenuButton",Ih);var Fh=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).$t=-1,e.on("keydown",e.handleKeyPress),e}be(i,t);var s=i.prototype;return s.addItem=function(t){this.addChild(t),t.on("click",n(this,(function(t){this.unlockShowing()})))},s.createEl=function(){var i=this.h.contentElType||"ul";this.S=ns(i,{className:"vjs-menu-content"}),this.S.setAttribute("role","menu");var s=t.prototype.createEl.call(this,"div",{append:this.S,className:"vjs-menu"});return s.setAttribute("role","presentation"),s.appendChild(this.S),ee(s,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),s},s.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},s.stepForward=function(){var t=0;void 0!==this.$t&&(t=this.$t+1),this.focus(t)},s.stepBack=function(){var t=0;void 0!==this.$t&&(t=this.$t-1),this.focus(t)},s.focus=function(t){void 0===t&&(t=0);var i=this.children().slice();i.length&&i[0].className&&/vjs-menu-title/.test(i[0].className)&&i.shift(),i.length>0&&(t<0?t=0:t>=i.length&&(t=i.length-1),this.$t=t,i[t].v.focus())},i}(pe);pe.registerComponent("Menu",Fh);var Dh=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}be(i,t);var s=i.prototype;return s.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.Ut=!1,this.v.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.Ot?this.hide():this.show()},s.createMenu=function(){var t=new Fh(this.t);if(this.Ot=0,this.h.title){var i=ns("li",{className:"vjs-menu-title",innerHTML:fe(this.h.title),tabIndex:-1});this.Ot+=1,t.m.unshift(i),hs(i,t.contentEl())}if(this.items=this.createItems(),this.items)for(var s=0;s<this.items.length;s++)t.addItem(this.items[s]);return t},s.createItems=function(){},s.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},s.buildCSSClass=function(){var i="vjs-menu-button";return!0===this.h.inline?i+="-inline":i+="-popup","vjs-menu-button "+i+" "+t.prototype.buildCSSClass.call(this)},s.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",n(this,(function(t){this.unpressButton(),this.v.blur()}))),this.Ut?this.unpressButton():this.pressButton()},s.handleKeyPress=function(i){27===i.which||9===i.which?(this.Ut&&this.unpressButton(),9!==i.which&&i.preventDefault()):38===i.which||40===i.which?this.Ut||(this.pressButton(),i.preventDefault()):t.prototype.handleKeyPress.call(this,i)},s.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.Ut&&this.unpressButton(),9!==t.which&&t.preventDefault())},s.pressButton=function(){this.Rt&&(this.Ut=!0,this.menu.lockShowing(),this.v.setAttribute("aria-expanded","true"),this.menu.focus())},s.unpressButton=function(){this.Rt&&(this.Ut=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.v.focus())},s.disable=function(){return this.Ut=!1,this.menu.unlockShowing(),this.v.setAttribute("aria-expanded","false"),this.Rt=!1,t.prototype.disable.call(this)},s.enable=function(){return this.Rt=!0,t.prototype.enable.call(this)},i}(ih);pe.registerComponent("MenuButton",Dh);var $h=function(t){function i(i,s){var e,r=s.tracks;if((e=t.call(this,i,s)||this).items.length<=1&&e.hide(),!r)return ge(e);var h=n(ge(e),e.update);return r.addEventListener("removetrack",h),r.addEventListener("addtrack",h),e.t.on("dispose",(function(){r.removeEventListener("removetrack",h),r.removeEventListener("addtrack",h)})),e}return be(i,t),i}(Dh);pe.registerComponent("TrackButton",$h);var Rh=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}be(i,t);var s=i.prototype;return s.createEl=function(i,s,e){this.nonIconControl=!0;var n=t.prototype.createEl.call(this,"li",qi({className:"vjs-menu-item",tabIndex:-1},s),e);return this.Vt=Di.createTextNode(this.localize(this.h.label)),n.appendChild(this.Vt),n},s.handleClick=function(t){this.selected(!0)},s.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.v.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.v.setAttribute("aria-checked","false"),this.controlText("")))},s.handleLanguagechange=function(){t.prototype.handleLanguagechange.call(this),this.Vt.innerHTML=this.localize(this.h.label)},i}(ih);pe.registerComponent("MenuItem",Rh);var Uh=function(t){function i(i,s){var e,r,h=s.track,o=i.textTracks();if(s.label=h.label||h.language||"Unknown",s.selected=h.default||"showing"===h.mode,(e=t.call(this,i,s)||this).track=h,o){var a=n(ge(e),e.handleTracksChange);i.on(["loadstart","texttrackchange"],a),o.addEventListener("change",a),e.on("dispose",(function(){o.removeEventListener("change",a)}))}o&&void 0===o.onchange&&e.on(["tap","click"],(function(){if("object"!=typeof b.Event)try{r=new b.Event("change")}catch(t){}r||(r=Di.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(r)}));return e}be(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}(Rh);pe.registerComponent("TextTrackMenuItem",Uh);var Oh=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 be(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}(Uh);pe.registerComponent("OffTextTrackMenuItem",Oh);var Vh=function(t){function i(i,s){return void 0===s&&(s={}),s.tracks=i.textTracks(),t.call(this,i,s)||this}return be(i,t),i.prototype.createItems=function(t){void 0===t&&(t=[]),t.push(new Oh(this.t,{kind:this.Lt})),this.Ot+=1;var i=this.t.textTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];e.kind===this.Lt&&t.push(new Uh(this.t,{track:e,selectable:!0}))}return t},i}($h);pe.registerComponent("TextTrackButton",Vh);var Lh=function(t){function i(i,s){var e,r=s.track,h=s.cue,o=i.currentTime();return s.selectable=!0,s.label=h.text,s.selected=h.startTime<=o&&o<h.endTime,(e=t.call(this,i,s)||this).track=r,e.cue=h,r.addEventListener("cuechange",n(ge(e),e.update)),e}be(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}(Rh);pe.registerComponent("ChaptersTrackMenuItem",Lh);var Hh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Chapters Menu"),n}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},s.update=function(i){this.Ht&&(!i||"addtrack"!==i.type&&"removetrack"!==i.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},s.setTrack=function(t){if(this.Ht!==t){if(this.qt||(this.qt=this.update.bind(this)),this.Ht){var i=this.t.remoteTextTrackEls().Y(this.Ht);i&&i.removeEventListener("load",this.qt),this.Ht=null}if(this.Ht=t,this.Ht){this.Ht.mode="hidden";var s=this.t.remoteTextTrackEls().Y(this.Ht);s&&s.addEventListener("load",this.qt)}}},s.findChaptersTrack=function(){for(var t=this.t.textTracks()||[],i=t.length-1;i>=0;i--){var s=t[i];if(s.kind===this.Lt)return s}},s.getMenuCaption=function(){return this.Ht&&this.Ht.label?this.Ht.label:this.localize(fe(this.Lt))},s.createMenu=function(){return this.h.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},s.createItems=function(){var t=[];if(!this.Ht)return t;var i=this.Ht.cues;if(!i)return t;for(var s=0,e=i.length;s<e;s++){var n=i[s],r=new Lh(this.t,{track:this.Ht,cue:n});t.push(r)}return t},i}(Vh);Hh.prototype.Lt="chapters",Hh.prototype.St="Chapters",pe.registerComponent("ChaptersButton",Hh);var qh=function(t){function i(i,s,e){var r;(r=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Descriptions Menu");var h=i.textTracks();if(h){var o=n(ge(r),r.handleTracksChange);h.addEventListener("change",o),r.on("dispose",(function(){h.removeEventListener("change",o)}))}return r}be(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}(Vh);qh.prototype.Lt="descriptions",qh.prototype.St="Descriptions",pe.registerComponent("DescriptionsButton",qh);var zh=function(t){function i(i,s,e){var n;return(n=t.call(this,i,s,e)||this).v.setAttribute("aria-label","Subtitles Menu"),n}return be(i,t),i.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i}(Vh);zh.prototype.Lt="subtitles",zh.prototype.St="Subtitles",pe.registerComponent("SubtitlesButton",zh);var Wh=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 be(i,t),i.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").v.focus()},i}(Uh);pe.registerComponent("CaptionSettingsMenuItem",Wh);var Gh=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}be(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 Wh(this.t,{kind:this.Lt})),this.Ot+=1),t.prototype.createItems.call(this,i)},i}(Vh);Gh.prototype.Lt="captions",Gh.prototype.St="Captions",pe.registerComponent("CaptionsButton",Gh);var Xh=function(t){function i(i,s){var e,r=s.track,h=i.audioTracks();if(s.label=r.label||r.language||"Unknown",s.selected=r.enabled,(e=t.call(this,i,s)||this).track=r,h){var o=n(ge(e),e.handleTracksChange);h.addEventListener("change",o),e.on("dispose",(function(){h.removeEventListener("change",o)}))}return e}be(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}(Rh);pe.registerComponent("AudioTrackMenuItem",Xh);var Jh=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}be(i,t);var s=i.prototype;return s.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},s.createItems=function(t){void 0===t&&(t=[]),this.Ot=1;var i=this.t.audioTracks&&this.t.audioTracks();if(!i)return t;for(var s=0;s<i.length;s++){var e=i[s];t.push(new Xh(this.t,{track:e,selectable:!0}))}return t},i}($h);Jh.prototype.St="Audio Track",pe.registerComponent("AudioTrackButton",Jh);var Qh=function(t){function i(i,s){var e,n=s.rate,r=C(n,10);return s.label=n,s.selected=1===r,s.selectable=!0,(e=t.call(this,i,s)||this).label=n,e.rate=r,e.on(i,"ratechange",e.update),e}be(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}(Rh);Qh.prototype.contentElType="button",pe.registerComponent("PlaybackRateMenuItem",Qh);var Yh=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}be(i,t);var s=i.prototype;return s.createEl=function(){var i=t.prototype.createEl.call(this);return this.Vt=ns("div",{className:"vjs-playback-rate-value",innerHTML:1}),i.appendChild(this.Vt),i},s.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},s.createMenu=function(){var t=new Fh(this.player()),i=this.playbackRates();if(i)for(var s=i.length-1;s>=0;s--)t.addChild(new Qh(this.player(),{rate:i[s]+"x"}));return t},s.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},s.handleClick=function(t){for(var i=this.player().playbackRate(),s=this.playbackRates(),e=s[0],n=0;n<s.length;n++)if(s[n]>i){e=s[n];break}this.player().playbackRate(e)},s.playbackRates=function(){return this.h.playbackRates||this.h.playerOptions&&this.h.playerOptions.playbackRates},s.playbackRateSupported=function(){return this.player().H&&this.player().H.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},s.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},s.updateLabel=function(t){this.playbackRateSupported()&&(this.Vt.innerHTML=this.player().playbackRate()+"x")},i}(Dh);Yh.prototype.St="Playback Rate",pe.registerComponent("PlaybackRateMenuButton",Yh);var Kh=function(t){function i(){return t.apply(this,arguments)||this}be(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}(pe);pe.registerComponent("Spacer",Kh);var Zh=function(t){function i(){return t.apply(this,arguments)||this}be(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}(Kh);pe.registerComponent("CustomControlSpacer",Zh);var to=function(t){function i(){return t.apply(this,arguments)||this}return be(i,t),i.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},i}(pe);to.prototype.h={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},pe.registerComponent("ControlBar",to);var io=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).on(i,"error",e.open),e}be(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}($e);io.prototype.h=ve($e.prototype.h,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),pe.registerComponent("ErrorDisplay",io);var so="vjs-text-track-settings",eo=["#000","Black"],no=["#00F","Blue"],ro=["#0FF","Cyan"],ho=["#0F0","Green"],oo=["#F0F","Magenta"],ao=["#F00","Red"],uo=["#FFF","White"],co=["#FF0","Yellow"],lo=["1","Opaque"],fo=["0.5","Semi-Transparent"],vo=["0","Transparent"],po={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[eo,uo,ao,ho,no,co,oo,ro]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[lo,fo,vo]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[uo,eo,ao,ho,no,co,oo,ro]},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:[lo,fo]},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:[vo,fo,lo]}};function mo(t,i){if(i&&(t=i(t)),t&&"none"!==t)return t}po.windowColor.options=po.backgroundColor.options;var go,yo=function(t){function i(i,s){var e;return(e=t.call(this,i,s)||this).setDefaults(),e.hide(),e.updateDisplay=n(ge(e),e.updateDisplay),void 0===s.persistTextTrackSettings&&(e.h.persistTextTrackSettings=e.h.playerOptions.persistTextTrackSettings),e.on(e.$(".vjs-done-button"),"click",(function(){e.saveSettings(),e.hide()})),e.on(e.$(".vjs-default-button"),"click",(function(){e.setDefaults(),e.updateDisplay()})),Hi(po,(function(t){e.on(e.$(t.selector),"change",e.updateDisplay)})),e.h.persistTextTrackSettings&&e.restoreSettings(),e}be(i,t);var s=i.prototype;return s.zt=function(t){var i=this,s=po[t],e=s.id.replace("%s",this.o);return[ns("label",{className:"vjs-label",textContent:s.label},{for:e}),ns("select",{id:e},void 0,s.options.map((function(t){return ns("option",{textContent:i.localize(t[1]),value:t[0]})})))]},s.Wt=function(){var t=ns("legend",{textContent:this.localize("Text")}),i=this.zt("color"),s=ns("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.zt("textOpacity"));return ns("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Gt=function(){var t=ns("legend",{textContent:this.localize("Background")}),i=this.zt("backgroundColor"),s=ns("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.zt("backgroundOpacity"));return ns("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Xt=function(){var t=ns("legend",{textContent:this.localize("Window")}),i=this.zt("windowColor"),s=ns("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.zt("windowOpacity"));return ns("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[t].concat(i,s))},s.Jt=function(){return ns("div",{className:"vjs-tracksettings-colors"},void 0,[this.Wt(),this.Gt(),this.Xt()])},s.Qt=function(){var t=ns("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.zt("fontPercent")),i=ns("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.zt("edgeStyle")),s=ns("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.zt("fontFamily"));return ns("div",{className:"vjs-tracksettings-font"},void 0,[t,i,s])},s.Yt=function(){var t=ns("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),i=ns("button",{className:"vjs-done-button",textContent:"Done"});return ns("div",{className:"vjs-tracksettings-controls"},void 0,[t,i])},s.createEl=function(){var t=ns("div",{className:"vjs-tracksettings"},void 0,[this.Jt(),this.Qt(),this.Yt()]),i=ns("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.o,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),s=ns("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.o,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),e=ns("div",void 0,{role:"document"},[i,s,t]);return ns("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":i.id,"aria-describedby":s.id},e)},s.getValues=function(){var t=this;return function(t,i,s){return void 0===s&&(s=0),Li(t).reduce((function(s,e){return i(s,t[e],e)}),s)}(po,(function(i,s,e){var n=function(t,i){return mo(t.options[t.options.selectedIndex].value,i)}(t.$(s.selector),s.parser);return void 0!==n&&(i[e]=n),i}),{})},s.setValues=function(t){var i=this;Hi(po,(function(s,e){!function(t,i,s){if(i)for(var e=0;e<t.options.length;e++)if(mo(t.options[e].value,s)===i){t.selectedIndex=e;break}}(i.$(s.selector),t[e],s.parser)}))},s.setDefaults=function(){var t=this;Hi(po,(function(i){var s=i.hasOwnProperty("default")?i.default:0;t.$(i.selector).selectedIndex=s}))},s.restoreSettings=function(){var t;try{t=JSON.parse(b.localStorage.getItem(so))}catch(t){Xi.warn(t)}t&&this.setValues(t)},s.saveSettings=function(){if(this.h.persistTextTrackSettings){var t=this.getValues();try{w.keys(t).length?b.localStorage.setItem(so,JSON.stringify(t)):b.localStorage.removeItem(so)}catch(t){Xi.warn(t)}}},s.updateDisplay=function(){var t=this.t.getChild("textTrackDisplay");t&&t.updateDisplay()},i}(pe);pe.registerComponent("TextTrackSettings",yo);var bo,ko=function(t){function i(i,s){var e;e=t.call(this,i,s)||this;var r=i.source,h=!1;if(r&&(e.v.currentSrc!==r.src||i.tag&&3===i.tag.Kt)?e.setSource(r):e.Zt(e.v),e.v.hasChildNodes()){for(var o=e.v.childNodes,a=o.length,u=[];a--;){var c=o[a];"track"===c.nodeName.toLowerCase()&&(e.featuresNativeTextTracks?(e.remoteTextTrackEls().J(c),e.remoteTextTracks().tt(c.track),h||e.v.hasAttribute("crossorigin")||!ze(c.src)||(h=!0)):u.push(c))}for(var l=0;l<u.length;l++)e.v.removeChild(u[l])}return["audio","video"].forEach((function(t){var i=e.el()[t+"Tracks"],s=e[t+"Tracks"](),n=fe(t);e["featuresNative"+n+"Tracks"]&&i&&i.addEventListener&&(e["handle"+n+"ti"]=function(t){s.trigger({type:"change",target:s,currentTarget:s,srcElement:s})},e["handle"+n+"ii"]=function(t){return s.addTrack(t.track)},e["handle"+n+"si"]=function(t){return s.removeTrack(t.track)},i.addEventListener("change",e["handle"+n+"ti"]),i.addEventListener("addtrack",e["handle"+n+"ii"]),i.addEventListener("removetrack",e["handle"+n+"si"]),e["removeOld"+n+"ei"]=function(t){return e.ni(s,i)},e.on("loadstart",e["removeOld"+n+"ei"]))})),e.featuresNativeTextTracks&&(h&&Xi.warn(Ki(go||(go=$i(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n This may prevent text tracks from loading."])))),e.ri=n(ge(e),e.handleTextTrackChange),e.hi=n(ge(e),e.handleTextTrackAdd),e.oi=n(ge(e),e.handleTextTrackRemove),e.ai()),e.ci(),(Js||Bs||Os)&&!0===i.nativeControlsForTouch&&e.setControls(!0),e.di(),e.triggerReady(),e}be(i,t);var s=i.prototype;return s.dispose=function(){var s=this;["audio","video","text"].forEach((function(t){var i=fe(t),e=s.v[t+"Tracks"];e&&e.removeEventListener&&(e.removeEventListener("change",s["handle"+i+"ti"]),e.removeEventListener("addtrack",s["handle"+i+"ii"]),e.removeEventListener("removetrack",s["handle"+i+"si"])),e&&s.off("loadstart",s["removeOld"+i+"ei"])})),i.disposeMediaElement(this.v),t.prototype.dispose.call(this)},s.ci=function(){var t,i=this.textTracks(),s=function(){t=[];for(var s=0;s<i.length;s++){var e=i[s];"metadata"===e.kind&&t.push({track:e,storedMode:e.mode})}};s(),i.addEventListener("change",s);var e=function s(){for(var e=0;e<t.length;e++){var n=t[e];"disabled"===n.track.mode&&n.track.mode!==n.storedMode&&(n.track.mode=n.storedMode)}i.removeEventListener("change",s)};this.on("webkitbeginfullscreen",(function(){i.removeEventListener("change",s),i.removeEventListener("change",e),i.addEventListener("change",e)})),this.on("webkitendfullscreen",(function(){i.removeEventListener("change",s),i.addEventListener("change",s),i.removeEventListener("change",e)}))},s.createEl=function(){var t=this.h.tag;if(!t||!this.h.playerElIngest&&!this.movingMediaElementInDOM){if(t){var s=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(s,t),i.disposeMediaElement(t),t=s}else{t=Di.createElement("video");var e=ve({},this.h.tag&&gs(this.h.tag));Js&&!0===this.h.nativeControlsForTouch||delete e.controls,ms(t,qi(e,{id:this.h.techId,class:"vjs-tech"}))}t.playerId=this.h.playerId}void 0!==this.h.preload&&ys(t,"preload",this.h.preload);for(var n=["loop","muted","playsinline","autoplay"],r=n.length-1;r>=0;r--){var h=n[r],o=this.h[h];void 0!==o&&(o?ys(t,h,h):bs(t,h),t[h]=o)}return t},s.Zt=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var i=!1,s=function(){i=!0};this.on("loadstart",s);var e=function(){i||this.trigger("loadstart")};return this.on("loadedmetadata",e),void this.ready((function(){this.off("loadstart",s),this.off("loadedmetadata",e),i||this.trigger("loadstart")}))}var n=["loadstart"];n.push("loadedmetadata"),t.readyState>=2&&n.push("loadeddata"),t.readyState>=3&&n.push("canplay"),t.readyState>=4&&n.push("canplaythrough"),this.ready((function(){n.forEach((function(t){this.trigger(t)}),this)}))}},s.ai=function(){var t=this.el().textTracks;if(t){for(var i=0;i<t.length;i++)this.textTracks().tt(t[i]);t.addEventListener&&(t.addEventListener("change",this.ri),t.addEventListener("addtrack",this.hi),t.addEventListener("removetrack",this.oi)),this.on("loadstart",this.fi)}},s.handleTextTrackChange=function(t){var i=this.textTracks();this.textTracks().trigger({type:"change",target:i,currentTarget:i,srcElement:i})},s.handleTextTrackAdd=function(t){this.textTracks().tt(t.track)},s.handleTextTrackRemove=function(t){this.textTracks().it(t.track)},s.ni=function(t,i){var s=[];if(i){for(var e=0;e<t.length;e++){for(var n=t[e],r=!1,h=0;h<i.length;h++)if(i[h]===n){r=!0;break}r||s.push(n)}for(var o=0;o<s.length;o++){var a=s[o];t.it(a)}}},s.fi=function(t){var i=this.textTracks(),s=this.el().textTracks;this.ni(i,s)},s.play=function(){var t=this.v.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))},s.setCurrentTime=function(t){try{this.v.currentTime=t}catch(t){Xi(t,"Video is not ready. (Video.js)")}},s.duration=function(){var t=this;if(this.v.duration===1/0&&$s&&Hs&&0===this.v.currentTime){return this.on("timeupdate",(function i(){t.v.currentTime>0&&(t.v.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",i))})),NaN}return this.v.duration||NaN},s.width=function(){return this.v.offsetWidth},s.height=function(){return this.v.offsetHeight},s.di=function(){var t=this;if("webkitDisplayingFullscreen"in this.v){var i=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},s=function(){"webkitPresentationMode"in this.v&&"picture-in-picture"!==this.v.webkitPresentationMode&&(this.one("webkitendfullscreen",i),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",s),this.on("dispose",(function(){t.off("webkitbeginfullscreen",s),t.off("webkitendfullscreen",i)}))}},s.supportsFullScreen=function(){if("function"==typeof this.v.webkitEnterFullScreen){var t=b.navigator&&b.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},s.enterFullScreen=function(){var t=this.v;t.paused&&t.networkState<=t.HAVE_METADATA?(this.v.play(),this.setTimeout((function(){t.pause(),t.webkitEnterFullScreen()}),0)):t.webkitEnterFullScreen()},s.exitFullScreen=function(){this.v.webkitExitFullScreen()},s.src=function(t){if(void 0===t)return this.v.src;this.setSrc(t)},s.reset=function(){i.resetMediaElement(this.v)},s.currentSrc=function(){return this.bt?this.bt.src:this.v.currentSrc},s.setControls=function(t){this.v.controls=!!t},s.addTextTrack=function(i,s,e){return this.featuresNativeTextTracks?this.v.addTextTrack(i,s,e):t.prototype.addTextTrack.call(this,i,s,e)},s.createRemoteTextTrack=function(i){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,i);var s=Di.createElement("track");return i.kind&&(s.kind=i.kind),i.label&&(s.label=i.label),(i.language||i.srclang)&&(s.srclang=i.language||i.srclang),i.default&&(s.default=i.default),i.id&&(s.id=i.id),i.src&&(s.src=i.src),s},s.addRemoteTextTrack=function(i,s){var e=t.prototype.addRemoteTextTrack.call(this,i,s);return this.featuresNativeTextTracks&&this.el().appendChild(e),e},s.removeRemoteTextTrack=function(i){if(t.prototype.removeRemoteTextTrack.call(this,i),this.featuresNativeTextTracks)for(var s=this.$$("track"),e=s.length;e--;)i!==s[e]&&i!==s[e].track||this.el().removeChild(s[e])},s.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),b.performance&&"function"==typeof b.performance.now?t.creationTime=b.performance.now():b.performance&&b.performance.timing&&"number"==typeof b.performance.timing.navigationStart&&(t.creationTime=b.Date.now()-b.performance.timing.navigationStart),t},i}(Zr);is()&&(ko.TEST_VID=Di.createElement("video"),(bo=Di.createElement("track")).kind="captions",bo.srclang="en",bo.label="English",ko.TEST_VID.appendChild(bo)),ko.isSupported=function(){try{ko.TEST_VID.volume=.5}catch(t){return!1}return!(!ko.TEST_VID||!ko.TEST_VID.canPlayType)},ko.canControlVolume=function(){try{var t=ko.TEST_VID.volume;return ko.TEST_VID.volume=t/2+.1,t!==ko.TEST_VID.volume}catch(t){return!1}},ko.canControlPlaybackRate=function(){if($s&&Hs&&qs<58)return!1;try{var t=ko.TEST_VID.playbackRate;return ko.TEST_VID.playbackRate=t/2+.1,t!==ko.TEST_VID.playbackRate}catch(t){return!1}},ko.supportsNativeTextTracks=function(){return Xs},ko.supportsNativeVideoTracks=function(){return!(!ko.TEST_VID||!ko.TEST_VID.videoTracks)},ko.supportsNativeAudioTracks=function(){return!(!ko.TEST_VID||!ko.TEST_VID.audioTracks)},ko.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],ko.prototype.featuresVolumeControl=ko.canControlVolume(),ko.prototype.featuresPlaybackRate=ko.canControlPlaybackRate(),ko.prototype.movingMediaElementInDOM=!Fs,ko.prototype.featuresFullscreenResize=!0,ko.prototype.featuresProgressEvents=!0,ko.prototype.featuresTimeupdateEvents=!0,ko.prototype.featuresNativeTextTracks=ko.supportsNativeTextTracks(),ko.prototype.featuresNativeVideoTracks=ko.supportsNativeVideoTracks(),ko.prototype.featuresNativeAudioTracks=ko.supportsNativeAudioTracks();var wo=ko.TEST_VID&&ko.TEST_VID.constructor.prototype.canPlayType,_o=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,xo=/^video\/mp4/i;ko.patchCanPlayType=function(){Rs>=4&&!Vs?ko.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&_o.test(t)?"maybe":wo.call(this,t)}:Us&&(ko.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&xo.test(t)?"maybe":wo.call(this,t)})},ko.unpatchCanPlayType=function(){var t=ko.TEST_VID.constructor.prototype.canPlayType;return ko.TEST_VID.constructor.prototype.canPlayType=wo,t},ko.patchCanPlayType(),ko.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){}}()}}},ko.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){ko.prototype[t]=function(){return this.v[t]||this.v.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){ko.prototype["set"+fe(t)]=function(i){this.v[t]=i,i?this.v.setAttribute(t,t):this.v.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(t){ko.prototype[t]=function(){return this.v[t]}})),["volume","src","poster","preload","playbackRate"].forEach((function(t){ko.prototype["set"+fe(t)]=function(i){this.v[t]=i}})),["pause","load"].forEach((function(t){ko.prototype[t]=function(){return this.v[t]()}})),Zr.withSourceHandlers(ko),ko.nativeSourceHandler={},ko.nativeSourceHandler.canPlayType=function(t){try{return ko.TEST_VID.canPlayType(t)}catch(t){return""}},ko.nativeSourceHandler.canHandleSource=function(t,i){if(t.type)return ko.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 ko.nativeSourceHandler.canPlayType("video/"+s)}return""},ko.nativeSourceHandler.handleSource=function(t,i,s){i.setSrc(t.src)},ko.nativeSourceHandler.dispose=function(){},ko.registerSourceHandler(ko.nativeSourceHandler),pe.registerComponent("Html5",ko),Zr.registerTech("Html5",ko);var Co=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],So=function(t){function i(s,e,n){var r;if(s.id=s.id||["vjs_video",Ui()].join("_"),(e=qi(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(gs(o).hasOwnProperty("lang")){e.language=o.getAttribute("lang");break}o=o.parentNode}if(!(r=t.call(this,null,e,n)||this).h||!r.h.techOrder||!r.h.techOrder.length)throw new m("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&&gs(s),r.language(r.h.language),e.languages){var a={};w.getOwnPropertyNames(e.languages).forEach((function(t){a[t.toLowerCase()]=e.languages[t]})),r.vi=a}else r.vi=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=ve(r.h);if(e.plugins){var c=e.plugins;w.getOwnPropertyNames(c).forEach((function(t){"function"==typeof this[t]?this[t](c[t]):Xi.error("Unable to find plugin:",t)}),ge(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"),Fs||r.addClass("vjs-workinghover"),i.players[r.o]=ge(r);var l="5.20.6-opentelly.14".split(".")[0];return r.addClass("vjs-v"+l),r.userActive(!0),r.reportUserActivity(),r.ki(),r.on("fullscreenchange",r.wi),r.on("stageclick",r._i),r}be(i,t);var s=i.prototype;return s.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.xi&&this.xi.parentNode&&this.xi.parentNode.removeChild(this.xi),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.Ci=s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player");i=this.v=e?s.parentNode:t.prototype.createEl.call(this,"div"),s.setAttribute("tabindex","-1"),s.removeAttribute("width"),s.removeAttribute("height");var n=gs(s);if(w.getOwnPropertyNames(n).forEach((function(t){"class"===t?i.className+=" "+n[t]:i.setAttribute(t,n[t])})),s.playerId=s.id,s.id+="Si",s.className="vjs-tech",s.player=i.player=this,this.addClass("vjs-paused"),!0!==b.VIDEOJS_NO_DYNAMIC_STYLE){this.xi=le("vjs-styles-dimensions");var r=Ts(".vjs-styles-defaults"),h=Ts("head");h.insertBefore(this.xi,r?r.nextSibling:h.firstChild)}this.width(this.h.width),this.height(this.h.height),this.fluid(this.h.fluid),this.aspectRatio(this.h.aspectRatio);for(var o=s.getElementsByTagName("a"),a=0;a<o.length;a++){var u=o.item(a);fs(u,"vjs-hidden"),u.setAttribute("hidden","hidden")}return s.Kt=s.networkState,s.parentNode&&!e&&s.parentNode.insertBefore(i,s),hs(s,i),this.m.unshift(s),this.v=i,i},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?"ji":"Ti";if(void 0===i)return this[s]||0;if(""===i)this[s]=void 0;else{var e=C(i);if(S(e))return Xi.error('Improper value "'+i+'" supplied for for '+t),this;this[s]=e}return this.Mi(),this},s.fluid=function(t){if(void 0===t)return!!this.Ai;this.Ai=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.Mi()},s.aspectRatio=function(t){if(void 0===t)return this.Pi;if(!/^\d+\:\d+$/.test(t))throw new m("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.Pi=t,this.fluid(!0),this.Mi()},s.Mi=function(){if(!0!==b.VIDEOJS_NO_DYNAMIC_STYLE){var t,i,s,e=(void 0!==this.Pi&&"auto"!==this.Pi?this.Pi:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=e[1]/e[0];t=void 0!==this.ji?this.ji:void 0!==this.Ti?this.Ti/n:this.videoWidth()||300,i=void 0!==this.Ti?this.Ti:t*n,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),de(this.xi,"\n ."+s+" {\n width: "+t+"px;\n height: "+i+"px;\n }\n\n ."+s+".vjs-fluid {\n padding-top: "+100*n+"%;\n }\n ")}else{var r="number"==typeof this.ji?this.ji:this.h.width,h="number"==typeof this.Ti?this.Ti:this.h.height,o=this.H&&this.H.el();o&&(r>=0&&(o.width=r),h>=0&&(o.height=h))}},s._t=function(t,i){var s=this;this.H&&this.Ni(),"Html5"!==t&&this.tag&&(Zr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.Ei=t,this.j=!1;var e=qi({source:i,nativeControlsForTouch:this.h.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+t+"Bi",videoTracks:this.rt,textTracks:this.nt,audioTracks:this.ht,autoplay:this.h.autoplay,playsinline:this.h.playsinline,preload:this.h.preload,loop:this.h.loop,muted:this.h.muted,poster:this.poster(),language:this.language(),playerElIngest:this.Ci||!1,"vtt.js":this.h["vtt.js"]},this.h[t.toLowerCase()]);this.tag&&(e.tag=this.tag),i&&(this.Ii=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 r=Zr.getTech(t);r||(r=pe.getComponent(t)),this.H=new r(e),this.H.ready(n(this,this.Fi),!0),Fe(this.Di||[],this.H),Co.forEach((function(t){s.on(s.H,t,s["handleTech"+fe(t)+"_"])})),this.on(this.H,"loadstart",this.$i),this.on(this.H,"waiting",this.Ri),this.on(this.H,"canplay",this.Ui),this.on(this.H,"canplaythrough",this.Oi),this.on(this.H,"playing",this.Vi),this.on(this.H,"ended",this.Li),this.on(this.H,"seeking",this.Hi),this.on(this.H,"seeked",this.qi),this.on(this.H,"play",this.zi),this.on(this.H,"firstplay",this.Wi),this.on(this.H,"pause",this.Gi),this.on(this.H,"durationchange",this.Xi),this.on(this.H,"fullscreenchange",this.Ji),this.on(this.H,"error",this.Qi),this.on(this.H,"loadedmetadata",this.Mi),this.on(this.H,"resize",this.Mi),this.on(this.H,"posterchange",this.Yi),this.on(this.H,"textdata",this.Ki),this.usingNativeControls(this.Zi("controls")),this.controls()&&!this.usingNativeControls()&&this.ts(),this.H.el().parentNode===this.contentEl()||"Html5"===t&&this.tag||hs(this.H.el(),this.contentEl()),this.tag&&(this.tag.player=null,this.tag=null)},s.Ni=function(){this.rt=this.videoTracks(),this.nt=this.textTracks(),this.ht=this.audioTracks(),this.Di=Ie(this.H),this.j=!1,this.H.dispose(),this.H=!1},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 b.alert(i),new m(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){Xi("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.zi=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.Ui=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},s.Oi=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},s.Vi=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},s.Hi=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},s.qi=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},s.Wi=function(){this.h.starttime&&(Xi.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.h.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},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.wi=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.j)this.H.ready((function(){this[t](i)}),!0);else try{this.H&&this.H[t](i)}catch(t){throw Xi(t),t}},s.Zi=function(t){if(this.H&&this.H.j)try{return this.H[t]()}catch(i){throw void 0===this.H[t]?Xi("Video.js: "+t+" method not defined for "+this.Ei+" playback technology.",i):"TypeError"===i.name?(Xi("Video.js: "+t+" unavailable on "+this.Ei+" playback technology element.",i),this.H.j=!1):Xi(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=C(t))<0&&(t=1/0),t!==this.pi.duration&&(this.pi.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},s.remainingTime=function(){return this.duration()-this.currentTime()},s.buffered=function(){var t=this.Zi("buffered");return t&&t.length||(t=_e(0,0)),t},s.bufferedPercent=function(){return xe(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=_.max(0,_.min(1,C(t))),this.pi.volume=i,this.us("setVolume",i),this):(i=C(this.Zi("volume")),S(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=Me;return this.isFullscreen(!0),s.requestFullscreen?(ee(Di,s.fullscreenchange,n(this,(function t(i){this.isFullscreen(Di[s.fullscreenElement]),!1===this.isFullscreen()&&ne(Di,s.fullscreenchange,t),this.trigger("fullscreenchange")}))),s.prefixed||(i=this.h.fullscreenOptions,void 0!==t&&(i=t)),this.v[s.requestFullscreen](i)):this.H.supportsFullScreen()?this.us("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},s.exitFullscreen=function(){var t=Me;return this.isFullscreen(!1),t.requestFullscreen?Di[t.exitFullscreen]():this.H.supportsFullScreen()?this.us("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},s.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=Di.documentElement.style.overflow,ee(Di,"keydown",n(this,this.fullWindowOnEscKey)),Di.documentElement.style.overflow="hidden",fs(Di.body,"vjs-full-window"),this.trigger("enterFullWindow")},s.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},s.exitFullWindow=function(){this.isFullWindow=!1,ne(Di,"keydown",this.fullWindowOnEscKey),Di.documentElement.style.overflow=this.docOrigOverflow,vs(Di.body,"vjs-full-window"),this.trigger("exitFullWindow")},s.canPlayType=function(t){for(var i,s=0,e=this.h.techOrder;s<e.length;s++){var n=fe(e[s]),r=Zr.getTech(n);if(r||(r=pe.getComponent(n)),r){if(r.isSupported()&&(i=r.canPlayType(t)))return i}else Xi.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(fe).map((function(t){return[t,Zr.getTech(t)||pe.getComponent(t)]})).filter((function(t){var i=t[0],s=t[1];return s?s.isSupported():(Xi.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),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=Zr.getTech(this.Ei);return i||(i=pe.getComponent(this.Ei)),Array.isArray(t)?this.ls(t):"string"==typeof t?this.src({src:t}):t instanceof w&&(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.Ii=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(fe(this.h.techOrder[0]),null),this.us("reset"),this},s.currentSources=function(){var t=this.currentSource(),i=[];return 0!==w.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.Ii||""},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.ds!==t&&(this.ds=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.ds},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 Ne(t),this.addClass("vjs-error"),Xi.error("(CODE:"+this.lt.code+" "+Ne.errorTypes[this.lt.code]+")",this.lt.message,this.lt),this.trigger("error"),this)},s.reportUserActivity=function(t){this.fs=!0},s.userActive=function(t){return void 0!==t?((t=!!t)!==this.vs&&(this.vs=t,t?(this.fs=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.fs=!1,this.H&&this.H.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.vs},s.ki=function(){var t,i,s,e,r=n(this,this.reportUserActivity);this.on("mousedown",(function(){r(),this.clearInterval(t),t=this.setInterval(r,250)})),this.on("mousemove",(function(t){t.screenX===i&&t.screenY===s||(i=t.screenX,s=t.screenY,r())})),this.on("mouseup",(function(i){r(),this.clearInterval(t)})),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.fs){this.fs=!1,this.userActive(!0),this.clearTimeout(e);var t=this.h.inactivityTimeout;t>0&&(e=this.setTimeout((function(){this.fs||this.userActive(!1)}),t))}}),250)},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 Jr,this.rt)},s.audioTracks=function(){return this.H?this.H.audioTracks():(this.ht=this.ht||new Yr,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 ve(i.prototype.h.languages,this.vi)},s.toJSON=function(){var t=ve(this.h),i=t.tracks;t.tracks=[];for(var s=0;s<i.length;s++){var e=i[s];(e=ve(e)).player=void 0,t.tracks[s]=e}return t},s.createModal=function(t,i){var s=this;(i=i||{}).content=t||"";var e=new $e(this,i);return this.addChild(e),e.on("dispose",(function(){s.removeChild(e)})),e.open()},i.getTagSettings=function(t){var i={sources:[],tracks:[]},s=gs(t),e=s["data-setup"];if(ds(t,"vjs-fluid")&&(s.fluid=!0),null!==e){var n=Ee(e||"{}"),r=n[0],h=n[1];r&&Xi.error(r),qi(s,h)}if(qi(i,s),t.hasChildNodes())for(var o=t.childNodes,a=0,u=o.length;a<u;a++){var c=o[a],l=c.nodeName.toLowerCase();"source"===l?i.sources.push(gs(c)):"track"===l&&i.tracks.push(gs(c))}return i},s.bi=function(){var t=Di.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},i}(pe);So.players={};var jo=b.navigator;So.prototype.h={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:jo&&(jo.languages&&jo.languages[0]||jo.userLanguage||jo.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreenOptions:{navigationUI:"hide"}},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){So.prototype[t]=function(){return this.Zi(t)}})),Co.forEach((function(t){So.prototype["handleTech"+fe(t)+"_"]=function(){return this.trigger(t)}})),pe.registerComponent("Player",So);var To,Mo,Ao=function(t){function i(s){var e;void 0===s&&(s={});var n=ve(s,{kind:Oe[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(zs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.defineProperty(r,"enabled",{get:function(){return h},set:function(t){"boolean"==typeof t&&t!==h&&(h=t,this.trigger("enabledchange"))}}),n.enabled&&(r.enabled=n.enabled),r.W=!0,r||ge(e)}return be(i,t),i}(He),Po=function(t){function i(s){var e;void 0===s&&(s={});var n=ve(s,{kind:Ue[s.kind]||""}),r=e=t.call(this,n)||this,h=!1;if(zs)for(var o in i.prototype)"constructor"!==o&&(r[o]=i.prototype[o]);return w.defineProperty(r,"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||ge(e)}return be(i,t),i}(He);function No(t,i,s){var e;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),No.getPlayers()[t])return i&&Xi.warn('Player "'+t+'" is already initialised. Options will not be applied.'),s&&No.getPlayers()[t].ready(s),No.getPlayers()[t];e=function(t){return 0===t.indexOf("#")&&(t=t.slice(1)),Di.getElementById(t)}(t)}else e=t;if(!e||!e.nodeName)throw new g("The element or ID supplied is not valid. (videojs)");if(e.player||So.players[e.playerId])return e.player||So.players[e.playerId];i=i||{},No.hooks("beforesetup").forEach((function(t){var s=t(e,ve(i));zi(s)&&!Array.isArray(s)?i=ve(i,s):Xi.error("please return an object in beforesetup hooks")}));var n=new(pe.getComponent("Player"))(e,i,s);return No.hooks("setup").forEach((function(t){return t(n)})),n}"undefined"==typeof HTMLVideoElement&&is()&&(Di.createElement("video"),Di.createElement("audio"),Di.createElement("track")),No.ys={},No.hooks=function(t,i){return No.ys[t]=No.ys[t]||[],i&&(No.ys[t]=No.ys[t].concat(i)),No.ys[t]},No.hook=function(t,i){No.hooks(t,i)},No.removeHook=function(t,i){var s=No.hooks(t).indexOf(i);return!(s<=-1)&&(No.ys[t]=No.ys[t].slice(),No.ys[t].splice(s,1),!0)},!0!==b.VIDEOJS_NO_DYNAMIC_STYLE&&is()&&((To=Ts(".vjs-styles-defaults"))||(To=le("vjs-styles-defaults"),(Mo=Ts("head"))&&Mo.insertBefore(To,Mo.firstChild),de(To,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n "))),ce(1,No),No.VERSION="5.20.6-opentelly.14",No.options=So.prototype.h,No.getPlayers=function(){return So.players},No.players=So.players,No.getComponent=pe.getComponent,No.registerComponent=function(t,i){Zr.isTech(i)&&Xi.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),pe.registerComponent.call(pe,t,i)},No.getTech=Zr.getTech,No.registerTech=Zr.registerTech,No.browser=Ys,No.TOUCH_ENABLED=Js,No.extend=function(t,i){void 0===i&&(i={});var s=function(){t.apply(this,arguments)},e={};for(var n in zi(i)?("function"==typeof i.init&&(Xi.warn("Constructor logic via init() is deprecated; please use constructor() instead."),i.constructor=i.init),i.constructor!==w.prototype.constructor&&(s=i.constructor),e=i):"function"==typeof i&&(s=i),function(t,i){if("function"!=typeof i&&null!==i)throw new g("Super expression must either be null or a function, not "+typeof i);t.prototype=w.create(i&&i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i&&(t.bs=i)}(s,t),e)e.hasOwnProperty(n)&&(s.prototype[n]=e[n]);return s},No.mergeOptions=ve,No.bind=n,No.plugin=function(t,i){So.prototype[t]=i},No.addLanguage=function(t,i){var s;return t=(""+t).toLowerCase(),No.options.languages=ve(No.options.languages,((s={})[t]=i,s)),No.options.languages[t]},No.log=Xi,No.createTimeRange=No.createTimeRanges=_e,No.formatTime=fh,No.parseUrl=qe,No.isCrossOrigin=ze,No.EventTarget=me,No.on=ee,No.one=he,No.off=ne,No.trigger=re,No.xhr=$r,No.TextTrack=Lr,No.AudioTrack=Ao,No.VideoTrack=Po,No.isEl=ss,No.isTextNode=_s,No.createEl=ns,No.hasClass=ds,No.addClass=fs,No.removeClass=vs,No.toggleClass=ps,No.setAttributes=ms,No.getAttributes=gs,No.emptyEl=xs,No.appendContent=Cs,No.insertContent=Ss,No.computedStyle=kh,f(),f();var Eo=10;function Bo(t){const i=t.duration;if(S(i)){var s;const i=null==(s=t.source)?void 0:s.streamType;return"live"===i||"dvr"===i}return i===1/0}function Io(t){return t.scrubbing()?t.getCache().currentTime:t.currentTime()}function Fo(t){const i=Ro(t);return Bo(t)?i.end(i.length-1):i.start(0)}function Do(t){return Ro(t).start(0)}function $o(t){const i=Ro(t);return i.end(i.length-1)-i.start(0)}function Ro(t){const i=t.seekable;if(i&&i.length)return i;let s=t.duration;return s=isFinite(s)?s:0,new Wt([0,s]).ks()}function Uo(t,i){void 0===i&&(i=t);const s=t<0?"-":"";t=_.abs(t);let e=_.floor(t%60),n=_.floor(t/60%60),r=_.floor(t/3600);const h=_.floor(i/60%60),o=_.floor(i/3600);return(S(t)||t===1/0)&&(r=n=e="-"),r=Number(r)>0||o>0?r+":":"",n=((r||h>=10)&&Number(n)<10?"0"+n:n)+":",e=Number(e)<10?"0"+e:e,s+r+n+e}function Oo(t){return class extends t{get ws(){var t;return null!=(t=this._s)?t:this._s=Vo(this.player())}dispose(){this._s=void 0,super.dispose()}constructor(...t){super(...t),this._s=void 0}}}function Vo(t){return t.tech({IWillNotUseThisInPlugins:!0}).theoplayer()}function Lo(t){const i=Vo(t),s=()=>{const s=Io(t);t.toggleClass("theo-at-live",function(t,i){if(Bo(t)){const s=t.seekable;return 0===s.length||s.end(s.length-1)-i<Eo}return!1}(i,s)),t.toggleClass("vjs-live",Bo(i)),t.toggleClass("theo-dvr",function(t){var i;return"dvr"===Pt(t.duration,t.seekable,null==(i=t.source)?void 0:i.streamType)}(i))};t.on("emptied",s),t.on("timeupdate",s),t.on("durationchange",s)}f(),f();var Ho="theo-ad-playing",qo="theo-dai-ad-playing";function zo(t,i,s){t.toggleClass(Ho,i),t.toggleClass(qo,i&&s)}function Wo(){this.userActive(!1)}f(),f(),f();var Go=class{constructor(t,i){this.type=t.type,this.target=i,this.playerEvent=t}},Xo=["loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange","resize"],Jo=No.getTech("Tech"),Qo=No.getTech("Html5"),Yo=class extends Jo{xs(){var t;for(const t of Xo)this.ws.addEventListener(t,this.Cs);this.ws.addEventListener("error",this.Ss),this.ws.addEventListener("contentprotectionerror",this.Ss),this.ws.addEventListener("sourcechange",this.js),this.ws.addEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.addEventListener(Ai.MODE_CHANGE,this.Ms),this.ws.textTracks.addEventListener("addtrack",this.As),this.ws.textTracks.addEventListener("removetrack",this.Ps),this.ws.textTracks.addEventListener("change",this.Ns),this.ws.audioTracks.addEventListener("addtrack",this.Es),this.ws.audioTracks.addEventListener("removetrack",this.Bs),this.ws.audioTracks.addEventListener("change",this.Is)}Fs(){var t;for(const t of Xo)this.ws.removeEventListener(t,this.Cs);this.ws.removeEventListener("error",this.Ss),this.ws.removeEventListener("contentprotectionerror",this.Ss),this.ws.removeEventListener("sourcechange",this.js),this.ws.removeEventListener("loadstart",this.Ts),null==(t=this.ws.presentation)||t.removeEventListener(Ai.MODE_CHANGE,this.Ms),this.ws.textTracks.removeEventListener("addtrack",this.As),this.ws.textTracks.removeEventListener("removetrack",this.Ps),this.ws.textTracks.removeEventListener("change",this.Ns),this.ws.audioTracks.removeEventListener("addtrack",this.Es),this.ws.audioTracks.removeEventListener("removetrack",this.Bs),this.ws.audioTracks.removeEventListener("change",this.Is)}Ds(t){this.trigger(new Go(t,this))}createEl(){const t=this.h,i=t.player;if(!i)throw new m(this.localize('Missing required tech option "player"'));const s=i.element;return No.setAttributes(s,{id:t.techId}),s}theoplayer(){return this.ws}addTextTrack(t,i,s){return super.addTextTrack(t,i,s)}buffered(){return this.ws.buffered}played(){return this.ws.played}reset(){this.ws.stop()}play(){this.ws.play()}pause(){this.ws.pause()}paused(){return this.ws.paused}currentTime(){return this.ws.currentTime}setCurrentTime(t){this.ws.currentTime=t}duration(){return this.ws.duration}volume(){return this.ws.volume}setVolume(t){this.ws.volume=t}muted(){return this.ws.muted}setMuted(t){this.ws.muted=t}src(t){if(void 0!==t)this.setSrc(t);else{if(this.ws.src)return this.ws.src;if(this.ws.source){if(!li(this.ws.source.ads))return this.ws.source.ads[0].sources;if(Gt(this.ws.source))return"This source is managed by the Uplynk integration extension.";if(qt(this.ws.source))return"This source is managed by the DAI integration extension.";if(Jt(this.ws.source))return"This source is managed by Millicast."}}}setSrc(t){return this.setSource({src:t})}setSource(t){this.lt=null,this.trigger("error")}currentSrc(){return this.ws.src}load(){this.setPreload("auto")}preload(){return this.ws.preload}setPreload(t){this.ws.preload=t}autoplay(){return this.ws.autoplay}setAutoplay(t){this.ws.autoplay=Boolean(t)}seeking(){return this.ws.seeking}seekable(){return this.ws.seekable}ended(){return this.ws.ended}playbackRate(){return this.ws.playbackRate}setPlaybackRate(t){this.ws.playbackRate=t}readyState(){return this.ws.readyState}networkState(){return 0}controls(){return!1}videoHeight(){return this.ws.videoHeight}videoWidth(){return this.ws.videoWidth}supportsFullScreen(){return this.ws.presentation.supportsMode(ii.FULLSCREEN)}enterFullScreen(){this.ws.presentation.requestMode(ii.FULLSCREEN)}exitFullScreen(){this.ws.presentation.requestMode(ii.INLINE)}$s(){const t=this.ws.ads;if(t&&t.playing)return!0;const i=this.ws.vr;return!(!i||i.state===Ft.Rs)}initTextTrackListeners(){return this.on("touchend",(t=>{this.$s()&&(t.preventDefault=()=>{})})),super.initTextTrackListeners()}Zt(){if(!this.src())return;const t=this.readyState();if(0===t){let t=!1;const i=()=>{t=!0};this.on("loadstart",i);const 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")}))}const i=["loadstart"];i.push("loadedmetadata"),t>=2&&i.push("loadeddata"),t>=3&&i.push("canplay"),t>=4&&i.push("canplaythrough"),this.ready((()=>{for(const t of i)this.trigger(t)}))}dispose(){this.Fs(),this.ws=null,super.dispose()}static isSupported(){return!0}static canPlayType(){return"maybe"}static canPlaySource(t){return"maybe"}get featuresVolumeControl(){return V}constructor(t={},i){super(t,i),this.Cs=t=>this.Ds(t),this.Us=!1,this.js=()=>{void 0===this.ws.errorObject&&(this.Ds(new Yt(this.ws.currentTime,this.ws.readyState)),this.Ds(new I),this.Ds(new Zt(this.ws.duration)))},this.Ts=()=>{this.Ds(new It(this.ws.currentTime))},this.As=t=>{this.textTracks().tt(t.track)},this.Es=t=>{this.audioTracks().tt(t.track)},this.Ps=t=>{this.textTracks().it(t.track)},this.Bs=t=>{this.audioTracks().it(t.track)},this.Ns=()=>{const t=this.textTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Is=()=>{const t=this.audioTracks();t.trigger({type:"change",target:t,currentTarget:t,srcElement:t})},this.Ms=()=>{if(!this.supportsFullScreen())return;const t=this.Us,i=this.ws.presentation.currentMode===ii.FULLSCREEN;t!==i&&(this.Us=i,this.trigger("fullscreenchange",{isFullscreen:i,nativeIOSFullscreen:!0}))},this.Ss=()=>{const t=this.ws.errorObject,i=t&&yt(t.code)||-1,s=t&&t.message||"An unknown error occurred.";this.error({code:i,message:this.localize(s)})},this.ws=this.h.player,this.xs();const s=!this.paused();s&&this.pause(),t.preload&&this.setPreload(t.preload),t.autoplay&&this.setAutoplay(t.autoplay),t.muted&&this.setMuted(t.muted),t.source?this.setSrc(t.source):this.Zt(),s&&this.ready((()=>this.play())),this.triggerReady()}};Yo.prototype.featuresFullscreenResize=Qo.prototype.featuresFullscreenResize,Yo.prototype.featuresPlaybackRate=Qo.prototype.featuresPlaybackRate,Yo.prototype.featuresProgressEvents=!0,Yo.prototype.featuresTimeupdateEvents=!0,Yo.prototype.featuresNativeTextTracks=!0,No.registerTech("THEOplayer",Yo),f(),f(),f(),f();var Ko=class{constructor(t){this.Os=t=>{si(this.Vs,"theo-mobile-button-hover"),t.stopImmediatePropagation()},this.Ls=t=>{ni(this.Vs,"theo-mobile-button-hover")},this.Hs=t=>{this.Vs.blur()},this.Vs=t,t.addEventListener("touchstart",this.Os),t.addEventListener("touchend",this.Ls),t.addEventListener("focusin",this.Hs)}};f(),f(),f(),f();var Zo=No.getComponent("Menu"),ta=class extends(Oo(Zo)){get qs(){return this.player().el()}zs(){si(this.qs,"theo-menu-opened")}Ws(){ni(this.qs,"theo-menu-opened")}constructor(t,i){super(t,i)}};f();var ia=No.getComponent("MenuItem"),sa=class extends(Oo(ia)){get parentMenu(){return this.Gs}buildCSSClass(){return"theo-menu-item vjs-menu-item"}createEl(){const t=super.createEl("li",{className:this.buildCSSClass(),tabIndex:0},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){this.Xs||(this.parentMenu.Js(this),"tap"!==t.type&&"keydown"!==t.type||(this.Xs=!0,this.trigger("click"),this.Xs=!1))}dispose(){vi.Ys.Qs&&(this.el().removeEventListener("touchstart",this.Os),this.el().removeEventListener("touchend",this.Ls)),super.dispose()}constructor(t,i,s){super(t,z({selectable:!0},i)),this.Xs=!1,this.Os=t=>{si(this.el(),"theo-mobile-menu-item-hover"),t.stopImmediatePropagation()},this.Ls=t=>{ni(this.el(),"theo-mobile-menu-item-hover")},this.Gs=s,vi.Ys.Qs&&(this.el().addEventListener("touchstart",this.Os),this.el().addEventListener("touchend",this.Ls))}};f();var ea=No.getComponent("ClickableComponent"),na=class extends ea{get parentMenu(){return this.Gs}get Ks(){return this.Zs}set Ks(t){this.Zs=t,this.el().setAttribute("tabindex",this.Ks?"0":"-1"),this.te()}buildCSSClass(){return"theo-primary-background theo-menu-header"}createEl(){const t=super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-live":"off","aria-label":""});return t.innerHTML="",t}handleClick(t){!this.Xs&&this.Ks&&(this.Gs.ie(),"tap"===t.type&&(this.Xs=!0,this.trigger("click"),this.Xs=!1))}te(){this.Ks?this.el().setAttribute("aria-label",this.localize("Go back to the previous menu")):this.el().setAttribute("aria-label","")}constructor(t,i,s){super(t,i),this.Xs=!1,this.Zs=!1,this.Gs=s,this.on(t,"languagechange",this.te)}},ra=class extends ta{get menuHeader(){return this.se}get menuItems(){return this.children()}addMenuItem(t){t=z({playerOptions:this.h.playerOptions},t);const i=new sa(this.player(),t,this);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}addSubMenuItem(t){t=z({playerOptions:this.h.playerOptions},t);const i=this.ee(this.player(),t);return this.addChild(i,void 0,t.index),this.trigger("menuchange"),i}removeMenuItem(t){this.removeChild(t),this.trigger("menuchange")}buildCSSClass(){return"theo-menu vjs-menu"}zs(){super.zs(),s.removeEventListener("resize",this.ne),s.addEventListener("resize",this.ne),this.show()}re(){const t=this.he();if(!t)return;const i=t.getClientRects();vi.Ys.Qs?this.oe(t,i):this.ae(t,i)}he(){var t;return null!=(t=this.contentEl().parentElement)?t:void 0}ae(t,i){}oe(t,i){}Ws(){s.removeEventListener("resize",this.ne),super.Ws(),this.hide(),vi.Ys.Qs&&(this.el().removeAttribute("style"),this.contentEl().removeAttribute("style"))}createEl(){const t=super.createEl();t.className=this.buildCSSClass();const i=this.contentEl();si(i,"theo-menu-content");const s=new na(this.player(),this.h,this);return i.parentNode.insertBefore(s.el(),i),this.se=s,t}Js(t){}show(){return this.re(),super.show()}dispose(){this.se&&this.se.dispose(),super.dispose()}constructor(t,i){super(t,i),this.ne=()=>this.re(),this.ue=this.player().el(),this.hide(),this.on("menuchange",this.re)}},ha=class extends ra{get ce(){return this.le}set ce(t){this.le&&this.le.de(this),this.le=t,t&&t.fe(this)}ve(t){this.ce.pe(t,"replace")}me(t){t.ce.pe(this,"restore")}ge(){ni(this.ye,"vjs-hidden"),this.ye.style.opacity="1",super.show()}be(){si(this.ye,"vjs-hidden")}zs(){this.ce&&this.ce.zs(),super.zs()}Ws(){this.ce&&this.ce.Ws(),super.Ws(),si(this.ye,"vjs-hidden")}he(){if(this.ce&&this.ce.ke)return this.ce.ke.ye}ae(t,i){if(i.length>0){const t=i[0].height,s=i[0].width;this.le.we.style.height=t+"px",this.le.we.style.width=s+"px"}super.ae(t,i)}constructor(t,i){super(t,i)}};f();var oa=class{get we(){return this.Vs}get ke(){return this._e}fe(t){t.be(),this.Vs.appendChild(t.ye)}de(t){this.Vs.removeChild(t.ye)}pe(t,i){if(t==this._e)return;const s=this._e;if(this._e=t,this._e.ge(),this.ke.focus(),vi.Ys.Qs)s.be();else{const t="translateX(100%)",e="translateX(-100%)",n=bi("transform");s.ye.style.opacity="0",s.ye.style[n]="replace"===i?e:t,this._e.ye.style.opacity="1",this._e.ye.style[n]="",u((()=>{s.be(),s.ye.style[n]=""}),300)}}zs(){this.xe(),this._e.ge(),this.Ce()}Ws(){this.xe(),this._e.be(),this.Se.be(),this._e=this.Se,this.Ce()}Ce(){fi((()=>{ni(this.Vs,"theo-no-transition"),ni(this._e.ye,"theo-no-transition")}))}xe(){si(this.Vs,"theo-no-transition"),si(this._e.ye,"theo-no-transition")}constructor(t){this.Se=this._e=t,this.Vs=h.createElement("div"),this.Vs.className="theo-tertiary-background theo-menu-animation-container",this.Vs.appendChild(this.Se.ye),this.ue=this._e.player().el()}};f(),f();var aa=class extends ha{get ye(){return this.el()}get parentMenu(){return this.je}ee(t,i){const s=new ua(t,i,this);return s.subMenu.ce=this.ce,s}ie(){this.Te()}Js(t){super.Js(t),this.Te()}Te(){this.parentMenu.me(this)}buildCSSClass(){return"theo-submenu "+(this.Me?"":"theo-leaf-submenu ")+"theo-menu-content theo-menu-content-animatable "+super.buildCSSClass()}addSubMenuItem(t){this.Me=!0;const i=super.addSubMenuItem(t);return this.removeClass("theo-leaf-submenu"),i}constructor(t,i,s){super(t,i),this.Me=!1,this.je=s,this.menuHeader.Ks=!0}},ua=class extends sa{get subMenu(){return this.Ae}handleClick(t){this.parentMenu.ve(this.subMenu)}constructor(t,i,s){super(t,z({selectable:!1},i),s),this.Ae=new aa(t,i,s)}},ca=class extends ha{get menuButton(){return this.Pe}createEl(){const t=No.createEl("div",{className:this.buildCSSClass()});return this.Ne=super.createEl(),this.Ne.className=super.buildCSSClass(),si(this.Ne,"theo-menu-content-animatable"),t.appendChild(this.Ne),this.ce=new oa(this),t.appendChild(this.ce.we),t}buildCSSClass(){return"theo-menu-animatable "+super.buildCSSClass()}ee(t,i){const s=new ua(t,i,this);return s.subMenu.ce=this.ce,s}ae(t,i){super.ae(t,i);const s=this.ue.getClientRects(),e=s.length>0?s[0]:void 0,n=C(getComputedStyle(this.el()).fontSize);Q(this.el(),this.Pe.el(),e,n)}get ye(){return this.Ne}ie(){this.Pe.closeMenu()}dispose(){this.Ee||(this.Ee=!0,super.dispose())}constructor(t,i,s){super(t,i),this.Ee=!1,this.Pe=s}};f();var la=class{set Be(t){this.Ie.innerHTML=this.Fe.localize(t),this.De()&&this.$e(),ci(this.Fe.el())}get Be(){return this.Ie.textContent||""}De(){return!ti(this.Ie,"vjs-hidden")}Re(){this.Fe.off("mouseover",this.$e),this.Fe.off("mouseout",this.Ue),this.Fe.off("dispose",this.Oe),Qt(this.Ie)}constructor(t,i){this.$e=()=>{ni(this.Ie,"vjs-hidden");const t=this.Fe.player().contentEl().getClientRects(),i=t.length>0?t[0]:void 0,s=C(getComputedStyle(this.Ie).fontSize);Q(this.Ie,this.Fe.el(),i,s)},this.Ue=()=>{si(this.Ie,"vjs-hidden")},this.Oe=()=>this.Re(),this.Fe=t,ci(t.el()),di(t.el()),this.Ie=h.createElement("span"),this.Ie.innerHTML=this.Fe.localize(i),this.Ie.className="theo-button-tooltip vjs-hidden",this.Ie.setAttribute("aria-hidden","true"),this.Fe.el().appendChild(this.Ie),this.Fe.on("mouseover",this.$e),this.Fe.on("mouseout",this.Ue),this.Fe.on("dispose",this.Oe)}},da=No.getComponent("Button"),fa=class extends(Oo(da)){get Ve(){const t=this.el().parentElement;return!!t&&null!==t.querySelector(".theo-mobile-menu-background")}get menu(){return this.Le}isMenuOpen(){return this.He}openMenu(){this.qe&&!this.He&&(this.Le.zs(),this.el().setAttribute("aria-expanded","true"),this.He=!0,this.Le.focus())}closeMenu(){this.qe&&this.He&&(this.Le.Ws(),this.el().setAttribute("aria-expanded","false"),this.He=!1)}set minimumMenuItems(t){this.ze=t,this.We()}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.He?this.closeMenu():this.openMenu()}enable(){return this.qe=!0,super.enable()}disable(){return this.closeMenu(),this.qe=!1,super.disable()}te(){this.Ie.Be=this.controlText()}dispose(){this.player().removeChild(this.Le),this.Le.dispose(),this.Ie.Re(),this.ws.removeEventListener("seeking",this.Ge),super.dispose()}constructor(t,i){super(t,i),this.He=!1,this.ze=1,this.qe=!0,this.Xe=t=>{const i=this.el().contains(t.target),s=this.Le.el().contains(t.target);let e=!1;var n;vi.Ys.Qs&&this.Ve&&(e=(null==(n=this.el().parentElement)?void 0:n.querySelector(".theo-mobile-menu-background"))===t.target);i||s||!this.He||(e&&t.preventDefault(),this.closeMenu())},this.Je=t=>{27===t.which&&(this.closeMenu(),this.focus())},this.Ge=()=>{this.He&&this.closeMenu()},this.We=()=>{this.Le.menuItems.length>=this.ze?this.show():(this.closeMenu(),this.hide())},this.Le=new ca(t,i,this),this.player().getChild("controlBarMenuContainer").addChild(this.Le),this.Ie=new la(this,this.controlText()),this.el().setAttribute("aria-haspopup","true"),vi.Ys.Qe?(this.on(h,"touchend",this.Xe),new Ko(this.el())):(this.on(h,"click",this.Xe),this.on(h,"keydown",this.Je),Si&&this.on(h,Si.Ye,this.closeMenu)),this.ws.addEventListener("seeking",this.Ge),this.on(this.Le,"menuchange",this.We),this.on(t,"languagechange",this.te),this.We()}},va=No.getComponent("Component"),pa=class extends(No.getComponent("ControlBar")){addMenuButton(t){t=z({playerOptions:this.h.playerOptions},t);const i=new fa(this.player(),t);return this.addChild(i),i}removeMenuButton(t){this.removeChild(t)}createEl(){const 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)}};No.registerComponent("THEOControlBarShadow",class extends va{createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-tertiary-color theo-control-bar-shadow"}}),f(),f();var ma=No.getComponent("VolumeBar"),ga=class extends ma{handleFocus(t){super.handleFocus(t),this.Ke.addClass("focus-within")}handleBlur(t){super.handleBlur(t),this.Ke.removeClass("focus-within")}constructor(t,i){super(t,i),this.Ke=i.Ze}};f();var ya=No.getComponent("VolumeControl"),ba=class extends ya{constructor(t,i){super(t,i),this.tn=new ga(t,{Ze:this}),this.addChild(this.tn)}};ba.prototype.h=z({},ya.prototype.h,{children:[]}),No.registerComponent("VolumeControl",ba);var ka=class extends(Oo(pa)){sn(){this.nn(this.rn())}hn(){0===this.an&&(this.an=u(this.un,100))}cn(t){"opacity"===t.propertyName&&(0!==this.an&&(c(this.an),this.an=0),this.nn(!0))}ln(t){"opacity"===t.propertyName&&(this.rn()||this.nn(!1))}rn(){return"0"!==s.getComputedStyle(this.el()).opacity}nn(t){this.dn!==t&&(this.dn=t,t?this.fn():this.ws.textTrackStyle.marginBottom=void 0)}fn(){const t=this.el().getBoundingClientRect().height;this.ws.textTrackStyle.marginBottom!==t&&(this.ws.textTrackStyle.marginBottom=t)}dispose(){c(this.an),this.an=0,this.pn.vn(pi.mn,this.gn),this.pn.yn(),super.dispose()}constructor(t,i){super(t,i),this.dn=!1,this.an=0,this.un=()=>{0!==this.an&&(this.an=0,this.nn(this.rn()))},this.gn=()=>{this.dn&&this.fn()},this.on(t,"ready",this.sn),this.on(t,"pause",this.sn),this.on(t,"useractive",this.sn),this.on(t,"firstplay",this.hn),this.on(t,"play",this.hn),this.on(t,"userinactive",this.hn),this.on("transitionstart",this.cn),this.on("transitionend",this.ln),this.pn=new wi(this.el()),this.pn.bn(pi.mn,this.gn),this.pn.kn(!0)}};ka.prototype.h=z({},pa.prototype.h,{children:["progressControl","playToggle","muteToggle","volumeControl","currentTimeDisplay","timeDivider","durationDisplay","liveDisplay","remainingTimeDisplay","customControlSpacer","activeQualityLabel","vrButton","descriptionsButton","subtitlesButton","chromecastButton","airplayButton","multiViewButton","audioTrackButton","SettingsButton","fullscreenToggle"]}),No.registerComponent("ControlBar",ka),f();var wa=class extends pa{buildCSSClass(){return"theo-top-controlbar "+super.buildCSSClass()}constructor(t,i){super(t,i),t.topControlBar=this}};wa.prototype.h=z({},pa.prototype.h,{children:[]}),No.registerComponent("TopControlBar",wa),f();var _a=No.getComponent("CurrentTimeDisplay"),xa=class extends(Oo(_a)){updateContent(){const t=Io(this.player()),i=this.ws,s=Do(i),e=this.localize("Current Time"),n=Uo(_.max(0,t-s),$o(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)}};No.registerComponent("CurrentTimeDisplay",xa),f();var Ca=No.getComponent("DurationDisplay"),Sa=class extends(Oo(Ca)){updateContent(){const t=this.ws,i=S(t.duration)?NaN:$o(t),s=t.clip.endTime-t.clip.startTime,e=_.min(i,s)||0;if(this.ct!==e){this.ct=e;const t=this.localize("Duration Time"),i=Uo(e);this.S.innerHTML='<span class="vjs-control-text">'+t+"</span> "+i}}dispose(){var t;null==(t=this.ws)||t.clip.removeEventListener("change",this.wn),super.dispose()}constructor(t,i){var s;super(t,i),this.wn=()=>this.updateContent(),this.off(t,"durationchange",this.updateContent),this.on(t,"durationchange",this.updateContent),this.off(t,"timeupdate",this.updateContent),this.on(t,"timeupdate",this.updateContent),this.off(t,"emptied",this.updateContent),this.on(t,"emptied",this.updateContent),null==(s=this.ws)||s.clip.addEventListener("change",this.wn)}};No.registerComponent("DurationDisplay",Sa),f();var ja=No.getComponent("Button"),Ta=class extends(Oo(ja)){buildCSSClass(){return"theo-live-control "+super.buildCSSClass()}createEl(){const t=super.createEl("button",{},{"aria-live":"off"});return this._n=No.createEl("span",{className:"theo-live-control-indicator"}),Kt(t,this._n),t}createControlTextEl(t){const i=super.createControlTextEl(t);return No.removeClass(i,"vjs-control-text"),No.addClass(i,"theo-live-control-text"),i}handleClick(){var t;const i=this.ws;if(void 0!==(null==(t=i.hesp)?void 0:t.manifest))i.hesp.goLive();else{const t=this.player();t.currentTime(Fo(i)),t.play()}}xn(){Bo(this.ws)?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),vi.Ys.Qe&&new Ko(this.el())}};No.registerComponent("LiveDisplay",Ta),f();var Ma=No.getComponent("LoadingSpinner");No.registerComponent("LoadingSpinner",class extends Ma{buildCSSClass(){return"theo-secondary-color vjs-loading-spinner "+super.buildCSSClass()}createEl(){const t=super.createEl();t.className=this.buildCSSClass();const i=No.createEl("div",{className:"theo-loading-spinner-rotator"}),s=No.createEl("div",{className:"theo-loading-spinner-circle-left"}),e=No.createEl("div",{className:"theo-loading-spinner-circle-right"});return i.appendChild(s),i.appendChild(e),t.appendChild(i),t}constructor(t,i){super(t,i)}}),f();var Aa=No.getComponent("LoadProgressBar"),Pa=class extends(Oo(Aa)){update(){const t=this.ws,i=Wt.Cn(Ro(t)),s=i.Sn(0),e=Wt.Cn(t.buffered).jn(i),n=i.Tn(0)-s;let r=e.V&&e.Tn(e.V-1)||0;r=_.max(0,r-s);const o=this.el(),a=this.Mn;o.style.width=Na(r,n);for(let t=0;t<e.V;t++){const i=e.Sn(t),n=e.Tn(t);let u=a[t];u||(u=h.createElement("div"),a.push(u),o.appendChild(u)),u.style.left=Na(i-s,r),u.style.width=Na(n-i,r)}for(let t=a.length;t>e.V;t--)o.removeChild(a[t-1]);a.length=e.V}constructor(t,i){super(t,i),this.Mn=[],this.on(t,"emptied",this.update)}};function Na(t,i){const s=t/i||0;return 100*(s>=1?1:s)+"%"}No.registerComponent("LoadProgressBar",Pa),f();var Ea=No.getComponent("MouseTimeDisplay"),Ba=class extends(Oo(Ea)){handleMouseMove(t){const i=t,s=this.ws,e=Do(s)+this.calculateDistance(i)*$o(s),n=i.pageX-X(this.el().parentNode).left;this.update(e,n+"px")}handleTouchMove(t){const i=t,s=this.ws,e=Do(s)+this.calculateDistance(i)*$o(s),n=i.touches[0].pageX-X(this.el().parentNode).left;this.update(e,n+"px")}createEl(){const t=super.createEl();return this.An=No.createEl("span",{className:"theo-time-tooltip-text"}),t}update(t,i){this.Pn=t;const s=this.Nn(t);this.el().style.left=i,this.el().setAttribute("data-current-time",s),this.keepTooltipsInside&&(d(this.An,s),this.En())}En(){if(this.keepTooltipsInside&&this.tooltip.offsetParent){const t=this.player().contentEl(),i=t.getClientRects(),s=i.length>0?i[0]:void 0,e=C(getComputedStyle(t).fontSize);Q(this.tooltip,this.el(),s,e)}}Nn(t){const i=this.ws,s=t-Fo(i);return Uo(Bo(i)?_.min(s,0):s,$o(i))}dispose(){var t;this.ws.removeEventListener("dimensionchange",this.Bn),null==(t=this.ws.presentation)||t.removeEventListener(Ai.MODE_CHANGE,this.Bn),super.dispose()}constructor(t,i){var s;(super(t,i),this.Pn=NaN,this.Bn=()=>{const t=Io(this.player()),i=this.ws;let s=(t-Do(i))/$o(i)||0;s=Ci(s,0,1),this.update(t,100*s+"%")},this.keepTooltipsInside&&(No.addClass(this.tooltip,"theo-secondary-color"),this.tooltip.appendChild(this.An)),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"mouseenter",this.handleMouseMove)})),Dt.Qs)&&(this.on(t,"firstplay",this.Bn),this.on(t,"play",this.Bn),this.on(t,"seeking",this.Bn),this.on(t,"seeked",this.Bn),this.on(t,"timeupdate",this.Bn),this.ws.addEventListener("dimensionchange",this.Bn),null==(s=this.ws.presentation)||s.addEventListener(Ai.MODE_CHANGE,this.Bn),this.on(t,"ready",(()=>{this.on(t.controlBar.progressControl,"touchstart",this.handleTouchMove),this.on(t.controlBar.progressControl,"touchmove",yi((t=>this.handleTouchMove(t)),25)),this.Bn()})))}};No.registerComponent("MouseTimeDisplay",Ba),f();var Ia=No.getComponent("PlayProgressBar"),Fa=class extends(Oo(Ia)){updateDataAttr(){const t=Io(this.player());this.el().setAttribute("data-current-time",this.Nn(t))}Nn(t){const i=this.ws;return Uo(t-Fo(i),$o(i))}createEl(){const 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)}};No.registerComponent("PlayProgressBar",Fa),f();var Da=No.getComponent("RemainingTimeDisplay"),$a=class extends(Oo(Da)){updateContent(){const t=this.ws,i=$o(t);if(i){const s=Ro(t).end(0),e=this.localize("Remaining Time"),n=Uo(_.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)}};No.registerComponent("RemainingTimeDisplay",$a),f(),f();var Ra=class{get ws(){var t;return null!=(t=this._s)?t:this._s=Vo(this.In)}Fn(){const t=this.Dn;if(!t)return;const i=this.ws;if(0===i.seekable.length)return;const s=t.cues.slice();this.Rn.$n(s);for(let t=0;t<s.length;t++){const e=s[t],n=s[t+1],r=!n||e.endTime!==n.startTime,h=new Ua(e,i,r);this.Un.push(h),this.On.appendChild(h.we)}}Vn(){this.ws.addEventListener("loadedmetadata",this.Ln),this.ws.addEventListener("loadeddata",this.Ln),this.ws.addEventListener("sourcechange",this.Ln),this.ws.addEventListener("durationchange",this.Hn),this.ws.clip.addEventListener("change",this.Hn),this.ws.textTracks.addEventListener("addtrack",this.qn),this.ws.textTracks.addEventListener("removetrack",this.zn),this.ws.textTracks.addEventListener("change",this.Ln)}Wn(){this.ws.removeEventListener("loadedmetadata",this.Ln),this.ws.removeEventListener("loadeddata",this.Ln),this.ws.removeEventListener("sourcechange",this.Ln),this.ws.removeEventListener("durationchange",this.Hn),this.ws.clip.removeEventListener("change",this.Hn),this.ws.textTracks.removeEventListener("addtrack",this.qn),this.ws.textTracks.removeEventListener("removetrack",this.zn),this.ws.textTracks.removeEventListener("change",this.Ln)}Gn(){if(!(this.ws.readyState<Et.Xn))for(const t of this.ws.textTracks)if(t.kind===jt.Jn&&t.mode===Ct.Qn&&t.cues.length>0&&t.readyState!==kt.ERROR)return t}Yn(t){const i=this.Dn;t!==i&&(i&&(this.Kn(),i.removeEventListener("cuechange",this.Zn)),this.Dn=t,t&&(t.addEventListener("cuechange",this.Zn),this.Hn()))}tr(t){this.Rn.ir(t)}sr(){this.Rn.ge()}er(){this.Rn.be()}Kn(){for(const t of this.Un)t.Re();this.Rn.nr(),this.Un=[],this.rr=void 0}Re(){this.Wn(),this.hr.removeEventListener("mousemove",this.ar),this.hr.removeEventListener("mouseenter",this.ur),this.hr.removeEventListener("mouseleave",this.cr),this.Yn(void 0),this.Rn.Re(),this._s=void 0}constructor(t,i){this.In=i,this.Un=[],this._s=void 0,this.Ln=()=>{this.Yn(this.Gn())},this.qn=t=>{const i=t.track;i.kind===jt.Jn&&(i.addEventListener("addcue",this.Ln),i.addEventListener("removecue",this.Ln),i.addEventListener("readystatechange",this.Ln)),this.Ln()},this.zn=t=>{const i=t.track;i.kind===jt.Jn&&(i.removeEventListener("addcue",this.Ln),i.removeEventListener("removecue",this.Ln),i.removeEventListener("readystatechange",this.Ln)),this.Ln()},this.ar=t=>{const i=this.ws,s=function(t,i){const s=X(t),e=t.offsetWidth,n=t.offsetHeight,r=s.top,h=s.left;let o,a;!function(t){return void 0!==t.changedTouches}(i)?(a=i.pageX,o=i.pageY):(a=i.changedTouches[0].pageX,o=i.changedTouches[0].pageY);const u=Ci((r-o+n)/n,0,1),c=Ci((a-h)/e,0,1);return{x:c,y:u}}(this.On,t);let e=Do(i)+s.x*$o(i);e===i.duration&&(e-=.1),this.tr(e)},this.cr=()=>{this.Rn.be()},this.ur=()=>{this.Rn.ge()},this.Hn=()=>{this.Dn&&(this.Kn(),this.Fn(),this.Zn())},this.Zn=()=>{var t,i,s;const e=null==(i=this.Dn)||null==(t=i.activeCues)?void 0:t[0],n=Pi(this.Un,(t=>t.lr===e));n!==this.rr&&(null==(s=this.rr)||s.dr(),this.rr=n,null==n||n.pr())},this.hr=t,this.Rn=new Oa,this.In.contentEl().appendChild(this.Rn.we),this.On=h.createElement("div"),si(this.On,"theoplayer-chapterbar"),this.hr.appendChild(this.On),this.hr.addEventListener("mousemove",this.ar),this.hr.addEventListener("mouseenter",this.ur),this.hr.addEventListener("mouseleave",this.cr),this.Vn()}},Ua=class{get we(){return this.Vs}pr(){si(this.Vs,"theoplayer-chapter-indicator-active")}dr(){ni(this.Vs,"theoplayer-chapter-indicator-active")}mr(t,i){const s=t.seekable.start(0),e=t.seekable.end(t.seekable.length-1),n=e-s,r=this.lr.startTime,o=this.lr.endTime,a=o>=s&&r<=e,u=Ci(r-s,0,n),c=Ci(o-s,0,n),l=_.max(0,c-u),d=h.createElement("div");si(d,"theoplayer-chapter-indicator");const f=h.createElement("div");si(f,"theoplayer-chapter-indicator-highlight"),d.appendChild(f),i&&si(d,"theoplayer-chapter-indicator-discontinuous");const v=u/n*100,p=l/n*100;return d.style.display=a?"":"none",d.style.width=p+"%",d.style.left=v+"%",d}Re(){Qt(this.Vs)}constructor(t,i,s){this.lr=t,this.Vs=this.mr(i,s)}},Oa=class{be(){this.gr--,0===this.gr&&ni(this.we,"theoplayer-chapter-hovering")}$n(t){this.yr=t||[],this.yr.length>0&&(this.we.style.display="")}br(t){d(this.kr,t.content)}nr(){this.yr=[],d(this.kr,""),this.we.style.display="none"}ge(){this.gr++,this.gr>0&&si(this.we,"theoplayer-chapter-hovering")}ir(t){for(const i of this.yr)if(Va(i,t)){this.br(i);break}}Re(){Qt(this.we)}constructor(){this.yr=[],this.gr=0,this.we=h.createElement("div"),si(this.we,"theoplayer-chaptertitle"),this.we.style.display="none",this.kr=h.createElement("p"),this.we.appendChild(this.kr)}};function Va(t,i){return new Wt([t.startTime,t.endTime]).wr(i)}var La=No.getComponent("SeekBar"),Ha=class extends(Oo(La)){updateAriaAttributes(t){const i=Io(this.player()),s=this.ws;t.setAttribute("aria-valuenow",(100*this._r(i)).toFixed(2)),t.setAttribute("aria-valuetext",Uo(i-Fo(s),$o(s)))}getPercent(){return this._r(this.player().currentTime())}handleMouseMove(t){if(this.ws&&this.ws.ads&&this.ws.ads.playing)return;const i=this.ws;let s=Do(i)+this.calculateDistance(t)*$o(i);s>=i.duration&&(s=i.duration-.1),this.On.tr(s),this.player().currentTime(s)}handleMouseDown(t){this.playingStates.push(!this.player().paused()),this.On.sr(),super.handleMouseDown(t)}handleMouseUp(t){this.videoWasPlaying=Boolean(this.playingStates.pop()),this.On.er(),super.handleMouseUp(t)}_r(t){const i=this.ws,s=(t-Do(i))/$o(i);return Ci(s,0,1)}dispose(){this.On.Re(),B(this.playingStates)}constructor(t,i){super(t,i),this.playingStates=[],this.on(t,"emptied",this.update),this.on(t,"seeking",this.update),this.On=new Ra(this.el(),t)}};No.registerComponent("SeekBar",Ha),f();var qa=No.getComponent("ProgressControl");vi.Ys.Qs&&No.registerComponent("ProgressControl",class extends qa{createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(t){this.seekBar.handleMouseMove(t)}handleMouseDown(t){this.seekBar.handleMouseDown(t)}constructor(t,i){super(t,i),this.on(this,"touchmove",this.handleMouseMove),this.on("touchstart",this.handleMouseDown),this.seekBar.off(["touchmove","touchstart"])}}),f();var za=No.getComponent("TooltipProgressBar"),Wa=class extends(Oo(za)){updateDataAttr(){const t=Io(this.player()),i=this.Nn(t);this.el().setAttribute("data-current-time",i),this.tooltip.innerHTML=i}Nn(t){const i=this.ws;return Uo(t-Fo(i),$o(i))}createEl(){const 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 Ga(t){for(const i of t)if(i.enabled)return i}function Xa(t){if(t)return t.label&&""!==t.label?{name:t.label,hd:!1}:{name:Ja(t),description:Qa(t),hd:!!t.height&&t.height>=720}}function Ja(t){return t.height?t.height+"p":t.bandwidth?Qa(t):""}function Qa(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":""}No.registerComponent("TooltipProgressBar",Wa),f(),f(),f(),f(),f();var Ya=class{get Cr(){return this.Sr}set Cr(t){const i=this.Sr;for(let s=i.length-1;s>=0;s--){const e=i[s];N(t,e)||this.jr(e)}for(const i of t)this.Tr(i);this.Mr.re()}get Ar(){return this.Mr.menuItems}Pr(t){const i=this.Ar;if(i)for(const s of i)if(s.Nr===t)return s}Er(t){const i=this.Mr.addMenuItem();return i.Nr=t,i.on("click",(()=>this.Br(i))),i.el().setAttribute("role","menuitemradio"),i}Ir(t){t.dispose()}Fr(t){return!0}Tr(t){if(this.Fr(t)){N(this.Sr,t)||this.Sr.push(t);const i=this.Pr(t)||this.Er(t);return this.Dr(i),i}this.jr(t)}jr(t){const i=this.Pr(t);i&&(this.Mr.removeMenuItem(i),this.Ir(i)),A(this.Sr,t)}Re(){const t=[];for(const i of this.Sr)t.push(i);for(const i of t)this.jr(i);B(t)}constructor(t){this.Sr=[],this.Mr=t}},Ka=class extends Ya{$r(){return this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",d(this.Rr,this.Ur.localize("Quality")),this.Rr}Or(){return this.Vr=h.createElement("span"),this.Vr.className="theo-settings-control-menu-quality-automatic",d(this.Vr,this.Ur.localize("Automatic")),this.Vr}Lr(){return this.Hr=h.createElement("span"),d(this.Hr,this.Ur.localize("Automatic")),this.Hr}qr(){return this.zr=h.createElement("span"),this.zr.className="theo-primary-color theo-settings-control-menu-item-hd-label",d(this.zr,this.Ur.localize("HD")),this.zr}Wr(){const t=h.createElement("span");t.className="theo-primary-color theo-settings-control-menu-item-value",t.appendChild(this.Vr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.Hr),t.appendChild(h.createTextNode(" ")),t.appendChild(this.zr),this.Gr.el().appendChild(this.Rr),this.Gr.el().appendChild(t),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video quality settings menu"))}Xr(){const t=this.Jr,i=t&&ru(t.targetQuality),s=t&&t.activeQuality,e=Xa(this.Qr(i||s))||{name:this.Ur.localize("Automatic")};d(this.Hr,e.name),hi(this.Vr,"vjs-hidden",Boolean(i)),hi(this.zr,"vjs-hidden",!e.hd)}Dr(t){const i=Xa(t.Nr)||{name:this.Ur.localize("Automatic")};let s=i.name;i.hd&&(s+='<span class="theo-primary-color theo-settings-control-menu-item-hd-label">'+this.Ur.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.Ur.localize("Set video quality to ")+i.name),t.Nr?t.selected(t.Nr===this.Yr):t.selected(!this.Yr)}Br(t){this.Jr&&(this.Jr.targetQuality=t.Nr&&t.Nr.videoQualities)}Qr(t,i){const s=i||this.Cr;for(const i of s)if(t&&i&&-1!==i.videoQualities.indexOf(t))return i}Re(){this._s.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.Kr),this.Ur.off("languagechange",this.te),this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr.removeEventListener("targetqualitychanged",this.th),this.Jr.removeEventListener("update",this.ih)),super.Re()}constructor(t,i,s){super(t.subMenu),this.Jr=void 0,this.Yr=void 0,this.Kr=()=>{const t=Ga(this._s.videoTracks);if(t===this.Jr)return;let i=[];if(this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr.removeEventListener("targetqualitychanged",this.th),this.Jr.removeEventListener("update",this.ih)),this.Jr=t,t){t.addEventListener("activequalitychanged",this.Zr),t.addEventListener("targetqualitychanged",this.th),t.addEventListener("update",this.ih);const s=tu(eu(t.qualities.filter((t=>t.available))));i=s.length>1?[void 0,...s]:[void 0]}this.Cr=i,this.th(),this.Zr()},this.ih=t=>{const i=t.track;if(i!==this.Jr)return;const s=tu(eu(i.qualities.filter((t=>t.available)))),e=i&&ru(i.targetQuality);let n;this.Yr=this.Qr(e,s),n=s.length>1?[void 0,...s]:[void 0],this.Cr=n,this.Xr()},this.Zr=()=>{this.Tr(void 0),this.Xr()},this.th=()=>{const t=Ga(this._s.videoTracks),i=t&&ru(t.targetQuality),s=this.Qr(i),e=this.Yr;s!==e&&(this.Yr=s,s&&e||this.Tr(void 0),e&&N(this.Cr,e)&&this.Tr(e),i&&this.Tr(s),this.Xr())},this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Quality")),d(this.Rr,this.Ur.localize("Quality")),d(this.Vr,this.Ur.localize("Automatic")),d(this.Hr,this.Ur.localize("Automatic")),d(this.zr,this.Ur.localize("HD")),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video quality settings menu"));for(const t of this.Ar)this.Dr(t);this.Xr()},this.Gr=t,this._s=i,this.Ur=s,this.Rr=this.$r(),this.Vr=this.Or(),this.Hr=this.Lr(),this.zr=this.qr(),this.Wr(),d(this.Mr.menuHeader.el(),this.Ur.localize("Quality")),this.Cr=[void 0],this._s.videoTracks.addEventListener(["addtrack","removetrack","change"],this.Kr),this.Ur.on("languagechange",this.te),this.Kr()}},Za=class{get height(){return this.sh[0].height}get bandwidth(){return this.sh[0].bandwidth}get videoQualities(){return this.sh}get label(){return this.sh[0].label}add(t){this.sh.push(t)}constructor(t){this.sh=t}};function tu(t){const i=[];for(const s of t){const t=s;let e=!1;for(const s of i)if(nu(s,t)){s.add(t),e=!0;break}e||i.push(new Za([t]))}return i}function iu(t,i){return t&&i?Mi(t,i):ji.eh}function su(t,i){return t===i?ji.eh:iu(t.height,i.height)||iu(t.width,i.width)||iu(t.bandwidth,i.bandwidth)}function eu(t){return _i(t,su).reverse()}function nu(t,i){return t.label&&i.label&&t.label===i.label||ct(Xa(t),Xa(i))}function ru(t){return Lt(t)?1===t.length?t[0]:void 0:t}function hu(t){return 1===t?"Normal":""+_.round(100*t)/100}f();var ou=class extends Ya{$r(){return this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",d(this.Rr,this.Ur.localize("Speed")),this.Rr}Wr(){const t=h.createElement("span");return t.className="theo-primary-color theo-settings-control-menu-item-value",this.Gr.el().appendChild(this.Rr),this.Gr.el().appendChild(t),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video speed settings menu")),t}Er(t){const i=super.Er(t);return this.Dr(i),i}Dr(t){const i=t.Nr,s=this.Ur.localize(hu(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Ur.localize("Set video speed to ")+s),t.selected(t.Nr===this._s.playbackRate)}Br(t){this._s.playbackRate=t.Nr}Re(){this._s.removeEventListener("ratechange",this.nh),this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.rh=void 0,this.nh=()=>{this.rh&&this.Tr(this.rh);const t=this._s.playbackRate;this.rh=t,d(this.hh,this.Ur.localize(hu(t))),t&&this.Tr(t)},this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Speed")),d(this.Rr,this.Ur.localize("Speed")),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the video speed settings menu"));for(const t of this.Ar)this.Dr(t);this.nh()},this.Gr=t,this._s=i,this.Ur=s,this.Rr=this.$r(),this.hh=this.Wr(),d(this.Mr.menuHeader.el(),this.Ur.localize("Speed")),this.Cr=e,this._s.addEventListener("ratechange",this.nh),this.Ur.on("languagechange",this.te),this.nh()}};No.registerComponent("SettingsButton",class extends fa{createEl(){const t=super.createEl();return this.oh=No.createEl("span",{className:"theo-settings-control-label-hd theo-primary-background"}),d(this.oh,this.localize("HD")),t.appendChild(this.oh),t}buildCSSClass(){return"vjs-icon-cog theo-settings-control-button "+super.buildCSSClass()}te(){super.te(),d(this.oh,this.localize("HD")),d(this.menu.menuHeader.el(),this.localize("Settings"))}dispose(){this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr=void 0),this.ws.videoTracks.removeEventListener(["addtrack","removetrack","change"],this.ah),this.uh.Re(),this.lh.Re(),super.dispose()}constructor(t,i){var s,e;super(t,i),this.Jr=void 0,this.ah=()=>{const t=Ga(this.ws.videoTracks);t!==this.Jr&&(this.Jr&&this.Jr.removeEventListener("activequalitychanged",this.Zr),this.Jr=t,t&&t.addEventListener("activequalitychanged",this.Zr),this.Zr())},this.Zr=()=>{var t;const i=null==(t=this.Jr)?void 0:t.activeQuality,s=Boolean(i&&i.height>=720);this.player().toggleClass("theo-hd",s)},si(this.menu.el(),"theo-settings-control-menu"),d(this.menu.menuHeader.el(),t.localize("Settings")),this.controlText("Settings"),this.Ie.Be=this.controlText(),this.dh=this.menu.addSubMenuItem({name:"QualityMenuItem"}),this.uh=new Ka(this.dh,this.ws,t);const n=null!=(e=null==i||null==(s=i.playerOptions)?void 0:s.playbackRates)?e:[];this.fh=this.menu.addSubMenuItem({name:"PlaybackRateMenuItem"}),this.lh=new ou(this.fh,this.ws,t,n),this.ws.videoTracks.addEventListener(["addtrack","removetrack","change"],this.ah),this.ah()}}),f(),f(),f();var au=class extends Ya{ph(t){const i=t.label;if(i)return i;const s=t.language;if(s){const t=St(s);if(t)return t.mh}return s||""}gh(){this.Cr=this.yh}Re(){this.yh.removeEventListener("addtrack",this.bh),this.yh.removeEventListener("removetrack",this.kh),this.yh.removeEventListener("change",this.wh),super.Re()}constructor(t,i){super(t),this.bh=t=>{const i=t.track;this.Tr(i),i.addEventListener("update",this._h)},this.kh=t=>{const i=t.track;this.jr(i),i.removeEventListener("update",this._h)},this.wh=t=>this.gh(),this._h=()=>{for(const t of this.Cr)this.Tr(t)},this.yh=i,this.yh.addEventListener("addtrack",this.bh),this.yh.addEventListener("removetrack",this.kh),this.yh.addEventListener("change",this.wh),this.gh()}},uu=class extends au{Dr(t){const i=t.Nr,s=this.Ur.localize(this.ph(i));d(t.el(),s),t.el().setAttribute("aria-label",this.Ur.localize("Set the audio language to")+" "+s),t.selected(i.enabled)}Br(t){const i=t.Nr;for(const t of this.ws.audioTracks)t!==i&&(t.enabled=!1);i.enabled=!0}Re(){this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.audioTracks),this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Language"));for(const t of this.Ar)this.Dr(t)},this.ws=i,this.Ur=s,d(this.Mr.menuHeader.el(),this.Ur.localize("Language")),this.Ur.on("languagechange",this.te)}};No.registerComponent("audioTrackButton",class extends fa{buildCSSClass(){return"vjs-icon-audio theo-audio-track-control-button "+super.buildCSSClass()}dispose(){this.xh.Re(),super.dispose()}constructor(t,i){super(t,i),this.minimumMenuItems=2,this.xh=new uu(this.menu,this.ws,t),this.controlText("Language"),this.Ie.Be=this.controlText()}}),f(),f();var cu=class extends au{Fr(t){return!!super.Fr(t)&&(!t.forced&&At(t.kind))}Er(t){const i=super.Er(t);si(i.el(),"theo-text-track-menu-item");const s=h.createElement("span");i.Ch=s;const e=h.createElement("div");e.className="theo-text-track-menu-item-toggle",i.Sh=e;const n=t=>this.jh(t,i);i.Th=n,e.addEventListener("click",n);const 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}Dr(t){const i=t,s=i.Nr,e=this.Ur.localize(this.ph(s));d(i.Ch,e),i.el().setAttribute("aria-label",this.Ur.localize("Set the subtitle language to")+" "+e),i.el().setAttribute("role","menuitemcheckbox"),i.selected(s.mode===Ct.Qn)}Ir(t){const i=t;i.Sh.removeEventListener("click",i.Th),super.Ir(t)}Br(t){const i=t.Nr;for(const t of this.ws.textTracks)t!==i&&T(t.kind,i.kind)&&(t.mode=Ct.Mh);i.mode!==Ct.Qn?i.mode=Ct.Qn:i.mode=Ct.Mh}jh(t,i){t.stopImmediatePropagation(),this.Br(i)}Re(){this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s){super(t,i.textTracks),this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Subtitles"));for(const t of this.Ar)this.Dr(t)},this.ws=i,this.Ur=s,d(this.Mr.menuHeader.el(),s.localize("Subtitles")),this.Ur.on("languagechange",this.te)}};No.registerComponent("subtitlesButton",class extends fa{buildCSSClass(){return"vjs-icon-subtitles theo-text-track-control-button "+super.buildCSSClass()}dispose(){this.xh.Re(),super.dispose()}constructor(t,i){super(t,i),this.xh=new cu(this.menu,this.ws,t),this.controlText("Subtitles"),this.Ie.Be=this.controlText()}}),f();var lu=No.getComponent("playToggle"),du=class extends(Oo(lu)){handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t)}handlePlay(t){super.handlePlay(t),this.controlText("Pause"),this.Ie.Be=this.controlText()}handlePause(t){this.ws.ended||(super.handlePause(t),this.controlText("Play"),this.Ie.Be=this.controlText())}te(){this.Ie.Be=this.controlText()}dispose(){this.Ie.Re(),this.ws.removeEventListener("ended",this.Ah),super.dispose()}constructor(t,i){super(t,i),this.Ah=()=>{this.controlText("Replay"),this.Ie.Be=this.controlText()},this.controlText("Play"),this.Ie=new la(this,this.controlText()),this.ws.addEventListener("ended",this.Ah),this.on(t,"languagechange",this.te),vi.Ys.Qe&&new Ko(this.el())}};No.registerComponent("playToggle",du),f();var fu=No.getComponent("fullscreenToggle"),vu=class extends(Oo(fu)){handleClick(t){this.ws.prepareWithUserAction(),super.handleClick(t)}handleFullscreenChange(t){super.handleFullscreenChange(t),this.updateContent()}updateContent(){const t=this.player().isFullscreen()?"Exit fullscreen":"Fullscreen";this.controlText(t),this.Ie.Be=this.controlText()}dispose(){this.Ie.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Fullscreen"),this.Ie=new la(this,this.controlText()),vi.Ys.Qe&&new Ko(this.el()),this.on(t,"languagechange",this.updateContent)}};No.registerComponent("fullscreenToggle",vu),f();var pu=No.getComponent("muteToggle"),mu=class extends(Oo(pu)){handleClick(t){this.ws.muted&&!this.ws.paused&&this.ws.prepareWithUserAction(),super.handleClick(t)}update(t){super.update(t),this.te()}te(){const t=this.player().muted()?"Unmute":"Mute";this.controlText(t),this.Ie.Be=this.controlText()}dispose(){this.Ie.Re(),super.dispose()}constructor(t,i){super(t,i),this.controlText("Mute"),this.Ie=new la(this,this.controlText()),vi.Ys.Qe&&new Ko(this.el()),this.on(t,"languagechange",this.te),U&&(this.removeClass("vjs-hidden"),this.on(t,"loadstart",(()=>{this.removeClass("vjs-hidden")})))}};No.registerComponent("muteToggle",mu),f();var gu=No.getComponent("BigPlayButton"),yu="theo-play-svg-circle",bu='<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="'+yu+'" 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>',ku=class extends(Oo(gu)){createEl(){const t=super.createEl(),i=No.createEl("div",{className:"theo-big-play-button-svg-container"});return i.innerHTML=bu,t.appendChild(i),t}buildCSSClass(){return"theo-primary-color "+super.buildCSSClass()}handleClick(t){this.ws.muted||this.ws.prepareWithUserAction(),super.handleClick(t),void 0!==this.ws.vr&&"unavailable"!==this.ws.vr.state&&(this.ws.vr.useDeviceMotionControls=!0)}};No.registerComponent("BigPlayButton",ku),f();var wu=/^([^#]*)#xywh=(\d+),(\d+),(\d+),(\d+)\s*$/;No.registerComponent("MouseTimeDisplay",class extends Ba{Ph(t){const i=t.track;"metadata"===i.kind&&"thumbnails"===i.label&&void 0===this.Nh&&(this.Nh=i,this.Eh=i.src?vi.Bh(i.src).href:void 0,this.Nh.addEventListener(["addcue","removecue"],this.Ih),this.Fh())}Dh(t){t.track===this.Nh&&this.$h()}createEl(){const t=super.createEl();return this.Rh=No.createEl("img",{className:"theo-time-tooltip-thumbnail"}),this.Uh=No.createEl("canvas",{className:"theo-time-tooltip-thumbnail"}),t}update(t,i){super.update(t,i),this.keepTooltipsInside&&this.Oh(t)}Oh(t){let i;if(this.Nh&&this.Nh.cues){const s=function(t,i){let s=t[0];for(const e of t)if(e.startTime<=i)s=e;else if(i>=e.endTime)return s;return s}(this.Nh.cues,t);i=s&&s.content}if(i===this.Vh)return;if(this.Vh=i,No.toggleClass(this.el(),"theo-time-tooltip-has-thumbnail",Boolean(i)),!i)return void this.Lh();const s=i.match(wu);if(s){let[,t,i,e,n,r]=s;t=this.Hh(t);const h={qh:Number(i),zh:Number(e),ji:Number(n),Ti:Number(r)};this.Wh(t,h)}else{const t=this.Hh(i);this.Wh(t)}}Fh(){S(this.Pn)||this.Oh(this.Pn)}Hh(t){return this.Nh&&this.Eh?vi.Bh(t,this.Eh).href:t}Wh(t,i){this.Rh&&(this.Rh.src!==t?(this.Rh.onload=()=>{this.Gh(i)},this.Rh.src="",this.Rh.src=t):this.Gh(i))}Gh(t){if(!this.Uh||!this.Rh)return;const i=this.Uh.getContext("2d");i&&(null!=t||(t={qh:0,zh:0,ji:this.Rh.naturalWidth,Ti:this.Rh.naturalHeight}),this.Uh.width=t.ji,this.Uh.height=t.Ti,i.drawImage(this.Rh,t.qh,t.zh,t.ji,t.Ti,0,0,t.ji,t.Ti),this.Xh(this.Uh))}Xh(t){this.Jh||(Kt(this.tooltip,t),this.Jh=t),this.En()}Lh(){this.Jh&&(this.tooltip.removeChild(this.Jh),this.Jh=void 0,this.En())}$h(){void 0!==this.Nh&&(this.Nh.removeEventListener(["addcue","removecue"],this.Ih),this.Nh=void 0),this.Eh=void 0,this.Lh(),this.Vh=void 0}dispose(){this.$h(),super.dispose()}constructor(t,i){super(t,i),this.Jh=void 0,this.Nh=void 0,this.Eh=void 0,this.Qh=t=>this.Ph(t),this.Yh=t=>this.Dh(t),this.Ih=t=>this.Fh(),this.showThumbnails=()=>{this.Jh&&this.Jh.hidden&&(this.Jh.hidden=!1,this.En())},this.hideThumbnails=()=>{!this.Jh||this.Jh.hidden||this.player().scrubbing()||(this.Jh.hidden=!0,this.En())},this.on(this.player().textTracks(),"addtrack",this.Qh),this.on(this.player().textTracks(),"removetrack",this.Yh),Dt.Qs&&(this.on(t,"seeking",this.showThumbnails),this.on(t,"seeked",this.hideThumbnails))}}),f();var _u=No.getComponent("VolumeLevel");No.registerComponent("VolumeLevel",class extends _u{createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-primary-color vjs-volume-level "+super.buildCSSClass()}}),f(),f();var xu=No.getComponent("Component"),Cu=class extends xu{createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-menu-container "+super.buildCSSClass()}};Cu.prototype.h=z({},Cu.prototype.h,{children:[]}),No.registerComponent("controlBarMenuContainer",Cu);var Su=No.getComponent("Player"),ju=class extends Su{dispose(){const t=this.el(),i=this.contentEl(),s=t.parentNode,e=t.nextSibling;super.dispose(),Qt(i),this.Ci&&s&&(e?s.insertBefore(t,e):s.appendChild(t)),h.body.removeEventListener("keydown",this.handleKeyPress),h.body.removeEventListener("click",this.handleClick)}constructor(t,i,s){super(t,i,s),this.handleKeyPress=t=>{9===t.which&&this.addClass("theo-probably-keyboard-focus")},this.handleClick=t=>{0===t.x&&0===t.y||this.removeClass("theo-probably-keyboard-focus")},h.body.addEventListener("keydown",this.handleKeyPress),h.body.addEventListener("click",this.handleClick)}};ju.prototype.h=z({},Su.prototype.h,{children:["bigPlayButton","AdControlPanel","TopControlBar","mediaLoader","upNextContainer","posterImage","chromecastOverlay","upcomingAdNotificationText","controlBarMenuContainer","controlBar","textTrackDisplay","loadingSpinner","errorDisplay","textTrackSettings","xrCompass"]}),No.registerComponent("Player",ju),f(),f();var Tu=No.getComponent("Player"),Mu=Tu.prototype.es;Tu.prototype.es=function(t){if(!(this.H&&this.H.$s&&this.H.$s()))return Mu.call(this,t)};var Au=Tu.prototype.createEl;function Pu(t,i,e,n){const r=z({controls:!0,playbackRates:[.25,.5,1,1.25,1.5,2]},e);r.controlBar=z({progressControl:{keepTooltipsInside:!0}},r.controlBar);const h=r.techOrder||(r.techOrder=[]);-1===h.indexOf("THEOplayer")&&h.unshift("THEOplayer");(r.theoplayer||(r.theoplayer={})).player=t,e&&zt(e.language)&&(r.languages=z({},r.languages,{[xt]:e.language}),r.language=xt),i.setAttribute("data-vjs-player","");const o=i.getAttribute("style"),a=No(t.element,r,n);return a.ready((()=>{Lo(a),function(t,i){if(i){if(i.ads){const s=i=>{const s="adbreakbegin"===i.type,e=i.adBreak.integration===Tt.Kh;zo(t,s,e)};i.ads.addEventListener("adbreakbegin",s),i.ads.addEventListener("adbreakend",s)}if(i.uplynk){var s;const e=i=>{const s="adbreakbegin"===i.type;zo(t,s,!1)};null==(s=i.uplynk)||s.ads.adBreaks.addEventListener("addadbreak",(t=>{t.adBreak.addEventListener("adbreakbegin",e),t.adBreak.addEventListener("adbreakend",e)}))}i.addEventListener("sourcechange",(()=>{zo(t,!1,!1)}))}}(a,t),function(t){t.on("mouseleave",Wo)}(a)})),i.removeAttribute("data-vjs-player"),o?i.setAttribute("style",o):i.removeAttribute("style"),vi.Ys.Qs&&(si(i,"theo-mobile"),function(t){const i=s.outerHeight,e=s.outerWidth,n=i>e;n?(ni(t,"theo-mobile-landscape"),si(t,"theo-mobile-portrait")):(ni(t,"theo-mobile-portrait"),si(t,"theo-mobile-landscape"))}(i)),function(t){t.on("seeking",(()=>{ti(t.el(),"vjs-ended")&&t.currentTime()!==t.duration()&&t.play()}))}(a),a}Tu.prototype.createEl=function(){const t=Au.call(this),i=No.createEl("div");for(i.className="theo-player-wrapper";t.firstChild;)i.appendChild(t.firstChild);return t.appendChild(i),this.S=i,t},f(),f(),f(),f();var Nu=No.getComponent("Button");var Eu="THEOPiPCloseButton";No.registerComponent(Eu,class extends Nu{buildCSSClass(){return"theo-close-button theo-pip-close"}handleClick(){this.io.Zh()}constructor(t,i){if(super(t,i),this.controlText("Close Picture-in-Picture"),!function(t){return!!t&&Boolean(t.io)}(i))throw new m("Invalid Picture-in-picture options.");this.io=i.io}});var Bu=class extends Y{get so(){return this.eo}get no(){return this.t.cs()}ro(){this.t.bn(it.ho,this.oo),this.ao||this.t.bn(it.uo,this.co),this.t.lo.on("languagechange",this.te)}do(){var t;return"theo-pip-"+(null!=(t=this.fo)?t:"bottom-right")}vo(t){const i=this.po;i&&!this.no&&(this.mo||this.yo(),this.bo(),si(i,"theo-pip"),si(i,this.do()),this.eo=!0,this.ko=t,this.wo=!1,this._o(new Ni(ii.PICTURE_IN_PICTURE)))}xo(t){const i=this.po;i&&(this.Co(),ni(i,"theo-pip"),ni(i,this.do()),this.eo=!1,this.wo=t,this.So=this.ko,this.ko=!1,this._o(new Ni(ii.INLINE)))}yo(){if(!this.mo){const t=this.t.lo;t.addChild(Eu,{io:this});const i=h.createElement("div");i.className="theo-pip-overlay",this.jo=h.createElement("div"),this.jo.className="theo-pip-overlay-text",d(this.jo,t.localize("Video playing in Picture-in-Picture mode")),i.appendChild(this.jo),Kt(t.el(),i),this.To=i,this.mo=!0}}Mo(){this.Ao&&!this.Po&&this.t.No&&(this.Eo=this.t.No.Bo(et,this.Io),this.Po=!0)}Fo(){this.Eo&&this.t.No&&(this.t.No.Do(this.Eo),this.Po=!1)}bo(){const t=this.t.lo.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"}Co(){const t=this.t.lo.contentEl();t.style.top="",t.style.bottom="",t.style.right="",t.style.left="",t.style.width="",t.style.height="",t.style.position=""}$o(){ni(this.po,"theo-pip"),this.so&&this.fo&&ni(this.po,"theo-pip-"+this.fo),this.To&&(Qt(this.To),this.To=void 0)}yn(){this.$o(),this.Fo(),this.Ro(),this.t.vn(it.ho,this.oo),this.t.vn(it.uo,this.co),this.t.lo.off("languagechange",this.te),this.t=void 0}constructor(t,i,s){super(),this.Uo=!1,this.eo=!1,this.wo=!1,this.ko=!1,this.mo=!1,this.Po=!1,this.So=!1,this.oo=()=>{this.Uo=!0,this.Ao&&!this.so&&this.Eo&&this.Oo&&this.Eo.Vo<=this.Oo&&this.vo(!1)},this.co=()=>{this.ao||(this.Uo=!1,this.Zh(),this.xo(!1))},this.te=()=>{if(this.jo){const t=this.t.lo;d(this.jo,t.localize("Video playing in Picture-in-Picture mode"))}},this.Io=t=>{!this.ko&&this.Ao&&(S(t)||(this.Oo&&t<=this.Oo||this.So?this.eo||this.wo||this.vo(!1):this.eo?this.xo(!1):this.wo=!1))},this.Oo=i.visibility,this.fo=i.position,this.ao=i.retainPresentationModeOnSourceChange,this.Ao=void 0!==this.Oo,this.t=t,this.po=t.Lo,this.Zh=s,this.ro()}},Iu=class extends E{Ho(){const t=super.Ho();return t===ii.INLINE&&this.qo.so?ii.PICTURE_IN_PICTURE:t}zo(t){return t===ii.PICTURE_IN_PICTURE||super.zo(t)}Wo(t){this.Go=this.Xo,t===ii.FULLSCREEN||t===ii.NATIVE_PICTURE_IN_PICTURE?this.qo.Fo():this.qo.Mo(),super.Wo(t)}Jo(t){super.Jo(t),t===ii.PICTURE_IN_PICTURE?$(this.Yo.Qo((t=>this.Ko(t)))):t===ii.FULLSCREEN?this.qo.xo(!1):this.qo.xo(!0)}async Ko(t){F(t),await Promise.all([this.Zo(),this.ta.xo()]).catch(mi),F(t),this.qo.vo(!this.ia),this._o(new Ni(this.Xo)),this.ia=!1,this.sa=!1}wi(){this.sa||(this.qo.so&&this.ea.cs?this.Wo(ii.FULLSCREEN):this.Go!==ii.PICTURE_IN_PICTURE||this.ea.cs?super.wi():(this.ia=!0,this.Wo(ii.PICTURE_IN_PICTURE)))}yn(){super.yn(),this.qo.yn(),this.na.vn(it.ho,this.ra),this.na=void 0}constructor(t,i,s,e){super(i,s),this.Go=ii.INLINE,this.ia=!1,this.Zh=()=>{this.Xo===ii.PICTURE_IN_PICTURE&&this.Wo(ii.INLINE)},this.ha=t=>{this.sa||(this.Xo!==ii.PICTURE_IN_PICTURE||this.qo.so?this.Xo!==ii.PICTURE_IN_PICTURE&&this.qo.so&&(this.ia=!0,this.Wo(ii.PICTURE_IN_PICTURE)):this.Wo(ii.INLINE))},this.ra=()=>{this.Ho()!==ii.PICTURE_IN_PICTURE&&this.Ho()!==ii.INLINE||this.qo.Mo(),this.na.vn(it.ho,this.ra)},this.na=t,this.qo=new Bu(t,e.pip,this.Zh),this.qo.bn(Ai.MODE_CHANGE,this.ha),this.na.bn(it.ho,this.ra)}};f();var Fu=class extends Y{get oa(){return Ti.aa(this.lo.el())||this.lo.supportsFullScreen()}get cs(){return this.lo.isFullscreen()||this.ua}vo(){this.lo.requestFullscreen()}xo(){this.lo.exitFullscreen(),this.ca.xo()}yn(){this.Ro(),this.lo.off("fullscreenchange",this.la),this.ca.vn(oi.da,this.la),this.ca.vn(oi.fa,this.Ds),this.lo.isFullWindow&&this.lo.exitFullscreen()}constructor(t,i){super(),this.Us=!1,this.ua=!1,this.va=!1,this.la=()=>{if(this.va)return;const t=this.Us,i=this.cs;t!==i&&(this.Us=i,this._o(new xi))},this.pa=()=>{this.ua=this.ca.cs,this.la()},this.ma=()=>{this.va||(this.lo.isFullWindow&&this.lo.supportsFullScreen()||this.ua&&!this.lo.supportsFullScreen())&&(this.va=!0,this.lo.exitFullscreen(),this.lo.requestFullscreen(),this.va=!1,this.la())},this.lo=t,this.ca=i,this.lo.on("fullscreenchange",this.la),this.ca.bn(oi.da,this.pa),this.ca.bn(oi.ga,this.ma),this.ca.bn(oi.fa,this.Ds),this.la()}};function Du(t){return class extends t{get No(){return this.ya}cs(){return this.ba.Ho()===ii.FULLSCREEN}ka(){return function(t,i){const s=w.create(t),e=i.lo;return at(s,{get controls(){return e.controls()},set controls(t){e.controls(vt(t))},get presentation(){return i.ba.wa},get presentationMode(){return i.ba.Ho()},set presentationMode(t){const s=ri(t);s&&i.ba.Wo(s)},get ui(){return e},get visibility(){return i.No.wa}})}(this._a,this)}yn(){super.yn(),this.ba.yn(),this.xa.yn(),this.lo.dispose(),this.ya.yn()}Ca(t){this.lo.src(""),super.Ca(t)}constructor(t,i,s){super(i,s),this.Lo=t,this.ya=new rt(t),this._a=super.ka(),w.defineProperty(this._a,"constructor",{value:lt}),this.lo=Pu(this._a,this.Lo,s.ui),this.xa=new Fu(this.lo,this.Sa),this.ba=new Iu(this,this.xa,this.Ta.ja(),s),this.ba.bn(Ai.MODE_CHANGE,this.Ds)}}}function $u(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(Ut(t)&&!S(t))return Ci(t,0,1)}(t.visibility),t.retainPresentationModeOnSourceChange=vt(t.retainPresentationModeOnSourceChange),t}f(),f();var Ru=ki((()=>{let t=Du(ut());return t=function(t){let i=t;for(const t of Ei)i=t(i);return i}(t),t}));function Uu(t,i){const s=function(t){const i=ei(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=$u(i.pip),i}(i),e=h.createElement("div");ai(e),t.appendChild(e);const n=new(Ru())(t,e,s);n.Ma=n;let r=n.wa;return n.Aa(),n.Pa(ot),w.defineProperty(r,"constructor",{value:Uu}),r=ht(r),Ht(n),function(t){for(const i of Ii)i(t)}(n),r}f(),f(),f();var Ou="theo-cast-",Vu=No.getComponent("Button"),Lu=class extends(Oo(Vu)){get Na(){throw new m("Ea")}get Ba(){return this.h.Ba}get Ia(){return this.h.Ia}buildCSSClass(){return Ou+"button theo-"+this.Ia+"-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=Ou+"svg-container",r.innerHTML=this.Ba,e.appendChild(n),e.appendChild(r),e}handleClick(t){var i;if(super.handleClick(t),this.Fa===ui.AVAILABLE)null==(i=this.Na)||i.start();else if(this.Fa===ui.CONNECTED||this.Fa===ui.CONNECTING){var s;null==(s=this.Na)||s.stop()}}Da(t){ni(this.po,"theo-"+this.Ia+"-"+this.Fa),this.Fa=t,si(this.po,"theo-"+this.Ia+"-"+this.Fa),this.te()}te(){this.$a(this.Fa),this.Ie.Be=this.controlText()}$a(t){t===ui.CONNECTED?this.controlText("Stop Casting"):t===ui.AVAILABLE?this.controlText("Start Casting"):t===ui.CONNECTING?this.controlText("Connecting"):this.controlText("Unavailable")}constructor(t,i){var s;super(t,i),this.po=t.el(),this.Fa=ui.UNAVAILABLE,this.controlText("Unavailable"),this.Ie=new la(this,this.controlText()),null==(s=this.Na)||s.addEventListener("statechange",(t=>{const i=t;this.Da(i.state)})),vi.Ys.Qe&&(this.Ra=new Ko(this.el())),this.Da(this.Na?this.Na.state:ui.UNAVAILABLE),this.on(t,"languagechange",this.te)}},Hu=0;function qu(){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-'+Hu+'">\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-'+Hu+')">\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 Hu++,t}No.registerComponent("chromecastButton",class extends Lu{get Na(){var t;return null==(t=this.ws.cast)?void 0:t.chromecast}constructor(t,i){super(t,z({},i,{Ia:"chromecast",Ba:qu()}))}}),f();var zu="theo-chromecast-",Wu=No.getComponent("Component"),Gu=class t extends(Oo(Wu)){buildCSSClass(){return zu+"overlay "+super.buildCSSClass()}createEl(){const i=super.createEl();si(i,zu+"overlay");const s=No.createEl("div",{className:zu+"status-icon",innerHTML:t.ICON_SVG}),e=No.createEl("div",{className:zu+"status-info"});d(e,"Playing on");const n=No.createEl("div",{className:zu+"status-title"}),r=No.createEl("div",{className:zu+"status"});return this.kr=n,r.appendChild(s),r.appendChild(e),r.appendChild(n),i.appendChild(r),i}dispose(){var t;null==(t=this.Ua)||t.removeEventListener("statechange",this.update),this.Ua=void 0,this.ws.removeEventListener("play",this.update),super.dispose()}constructor(t,i){var s,e;super(t,i),this.update=()=>{this.Ua?(this.kr&&d(this.kr,this.Ua.receiverName||""),this.Ua.state===ui.CONNECTED?this.show():this.hide()):this.hide()},this.Ua=null==(s=this.ws.cast)?void 0:s.chromecast,null==(e=this.Ua)||e.addEventListener("statechange",this.update),this.ws.addEventListener("play",this.update),this.update()}};Gu.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>',No.registerComponent("chromecastOverlay",Gu),f(),f();No.registerComponent("airplayButton",class extends Lu{dispose(){var t,i;null==(t=this.ws.ads)||t.removeEventListener("adbreakbegin",this.Oa),null==(i=this.ws.ads)||i.removeEventListener("adbreakend",this.Va),this.ws.removeEventListener("currentsourcechange",this.Va),super.dispose()}get Na(){var t;return null==(t=this.ws.cast)?void 0:t.airplay}constructor(t,i){var s,e;super(t,z({},i,{Ia:"airplay",Ba:'\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.Va=()=>{this.enable()},this.Oa=()=>{this.disable()},null==(s=this.ws.ads)||s.addEventListener("adbreakbegin",this.Oa),null==(e=this.ws.ads)||e.addEventListener("adbreakend",this.Va),this.ws.addEventListener("currentsourcechange",this.Va)}}),f(),f(),f();var Xu=No.getComponent("Button"),Ju=class extends(Oo(Xu)){buildCSSClass(){return"theo-vr-button theo-controlbar-button "+super.buildCSSClass()}handleClick(){this.ws.vr.stereo=!this.ws.vr.stereo,this.te()}xn(){const t=this.ws.vr;t&&t.state!==Ft.Rs?(this.show(),t.canPresentVR?this.enable():this.disable()):this.hide(),this.te()}te(){const t=this.ws.vr;t&&t.state!==Ft.Rs&&(t.stereo?this.controlText("Stop watching in VR"):t.canPresentVR?this.controlText("Watch in VR"):this.controlText("No VR capable device found"),this.La.Be=this.controlText())}dispose(){var t;null==(t=this.ws.vr)||t.removeEventListener(["statechange","stereochange"],this.Ha),super.dispose()}constructor(t,i){var s;super(t,i),this.Ha=()=>this.xn(),this.controlText("Watch in VR"),this.La=new la(this,this.controlText()),null==(s=this.ws.vr)||s.addEventListener(["statechange","stereochange"],this.Ha),this.xn(),vi.Ys.Qe&&(this.Ra=new Ko(this.el())),this.on(t,"languagechange",this.te)}};No.registerComponent("vrButton",Ju),f();var Qu=No.getComponent("Component"),Yu=class extends Qu{createEl(){const t=super.createEl("div",{className:this.buildCSSClass()}),i=No.createEl("div",{className:"theo-360-fov"});return t.appendChild(i),this.qa=i,t}buildCSSClass(){return"theo-360-compass "+super.buildCSSClass()}xn(){this.ws.vr.state===Ft.Rs?this.hide():this.show()}za(){const t=-this.ws.vr.direction.yaw+40;this.qa.style[bi("transform")]="scale(0.875) rotate("+t+"deg) skew("+"-10deg)"}dispose(){this.ws.vr.removeEventListener("statechange",this.Ha),this.ws.vr.removeEventListener("directionchange",this.Wa),super.dispose()}constructor(t,i,s){super(t,i),this.Ha=()=>this.xn(),this.Wa=()=>this.za(),this.ws=s,this.ws.vr.addEventListener("statechange",this.Ha),this.ws.vr.addEventListener("directionchange",this.Wa),this.xn(),this.za()}};f();var Ku=No.getComponent("Component"),Zu=class extends Ku{Ga(){this.ws.vr.state===Ft.Xa?this.Ja():this.Qa()}Ja(){if(this.Ya)return;this.Ya=!0;const t=this.ws.element;this.Ka=t.style.zIndex||"",t.style.zIndex="2147483647",this.Za=this.player().isFullscreen(),this.player().requestFullscreen()}Qa(){if(!this.Ya)return;this.Ya=!1;this.ws.element.style.zIndex=this.Ka,this.Za?this.player().requestFullscreen():this.player().exitFullscreen()}dispose(){this.Qa(),this.ws.vr.removeEventListener("statechange",this.tu),super.dispose()}constructor(t,i,s){super(t,i),this.Ya=!1,this.Za=!1,this.Ka="",this.tu=()=>this.Ga(),this.ws=s,this.ws.vr.addEventListener("statechange",this.tu),this.Ga()}};Fi((function(t){const i=t.wa;if(!i.vr)return;const s=t.lo,e=new Yu(s,{},i);if(t.bn(it.uo,(()=>{var i;s.removeChild(e);const n=null==(i=t.iu())?void 0:i.vr;void 0===n||n.nativeVR||s.addChild(e)})),Dt.su){const t=new Zu(s,{},i);s.addChild(t)}})),f(),f(),f();var tc=class extends Z{constructor(){super("relatedchange")}},ic=["relatedchange"],sc=class extends Y{get wa(){return this.eu||(this.eu=function(t){let i;const s={get sources(){return t.nu},set sources(i){t.nu=i},addEventListener(t,s){i.bn(t,s)},removeEventListener(t,s){i.vn(t,s)}};return i=new P(ic,!0,s),i.ru(t),s}(this)),this.eu}get nu(){return this.hu}set nu(t){this.hu=function(t){return t.filter((t=>t&&(Xt(t.link)||dt(t,["source"]))))}(t),t.length>this.hu.length&&console.warn("One or more of the configured related content sources are invalid. Check if they have a source or a link."),this._o(new tc)}yn(){this.Ro(),this.hu=[]}constructor(...t){super(...t),this.hu=[]}};Ot((function(t){return class extends t{ka(){const t=this.ou;return at(super.ka(),{get related(){return t.wa}})}yn(){this.ou.yn(),super.yn()}constructor(t,i){super(t,i),this.ou=new sc}}}),$t.au),f(),f();var ec=No.getComponent("Button"),nc=class extends ec{buildCSSClass(){return"vjs-icon-view-grid theo-related-button "+super.buildCSSClass()}handleClick(){this.cu.uu?this.cu.be():this.cu.ge()}te(){this.Ie.Be=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.po=t.el(),this.cu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText(this.localize("Related content")),this.Ie=new la(this,this.controlText()),this.on(t,"languagechange",this.te)}};f(),f();var rc=No.getComponent("Button"),hc=class extends rc{buildCSSClass(){return"theo-secondary-background theo-close-button"}handleClick(){this.lu.hide()}constructor(t,i){super(t),this.lu=i}},oc=(()=>{const t=h.createElement("div");return t.className="theo-related-grid-tile",t.innerHTML='<a class="theo-related-grid-tile-content"><div class="theo-related-grid-tile-image"></div><span class="theo-related-grid-tile-title theo-primary-border theo-tertiary-background"></span><span class="theo-related-grid-tile-duration"></span></a>',t})();function ac(t,i,s){const e=oc.cloneNode(!0),n=e.querySelector(".theo-related-grid-tile-content");dt(s,["source"])?(n.style.cursor="pointer",n.addEventListener("click",(()=>{t.source=s.source,i.be()}))):Xt(s.link)&&n.setAttribute("href",s.link);const r=e.querySelector(".theo-related-grid-tile-image");r.style.backgroundImage='url("'+J(s.image)+'")',r.removeAttribute("id");const h=e.querySelector(".theo-related-grid-tile-title");s.title?(d(h,s.title),h.removeAttribute("id")):Qt(h);const o=e.querySelector(".theo-related-grid-tile-duration");return s.duration?(d(o,s.duration),o.removeAttribute("id")):Qt(o),e}var uc=[15,12,9,8,6,4,3,2,1];var cc=class{get du(){return"theo-"+this.fu+"-item-grid"}vu(){this.pu.focus()}mu(t){this.gu(),function(t){if(t.length)for(const i of uc)if(t.length>=i){t.length=i;break}}(t),this.yu(t.length);for(const i of t){const t=ac(this.bu.wa,this.ku,i);this.wu.appendChild(t)}}gu(){this.wu.innerHTML=""}_u(){const t=h.createElement("div");t.className="theo-overlay-panel";const i=h.createElement("div");return i.className="theo-related-grid",this.xu.className="theo-related",this.pu.controlText("Close Related Content"),this.Cu.appendChild(this.xu),this.xu.appendChild(t),t.appendChild(this.pu.el()),t.appendChild(i),i}yu(t){ni(this.wu,this.du),this.fu=t,si(this.wu,this.du)}yn(){Qt(this.xu),this.Su.yn(),this.ju.yn(),this.pu.dispose(),this.bu=void 0}constructor(t,i,s,e,n){this.bu=t,this.Tu=i,this.ku=s,this.Cu=e,this.fu=12,this.Mu=t=>{this.wu.style.width=t.width+"px"},this.xu=h.createElement("div"),this.pu=new hc(this.Tu,{hide:()=>{this.ku.be()}}),this.wu=this._u(),this.ju=new lc(n),this.ju.bn(pi.mn,this.Mu),this.Su=new M(this.wu,this.ju),this.yu(12)}},lc=class extends Y{get Au(){return this.Pu||0}get Nu(){return this.Eu.Nu}yn(){this.Ro(),this.Eu.vn(pi.mn,this.Bu)}constructor(t){super(),this.Eu=t,this.Bu=t=>{let i=t.width;if(9*(t.width/16)>t.height){i=16*(t.height/9)}this.Pu=i,this._o(new gi(this.Au,t.height))},this.Eu.bn(pi.mn,this.Bu)}};f();var dc=class extends Z{constructor(){super("show")}};f();var fc=class extends Z{constructor(){super("hide")}},vc="theo-related-available",pc="theo-related-showing",mc=[...ic,"show","hide"],gc=class extends Y{get wa(){return this.eu||(this.eu=function(t){let i;const s={get sources(){return t.nu},set sources(i){t.nu=i},get showing(){return t.uu},show(){t.ge()},hide(){t.be()},addEventListener(t,s){i.bn(t,s)},removeEventListener(t,s){i.vn(t,s)}};return i=new P(mc,!0,s),i.ru(t),s}(this)),this.eu}get nu(){return this.Iu.nu}set nu(t){this.Iu.nu=t}get uu(){return this.Fu}ge(){const t=this.Fu;this.Fu=!0,this.Du(pc),this.$u.vu(),this.Tu.paused()?this.Ru=!0:this.Tu.pause(),t!==this.Fu&&this._o(new dc)}be(){const t=this.Fu;this.Fu=!1,this.Uu(pc),this.Ou.focus(),this.Ru||this.Tu.play(),this.Ru=!1,t!==this.Fu&&this._o(new fc)}Du(t){this.Tu.el().classList.add(t)}Uu(t){this.Tu.el().classList.remove(t)}yn(){this.Ro(),this.$u.yn()}constructor(t,i,s,e){super(),this.Fu=!1,this.Ru=!1,this.Vu=t=>{const i=this.nu;this.$u.mu(i),i.length?(this.Du(vc),this.Ou.show()):(this.Uu(vc),this.Ou.hide()),this._o(t)},this.Iu=i,this.Iu.bn("relatedchange",this.Vu),this.Tu=s,this.$u=new cc(t,this.Tu,this,s.contentEl(),e),this.Ou=new nc(s,this,{})}};Bi((function(t){return class extends t{ka(){const t=this.Lu;return at(super.ka(),{get related(){return t.wa}})}yn(){this.Lu.yn(),super.yn()}constructor(t,i,s){super(t,i,s),this.Lu=new gc(this,this.ou,this.lo,this.Hu)}}})),f(),f(),f();var yc=No.getComponent("Button"),bc=class extends yc{buildCSSClass(){return"vjs-icon-share theo-social-button "+super.buildCSSClass()}handleClick(){this.qu.showing?this.qu.hide():this.qu.show()}te(){this.Ie.Be=this.controlText()}dispose(){this.player().topControlBar.removeChild(this),super.dispose()}constructor(t,i,s){super(t,s),this.po=t.el(),this.qu=i,this.player().topControlBar.addChild(this),this.hide(),this.controlText("Share Video"),this.Ie=new la(this,this.controlText()),this.on(t,"languagechange",this.te)}};function kc(t,i,s){switch(i){case"iconurl":return function(t,i){const s=h.createElement("a");var e;s.className="theo-social-iconurl",s.title=null!=(e=t.label)?e:"",s.target="zu",s.href=i;const n=h.createElement("img");var r,o;return n.src=null!=(r=t.icon)?r:"",n.alt=null!=(o=t.label)?o:"",n.width=25,n.height=25,s.appendChild(n),s}(t,s);case"text":return function(t){const i=h.createElement("div");if(i.className="theo-social-text",t.label){const s=h.createElement("h5");s.className="theo-primary-background theo-social-label",d(s,t.label),i.appendChild(s)}const s=h.createElement("p");var e;return s.className="theo-social-content-container theo-tertiary-background",s.tabIndex=0,d(s,null!=(e=t.text)?e:""),i.appendChild(s),i}(t);case"texturl":return function(t,i){const s=h.createElement("div");if(s.className="theo-social-texturl",t.label){const i=h.createElement("h5");i.className="theo-primary-background theo-social-label",d(i,t.label),s.appendChild(i)}const e=h.createElement("div");e.className="theo-social-content-container theo-tertiary-background";const n=h.createElement("a");return n.target="zu",n.href=i,d(n,i),e.appendChild(n),s.appendChild(e),s}(t,s)}}f();var wc="<URL>";var _c=class{get we(){return this.xu}Wu(t){this.gu();for(const i of t)this.Gu(i)}vu(){this.pu.focus()}Gu(t){const i=function(t,i){return t.src?G(t.src,wc)?t.src.replace(wc,i):t.src:i}(t,this.ku.Xu),s=function(t){if(t)return t.icon?"iconurl":t.text?"text":"texturl"}(t),e=kc(t,s,i);e&&("iconurl"===s?this.Ju.appendChild(e):this.Qu.appendChild(e))}gu(){this.Ju.innerHTML="",this.Qu.innerHTML=""}yn(){Qt(this.xu),this.Yu.yn()}constructor(t,i,s,e){this.na=t,this.ku=i,this.Cu=s,this.Ku=e;const n=h.createElement("div");n.className="theo-overlay-panel",this.pu=new hc(this.na,this.ku.wa),this.pu.controlText("Close Share"),this.$u=h.createElement("div"),this.$u.className="theo-social-container",this.xu=h.createElement("div"),this.xu.className="theo-social",this.Ju=h.createElement("div"),this.Ju.className="theo-social-icon-container",this.Qu=h.createElement("div"),this.Qu.className="theo-social-text-container",this.Cu.appendChild(this.xu),this.xu.appendChild(n),this.$u.appendChild(this.Ju),this.$u.appendChild(this.Qu),n.appendChild(this.pu.el()),n.appendChild(this.$u),this.Yu=new M(this.xu,this.Ku)}},xc="theo-social-available",Cc="theo-social-showing",Sc=class{get wa(){return this.eu}get uu(){return this.Fu}get Zu(){return this.tc}set Zu(t){this.tc=t,this.$u.Wu(t),t.length?(this.Du(xc),this.Ou.show()):(this.Uu(xc),this.Ou.hide())}get Xu(){return this.ic||H()}set Xu(t){this.ic=t}ge(){this.Fu=!0,this.Du(Cc),this.$u.vu(),this.sc.paused()?this.Ru=!0:this.sc.pause()}be(){this.Fu=!1,this.Uu(Cc),this.Ou.focus(),this.Ru||this.sc.play(),this.Ru=!1}Du(t){this.sc.el().classList.add(t)}Uu(t){this.sc.el().classList.remove(t)}yn(){this.Ou.dispose(),this.$u.yn()}constructor(t,i){this.Fu=!1,this.tc=[],this.Ru=!1,this.eu=function(t){return{get showing(){return t.uu},get items(){return t.Zu},set items(i){t.Zu=i},get url(){return t.Xu},set url(i){t.Xu=i},show(){t.ge()},hide(){t.be()}}}(this),this.sc=t,this.$u=new _c(this.sc,this,t.contentEl(),i),this.Ou=new bc(t,this.eu,{})}};Bi((function(t){return class extends t{ka(){const t=this.qu;return at(super.ka(),{get social(){return t.wa}})}constructor(t,i,s){super(t,i,s),this.qu=new Sc(this.lo,this.Hu)}}})),f(),f();var jc=No.getComponent("Component"),Tc=class extends jc{createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}buildCSSClass(){return"theo-upnext-container "+super.buildCSSClass()}};Tc.prototype.h=z({},Tc.prototype.h,{children:[]}),No.registerComponent("upNextContainer",Tc),f(),f();var Mc="theo-upnext-bar-",Ac=No.getComponent("Component"),Pc=class extends Ac{get uu(){return this.Fu}set uu(t){this.Fu=t,this.ec&&(this.ec.tabIndex=t?0:-1)}get nc(){return this.rc}set nc(t){this.rc=t}Ca(t){this.gu(),this.hc(t)}hc(t){if(t&&t.link&&t.image){const i=h.createElement("div");si(i,Mc+"content"),i.onclick=()=>{this.oc.next()},i.onkeypress=t=>{13===t.which&&this.oc.next()};const s=h.createElement("div");if(s.style.backgroundImage='url("'+J(t.image)+'")',si(s,Mc+"image"),i.appendChild(s),t.duration){const i=h.createElement("span");si(i,Mc+"duration"),i.innerHTML=""+t.duration,s.appendChild(i)}const e=h.createElement("div");si(e,Mc+"text");const n=h.createElement("div");if(si(n,Mc+"upnext"),d(n,this.localize("Up Next")),e.appendChild(n),t.title){const i=h.createElement("div");si(i,Mc+"title"),d(i,t.title),e.appendChild(i)}i.appendChild(e),this.ec=i,this.ac=n,this.el().appendChild(this.ec)}}gu(){this.el().innerHTML="",this.ec=void 0,this.ac=void 0}te(){this.ac&&d(this.ac,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-bar "+super.buildCSSClass()}dispose(){this.Yu.yn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.ec=void 0,this.ac=void 0,this.oc=i,this.Yu=new M(this.el(),e),this.Fu=!1,this.rc=10,this.on(t,"languagechange",this.te)}};f();var Nc="theo-upnext-panel-",Ec=yu,Bc=No.getComponent("Component"),Ic=class extends Bc{get uu(){return this.Fu}set uu(t){this.Fu=t}get uc(){return this.cc}set uc(t){this.cc=t}get lc(){return this.dc}set lc(t){this.dc=t}Ca(t){this.gu(),this.fc(t)}fc(t){if(t&&t.link&&t.image){const i=h.createElement("div");i.className=Nc+"content";const s=h.createElement("div");s.style.backgroundImage='url("'+J(t.image)+'")',s.className=Nc+"image",i.appendChild(s);const e=h.createElement("div");e.className=Nc+"text";const n=h.createElement("div");if(n.className=Nc+"upnext",d(n,this.localize("Up Next")),e.appendChild(n),t.title){const i=h.createElement("div");i.className=Nc+"title",d(i,t.title),e.appendChild(i)}i.appendChild(e),this.vc=h.createElement("div"),this.vc.className=Nc+"autoplay",this.vc.innerHTML=bu;const r=this.vc.querySelector("svg");r.onclick=()=>{this.oc.next()},r.tabIndex=0,r.onkeypress=t=>{13===t.which&&this.oc.next()},this.mc=n,this.gc=this.vc.querySelector("."+Ec),i.appendChild(this.vc),this.el().appendChild(i)}}get yc(){return this.bc}set yc(t){this.bc=t,this.gc.style.strokeDashoffset=""+_.round(1e5*t)/1e5}gu(){this.el().innerHTML="",this.mc=void 0,this.gc=void 0}te(){this.mc&&d(this.mc,this.localize("Up Next"))}createEl(){return super.createEl("div",{className:this.buildCSSClass()})}buildCSSClass(){return"theo-upnext-panel "+super.buildCSSClass()}dispose(){this.Yu.yn(),super.dispose()}constructor(t,i,s,e){super(t,s),this.bc=0,this.oc=i,this.Yu=new M(this.el(),e),this.Fu=!1,this.cc=10,this.dc=!0,this.on(t,"languagechange",this.te)}},Fc="theo-upnext-panel-showing",Dc="theo-upnext-bar-showing",$c=2*_.PI*73,Rc=class t{get wa(){return this.eu}get kc(){return this.wc}get _c(){return this.xc}get Cc(){return this.Sc}set Cc(t){this.Sc=t,this.$u.Ca(t),this.jc.Ca(t),this.sc.off("timeupdate",this.Tc),this.sc.off("ended",this.Mc),t&&(this.sc.on("timeupdate",this.Tc),this.sc.on("ended",this.Mc))}Ac(){this.$u.uc?this.Pc=mt(this.$u.uc):0===this.$u.uc?this.Pc=0:this.Pc=10,0!==this.Pc?(isFinite(this.Pc)&&(this.Nc=!0),this.$u.uu=!0,this.Du(Fc),this.Nc&&(this.$u.yc=$c-$c/this.Pc,this.Ec=v(this.Bc,1e3))):this.Ic()}Fc(){this.$u.uu=!1,this.Uu(Fc),this.Nc&&(p(this.Ec),this.Dc=1,this.$u.yc=$c)}$c(){this.jc.uu=!0,this.Du(Dc)}Rc(){this.jc.uu=!1,this.Uu(Dc)}Ic(){p(this.Ec),this.Cc&&(s.location.href=this.Cc.link)}Du(t){this.sc.el().classList.add(t)}Uu(t){this.sc.el().classList.remove(t)}Uc(t,i){const s=t>=i&&!(this.Oc&&this.Oc.Vc);this.jc.uu&&!s?this.Rc():!this.jc.uu&&s&&this.$c()}Lc(t,i){this.$u.uu&&t<i&&!this.sc.ended()&&this.Fc()}static Hc(t,i){const s=mt(t);if(!S(s))return i-s;const e=(""+t).match(/^([1-9]?\d|100)%$/);if(e){return i*(1-x(e[1],10)/100)}}yn(){this.Ec&&p(this.Ec),this.sc.getChild("upNextContainer").removeChild(this.$u),this.sc.getChild("upNextContainer").removeChild(this.jc),this.$u.dispose(),this.jc.dispose()}constructor(i,s,e){this.Sc=void 0,this.Pc=10,this.Dc=1,this.Ec=void 0,this.Nc=!0,this.Bc=()=>{this.Dc!==this.Pc?(this.$u.yc-=$c/this.Pc,this.Dc+=1):this.Ic()},this.Mc=()=>{this.$u.uu||this.Ac()},this.Tc=()=>{const i=this.sc.currentTime(),s=this.sc.duration(),e=s?t.Hc(this.jc.nc,s):void 0;void 0!==e&&this.Uc(i,e),this.$u.lc&&this.Lc(i,s)},this.eu=function(t){return{get source(){return t.Cc},set source(i){t.Cc=i},get bar(){return t.kc},get panel(){return t._c},next(){t.Ic()}}}(this),this.jc=new Pc(i,this.eu,{},s),this.$u=new Ic(i,this.eu,{},s),this.wc=function(t,i){return{get showing(){return i.uu},get offset(){return i.nc},set offset(t){i.nc=t},show(){t.$c()},hide(){t.Rc()}}}(this,this.jc),this.xc=function(t,i){return{get showing(){return i.uu},get countdownDuration(){return i.uc},set countdownDuration(t){i.uc=t},get showUpNextPanel(){return i.lc},set showUpNextPanel(t){i.lc=t},show(){t.Ac()},hide(){t.Fc()}}}(this,this.$u),this.sc=i,this.Oc=e,i.getChild("upNextContainer").addChild(this.jc,{}),i.getChild("upNextContainer").addChild(this.$u,{})}};Bi((function(t){return class extends t{ka(){const t=this.qc;return at(super.ka(),{get upnext(){return t.wa}})}yn(){this.qc.yn(),super.yn()}constructor(t,i,s){super(t,i,s),this.qc=new Rc(this.lo,this.Hu,this.zc)}}})),f(),f();var Uc=No.getComponent("Component"),Oc=class extends Uc{createEl(){const t=super.createEl("ul",{className:"theo-context-menu"}),i=h.createElement("li"),s=h.createElement("a"),e=h.createElement("div");s.className="theo-context-menu-a",i.appendChild(s),e.className="theo-context-menu-logo",e.innerHTML='<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t width="507.262px" height="399.16px" viewBox="0 0.1 507.262 399.16" enable-background="new 0 0.1 507.262 399.16"\n\t xml:space="preserve" class=\'theo-context-menu-logo-svg\'>\n\t<g transform="matrix(1.90897, 0, 0, 1.90897, 212.4, 144.6)">\n\t\t<path fill="#FFFFFF" d="M-38.416-53.802C-53.351-38.867-60.82-20.814-60.82,0.353c0,21.253,7.466,39.392,22.404,54.413\n\t\t\tc6.83,6.658,13.827,11.778,20.996,15.363c5.122,2.561,10.583,4.397,16.388,5.507v1.024h-78.481\n\t\t\tc-21.168,0-31.752-10.584-31.752-31.752v-88.724c0-21.252,10.584-31.879,31.752-31.879h79.377v0.896\n\t\t\tc-6.145,1.196-11.95,3.116-17.411,5.762C-24.632-65.538-31.586-60.46-38.416-53.802"/>\n\t</g>\n\t<g transform="matrix(0.535073, 0, 0, 0.535073, 242.35, 104.7)">\n\t\t<path fill="#FFFFFF" d="M188.354,104.104c-32.941,23.472-75.492,49.679-127.641,78.61c-50.275,28.254-94.358,50.44-132.254,66.572l-41.989,15.616\n\t\t\tc-2.645-11.348-5.122-28.17-7.426-50.44c-5.205-44.383-7.809-93.375-7.809-146.975c0-49.079,3.538-94.947,10.622-137.631\n\t\t\tl10.249-49.034l44.551,14.978C-24.762-88.838,17.06-67.03,62.124-38.777c47.705,29.871,88.638,58.294,122.773,85.266\n\t\t\tc17.061,13.571,29.351,24.028,36.862,31.367L188.354,104.104"/>\n\t</g>\n\t<g transform="matrix(1.91028, 0, 0, 1.91028, 327.15, 144.6)">\n\t\t<path fill="#FFFFFF" d="M94.286-43.816v88.723c0,21.168-10.583,31.751-31.751,31.751h-80.018v-1.025\n\t\t\tc14.683-2.816,27.527-9.77,38.537-20.867c14.936-15.024,22.405-33.16,22.405-54.413c0-21.168-7.467-39.22-22.405-54.156\n\t\t\tC9.871-64.985-3.188-71.939-18.123-74.671v-1.024h80.658C83.702-75.696,94.286-65.069,94.286-43.816"/>\n\t</g>\n</svg>\n',s.appendChild(e);const n=h.createElement("div");return n.className="theo-context-version",d(n,"Powered by THEOplayer 9.8.2"),s.appendChild(n),s.href="https://www.theoplayer.com/player-referral",s.target="zu",t.appendChild(i),t}Wc(t){const i=t;i.preventDefault(),this.show(),this.el().style.left="0",this.el().style.top="0";const s=this.player().contentEl(),e=s.getClientRects(),n=e.length>0?e[0]:void 0,r=i.clientX-s.getBoundingClientRect().left,h=C(getComputedStyle(this.el()).fontSize);K(this.el(),r,n,h);const o=i.clientY-s.getBoundingClientRect().top;tt(this.el(),o,n,h),this.Gc()}Xc(){this.hide(),this.clearTimeout(this.Jc)}Gc(){this.Jc=this.setTimeout(this.Xc,4e3)}Qc(){this.clearTimeout(this.Jc)}dispose(){this.Xc(),this.off(this.player(),"contextmenu",this.Wc),this.el().removeEventListener("mousedown",Vc,!0),this.off(h,"mousedown",this.Xc),this.off("mouseout",this.Gc),this.off("mouseover",this.Qc),super.dispose()}constructor(t,i){super(t,i),this.Jc=0,this.on(this.player(),"contextmenu",this.Wc),this.el().addEventListener("mousedown",Vc,!0),this.on(h,"mousedown",this.Xc),this.on("mouseout",this.Gc),this.on("mouseover",this.Qc),this.Xc()}};function Vc(t){t.stopPropagation()}Fi((function(t){const i=new Oc(t.lo,{});t.lo.addChild(i),t.lo.on("dispose",(()=>{t.lo.removeChild(i),i.dispose()}))})),f(),f(),f(),f();var Lc={Default:"","Monospaced Serif":D.Yc,"Proportional Serif":D.Kc,"Monospaced Sans-Serif":D.Zc,"Proportional Sans-Serif":D.tl},Hc={White:"#ffffff",Yellow:"#ffff00",Green:"#00ff00",Cyan:"#00ffff",Blue:"#0000ff",Magenta:"#ff00ff",Red:"#ff0000",Black:"#000000"},qc=[50,75,100,150,200];function zc(t){return{label:t+"%",value:t}}function Wc(t){return w.keys(t).map((i=>({label:i,value:t[i]})))}qc.map((function(t){return{label:t+"%",value:t/100+"em"}}));var Gc=qc.map((function(t){return{label:t+"%",value:t+"%"}})),Xc=[25,50,75,100].map(zc),Jc=[0,25,50,75,100].map(zc),Qc=Wc(Hc),Yc=Wc(Lc),Kc=Wc({None:"none","Drop Shadow":"dropshadow",Raised:"raised",Depressed:"depressed",Uniform:"uniform"}),Zc=100,tl="#000000",il="#FFFFFF",sl="#000000";f();var el=class extends Ya{il(){const t=this.Ur.localize(this.sl);d(this.nl.subMenu.menuHeader.el(),t),this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",d(this.Rr,t);const i=h.createElement("span");return i.className="theo-primary-color theo-settings-control-menu-item-value",si(this.nl.el(),"theo-subtitle-options-menu-item"),this.nl.el().appendChild(this.Rr),this.nl.el().appendChild(i),i}rl(t){const i=this.Pr(t);i&&this.hl(i)}ol(){return this.Cr}Br(t){this.al(t.Nr)}hl(t){for(const t of this.Mr.menuItems)t.selected(!1);t?(t.selected(!0),this.cl(t.Nr.label)):this.cl("Custom")}cl(t){this.ll=t,d(this.dl,this.Ur.localize(t)),this.nl.parentMenu.re()}Er(t){const i=super.Er(t);return si(i.el(),"theo-subtitle-options-menu-item"),this.Dr(i),i}Dr(t){const i=this.Ur.localize(t.Nr.label);d(t.el(),i);const s=this.Ur.localize("Set "+this.sl+" to ")+i;t.el().setAttribute("aria-label",s)}Re(){this.Ur.off("languagechange",this.te),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.nl=t,this.Ur=e,this.ll="",this.te=()=>{const t=this.Ur.localize(this.sl);d(this.nl.subMenu.menuHeader.el(),t),d(this.Rr,t),this.cl(this.ll);for(const t of this.Ar)this.Dr(t)},this.sl=i,this.al=s.fl,this.dl=this.il(),this.Cr=s.vl,this.Ur.on("languagechange",this.te)}};f();var nl=class t{static pl(t,i,s,e){if(void 0===t&&void 0===i)return;return W(void 0===t?s:t,void 0===i?e:i)}constructor(i){this.ml=i,this.gl=t=>{this.ml.fontFamily=t.value},this.yl=t=>{this.ml.fontSize=t.value},this.bl=i=>{this.kl=i.value,this.ml.fontColor=t.pl(this.wl,this.kl,il,Zc)},this._l=i=>{this.wl=i.value,this.ml.fontColor=t.pl(this.wl,this.kl,il,Zc)},this.xl=i=>{this.Cl=i.value,this.ml.backgroundColor=t.pl(this.Cl,this.Sl,tl,Zc)},this.jl=i=>{this.Sl=i.value,this.ml.backgroundColor=t.pl(this.Cl,this.Sl,tl,Zc)},this.Tl=i=>{this.Ml=i.value,this.ml.windowColor=t.pl(this.Ml,this.Al,sl,Zc)},this.Pl=i=>{this.Al=i.value,this.ml.windowColor=t.pl(this.Ml,this.Al,sl,Zc)},this.Nl=t=>{this.ml.edgeStyle=t.value}}};f();var rl=class{El(t,i){const s=this.Bl(t,i.ol());s&&i.rl(s)}Bl(t,i){return Pi(i,(i=>i.value===t))}Il(t,i,s){let e,n;if(void 0===t)e=this.Bl(void 0,i.ol()),n=this.Bl(void 0,s.ol());else if(t){const r=function(t){let i=q(t);i||(i=q(t.slice(0,t.length-1).replace("rgb","rgba")+",1)"));i||(i=R(O(t),1));if(!i){const s=t.charAt(0).toUpperCase()+t.toLowerCase().slice(1);i=R(O(Hc[s]),1)}return i}(t);if(r){const t=L(r),h=100*r.Fl;e=this.Bl(t,i.ol()),n=this.Bl(h,s.ol())}}e&&i.rl(e),n&&s.rl(n)}constructor(t,i){this.ml=t,this.Dl=i,this.$l=()=>{const t=this.ml.fontFamily;this.El(t,this.Dl["Font family"]);const i=this.ml.fontColor;this.Il(i,this.Dl["Font color"],this.Dl["Font opacity"]);const s=this.ml.fontSize;this.El(s,this.Dl["Font size"]);const e=this.ml.backgroundColor;this.Il(e,this.Dl["Background color"],this.Dl["Background opacity"]);const n=this.ml.windowColor;this.Il(n,this.Dl["Window color"],this.Dl["Window opacity"]);const r=this.ml.edgeStyle;this.El(r,this.Dl["Character edge style"])},this.ml.addEventListener("change",this.$l),this.$l()}};var hl=class extends Ya{Rl(){return{"Font family":{vl:ol(Yc),fl:this.Ul.gl},"Font color":{vl:ol(Qc),fl:this.Ul._l},"Font opacity":{vl:ol(Xc),fl:this.Ul.bl},"Font size":{vl:ol(Gc),fl:this.Ul.yl},"Background color":{vl:ol(Qc),fl:this.Ul.xl},"Background opacity":{vl:ol(Jc),fl:this.Ul.jl},"Window color":{vl:ol(Qc),fl:this.Ul.Tl},"Window opacity":{vl:ol(Jc),fl:this.Ul.Pl},"Character edge style":{vl:ol(Kc),fl:this.Ul.Nl}}}Ol(){this.Rr=h.createElement("span"),this.Rr.className="theo-settings-control-menu-item-title",this.Vl=h.createElement("span"),this.Vl.className="theo-primary-color theo-settings-control-menu-item-value",this.Gr.el().appendChild(this.Rr),this.Gr.el().appendChild(this.Vl),this.te()}Er(t){const i=this.Mr.addSubMenuItem();return i.Nr=t,this.Dl[t]=new el(i,t,this.Ll[t],this.Ur),i}Dr(t){}Br(t){}Re(){this.Ur.off("languagechange",this.te),this.Hl.removeEventListener(["addtrack","removetrack"],this.ql),super.Re()}constructor(t,i,s,e){super(t.subMenu),this.Gr=t,this.Hl=i,this.Ur=e,this.Dl={},this.ql=()=>{this.Hl.some((t=>At(t.kind)))?this.Gr.show():this.Gr.hide()},this.te=()=>{d(this.Mr.menuHeader.el(),this.Ur.localize("Subtitle Options")),d(this.Rr,this.Ur.localize("Subtitle")),d(this.Vl,this.Ur.localize("Options")),this.Gr.el().setAttribute("aria-label",this.Ur.localize("Open the subtitle options menu"))},this.Ul=new nl(s),this.Ll=this.Rl(),this.Cr=w.keys(this.Ll),this.Ol(),this.zl=new rl(s,this.Dl),this.Ur.on("languagechange",this.te),this.Hl.addEventListener(["addtrack","removetrack"],this.ql),this.ql()}};function ol(t){const i=[{label:"Default",value:void 0}];for(const s of t)"Default"!==s.label&&i.push(s);return i}Fi((function(t){const i=t.lo.controlBar.getChild("SettingsButton").menu,s=i.addSubMenuItem({name:"TextTrackOptionsMenuItem"}),e=new hl(s,t.nt.wa,t.Wl.wa,t.lo);t.lo.on("dispose",(()=>{i.removeMenuItem(s),s.dispose(),e.Re(),i.dispose()}))})),f(),f();var al=No.getComponent("Component"),ul=class extends al{buildCSSClass(){return"theo-ad-control-panel"}createEl(){const t=super.createEl();return t.className=this.buildCSSClass(),t}constructor(t,i){super(t,i),t.adControlBar=this}};ul.prototype.h=z({},al.prototype.h,{children:[]}),No.registerComponent("AdControlPanel",ul),f(),f();var cl=No.getComponent("Component"),ll="theo-dai-countdown",dl=class extends cl{buildCSSClass(){return ll}createEl(t,i,s){const e=h.createElement("div");return e.className=ll,e}Gl(t,i){i.addEventListener("adbreakbegin",(()=>this.show())),i.addEventListener("adbreakend",(()=>this.hide())),t.addEventListener("timeupdate",this.te)}constructor(t,i,s){super(t,s),this.na=t,this.eu=i,this.te=()=>{const t=this.eu.ads;t.playing&&t.currentAdBreak&&t.currentAds.length&&d(this.contentEl(),function(t,i,s){const e=t.ads;let n="";const r=e.length;if(r>1){const t=e.indexOf(i)+1;n=s("Ad")+" "+t+"/"+r+". "}const h=_.ceil(t.maxRemainingDuration);return n+=s("The content will resume in {1} seconds.").replace("{1}",""+h),n}(t.currentAdBreak,t.currentAds[0],(t=>this.na.localize(t))))},this.po=t.el(),this.Gl(i,i.ads),this.on(t,"languagechange",this.te)}};f();var fl=No.getComponent("ClickableComponent"),vl=class extends fl{buildCSSClass(){return Vt}createEl(t,i,s){return this.h.wa.element.querySelector("."+Vt)}emitTapEvents(){}te(){d(this.el(),this.localize("Learn more"))}constructor(t,i){super(t,i),d(this.el(),t.localize("Learn more")),this.eu=i.wa,this.po=t.el(),this.on(t,"languagechange",this.te)}};Fi((function(t){if(t.wa.ads&&t.Xl){const i=t.lo,s=new dl(i,t.wa);i.adControlBar.addChild(s);if(t.wa.element.querySelector("."+Vt)){const s=new vl(i,{wa:t.wa});i.adControlBar.addChild(s)}}})),f(),f();var pl=No.getComponent("Component"),ml=["addtrack","removetrack","change"],gl=class extends(Oo(pl)){createEl(){const t=super.createEl();return this.qualityLabel=No.createEl("div",{className:"theo-quality-label-text"}),t.appendChild(this.qualityLabel),ci(this.qualityLabel),t}dispose(){this.Jr&&(this.Jr.removeEventListener("activequalitychanged",this.Jl),this.Jr=void 0),this.ws.videoTracks.removeEventListener(ml,this.ah),super.dispose()}constructor(t,i){super(t,i),this.Jr=void 0,this.ah=()=>{const t=Ga(this.ws.videoTracks);t!==this.Jr&&(this.Jr&&this.Jr.removeEventListener("activequalitychanged",this.Jl),this.Jr=t,t&&t.addEventListener("activequalitychanged",this.Jl),this.Jl())},this.Jl=()=>{const t=this.Jr&&this.Jr.activeQuality;if(!this.qualityLabel||!t)return;const i=t.label?t.label:t.height?t.height+"p":void 0;i&&(d(this.qualityLabel,i),this.addClass("theo-quality-label-show"),this.hideActiveQualityLabel())},this.hideActiveQualityLabel=()=>{this.resetTimeout(),this.startFadeOutID=this.setTimeout(this.fadeoutLabel,3750),this.removeLabelClassesID=this.setTimeout(this.hideLabel,4e3)},this.resetTimeout=()=>{this.startFadeOutID&&this.clearTimeout(this.startFadeOutID),this.removeLabelClassesID&&this.clearTimeout(this.removeLabelClassesID)},this.fadeoutLabel=()=>{this.addClass("theo-quality-label-fadeout")},this.hideLabel=()=>{this.removeClass("theo-quality-label-show"),this.removeClass("theo-quality-label-fadeout")},super.addClass("theo-quality-label"),this.ws.videoTracks&&(this.ws.videoTracks.addEventListener(ml,this.ah),this.ah())}};No.registerComponent("activeQualityLabel",gl),f(),f();var yl="theo-upcoming-ad-notification",bl=["adbreakbegin","adbreakend","adadded","adloaded","adbegin","adend"],kl=class extends(Oo(va)){createEl(){const t=No.createEl("div",{className:yl});return this.notificationText=No.createEl("div",{className:yl+"text"}),t.appendChild(this.notificationText),t}Ql(){if(!this.ws.ads)return;const t=this.ws.ads.scheduledAdBreaks;let i,s=1/0;for(let e=0;e<t.length;e++){const n=t[e],r=n.timeOffset;-1!==r&&r<s&&(s=r,i=n)}this.currentAdBreak=i,this.currentAdBreakValid=void 0!==i&&void 0!==i.ads&&i.ads.some((t=>"linear"===t.type))}Yl(){if(!this.ws.ads||this.ws.ads.playing||!this.currentAdBreak||!this.currentAdBreakValid||0===this.currentAdBreak.timeOffset)return void this.Kl();const t=this.ws.currentTime;if(this.currentAdBreak.timeOffset>t+10)return void this.Kl();const i=_.ceil(this.currentAdBreak.timeOffset-t);i<0?this.Kl():this.Zl(i)}Zl(t){this.td!==t&&(d(this.notificationText,"Your video will be temporarily interrupted in 0:"+(t<10?"0"+t:t)),this.td=t,this.show())}Kl(){this.td=NaN,this.hide()}dispose(){var t;this.ws.removeEventListener("timeupdate",this.handleTimeUpdate),null==(t=this.ws.ads)||t.removeEventListener(bl,this.handleAdEvent),this.currentAdBreak=void 0,super.dispose()}constructor(t,i){super(t,i),this.currentAdBreak=void 0,this.currentAdBreakValid=!1,this.td=NaN,this.handleTimeUpdate=()=>{this.Yl()},this.handleAdEvent=()=>{this.Ql(),this.Yl()},this.ws.ads&&(this.hide(),this.ws.addEventListener("timeupdate",this.handleTimeUpdate),this.ws.ads.addEventListener(bl,this.handleAdEvent))}};No.registerComponent("upcomingAdNotificationText",kl),f(),f();var wl=No.getComponent("Component");No.registerComponent("UplynkAdBreakBar",class extends wl{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theo-ad-remaining-container",t}get sd(){return this.h.adBreakProvider()}te(t,i){if(this.sd&&this.sd.endTime){const s=_.max(this.sd.endTime-t,0);d(i,"Content will resume in "+_.ceil(s)+"s"),this.show()}else this.hide()}constructor(t,i){super(t,i),this.ed=()=>{this.te(this.player().currentTime(),this.el())},this.on(t,"timeupdate",this.ed)}}),f();var _l=No.getComponent("ClickableComponent");No.registerComponent("UplynkAdSkipButton",class extends _l{createEl(){const t=h.createElement("div");return t.className="theoplayer-ad-overlay-component theoplayer-ad-skip theoplayer-ad-skip-countdown",this.nd=h.createElement("span"),t.appendChild(this.nd),this.te(t,this.nd),t}handleClick(){this.h.skipCallback()}te(t,i){this.rd<=_t.ad.od?(ni(t,"theoplayer-ad-skip-countdown"),si(t,"theoplayer-ad-skip-button"),d(i,"Skip ads")):d(i,"Skip ads in "+_.ceil(this.rd)+"s")}get rd(){return this.h.adBreak.startTime+this.h.adBreak.skipOffset-this.player().currentTime()}constructor(t,i){super(t,i),this.ed=()=>{this.te(this.el(),this.nd)},this.on(t,"timeupdate",this.ed)}}),f(),f();var xl=No.getComponent("Component"),Cl=class extends xl{buildCSSClass(){return"theo-uplynk-marker-bar"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}};No.registerComponent("UplynkAdBreakMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-adbreak"}}),f(),f();var Sl=No.getComponent("Component"),jl=class extends Sl{get startTime(){return this.h.startTime}get endTime(){return this.h.endTime}get seekable(){return this.player().seekable()}buildCSSClass(){return"theo-uplynk-marker"}createEl(t,i,s){const e=h.createElement("div");e.className=this.buildCSSClass();const n=this.seekable.start(0),r=this.seekable.end(this.seekable.length-1),o=_.max(this.startTime-n,0),a=void 0!==this.endTime?_.max(r-this.endTime,0):0,u=r-n;return e.style.left=o/u*100+"%",e.style.right=a/u*100+"%",e}constructor(t,i){super(t,i)}};No.registerComponent("UplynkAdBreakMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-adbreak"}}),f();No.registerComponent("UplynkAssetMarkerBar",class extends Cl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-bar-asset"}}),f();No.registerComponent("UplynkAssetMarker",class extends jl{buildCSSClass(){return super.buildCSSClass()+" theo-uplynk-marker-asset"}}),f();var Tl=No.getComponent("Component");No.registerComponent("UplynkContentNotificationBar",class extends Tl{buildCSSClass(){const t="theo-uplynk-content-notification-bar";return t+(Dt.su||Dt.ud?" "+t+"-ios":"")}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}constructor(t,i){super(t,i)}}),f();var Ml=No.getComponent("Component");function Al(t,i){const s=t.uplynk;return Boolean(t&&void 0===s)||Boolean(t&&s&&void 0===s.ui)||Boolean(t&&s&&s.ui&&void 0===s.ui[i])||Boolean(t&&s&&s.ui&&!0===s.ui[i])}No.registerComponent("UplynkContentNotification",class extends Ml{get ld(){return this.h.asset}buildCSSClass(){return"theo-uplynk-content-notification"}createEl(t,i,s){const e=h.createElement("div");return e.className=this.buildCSSClass(),e}yo(){const t=h.createElement("img");t.src=this.ld.posterUrl,t.className=this.buildCSSClass()+"-thumbnail",this.el().appendChild(t);const i=h.createElement("div");i.className=this.buildCSSClass()+"-description";const s=function(t){return"Next: "+t}(this.ld.description);d(i,s),this.el().appendChild(i),this.dd=h.createElement("div"),this.dd.className=this.buildCSSClass()+"-countdown",d(this.dd,this.fd),this.el().appendChild(this.dd)}get fd(){const t=_.min(10,this.vd);return"Starting in "+_.ceil(t)+" seconds"}get vd(){return _.max(0,this.ld.startTime-this.player().currentTime())}pd(){const t=this.vd;t>10||t<=0?this.hide():(d(this.dd,this.fd),this.show())}constructor(t,i){super(t,i),this.yo(),this.on(t,"timeupdate",this.pd),this.hide()}}),f(),Bi((function(t){return class extends t{get md(){return this.lo.controlBar.progressControl.seekBar}Ca(t){this.gd=!1,this.wa.removeEventListener("timeupdate",this.yd),this.lo.removeChild("UplynkAdBreakBar"),this.lo.removeChild("UplynkAdSkipButton"),this.md.removeChild("UplynkAdBreakMarkerBar"),this.md.removeChild("UplynkAssetMarkerBar"),this.lo.removeChild("UplynkContentNotificationBar"),super.Ca(t)}bd(){if(!function(t){return Al(t,"assetMarkers")}(this.kd)||!this.gd)return;const t=this.wa.uplynk.assets.map((t=>({name:"UplynkAssetMarker",startTime:t.startTime,endTime:t.endTime})));this.md.removeChild("UplynkAssetMarkerBar"),this.md.addChild("UplynkAssetMarkerBar",{children:t})}wd(){if(!function(t){return Al(t,"contentNotification")}(this.kd))return;const t=this.wa.uplynk.assets.map((t=>({name:"UplynkContentNotification",asset:t})));this.lo.removeChild("UplynkContentNotificationBar"),this.lo.addChild("UplynkContentNotificationBar",{children:t})}yn(){this.wa.removeEventListener("timeupdate",this.yd);const t=this.wa.uplynk;null==t||t.ads.adBreaks.removeEventListener("addadbreak",this._d),null==t||t.ads.adBreaks.removeEventListener("removeadbreak",this.xd),null==t||t.assets.removeEventListener("addasset",this.Cd),null==t||t.assets.removeEventListener("removeasset",this.Cd),this.wa.removeEventListener("loadeddata",this.Sd),super.yn()}constructor(t,i,s){super(t,i,s),this.gd=!1,this.Sd=()=>{this.gd=!0,isFinite(this.jd())||this.wa.addEventListener("timeupdate",this.yd),this.yd(),this.bd(),this.wd()},this._d=t=>{t.adBreak.addEventListener("adbreakbegin",this.Td),t.adBreak.addEventListener("adbreakend",this.Md),this.yd()},this.xd=t=>{t.adBreak.removeEventListener("adbreakbegin",this.Td),t.adBreak.removeEventListener("adbreakend",this.Md),this.yd()},this.yd=()=>{if(!function(t){return Al(t,"adBreakMarkers")}(this.kd)||!this.gd)return;const t=this.wa.uplynk,i=null==t?void 0:t.ads.adBreaks.map((t=>({name:"UplynkAdBreakMarker",startTime:t.startTime,endTime:t.endTime})));this.md.removeChild("UplynkAdBreakMarkerBar"),this.md.addChild("UplynkAdBreakMarkerBar",{children:i})},this.Td=()=>{if(function(t){return Al(t,"adNotification")}(this.kd)){const t=this.wa.uplynk,i=t.ads.currentAdBreak;this.lo.addChild("UplynkAdBreakBar",{adBreakProvider:this.Pd}),-1!==i.skipOffset&&this.lo.addChild("UplynkAdSkipButton",{adBreak:i,skipCallback:t.ads.skip})}},this.Pd=()=>this.wa.uplynk.ads.currentAdBreak,this.Md=()=>{this.lo.removeChild("UplynkAdBreakBar"),this.lo.removeChild("UplynkAdSkipButton")},this.Cd=()=>{this.bd(),this.wd()};const e=this.wa.uplynk;null==e||e.ads.adBreaks.addEventListener("addadbreak",this._d),null==e||e.ads.adBreaks.addEventListener("removeadbreak",this.xd),null==e||e.assets.addEventListener("addasset",this.Cd),null==e||e.assets.addEventListener("removeasset",this.Cd),this.wa.addEventListener("loadeddata",this.Sd)}}}));export{lt as ChromelessPlayer,nt as ErrorCategory,st as ErrorCode,Uu as Player,Rt as cache,Bt as cast,pt as features,bt as players,wt as registerContentProtectionIntegration,ft as utils,gt as version,No as videojs};
|