var ov_cid = 2; var djCampaignId = "0"; var ov_vid = 631; var ov_appurl = "https://app.dejacast.com"; var ov_pslug = "PeZAlfow"; var ov_hash = "bd4536647d102064a8a261c2523ac7ab91f4d9c28f134e2e6902ffeaad3df476"; /*! For license information please see omniview.js.LICENSE.txt */ !function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=92)}([function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(12))},function(e,t,n){"use strict";n.d(t,"g",(function(){return a})),n.d(t,"e",(function(){return o})),n.d(t,"k",(function(){return l})),n.d(t,"j",(function(){return u})),n.d(t,"i",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"f",(function(){return f})),n.d(t,"c",(function(){return m})),n.d(t,"h",(function(){return g})),n.d(t,"d",(function(){return v})),n.d(t,"a",(function(){return y}));var i,r,s=n(0),a=function(e,t,n){return void 0===n&&(n=" "),(function(e,t){for(var n="";t--;)n+=e;return n}(n,t)+e.toString()).slice(-t)},o=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},l=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||o(e)||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},u=function(e){e=l(e);for(var t="",n=0;nd&&(u-=d,u-=d,u-=c(2))}return Number(u)}),f=function(e,t){var n=(void 0===t?{}:t).le,i=void 0!==n&&n;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0),e=c(e);for(var r,s=(r=e,Math.ceil(function(e){return e.toString(2).length}(r)/8)),a=new Uint8Array(new ArrayBuffer(s)),o=0;o=t.length&&u.call(t,(function(t,n){return t===(o[n]?o[n]&e[s+n]:e[s+n])}))}},function(e,t,n){(function(t){var i,r=void 0!==t?t:"undefined"!=typeof window?window:{},s=n(39);"undefined"!=typeof document?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"])||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=s),e.exports=i}).call(this,n(12))},function(e,t,n){var i=n(15);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.r(t),function(e){for(var i,r=n(0),s=n.n(r),a=n(2),o=n.n(a),l=n(8),u=n.n(l),d=n(6),c=n.n(d),h=n(4),p=n.n(h),f=n(3),m=n.n(f),g=n(26),v=n.n(g),y=n(21),b=n.n(y),_=n(22),T=n.n(_),S=n(20),w=n.n(S),k=n(27),E=n.n(k),A=n(11),C=n(32),j=n(7),x=n(24),P=n(1),I=n(9),L=n(29),O=n.n(L),D=n(10),M=n(14),R=n(13),N=n(30),U=n.n(N),B={},F=function(e,t){return B[e]=B[e]||[],t&&(B[e]=B[e].concat(t)),B[e]},V=function(e,t){var n=F(e).indexOf(t);return!(n<=-1)&&(B[e]=B[e].slice(),B[e].splice(n,1),!0)},H={prefixed:!0},q=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],W=q[0],z=0;z0?l:0)}if(s.a.console){var u=s.a.console[n];u||"debug"!==n||(u=s.a.console.info||s.a.console.log),u&&a&&o.test(n)&&u[Array.isArray(r)?"apply":"call"](s.a.console,r)}}}(t,r),r.createLogger=function(n){return e(t+": "+n)},r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},r.level=function(e){if("string"==typeof e){if(!r.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');i=e}return i},(r.history=function(){return X?[].concat(X):[]}).filter=function(e){return(X||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},r.history.clear=function(){X&&(X.length=0)},r.history.disable=function(){null!==X&&(X.length=0,X=null)},r.history.enable=function(){null===X&&(X=[])},r.error=function(){for(var e=arguments.length,t=new Array(e),r=0;r1?t-1:0),i=1;i=0)throw new Error("class has illegal whitespace characters")}function Ce(){return o.a===s.a.document}function je(e){return ee(e)&&1===e.nodeType}function xe(){try{return s.a.parent!==s.a.self}catch(e){return!0}}function Pe(e){return function(t,n){if(!Ee(t))return o.a[e](null);Ee(n)&&(n=o.a.querySelector(n));var i=je(n)?n:o.a;return i[e]&&i[e](t)}}function Ie(e,t,n,i){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var r=o.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(Y.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+n+"."),r.setAttribute(e,n)):"textContent"===e?Le(r,n):r[e]===n&&"tabIndex"!==e||(r[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){r.setAttribute(e,n[e])})),i&&Je(r,i),r}function Le(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Oe(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function De(e,t){return Ae(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function Me(e,t){return e.classList?e.classList.add(t):De(e,t)||(e.className=(e.className+" "+t).trim()),e}function Re(e,t){return e?(e.classList?e.classList.remove(t):(Ae(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e):(Y.warn("removeClass was called with an element that doesn't exist"),null)}function Ne(e,t,n){var i=De(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!i),n!==i)return n?Me(e,t):Re(e,t),e}function Ue(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var i=t[n];null==i||!1===i?e.removeAttribute(n):e.setAttribute(n,!0===i?"":i)}))}function Be(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var i=e.attributes,r=i.length-1;r>=0;r--){var s=i[r].name,a=i[r].value;"boolean"!=typeof e[s]&&-1===n.indexOf(","+s+",")||(a=null!==a),t[s]=a}return t}function Fe(e,t){return e.getAttribute(t)}function Ve(e,t,n){e.setAttribute(t,n)}function He(e,t){e.removeAttribute(t)}function qe(){o.a.body.focus(),o.a.onselectstart=function(){return!1}}function We(){o.a.onselectstart=function(){return!0}}function ze(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(ne(e,"height"))),n.width||(n.width=parseFloat(ne(e,"width"))),n}}function Ge(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,n=e.offsetHeight,i=0,r=0;e.offsetParent&&e!==o.a[H.fullscreenElement];)i+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{left:i,top:r,width:t,height:n}}function Xe(e,t){var n={x:0,y:0};if(Se)for(var i=e;i&&"html"!==i.nodeName.toLowerCase();){var r=ne(i,"transform");if(/^matrix/.test(r)){var s=r.slice(7,-1).split(/,\s/).map(Number);n.x+=s[4],n.y+=s[5]}else if(/^matrix3d/.test(r)){var a=r.slice(9,-1).split(/,\s/).map(Number);n.x+=a[12],n.y+=a[13]}i=i.parentNode}var o={},l=Ge(t.target),u=Ge(e),d=u.width,c=u.height,h=t.offsetY-(u.top-l.top),p=t.offsetX-(u.left-l.left);return t.changedTouches&&(p=t.changedTouches[0].pageX-u.left,h=t.changedTouches[0].pageY+u.top,Se&&(p-=n.x,h-=n.y)),o.y=1-Math.max(0,Math.min(1,h/c)),o.x=Math.max(0,Math.min(1,p/d)),o}function Ye(e){return ee(e)&&3===e.nodeType}function Ke(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Qe(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),je(e)||Ye(e)?e:"string"==typeof e&&/\S/.test(e)?o.a.createTextNode(e):void 0})).filter((function(e){return e}))}function Je(e,t){return Qe(t).forEach((function(t){return e.appendChild(t)})),e}function Ze(e,t){return Je(Ke(e),t)}function $e(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var et,tt=Pe("querySelector"),nt=Pe("querySelectorAll"),it=Object.freeze({__proto__:null,isReal:Ce,isEl:je,isInFrame:xe,createEl:Ie,textContent:Le,prependTo:Oe,hasClass:De,addClass:Me,removeClass:Re,toggleClass:Ne,setAttributes:Ue,getAttributes:Be,getAttribute:Fe,setAttribute:Ve,removeAttribute:He,blockTextSelection:qe,unblockTextSelection:We,getBoundingClientRect:ze,findPosition:Ge,getPointerPosition:Xe,isTextNode:Ye,emptyEl:Ke,normalizeContent:Qe,appendContent:Je,insertContent:Ze,isSingleLeftClick:$e,$:tt,$$:nt}),rt=!1,st=function(){if(!1!==et.options.autoSetup){var e=Array.prototype.slice.call(o.a.getElementsByTagName("video")),t=Array.prototype.slice.call(o.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(o.a.getElementsByTagName("video-js")),i=e.concat(t,n);if(i&&i.length>0)for(var r=0,s=i.length;r-1&&(r={passive:!0}),e.addEventListener(t,i.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,i.dispatcher)}function _t(e,t,n){if(ft.has(e)){var i=ft.get(e);if(i.handlers){if(Array.isArray(t))return gt(_t,e,t,n);var r=function(e,t){i.handlers[t]=[],mt(e,t)};if(void 0!==t){var s=i.handlers[t];if(s)if(n){if(n.guid)for(var a=0;a=t&&(e.apply(void 0,arguments),n=i)}},jt=function(){};jt.prototype.allowedEvents_={},jt.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},bt(this,e,t),this.addEventListener=n},jt.prototype.addEventListener=jt.prototype.on,jt.prototype.off=function(e,t){_t(this,e,t)},jt.prototype.removeEventListener=jt.prototype.off,jt.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},St(this,e,t),this.addEventListener=n},jt.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},wt(this,e,t),this.addEventListener=n},jt.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=vt(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Tt(this,e)},jt.prototype.dispatchEvent=jt.prototype.trigger,jt.prototype.queueTrigger=function(e){var t=this;kt||(kt=new Map);var n=e.type||e,i=kt.get(this);i||(i=new Map,kt.set(this,i));var r=i.get(n);i.delete(n),s.a.clearTimeout(r);var a=s.a.setTimeout((function(){i.delete(n),0===i.size&&(i=null,kt.delete(t)),t.trigger(e)}),0);i.set(n,a)};var xt=function(e){return"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e},Pt=function(e){return e instanceof jt||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},It=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},Lt=function(e,t,n){if(!e||!e.nodeName&&!Pt(e))throw new Error("Invalid target for "+xt(t)+"#"+n+"; must be a DOM node or evented object.")},Ot=function(e,t,n){if(!It(e))throw new Error("Invalid event type for "+xt(t)+"#"+n+"; must be a non-empty string or array.")},Dt=function(e,t,n){if("function"!=typeof e)throw new Error("Invalid listener for "+xt(t)+"#"+n+"; must be a function.")},Mt=function(e,t,n){var i,r,s,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a?(i=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],s=t[1]):(i=t[0],r=t[1],s=t[2]),Lt(i,e,n),Ot(r,e,n),Dt(s,e,n),{isTargetingSelf:a,target:i,type:r,listener:s=At(e,s)}},Rt=function(e,t,n,i){Lt(e,e,t),e.nodeName?Et[t](e,n,i):e[t](n,i)},Nt={on:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}},t.isDisposed=function(){return Boolean(this.isDisposed_)},t.player=function(){return this.player_},t.options=function(e){return e?(this.options_=qt(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return Ie(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var i=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),s=r&&r[i],a=i&&i.split("-")[0],o=r&&r[a],l=n;return s&&s[e]?l=s[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,n){var i=t[n-1],r=i;return void 0===i&&(r=e),r}))),l},t.handleLanguagechange=function(){},t.contentEl=function(){return this.contentEl_||this.el_},t.id=function(){return this.id_},t.name=function(){return this.name_},t.children=function(){return this.children_},t.getChildById=function(e){return this.childIndex_[e]},t.getChild=function(e){if(e)return this.childNameIndex_[e]},t.getDescendant=function(){for(var e=arguments.length,t=new Array(e),n=0;n=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Ht(e.name())]=null,this.childNameIndex_[Vt(e.name())]=null;var i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var i,r=this.options_,s=e.getComponent("Tech");(i=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!i.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var i,r;return"string"==typeof e?r=n[i=e]||t.options_[i]||{}:(i=e.name,r=e),{name:i,opts:r}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||Ht(t.name));return n&&!s.isTech(n)})).forEach((function(e){var n=e.name,i=e.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=t.options_.playerOptions;var s=t.addChild(n,i);s&&(t[n]=s)}}))}},t.buildCSSClass=function(){return""},t.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},t.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},t.$=function(e,t){return tt(e,t||this.contentEl())},t.$$=function(e,t){return nt(e,t||this.contentEl())},t.hasClass=function(e){return De(this.el_,e)},t.addClass=function(e){Me(this.el_,e)},t.removeClass=function(e){Re(this.el_,e)},t.toggleClass=function(e,t){Ne(this.el_,e,t)},t.show=function(){this.removeClass("vjs-hidden")},t.hide=function(){this.addClass("vjs-hidden")},t.lockShowing=function(){this.addClass("vjs-lock-showing")},t.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.getAttribute=function(e){return Fe(this.el_,e)},t.setAttribute=function(e,t){Ve(this.el_,e,t)},t.removeAttribute=function(e){He(this.el_,e)},t.width=function(e,t){return this.dimension("width",e,t)},t.height=function(e,t){return this.dimension("height",e,t)},t.dimensions=function(e,t){this.width(e,!0),this.height(t)},t.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var i=this.el_.style[e],r=i.indexOf("px");return-1!==r?parseInt(i.slice(0,r),10):parseInt(this.el_["offset"+Ht(e)],10)},t.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=ne(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+Ht(e);t=this.el_[n]}return t},t.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.currentWidth=function(){return this.currentDimension("width")},t.currentHeight=function(){return this.currentDimension("height")},t.focus=function(){this.el_.focus()},t.blur=function(){this.el_.blur()},t.handleKeyDown=function(e){this.player_&&(c.a.isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))},t.handleKeyPress=function(e){this.handleKeyDown(e)},t.emitTapEvents=function(){var e,t=0,n=null;this.on("touchstart",(function(i){1===i.touches.length&&(n={pageX:i.touches[0].pageX,pageY:i.touches[0].pageY},t=s.a.performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var i=t.touches[0].pageX-n.pageX,r=t.touches[0].pageY-n.pageY;Math.sqrt(i*i+r*r)>10&&(e=!1)}}));var i=function(){e=!1};this.on("touchleave",i),this.on("touchcancel",i),this.on("touchend",(function(i){(n=null,!0===e)&&(s.a.performance.now()-t<200&&(i.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=At(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.setTimeout=function(e,t){var n,i=this;return e=At(this,e),this.clearTimersOnDispose_(),n=s.a.setTimeout((function(){i.setTimeoutIds_.has(n)&&i.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),s.a.clearTimeout(e)),e},t.setInterval=function(e,t){e=At(this,e),this.clearTimersOnDispose_();var n=s.a.setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),s.a.clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=At(this,e),t=s.a.requestAnimationFrame((function(){n.rafIds_.has(t)&&n.rafIds_.delete(t),e()})),this.rafIds_.add(t),t):this.setTimeout(e,1e3/60)},t.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=At(this,t);var i=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}},t.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},t.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),s.a.cancelAnimationFrame(e)),e):this.clearTimeout(e)},t.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],i=t[1];e[n].forEach((function(t,n){return e[i](n)}))})),e.clearingTimersOnDispose_=!1})))},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var i,r=e.getComponent("Tech"),s=r&&r.isTech(n),a=e===n||e.prototype.isPrototypeOf(n.prototype);if(s||!a)throw i=s?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+i+".");t=Ht(t),e.components_||(e.components_={});var o=e.getComponent("Player");if("Player"===t&&o&&o.players){var l=o.players,u=Object.keys(l);if(l&&u.length>0&&u.map((function(e){return l[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[Vt(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function Kt(e,t,n,i){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,i,n.length-1),n[i][t]}function Qt(e){var t;return t=void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Kt.bind(null,"start",0,e),end:Kt.bind(null,"end",1,e)},s.a.Symbol&&s.a.Symbol.iterator&&(t[s.a.Symbol.iterator]=function(){return(e||[]).values()}),t}function Jt(e,t){return Array.isArray(e)?Qt(e):void 0===e||void 0===t?Qt():Qt([[e,t]])}function Zt(e,t){var n,i,r=0;if(!t)return 0;e&&e.length||(e=Jt(0,0));for(var s=0;st&&(i=t),r+=i-n;return r/t}function $t(e){if(e instanceof $t)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:ee(e)&&("number"==typeof e.code&&(this.code=e.code),$(this,e)),this.message||(this.message=$t.defaultMessages[this.code]||"")}Yt.prototype.supportsRaf_="function"==typeof s.a.requestAnimationFrame&&"function"==typeof s.a.cancelAnimationFrame,Yt.registerComponent("Component",Yt),$t.prototype.code=0,$t.prototype.message="",$t.prototype.status=null,$t.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],$t.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."};for(var en=0;en<$t.errorTypes.length;en++)$t[$t.errorTypes[en]]=en,$t.prototype[$t.errorTypes[en]]=en;function tn(e){return null!=e&&"function"==typeof e.then}function nn(e){tn(e)&&e.then(null,(function(e){}))}var rn=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,i){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},sn=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=rn(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(rn))},an=function(e,t){return e.forEach((function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return n.addCue(e)}))})),t.textTracks()},on=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handleKeyDown_=function(e){return i.handleKeyDown(e)},i.close_=function(e){return i.close(e)},i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=Ie("div",{className:"vjs-modal-dialog-content"},{role:"document"}),i.descEl_=Ie("p",{className:"vjs-modal-dialog-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),Le(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},n.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+e.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},n.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var i=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=i,this.on(n,"close",this.close_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_},n.fill=function(){this.fillWith(this.content())},n.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,i=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),Ze(t,e),this.trigger("modalfill"),i?n.insertBefore(t,i):n.appendChild(t);var r=this.getChild("closeButton");r&&n.appendChild(r.el_)},n.empty=function(){this.trigger("beforemodalempty"),Ke(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=o.a.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(e){if(e.stopPropagation(),c.a.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(c.a.isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),i=this.el_.querySelector(":focus"),r=0;r=0;i--)if(t[i].enabled){dn(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,n}m()(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&dn(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,dn(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(ln),hn=function(e,t){for(var n=0;n=0;i--)if(t[i].selected){hn(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(p()(n),"selectedIndex",{get:function(){for(var e=0;e0&&(s.a.console&&s.a.console.groupCollapsed&&s.a.console.groupCollapsed("Text Track parsing errors for "+t.src),i.forEach((function(e){return Y.error(e)})),s.a.console&&s.a.console.groupEnd&&s.a.console.groupEnd()),n.flush()},jn=function(e,t){var n={uri:e},i=En(e);i&&(n.cors=i);var r="use-credentials"===t.tech_.crossOrigin();r&&(n.withCredentials=r),b()(n,At(this,(function(e,n,i){if(e)return Y.error(e,n);t.loaded_=!0,"function"!=typeof s.a.WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return Cn(i,t);Y.error("vttjs failed to load, stopping trying to process "+t.src)})):Cn(i,t)})))},xn=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var i=qt(t,{kind:bn[t.kind]||"subtitles",language:t.language||t.srclang||""}),r=_n[i.mode]||"disabled",s=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(r="hidden"),(n=e.call(this,i)||this).tech_=i.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var a=new gn(n.cues_),o=new gn(n.activeCues_),l=!1;n.timeupdateHandler=At(p()(n),(function(e){void 0===e&&(e={}),this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))}));return n.tech_.one("dispose",(function(){n.stopTracking()})),"disabled"!==r&&n.startTracking(),Object.defineProperties(p()(n),{default:{get:function(){return s},set:function(){}},mode:{get:function(){return r},set:function(e){_n[e]&&r!==e&&(r=e,this.preload_||"disabled"===r||0!==this.cues.length||jn(this.src,this),this.stopTracking(),"disabled"!==r&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var e=this.tech_.currentTime(),t=[],n=0,i=this.cues.length;n=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(l=!1,t.length!==this.activeCues_.length)l=!0;else for(var s=0;s0)return void this.trigger("vttjsloaded");var t=o.a.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){t.onload=null,t.onerror=null})),s.a.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),i=function(e){return t.addTrack(e.track)},r=function(e){return t.removeTrack(e.track)};n.on("addtrack",i),n.on("removetrack",r),this.addWebVttScript_();var s=function(){return e.trigger("texttrackchange")},a=function(){s();for(var e=0;e=0;r--){var s=e[r];s[t]&&s[t](i,n)}}(e,n,o,a),o}var Hn={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},qn={setCurrentTime:1,setMuted:1,setVolume:1},Wn={play:1,pause:1};function zn(e){return function(t,n){return t===Bn?Bn:n[e]?n[e](t):t}}var Gn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Xn=function(e){void 0===e&&(e="");var t=kn(e);return Gn[t.toLowerCase()]||""};function Yn(e){if(!e.type){var t=Xn(e.src);t&&(e.type=t)}return e}var Kn=function(e){function t(t,n,i){var r,s=qt({createEl:!1},n);if(r=e.call(this,t,s,i)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var a=0,o=n.playerOptions.techOrder;a0;!this.player_.tech(!0)||(ge||pe)&&t||this.player_.tech(!0).focus(),this.player_.paused()?nn(this.player_.play()):this.player_.pause()}},t}(Qn);Yt.registerComponent("PosterImage",Jn);var Zn={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 $n(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function ei(e,t,n){try{e.style[t]=n}catch(e){return}}var ti=function(e){function t(t,n,i){var r;r=e.call(this,t,n,i)||this;var a=function(e){return r.updateDisplay(e)};return t.on("loadstart",(function(e){return r.toggleDisplay(e)})),t.on("texttrackchange",a),t.on("loadedmetadata",(function(e){return r.preselectTrack(e)})),t.ready(At(p()(r),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",a),t.on("playerresize",a),s.a.addEventListener("orientationchange",a),t.on("dispose",(function(){return s.a.removeEventListener("orientationchange",a)}));for(var e=this.options_.playerOptions.tracks||[],n=0;n0;return nn(t),void(!this.player_.tech(!0)||(ge||pe)&&n||this.player_.tech(!0).focus())}var i=this.player_.getChild("controlBar"),r=i&&i.getChild("playToggle");if(r){var s=function(){return r.focus()};tn(t)?t.then(s,(function(){})):this.setTimeout(s,1)}else this.player_.tech(!0).focus()},n.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},n.handleMouseDown=function(e){this.mouseused_=!0},t}(ii);ri.prototype.controlText_="Play Video",Yt.registerComponent("BigPlayButton",ri);var si=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).controlText(n&&n.controlText||i.localize("Close")),i}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){c.a.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(ii);Yt.registerComponent("CloseButton",si);var ai=function(e){function t(t,n){var i;return void 0===n&&(n={}),i=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,i.on(t,"play",(function(e){return i.handlePlay(e)})),i.on(t,"pause",(function(e){return i.handlePause(e)})),n.replay&&i.on(t,"ended",(function(e){return i.handleEnded(e)})),i}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){this.player_.paused()?nn(this.player_.play()):this.player_.pause()},n.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},n.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},n.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},n.handleEnded=function(e){var t=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",(function(e){return t.handleSeeked(e)}))},t}(ii);ai.prototype.controlText_="Play",Yt.registerComponent("PlayToggle",ai);var oi=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),i=Math.floor(e/60%60),r=Math.floor(e/3600),s=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=i=n="-"),(r=r>0||a>0?r+":":"")+(i=((r||s>=10)&&i<10?"0"+i:i)+":")+(n=n<10?"0"+n:n)},li=oi;function ui(e,t){return void 0===t&&(t=e),li(e,t)}var di=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,["timeupdate","ended"],(function(e){return i.updateContent(e)})),i.updateTextNode_(),i}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control"}),i=Ie("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return n.appendChild(i),this.contentEl_=Ie("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},n.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=ui(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,Y.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=o.a.createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}})))},n.updateContent=function(e){},t}(Yt);di.prototype.labelText_="Time",di.prototype.controlText_="Time",Yt.registerComponent("TimeDisplay",di);var ci=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(di);ci.prototype.labelText_="Current Time",ci.prototype.controlText_="Current Time",Yt.registerComponent("CurrentTimeDisplay",ci);var hi=function(e){function t(t,n){var i,r=function(e){return i.updateContent(e)};return(i=e.call(this,t,n)||this).on(t,"durationchange",r),i.on(t,"loadstart",r),i.on(t,"loadedmetadata",r),i}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},t}(di);hi.prototype.labelText_="Duration",hi.prototype.controlText_="Duration",Yt.registerComponent("DurationDisplay",hi);var pi=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),n=e.prototype.createEl.call(this,"div"),i=e.prototype.createEl.call(this,"span",{textContent:"/"});return n.appendChild(i),t.appendChild(n),t},t}(Yt);Yt.registerComponent("TimeDivider",pi);var fi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"durationchange",(function(e){return i.updateContent(e)})),i}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return!1!==this.options_.displayNegative&&t.insertBefore(Ie("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(di);fi.prototype.labelText_="Remaining Time",fi.prototype.controlText_="Remaining Time",Yt.registerComponent("RemainingTimeDisplay",fi);var mi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).updateShowing(),i.on(i.player(),"durationchange",(function(e){return i.updateShowing(e)})),i}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Ie("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ie("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(o.a.createTextNode(this.localize("LIVE"))),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(Yt);Yt.registerComponent("LiveDisplay",mi);var gi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).updateLiveEdgeStatus(),i.player_.liveTracker&&(i.updateLiveEdgeStatusHandler_=function(e){return i.updateLiveEdgeStatus(e)},i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatusHandler_)),i}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Ie("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},n.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},n.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},n.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,e.prototype.dispose.call(this)},t}(ii);gi.prototype.controlText_="Seek to live, currently playing live",Yt.registerComponent("SeekToLive",gi);var vi=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},yi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handleMouseDown_=function(e){return i.handleMouseDown(e)},i.handleMouseUp_=function(e){return i.handleMouseUp(e)},i.handleKeyDown_=function(e){return i.handleKeyDown(e)},i.handleClick_=function(e){return i.handleClick(e)},i.handleMouseMove_=function(e){return i.handleMouseMove(e)},i.update_=function(e){return i.update(e)},i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}m()(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),n.className=n.className+" vjs-slider",n=$({tabIndex:0},n),i=$({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),e.prototype.createEl.call(this,t,n,i)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||fe||e.preventDefault(),qe(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)},n.handleMouseMove=function(e){},n.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;We(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},n.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",(function(){var n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"}))),t}},n.getProgress=function(){return Number(vi(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=Xe(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){c.a.isEventKey(t,"Left")||c.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):c.a.isEventKey(t,"Right")||c.a.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){e.stopPropagation(),e.preventDefault()},n.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},t}(Yt);Yt.registerComponent("Slider",yi);var bi=function(e,t){return vi(e/t*100,0,100).toFixed(2)+"%"},_i=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).partEls_=[],i.on(t,"progress",(function(e){return i.update(e)})),i}m()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=Ie("span",{className:"vjs-control-text"}),i=Ie("span",{textContent:this.localize("Loaded")}),r=o.a.createTextNode(": ");return this.percentageEl_=Ie("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(i),n.appendChild(r),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var e=t.player_.liveTracker,n=t.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():t.player_.duration(),r=t.player_.bufferedEnd(),s=t.partEls_,a=bi(r,i);t.percent_!==a&&(t.el_.style.width=a,Le(t.percentageEl_,a),t.percent_=a);for(var o=0;on.length;c--)t.el_.removeChild(s[c-1]);s.length=n.length}))},t}(Yt);Yt.registerComponent("LoadProgressBar",_i);var Ti=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=Ct(At(p()(i),i.update),30),i}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var i=Ge(this.el_),r=ze(this.player_.el()),s=e.width*t;if(r&&i){var a=e.left-r.left+s,o=e.width-s+(r.right-e.right),l=i.width/2;ai.width&&(l=i.width),l=Math.round(l),this.el_.style.right="-"+l+"px",this.write(n)}},n.write=function(e){Le(this.el_,e)},n.updateTime=function(e,t,n,i){var r=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var s,a=r.player_.duration();if(r.player_.liveTracker&&r.player_.liveTracker.isLive()){var o=r.player_.liveTracker.liveWindow(),l=o-t*o;s=(l<1?"":"-")+ui(l,o)}else s=ui(n,a);r.update(e,t,s),i&&i()}))},t}(Yt);Yt.registerComponent("TimeTooltip",Ti);var Si=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=Ct(At(p()(i),i.update),30),i}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,i)}},t}(Yt);Si.prototype.options_={children:[]},Se||ue||Si.prototype.options_.children.push("timeTooltip"),Yt.registerComponent("PlayProgressBar",Si);var wi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=Ct(At(p()(i),i.update),30),i}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,(function(){n.el_.style.left=e.width*t+"px"}))},t}(Yt);wi.prototype.options_={children:["timeTooltip"]},Yt.registerComponent("MouseTimeDisplay",wi);var ki=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).setEventHandlers_(),i}m()(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update_=At(this,this.update),this.update=Ct(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(t){return e.enableInterval_(t)},this.disableIntervalHandler_=function(t){return e.disableInterval_(t)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in o.a&&"visibilityState"in o.a&&this.on(o.a,"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){"hidden"===o.a.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},n.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},n.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},n.update=function(t){var n=this;if("hidden"!==o.a.visibilityState){var i=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,r=n.player_.duration();t&&t.isLive()&&(r=n.player_.liveTracker.liveCurrentTime()),n.percent_!==i&&(n.el_.setAttribute("aria-valuenow",(100*i).toFixed(2)),n.percent_=i),n.currentTime_===e&&n.duration_===r||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[ui(e,r),ui(r,r)],"{1} of {2}")),n.currentTime_=e,n.duration_=r),n.bar&&n.bar.update(ze(n.el()),n.getProgress())})),i}},n.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},n.handleMouseDown=function(t){$e(t)&&(t.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},n.handleMouseMove=function(e,t){if(void 0===t&&(t=!1),$e(e)){var n;t||this.player_.scrubbing()||this.player_.scrubbing(!0);var i=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(i>=.99)return void r.seekToLiveEdge();var s=r.seekableStart(),a=r.liveCurrentTime();if((n=s+i*r.liveWindow())>=a&&(n=a),n<=s&&(n=s+.1),n===1/0)return}else(n=i*this.player_.duration())===this.player_.duration()&&(n-=.1);this.userSeek_(n)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?nn(this.player_.play()):this.update_()},n.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)},n.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)},n.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},n.handleKeyDown=function(t){var n=this.player_.liveTracker;if(c.a.isEventKey(t,"Space")||c.a.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(c.a.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(c.a.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(c()(t))){t.preventDefault(),t.stopPropagation();var i=10*(c.a.codes[c()(t)]-c.a.codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else c.a.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):c.a.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},n.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in o.a&&"visibilityState"in o.a&&this.off(o.a,"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(yi);ki.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Se||ue||ki.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Yt.registerComponent("SeekBar",ki);var Ei=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handleMouseMove=Ct(At(p()(i),i.handleMouseMove),30),i.throttledHandleMouseSeek=Ct(At(p()(i),i.handleMouseSeek),30),i.handleMouseUpHandler_=function(e){return i.handleMouseUp(e)},i.handleMouseDownHandler_=function(e){return i.handleMouseDown(e)},i.enable(),i}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("playProgressBar"),i=t.getChild("mouseTimeDisplay");if(n||i){var r=t.el(),s=Ge(r),a=Xe(r,e).x;a=vi(a,0,1),i&&i.update(s,a),n&&n.update(s,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_},n.disable=function(){if(this.children().forEach((function(e){return e.disable&&e.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&nn(this.player_.play())}},n.enable=function(){this.children().forEach((function(e){return e.enable&&e.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},n.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},n.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},t}(Yt);Ei.prototype.options_={children:["seekBar"]},Yt.registerComponent("ProgressControl",Ei);var Ai=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return i.handlePictureInPictureChange(e)})),i.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return i.handlePictureInPictureEnabledChange(e)})),i.on(t,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(function(){"audio"===t.currentType().substring(0,5)||t.audioPosterMode()||t.audioOnlyMode()?(t.isInPictureInPicture()&&t.exitPictureInPicture(),i.hide()):i.show()})),i.disable(),i}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){o.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},n.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},n.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},t}(ii);Ai.prototype.controlText_="Picture-in-Picture",Yt.registerComponent("PictureInPictureToggle",Ai);var Ci=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"fullscreenchange",(function(e){return i.handleFullscreenChange(e)})),!1===o.a[t.fsApi_.fullscreenEnabled]&&i.disable(),i}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(ii);Ci.prototype.controlText_="Fullscreen",Yt.registerComponent("FullscreenToggle",Ci);var ji=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return t.appendChild(e.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),t},t}(Yt);Yt.registerComponent("VolumeLevel",ji);var xi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=Ct(At(p()(i),i.update),30),i}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n,i){if(!n){var r=ze(this.el_),s=ze(this.player_.el()),a=e.width*t;if(!s||!r)return;var o=e.left-s.left+a,l=e.width-a+(s.right-e.right),u=r.width/2;or.width&&(u=r.width),this.el_.style.right="-"+u+"px"}this.write(i+"%")},n.write=function(e){Le(this.el_,e)},n.updateVolume=function(e,t,n,i,r){var s=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){s.update(e,t,n,i.toFixed(0)),r&&r()}))},t}(Yt);Yt.registerComponent("VolumeLevelTooltip",xi);var Pi=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=Ct(At(p()(i),i.update),30),i}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t,n){var i=this,r=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,r,(function(){n?i.el_.style.bottom=e.height*t+"px":i.el_.style.left=e.width*t+"px"}))},t}(Yt);Pi.prototype.options_={children:["volumeLevelTooltip"]},Yt.registerComponent("MouseVolumeLevelDisplay",Pi);var Ii=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on("slideractive",(function(e){return i.updateLastVolume_(e)})),i.on(t,"volumechange",(function(e){return i.updateARIAAttributes(e)})),t.ready((function(){return i.updateARIAAttributes()})),i}m()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},n.handleMouseDown=function(t){$e(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var n=this.el(),i=ze(n),r=this.vertical(),s=Xe(n,e);s=r?s.y:s.x,s=vi(s,0,1),t.update(i,s,r)}$e(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},n.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},n.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},n.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},n.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},n.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},n.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},n.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",(function(){0===e.player_.volume()&&e.player_.lastVolume_(t)}))},t}(yi);Ii.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Se||ue||Ii.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Ii.prototype.playerEvent="volumechange",Yt.registerComponent("VolumeBar",Ii);var Li=function(e){function t(t,n){var i;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||te(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),i=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(p()(i),t),i.throttledHandleMouseMove=Ct(At(p()(i),i.handleMouseMove),30),i.handleMouseUpHandler_=function(e){return i.handleMouseUp(e)},i.on("mousedown",(function(e){return i.handleMouseDown(e)})),i.on("touchstart",(function(e){return i.handleMouseDown(e)})),i.on("mousemove",(function(e){return i.handleMouseMove(e)})),i.on(i.volumeBar,["focus","slideractive"],(function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")})),i.on(i.volumeBar,["blur","sliderinactive"],(function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")})),i}m()(t,e);var n=t.prototype;return n.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},n.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},n.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},t}(Yt);Li.prototype.options_={children:["volumeBar"]},Yt.registerComponent("VolumeControl",Li);var Oi=function(e){function t(t,n){var i;return i=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(p()(i),t),i.on(t,["loadstart","volumechange"],(function(e){return i.update(e)})),i}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var i=n<.1?.1:n;this.player_.volume(i),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;Se&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)Re(this.el_,"vjs-vol-"+n);Me(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(ii);Oi.prototype.controlText_="Mute",Yt.registerComponent("MuteToggle",Oi);var Di=function(e){function t(t,n){var i;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||te(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(i=e.call(this,t,n)||this).handleKeyPressHandler_=function(e){return i.handleKeyPress(e)},i.on(t,["loadstart"],(function(e){return i.volumePanelState_(e)})),i.on(i.muteToggle,"keyup",(function(e){return i.handleKeyPress(e)})),i.on(i.volumeControl,"keyup",(function(e){return i.handleVolumeControlKeyUp(e)})),i.on("keydown",(function(e){return i.handleKeyPress(e)})),i.on("mouseover",(function(e){return i.handleMouseOver(e)})),i.on("mouseout",(function(e){return i.handleMouseOut(e)})),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}m()(t,e);var n=t.prototype;return n.sliderActive_=function(){this.addClass("vjs-slider-active")},n.sliderInactive_=function(){this.removeClass("vjs-slider-active")},n.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},n.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},n.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},n.handleVolumeControlKeyUp=function(e){c.a.isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),bt(o.a,"keyup",this.handleKeyPressHandler_)},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),_t(o.a,"keyup",this.handleKeyPressHandler_)},n.handleKeyPress=function(e){c.a.isEventKey(e,"Esc")&&this.handleMouseOut()},t}(Yt);Di.prototype.options_={children:["muteToggle","volumeControl"]},Yt.registerComponent("VolumePanel",Di);var Mi=function(e){function t(t,n){var i;return i=e.call(this,t,n)||this,n&&(i.menuButton_=n.menuButton),i.focusedChild_=-1,i.on("keydown",(function(e){return i.handleKeyDown(e)})),i.boundHandleBlur_=function(e){return i.handleBlur(e)},i.boundHandleTapClick_=function(e){return i.handleTapClick(e)},i}m()(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof Yt&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof Yt&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},n.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=Ie(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),bt(n,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),n},n.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},n.handleBlur=function(e){var t=e.relatedTarget||o.a.activeElement;if(!this.children().some((function(e){return e.el()===t}))){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter((function(t){return t.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){c.a.isEventKey(e,"Left")||c.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(c.a.isEventKey(e,"Right")||c.a.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},n.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},n.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},n.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(Yt);Yt.registerComponent("Menu",Mi);var Ri=function(e){function t(t,n){var i;void 0===n&&(n={}),(i=e.call(this,t,n)||this).menuButton_=new ii(t,n),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var r=ii.prototype.buildCSSClass();i.menuButton_.el_.className=i.buildCSSClass()+" "+r,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0;var s=function(e){return i.handleClick(e)};return i.handleMenuKeyUp_=function(e){return i.handleMenuKeyUp(e)},i.on(i.menuButton_,"tap",s),i.on(i.menuButton_,"click",s),i.on(i.menuButton_,"keydown",(function(e){return i.handleKeyDown(e)})),i.on(i.menuButton_,"mouseenter",(function(){i.addClass("vjs-hover"),i.menu.show(),bt(o.a,"keyup",i.handleMenuKeyUp_)})),i.on("mouseleave",(function(e){return i.handleMouseLeave(e)})),i.on("keydown",(function(e){return i.handleSubmenuKeyDown(e)})),i}m()(t,e);var n=t.prototype;return n.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))},n.createMenu=function(){var e=new Mi(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=Ie("li",{className:"vjs-menu-title",textContent:Ht(this.options_.title),tabIndex:-1}),n=new Yt(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var i=0;i-1&&"showing"===s.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},n.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),n=!0,i=0,r=t.length;i-1&&"showing"===s.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Fi);Yt.registerComponent("OffTextTrackMenuItem",Vi);var Hi=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return m()(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=Fi),this.label_&&(n=this.label_+" off"),e.push(new Vi(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var i=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r-1){var a=new t(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+s.kind+"-menu-item"),e.push(a)}}return e},t}(Ni);Yt.registerComponent("TextTrackButton",Hi);var qi=function(e){function t(t,n){var i,r=n.track,s=n.cue,a=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=s.text,n.selected=s.startTime<=a&&a=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ht(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,i=t.length;n-1&&(i.label_="captions"),i.menuButton_.controlText(Ht(i.label_)),i}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new Xi(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,Ki)},t}(Hi);Qi.prototype.kinds_=["captions","subtitles"],Qi.prototype.controlText_="Subtitles",Yt.registerComponent("SubsCapsButton",Qi);var Ji=function(e){function t(t,n){var i,r=n.track,s=t.audioTracks();n.label=r.label||r.language||"Unknown",n.selected=r.enabled,(i=e.call(this,t,n)||this).track=r,i.addClass("vjs-"+r.kind+"-menu-item");var a=function(){for(var e=arguments.length,t=new Array(e),n=0;n=0;n--)t.push(new $i(this.player(),{rate:e[n]+"x"}));return t},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){var t=this.player().playbackRate(),n=this.playbackRates(),i=(n.indexOf(t)+1)%n.length;this.player().playbackRate(n[i])},n.handlePlaybackRateschange=function(e){this.update()},n.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},t}(Ri);er.prototype.controlText_="Playback Rate",Yt.registerComponent("PlaybackRateMenuButton",er);var tr=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(t,n,i){return void 0===t&&(t="div"),void 0===n&&(n={}),void 0===i&&(i={}),n.className||(n.className=this.buildCSSClass()),e.prototype.createEl.call(this,t,n,i)},t}(Yt);Yt.registerComponent("Spacer",tr);var nr=function(e){function t(){return e.apply(this,arguments)||this}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:" "})},t}(tr);Yt.registerComponent("CustomControlSpacer",nr);var ir=function(e){function t(){return e.apply(this,arguments)||this}return m()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(Yt);ir.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in o.a&&ir.prototype.options_.children.splice(ir.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Yt.registerComponent("ControlBar",ir);var rr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"error",(function(e){return i.open(e)})),i}m()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(on);rr.prototype.options_=u()({},on.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Yt.registerComponent("ErrorDisplay",rr);var sr=["#000","Black"],ar=["#00F","Blue"],or=["#0FF","Cyan"],lr=["#0F0","Green"],ur=["#F0F","Magenta"],dr=["#F00","Red"],cr=["#FFF","White"],hr=["#FF0","Yellow"],pr=["1","Opaque"],fr=["0.5","Semi-Transparent"],mr=["0","Transparent"],gr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[sr,cr,dr,lr,ar,hr,ur,or]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[pr,fr,mr]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[cr,sr,dr,lr,ar,hr,ur,or]},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(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[pr,fr]},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:[mr,fr,pr]}};function vr(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}gr.windowColor.options=gr.backgroundColor.options;var yr=function(e){function t(t,n){var i;return n.temporary=!1,(i=e.call(this,t,n)||this).updateDisplay=i.updateDisplay.bind(p()(i)),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=Ie("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===n.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",(function(){i.saveSettings(),i.close()})),i.on(i.$(".vjs-default-button"),"click",(function(){i.setDefaults(),i.updateDisplay()})),Z(gr,(function(e){i.on(i.$(e.selector),"change",i.updateDisplay)})),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}m()(t,e);var n=t.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){var i=this;void 0===t&&(t=""),void 0===n&&(n="label");var r=gr[e],s=r.id.replace("%s",this.id_),a=[t,s].join(" ").trim();return["<"+n+' id="'+s+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(r.label),"",'").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['
','',this.localize("Text"),"",this.createElSelect_("color",e),'',this.createElSelect_("textOpacity",e),"","
"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['
','',this.localize("Background"),"",this.createElSelect_("backgroundColor",e),'',this.createElSelect_("backgroundOpacity",e),"","
"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['
','',this.localize("Window"),"",this.createElSelect_("windowColor",e),'',this.createElSelect_("windowOpacity",e),"","
"].join("")},n.createElColors_=function(){return Ie("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return Ie("div",{className:"vjs-track-settings-font",innerHTML:['
',this.createElSelect_("fontPercent","","legend"),"
",'
',this.createElSelect_("edgeStyle","","legend"),"
",'
',this.createElSelect_("fontFamily","","legend"),"
"].join("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return Ie("div",{className:"vjs-track-settings-controls",innerHTML:['",'"].join("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e,t,n,i=this;return t=function(e,t,n){var r,s,a=(r=i.$(t.selector),s=t.parser,vr(r.options[r.options.selectedIndex].value,s));return void 0!==a&&(e[n]=a),e},void 0===(n={})&&(n=0),J(e=gr).reduce((function(n,i){return t(n,e[i],i)}),n)},n.setValues=function(e){var t=this;Z(gr,(function(n,i){!function(e,t,n){if(t)for(var i=0;ithis.options_.liveTolerance;this.timeupdateSeen_&&i!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.toggleTracking()},n.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},n.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},n.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},n.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},n.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},n.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"==typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(o.a,"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},t}(Yt);Yt.registerComponent("LiveTracker",Tr);var Sr,wr=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),i=[],r="";if(!n.length)return!1;for(var s=0;s=2&&r.push("loadeddata"),e.readyState>=3&&r.push("canplay"),e.readyState>=4&&r.push("canplaythrough"),this.ready((function(){r.forEach((function(e){this.trigger(e)}),this)}))}},n.setScrubbing=function(e){this.isScrubbing_=e},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&we?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){Y(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;if(this.el_.duration===1/0&&ue&&fe&&0===this.el_.currentTime){return this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN}return this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",(function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)}))}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=s.a.navigator&&s.a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)nn(this.el_.play()),this.setTimeout((function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},n.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},n.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},n.requestVideoFrameCallback=function(t){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(t):e.prototype.requestVideoFrameCallback.call(this,t)},n.cancelVideoFrameCallback=function(t){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(t):e.prototype.cancelVideoFrameCallback.call(this,t)},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){t.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,i):e.prototype.addTextTrack.call(this,t,n,i)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=o.a.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var i=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(i),i},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),i=n.length;i--;)t!==n[i]&&t!==n[i].track||this.el().removeChild(n[i])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),s.a.performance&&"function"==typeof s.a.performance.now?e.creationTime=s.a.performance.now():s.a.performance&&s.a.performance.timing&&"number"==typeof s.a.performance.timing.navigationStart&&(e.creationTime=s.a.Date.now()-s.a.performance.timing.navigationStart),e},t}(Rn);xr(Pr,"TEST_VID",(function(){if(Ce()){var e=o.a.createElement("video"),t=o.a.createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}})),Pr.isSupported=function(){try{Pr.TEST_VID.volume=.5}catch(e){return!1}return!(!Pr.TEST_VID||!Pr.TEST_VID.canPlayType)},Pr.canPlayType=function(e){return Pr.TEST_VID.canPlayType(e)},Pr.canPlaySource=function(e,t){return Pr.canPlayType(e.type)},Pr.canControlVolume=function(){try{var e=Pr.TEST_VID.volume;Pr.TEST_VID.volume=e/2+.1;var t=e!==Pr.TEST_VID.volume;return t&&Se?(s.a.setTimeout((function(){Pr&&Pr.prototype&&(Pr.prototype.featuresVolumeControl=e!==Pr.TEST_VID.volume)})),!1):t}catch(e){return!1}},Pr.canMuteVolume=function(){try{var e=Pr.TEST_VID.muted;return Pr.TEST_VID.muted=!e,Pr.TEST_VID.muted?Ve(Pr.TEST_VID,"muted","muted"):He(Pr.TEST_VID,"muted"),e!==Pr.TEST_VID.muted}catch(e){return!1}},Pr.canControlPlaybackRate=function(){if(ue&&fe&&me<58)return!1;try{var e=Pr.TEST_VID.playbackRate;return Pr.TEST_VID.playbackRate=e/2+.1,e!==Pr.TEST_VID.playbackRate}catch(e){return!1}},Pr.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(o.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(o.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(o.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(o.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Pr.supportsNativeTextTracks=function(){return we||Se&&fe},Pr.supportsNativeVideoTracks=function(){return!(!Pr.TEST_VID||!Pr.TEST_VID.videoTracks)},Pr.supportsNativeAudioTracks=function(){return!(!Pr.TEST_VID||!Pr.TEST_VID.audioTracks)},Pr.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(e){var t=e[0],n=e[1];xr(Pr.prototype,t,(function(){return Pr[n]()}),!0)})),Pr.prototype.featuresVolumeControl=Pr.canControlVolume(),Pr.prototype.movingMediaElementInDOM=!Se,Pr.prototype.featuresFullscreenResize=!0,Pr.prototype.featuresProgressEvents=!0,Pr.prototype.featuresTimeupdateEvents=!0,Pr.prototype.featuresVideoFrameCallback=!(!Pr.TEST_VID||!Pr.TEST_VID.requestVideoFrameCallback),Pr.patchCanPlayType=function(){de>=4&&!he&&!fe&&(Sr=Pr.TEST_VID&&Pr.TEST_VID.constructor.prototype.canPlayType,Pr.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":Sr.call(this,e)})},Pr.unpatchCanPlayType=function(){var e=Pr.TEST_VID.constructor.prototype.canPlayType;return Sr&&(Pr.TEST_VID.constructor.prototype.canPlayType=Sr),e},Pr.patchCanPlayType(),Pr.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},Pr.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Pr.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Pr.prototype["set"+Ht(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(e){Pr.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Pr.prototype["set"+Ht(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Pr.prototype[e]=function(){return this.el_[e]()}})),Rn.withSourceHandlers(Pr),Pr.nativeSourceHandler={},Pr.nativeSourceHandler.canPlayType=function(e){try{return Pr.TEST_VID.canPlayType(e)}catch(e){return""}},Pr.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return Pr.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=kn(e.src);return Pr.nativeSourceHandler.canPlayType("video/"+n)}return""},Pr.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},Pr.nativeSourceHandler.dispose=function(){},Pr.registerSourceHandler(Pr.nativeSourceHandler),Rn.registerTech("Html5",Pr);var Ir=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Lr={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Or=["tiny","xsmall","small","medium","large","xlarge","huge"],Dr={};Or.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Dr[e]="vjs-layout-"+t}));var Mr={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Rr=function(e){function t(n,i,r){var s;if(n.id=n.id||i.id||"vjs_video_"+ht(),(i=$(t.getTagSettings(n),i)).initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language)if("function"==typeof n.closest){var a=n.closest("[lang]");a&&a.getAttribute&&(i.language=a.getAttribute("lang"))}else for(var l=n;l&&1===l.nodeType;){if(Be(l).hasOwnProperty("lang")){i.language=l.getAttribute("lang");break}l=l.parentNode}if((s=e.call(this,null,i,r)||this).boundDocumentFullscreenChange_=function(e){return s.documentFullscreenChange_(e)},s.boundFullWindowOnEscKey_=function(e){return s.fullWindowOnEscKey(e)},s.boundUpdateStyleEl_=function(e){return s.updateStyleEl_(e)},s.boundApplyInitTime_=function(e){return s.applyInitTime_(e)},s.boundUpdateCurrentBreakpoint_=function(e){return s.updateCurrentBreakpoint_(e)},s.boundHandleTechClick_=function(e){return s.handleTechClick_(e)},s.boundHandleTechDoubleClick_=function(e){return s.handleTechDoubleClick_(e)},s.boundHandleTechTouchStart_=function(e){return s.handleTechTouchStart_(e)},s.boundHandleTechTouchMove_=function(e){return s.handleTechTouchMove_(e)},s.boundHandleTechTouchEnd_=function(e){return s.handleTechTouchEnd_(e)},s.boundHandleTechTap_=function(e){return s.handleTechTap_(e)},s.isFullscreen_=!1,s.log=K(s.id_),s.fsApi_=H,s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,s.debugEnabled_=!1,s.audioOnlyMode_=!1,s.audioPosterMode_=!1,s.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=n,s.tagAttributes=n&&Be(n),s.language(s.options_.language),i.languages){var u={};Object.getOwnPropertyNames(i.languages).forEach((function(e){u[e.toLowerCase()]=i.languages[e]})),s.languages_=u}else s.languages_=t.prototype.options_.languages;s.resetCache_(),s.poster_=i.poster||"",s.controls_=!!i.controls,n.controls=!1,n.removeAttribute("controls"),s.changingSrc_=!1,s.playCallbacks_=[],s.playTerminatedQueue_=[],n.hasAttribute("autoplay")?s.autoplay(!0):s.autoplay(s.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach((function(e){if("function"!=typeof s[e])throw new Error('plugin "'+e+'" does not exist')})),s.scrubbing_=!1,s.el_=s.createEl(),Ut(p()(s),{eventBusKey:"el_"}),s.fsApi_.requestFullscreen&&(bt(o.a,s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_),s.on(s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_)),s.fluid_&&s.on(["playerreset","resize"],s.boundUpdateStyleEl_);var d=qt(s.options_);i.plugins&&Object.keys(i.plugins).forEach((function(e){s[e](i.plugins[e])})),i.debug&&s.debug(!0),s.options_.playerOptions=d,s.middleware_=[],s.playbackRates(i.playbackRates),s.initChildren(),s.isAudio("audio"===n.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),be&&s.addClass("vjs-touch-enabled"),Se||s.addClass("vjs-workinghover"),t.players[s.id_]=p()(s);var c="7.21.4".split(".")[0];return s.addClass("vjs-v"+c),s.userActive(!0),s.reportUserActivity(),s.one("play",(function(e){return s.listenForUserActivity_(e)})),s.on("stageclick",(function(e){return s.handleStageClick_(e)})),s.on("keydown",(function(e){return s.handleKeyDown(e)})),s.on("languagechange",(function(e){return s.handleLanguagechange(e)})),s.breakpoints(s.options_.breakpoints),s.responsive(s.options_.responsive),s.on("ready",(function(){s.audioPosterMode(s.options_.audioPosterMode),s.audioOnlyMode(s.options_.audioOnlyMode)})),s}m()(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),_t(o.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),_t(o.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),t.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Un[this.id()]=null,Mn.names.forEach((function(e){var t=Mn[e],i=n[t.getterName]();i&&i.off&&i.off()})),e.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})},n.createEl=function(){var t,n=this.tag,i=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),r="video-js"===this.tag.tagName.toLowerCase();i?t=this.el_=n.parentNode:r||(t=this.el_=e.prototype.createEl.call(this,"div"));var a=Be(n);if(r){for(t=this.el_=n,n=this.tag=o.a.createElement("video");t.children.length;)n.appendChild(t.firstChild);De(t,"video-js")||Me(t,"video-js"),t.appendChild(n),i=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(e){}}))}if(n.setAttribute("tabindex","-1"),a.tabindex="-1",(ge||fe&&ye)&&(n.setAttribute("role","application"),a.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in a&&delete a.width,"height"in a&&delete a.height,Object.getOwnPropertyNames(a).forEach((function(e){r&&"class"===e||t.setAttribute(e,a[e]),r&&n.setAttribute(e,a[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==s.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=ut("vjs-styles-dimensions");var l=tt(".vjs-styles-defaults"),u=tt("head");u.insertBefore(this.styleEl_,l?l.nextSibling:u.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var d=n.getElementsByTagName("a"),c=0;c0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),r=i[1]/i[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/r:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*r,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),dt(this.styleEl_,"\n ."+n+" {\n width: "+e+"px;\n height: "+t+"px;\n }\n\n ."+n+".vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: "+100*r+"%;\n }\n ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,o="number"==typeof this.height_?this.height_:this.options_.height,l=this.tech_&&this.tech_.el();l&&(a>=0&&(l.width=a),o>=0&&(l.height=o))}},n.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var i=Ht(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(Rn.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;var s=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(s=!1);var a={source:t,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};Mn.names.forEach((function(e){var t=Mn[e];a[t.getterName]=n[t.privateName]})),$(a,this.options_[i]),$(a,this.options_[r]),$(a,this.options_[e.toLowerCase()]),this.tag&&(a.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(a.startTime=this.cache_.currentTime);var o=Rn.getTech(e);if(!o)throw new Error("No Tech named '"+i+"' exists! '"+i+"' should be registered using videojs.registerTech()'");this.tech_=new o(a),this.tech_.ready(At(this,this.handleTechReady_),!0),an(this.textTracksJson_||[],this.tech_),Ir.forEach((function(e){n.on(n.tech_,e,(function(t){return n["handleTech"+Ht(e)+"_"](t)}))})),Object.keys(Lr).forEach((function(e){n.on(n.tech_,e,(function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Lr[e]+"_"].bind(n),event:t}):n["handleTech"+Lr[e]+"_"](t)}))})),this.on(this.tech_,"loadstart",(function(e){return n.handleTechLoadStart_(e)})),this.on(this.tech_,"sourceset",(function(e){return n.handleTechSourceset_(e)})),this.on(this.tech_,"waiting",(function(e){return n.handleTechWaiting_(e)})),this.on(this.tech_,"ended",(function(e){return n.handleTechEnded_(e)})),this.on(this.tech_,"seeking",(function(e){return n.handleTechSeeking_(e)})),this.on(this.tech_,"play",(function(e){return n.handleTechPlay_(e)})),this.on(this.tech_,"firstplay",(function(e){return n.handleTechFirstPlay_(e)})),this.on(this.tech_,"pause",(function(e){return n.handleTechPause_(e)})),this.on(this.tech_,"durationchange",(function(e){return n.handleTechDurationChange_(e)})),this.on(this.tech_,"fullscreenchange",(function(e,t){return n.handleTechFullscreenChange_(e,t)})),this.on(this.tech_,"fullscreenerror",(function(e,t){return n.handleTechFullscreenError_(e,t)})),this.on(this.tech_,"enterpictureinpicture",(function(e){return n.handleTechEnterPictureInPicture_(e)})),this.on(this.tech_,"leavepictureinpicture",(function(e){return n.handleTechLeavePictureInPicture_(e)})),this.on(this.tech_,"error",(function(e){return n.handleTechError_(e)})),this.on(this.tech_,"posterchange",(function(e){return n.handleTechPosterChange_(e)})),this.on(this.tech_,"textdata",(function(e){return n.handleTechTextData_(e)})),this.on(this.tech_,"ratechange",(function(e){return n.handleTechRateChange_(e)})),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===i&&this.tag||Oe(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e=this;Mn.names.forEach((function(t){var n=Mn[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=sn(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},n.tech=function(e){return void 0===e&&Y.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},n.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},n.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},n.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},n.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())},n.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,i=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var i=t.play();if(tn(i))return i.catch((function(e){throw n(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))}))};if("any"!==e||this.muted()?n="muted"!==e||this.muted()?this.play():i():tn(n=this.play())&&(n=n.catch(i)),tn(n))return n.then((function(){t.trigger({type:"autoplay-success",autoplay:e})})).catch((function(){t.trigger({type:"autoplay-failure",autoplay:e})}))}},n.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter((function(e){return e.src===t}));if(n.length)return n[0].type;for(var i=e.$$("source"),r=0;r0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(e){return e.callback(e.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},n.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime();this.on("timeupdate",(function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))}))},n.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},n.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},n.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},n.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},n.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},n.handleTechFirstPlay_=function(){this.options_.starttime&&(Y.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},n.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},n.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},n.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},n.handleTechClick_=function(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?nn(this.play()):this.pause()))},n.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(t){return t.contains(e.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},n.handleTechTap_=function(){this.userActive(!this.userActive())},n.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},n.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},n.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},n.handleStageClick_=function(){this.reportUserActivity()},n.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},n.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),i=o.a[this.fsApi_.fullscreenElement]===n;!i&&n.matches?i=n.matches(":"+this.fsApi_.fullscreen):!i&&n.msMatchesSelector&&(i=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(i)}},n.handleTechFullscreenChange_=function(e,t){var n=this;t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(function(){n.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))},n.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},n.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},n.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},n.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},n.handleTechError_=function(){var e=this.tech_.error();this.error(e)},n.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},n.getCache=function(){return this.cache_},n.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},n.techCall_=function(e,t){this.ready((function(){if(e in qn)return function(e,t,n,i){return t[n](e.reduce(zn(n),i))}(this.middleware_,this.tech_,e,t);if(e in Wn)return Vn(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw Y(e),e}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in Hn)return function(e,t,n){return e.reduceRight(zn(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Wn)return Vn(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw Y("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw Y("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw Y(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||s.a.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=nn),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(we||Se);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!n&&i&&this.load());var r=this.techGet_("play");i&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))},n.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))},n.pause=function(){this.techCall_("pause")},n.paused=function(){return!1!==this.techGet_("paused")},n.played=function(){return this.techGet_("played")||Jt(0,0)},n.scrubbing=function(e){if(void 0===e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},n.currentTime=function(e){return void 0!==e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},n.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},n.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},n.remainingTime=function(){return this.duration()-this.currentTime()},n.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},n.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=Jt(0,0)),e},n.bufferedPercent=function(){return Zt(this.buffered(),this.duration())},n.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},n.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},n.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},n.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},n.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},n.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},n.isFullscreen=function(e){if(void 0!==e){var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},n.requestFullscreen=function(e){var t=this.options_.Promise||s.a.Promise;if(t){var n=this;return new t((function(t,i){function r(){n.off("fullscreenerror",a),n.off("fullscreenchange",s)}function s(){r(),t()}function a(e,t){r(),i(t)}n.one("fullscreenchange",s),n.one("fullscreenerror",a);var o=n.requestFullscreenHelper_(e);o&&(o.then(r,r),o.then(t,i))}))}return this.requestFullscreenHelper_()},n.requestFullscreenHelper_=function(e){var t,n=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var i=this.el_[this.fsApi_.requestFullscreen](t);return i&&i.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),i}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||s.a.Promise;if(e){var t=this;return new e((function(e,n){function i(){t.off("fullscreenerror",s),t.off("fullscreenchange",r)}function r(){i(),e()}function s(e,t){i(),n(t)}t.one("fullscreenchange",r),t.one("fullscreenerror",s);var a=t.exitFullscreenHelper_();a&&(a.then(i,i),a.then(e,n))}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=o.a[this.fsApi_.exitFullscreen]();return t&&nn(t.then((function(){return e.isFullscreen(!1)}))),t}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},n.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=o.a.documentElement.style.overflow,bt(o.a,"keydown",this.boundFullWindowOnEscKey_),o.a.documentElement.style.overflow="hidden",Me(o.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){c.a.isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,_t(o.a,"keydown",this.boundFullWindowOnEscKey_),o.a.documentElement.style.overflow=this.docOrigOverflow,Re(o.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},n.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},n.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},n.requestPictureInPicture=function(){if("pictureInPictureEnabled"in o.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in o.a)return o.a.exitPictureInPicture()},n.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){(function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;if("input"===t)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type);return-1!==["textarea"].indexOf(t)})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))}},n.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,i=void 0===n?function(e){return c.a.isEventKey(e,"f")}:n,r=t.muteKey,s=void 0===r?function(e){return c.a.isEventKey(e,"m")}:r,a=t.playPauseKey,l=void 0===a?function(e){return c.a.isEventKey(e,"k")||c.a.isEventKey(e,"Space")}:a;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();var u=Yt.getComponent("FullscreenToggle");!1!==o.a[this.fsApi_.fullscreenEnabled]&&u.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation(),Yt.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(l.call(this,e)){e.preventDefault(),e.stopPropagation(),Yt.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},n.canPlayType=function(e){for(var t,n=0,i=this.options_.techOrder;n1?n.handleSrc_(i.slice(1)):(n.changingSrc_=!1,n.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void n.triggerReady());s=r,a=n.tech_,s.forEach((function(e){return e.setTech&&e.setTech(a)}))})),this.options_.retryOnError&&i.length>1){var r=function(){n.error(null),n.handleSrc_(i.slice(1),!0)},s=function(){n.off("error",r)};this.one("error",r),this.one("playing",s),this.resetRetryOnError_=function(){n.off("error",r),n.off("playing",s)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)},n.src=function(e){return this.handleSrc_(e,!1)},n.src_=function(e){var t,n,i=this,r=this.selectSource([e]);return!r||(t=r.tech,n=this.techName_,Ht(t)!==Ht(n)?(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready((function(){i.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var e=this,t=this.options_.Promise||s.a.Promise;this.paused()||!t?this.doReset_():nn(this.play().then((function(){return e.doReset_()})))},n.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Pt(this)&&this.trigger("playerreset")},n.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},n.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar||{},t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},n.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},n.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},n.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},n.currentSource=function(){return this.cache_.source||{}},n.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},n.currentType=function(){return this.currentSource()&&this.currentSource().type||""},n.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},n.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},n.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},n.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},n.poster=function(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},n.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},n.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},n.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},n.error=function(e){var t=this;if(void 0===e)return this.error_||null;if(F("beforeerror").forEach((function(n){var i=n(t,e);ee(i)&&!Array.isArray(i)||"string"==typeof i||"number"==typeof i||null===i?e=i:t.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){var n=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],n),void this.one("loadstart",(function(){this.off(["click","touchstart"],n)}))}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new $t(e),this.addClass("vjs-error"),Y.error("(CODE:"+this.error_.code+" "+$t.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),F("error").forEach((function(e){return e(t,t.error_)}))},n.reportUserActivity=function(e){this.userActivity_=!0},n.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},n.listenForUserActivity_=function(){var e,t,n,i=At(this,this.reportUserActivity),r=function(t){i(),this.clearInterval(e)};this.on("mousedown",(function(){i(),this.clearInterval(e),e=this.setInterval(i,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,i())})),this.on("mouseup",r),this.on("mouseleave",r);var s,a=this.getChild("controlBar");!a||Se||ue||(a.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),a.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",i),this.on("keyup",i),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(s);var e=this.options_.inactivityTimeout;e<=0||(s=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},n.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},n.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},n.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},n.enableAudioOnlyUI_=function(){var e=this;this.addClass("vjs-audio-only-mode");var t=this.children(),n=this.getChild("ControlBar"),i=n&&n.currentHeight();t.forEach((function(t){t!==n&&t.el_&&!t.hasClass("vjs-hidden")&&(t.hide(),e.audioOnlyCache_.hiddenChildren.push(t))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(i),this.trigger("audioonlymodechange")},n.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach((function(e){return e.show()})),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")},n.audioOnlyMode=function(e){var t=this;if("boolean"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=e;var n=this.options_.Promise||s.a.Promise;if(n){if(e){var i=[];return this.isInPictureInPicture()&&i.push(this.exitPictureInPicture()),this.isFullscreen()&&i.push(this.exitFullscreen()),this.audioPosterMode()&&i.push(this.audioPosterMode(!1)),n.all(i).then((function(){return t.enableAudioOnlyUI_()}))}return n.resolve().then((function(){return t.disableAudioOnlyUI_()}))}e?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_()},n.enablePosterModeUI_=function(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},n.disablePosterModeUI_=function(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},n.audioPosterMode=function(e){var t=this;if("boolean"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=e;var n=this.options_.Promise||s.a.Promise;return n?e?this.audioOnlyMode()?this.audioOnlyMode(!1).then((function(){t.enablePosterModeUI_()})):n.resolve().then((function(){t.enablePosterModeUI_()})):n.resolve().then((function(){t.disablePosterModeUI_()})):e?(this.audioOnlyMode()&&this.audioOnlyMode(!1),void this.enablePosterModeUI_()):void this.disablePosterModeUI_()},n.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},n.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},n.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},n.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},n.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Pt(this)&&this.trigger("languagechange"))},n.languages=function(){return qt(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=qt(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n"):function(){}},$r=function(e,t){var n,i=[];if(e&&e.length)for(n=0;n=t}))},ts=function(e,t){return $r(e,(function(e){return e-1/30>=t}))},ns=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n "+e.end(n));return t.join(", ")},is=function(e){for(var t=[],n=0;ns||(n+=t>r&&t<=s?s-t:s-r)}return n},as=Xr.createTimeRange,os=function(e,t){if(!t.preload)return t.duration;var n=0;return(t.parts||[]).forEach((function(e){n+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(n+=e.partTargetDuration)})),n},ls=function(e){return(e.segments||[]).reduce((function(e,t,n){return t.parts?t.parts.forEach((function(i,r){e.push({duration:i.duration,segmentIndex:n,partIndex:r,part:i,segment:t})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e}),[])},us=function(e){var t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},ds=function(e){var t=e.preloadSegment;if(t){var n=t.parts,i=(t.preloadHints||[]).reduce((function(e,t){return e+("PART"===t.type?1:0)}),0);return i+=n&&n.length?n.length:0}},cs=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=us(t).length>0;return n&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:n&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},hs=function(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),tr){var a=[r,i];i=a[0],r=a[1]}if(i<0){for(var o=i;oDate.now()},vs=function(e){return e.excludeUntil&&e.excludeUntil===1/0},ys=function(e){var t=gs(e);return!e.disabled&&!t},bs=function(e,t){return t.attributes&&t.attributes[e]},_s=function(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((function(e){return!!ys(e)&&(e.attributes.BANDWIDTH||0)0)for(var h=u-1;h>=0;h--){var p=l[h];if(o+=p.duration,a){if(o<0)continue}else if(o+1/30<=0)continue;return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:s-fs({defaultDuration:t.targetDuration,durationList:l,startIndex:u,endIndex:h})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:n}}if(u<0){for(var f=u;f<0;f++)if((o-=t.targetDuration)<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:n};u=0}for(var m=u;m0)continue}else if(o-1/30>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:s+fs({defaultDuration:t.targetDuration,durationList:l,startIndex:u,endIndex:m})}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:n}},isEnabled:ys,isDisabled:function(e){return e.disabled},isBlacklisted:gs,isIncompatible:vs,playlistEnd:ms,isAes:function(e){for(var t=0;t-1&&o!==a.length-1&&(n._HLS_part=o),(o>-1||a.length)&&r--}n._HLS_msn=r}if(t.serverControl&&t.serverControl.canSkipUntil&&(n._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){var l=new s.a.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){n.hasOwnProperty(e)&&l.searchParams.set(e,n[e])})),e=l.toString()}return e}(n,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:n,withCredentials:this.withCredentials},(function(t,n){if(e.request)return t?e.playlistRequestError(e.request,e.media(),"HAVE_METADATA"):void e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}))}},n.playlistRequestError=function(e,t,n){var i=t.uri,r=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[r],status:e.status,message:"HLS playlist request error at URL: "+i+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},n.parseManifest_=function(e){var t=this,n=e.url;return function(e){var t=e.onwarn,n=e.oninfo,i=e.manifestString,r=e.customTagParsers,s=void 0===r?[]:r,a=e.customTagMappers,o=void 0===a?[]:a,l=e.experimentalLLHLS,u=new C.a;t&&u.on("warn",t),n&&u.on("info",n),s.forEach((function(e){return u.addParser(e)})),o.forEach((function(e){return u.addTagMapper(e)})),u.push(i),u.end();var d=u.manifest;if(l||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){d.hasOwnProperty(e)&&delete d[e]})),d.segments&&d.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!d.targetDuration){var c=10;d.segments&&d.segments.length&&(c=d.segments.reduce((function(e,t){return Math.max(e,t.duration)}),0)),t&&t("manifest has no targetDuration defaulting to "+c),d.targetDuration=c}var h=us(d);if(h.length&&!d.partTargetDuration){var p=h.reduce((function(e,t){return Math.max(e,t.duration)}),0);t&&(t("manifest has no partTargetDuration defaulting to "+p),Es.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),d.partTargetDuration=p}return d}({onwarn:function(e){var i=e.message;return t.logger_("m3u8-parser warn for "+n+": "+i)},oninfo:function(e){var i=e.message;return t.logger_("m3u8-parser info for "+n+": "+i)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},n.haveMetadata=function(e){var t=e.playlistString,n=e.playlistObject,i=e.url,r=e.id;this.request=null,this.state="HAVE_METADATA";var s=n||this.parseManifest_({url:i,manifestString:t});s.lastRequest=Date.now(),xs({playlist:s,uri:i,id:r});var a=Ns(this.master,s);this.targetDuration=s.partTargetDuration||s.targetDuration,this.pendingMedia_=null,a?(this.master=a,this.media_=this.master.playlists[r]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Us(this.media(),!!a)),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),s.a.clearTimeout(this.mediaUpdateTimeout),s.a.clearTimeout(this.finalRenditionTimeout),this.off()},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e,t){var n=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(s.a.clearTimeout(this.finalRenditionTimeout),t){var i=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=s.a.setTimeout(this.media.bind(this,e,!1),i)}else{var r=this.state,a=!this.media_||e.id!==this.media_.id,o=this.master.playlists[e.id];if(o&&o.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(a&&(this.trigger("mediachanging"),"HAVE_MASTER"===r?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Us(e,!0)),a){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},(function(t,i){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=Jr(n.handleManifestRedirects,e.resolvedUri,i),t)return n.playlistRequestError(n.request,e,r);n.haveMetadata({playlistString:i.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===r?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.mediaUpdateTimeout&&(s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},n.load=function(e){var t=this;this.mediaUpdateTimeout&&(s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var n=this.media();if(e){var i=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=s.a.setTimeout((function(){t.mediaUpdateTimeout=null,t.load()}),i)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.updateMediaUpdateTimeout_=function(e){var t=this;this.mediaUpdateTimeout&&(s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=s.a.setTimeout((function(){t.mediaUpdateTimeout=null,t.trigger("mediaupdatetimeout"),t.updateMediaUpdateTimeout_(e)}),e))},n.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=s.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){e.setupInitialPlaylist(e.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=Jr(e.handleManifestRedirects,e.src,n);var i=e.parseManifest_({manifestString:n.responseText,url:e.src});e.setupInitialPlaylist(i)}}))},n.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},n.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Ps(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=Ms(e),e.segments.forEach((function(t){Ds(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||s.a.location.href;this.master=function(e,t){var n=As(0,t),i={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:s.a.location.href,resolvedUri:s.a.location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return i.playlists[n]=i.playlists[0],i.playlists[t]=i.playlists[0],i}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(Ls),Fs=Xr.xhr,Vs=Xr.mergeOptions,Hs=function(e,t,n,i){var r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(r||e.responseText)))),i(t,e)},qs=function(){var e=function e(t,n){t=Vs({timeout:45e3},t);var i=e.beforeRequest||Xr.Vhs.xhr.beforeRequest;if(i&&"function"==typeof i){var r=i(t);r&&(t=r)}var s=(!0===Xr.Vhs.xhr.original?Fs:Xr.Vhs.xhr)(t,(function(e,t){return Hs(s,e,t,n)})),a=s.abort;return s.abort=function(){return s.aborted=!0,a.apply(s,arguments)},s.uri=t.uri,s.requestTime=Date.now(),s};return e.original=!0,e},Ws=function(e){var t,n={};return e.byterange&&(n.Range="bytes="+(t=e.byterange).offset+"-"+("bigint"==typeof t.offset||"bigint"==typeof t.length?s.a.BigInt(t.offset)+s.a.BigInt(t.length)-s.a.BigInt(1):t.offset+t.length-1)),n},zs=function(e,t){return e.start(t)+"-"+e.end(t)},Gs=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},Xs=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Ys=function(e){var t={};return Object.keys(e).forEach((function(n){var i=e[n];Object(P.e)(i)?t[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:t[n]=i})),t},Ks=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Qs=function(e){return e.resolvedUri},Js=function(e){for(var t=Array.prototype.slice.call(e),n="",i=0;ii){if(e>i+.25*s.duration)return null;n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(i,t);if(!s)return r({message:"valid programTime was not found"});if("estimate"===s.type)return r({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:s.estimatedStart});var a={mediaSeconds:i},o=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,i=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*i)}(i,s.segment);return o&&(a.programDateTime=o.toISOString()),r(null,a)},ea=function e(t){var n=t.programTime,i=t.playlist,r=t.retryCount,s=void 0===r?2:r,a=t.seekTo,o=t.pauseAfterSeek,l=void 0===o||o,u=t.tech,d=t.callback;if(!d)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!i||!a)return d({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!i.endList&&!u.hasStarted_)return d({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;tnew Date(o.getTime()+1e3*l)?null:(n>o&&(i=a),{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:ks.duration(t,t.mediaSequence+t.segments.indexOf(i)),type:i.videoTimingInfo?"accurate":"estimate"})}(n,i);if(!c)return d({message:n+" was not found in the stream"});var h=c.segment,p=function(e,t){var n,i;try{n=new Date(e),i=new Date(t)}catch(e){}var r=n.getTime();return(i.getTime()-r)/1e3}(h.dateTimeObject,n);if("estimate"===c.type)return 0===s?d({message:n+" is not buffered yet. Try again"}):(a(c.estimatedStart+p),void u.one("seeked",(function(){e({programTime:n,playlist:i,retryCount:s-1,seekTo:a,pauseAfterSeek:l,tech:u,callback:d})})));var f=h.start+p;u.one("seeked",(function(){return d(null,u.currentTime())})),l&&u.pause(),a(f)},ta=function(e,t){if(4===e.readyState)return t()},na=Xr.EventTarget,ia=Xr.mergeOptions,ra=function(e,t){if(!Rs(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var n=0;n=d+u)return o(t,{response:s.subarray(u,u+d),status:n.status,uri:n.uri});i.request=i.vhs_.xhr({uri:a,responseType:"arraybuffer",headers:Ws({byterange:e.sidx.byterange})},o)}))}else this.mediaRequest_=s.a.setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},s.a.clearTimeout(this.minimumUpdatePeriodTimeout_),s.a.clearTimeout(this.mediaRequest_),s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},n.hasPendingRequest=function(){return this.request||this.mediaRequest_},n.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},n.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(i){t.haveMetadata({startingState:n,playlist:e})})))},n.haveMetadata=function(e){var t=e.startingState,n=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[n.id]=n,this.mediaRequest_=null,this.refreshMedia_(n.id),"HAVE_MASTER"===t?this.trigger("loadedmetadata"):this.trigger("mediachange")},n.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(s.a.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;s.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var n=this.media();if(e){var i=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=s.a.setTimeout((function(){return t.load()}),i)}else this.started?n&&!n.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},n.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_((function(t,n){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=s.a.setTimeout((function(){return e.haveMaster_()}),0)},n.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(n,i){if(!t.requestErrored_(n,i)){var r=i.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?t.masterLoaded_=Date.parse(i.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Jr(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,i),r?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(i,r)}))):e(i,r)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t=this,n=Object(I.d)(this.masterPlaylistLoader_.masterXml_);return null===n?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===n.method?(this.masterPlaylistLoader_.clientOffset_=n.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Qr(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(i,r){if(t.request){if(i)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var s;s="HEAD"===n.method?r.responseHeaders&&r.responseHeaders.date?Date.parse(r.responseHeaders.date):t.masterLoaded_:Date.parse(r.responseText),t.masterPlaylistLoader_.clientOffset_=s-Date.now(),e()}})))},n.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},n.handleMaster_=function(){this.mediaRequest_=null;var e,t,n,i,r,s,a,o=this.masterPlaylistLoader_.master,l=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:o},t=e.masterXml,n=e.srcUrl,i=e.clientOffset,r=e.sidxMapping,s=e.previousManifest,a=Object(I.c)(t,{manifestUri:n,clientOffset:i,sidxMapping:r,previousManifest:s}),Ps(a,n,sa),a);o&&(l=aa(o,l,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=l||o;var u=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return u&&u!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=u),(!o||l&&l.minimumUpdatePeriod!==o.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(l)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(s.a.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout"):this.createMUPTimeout_(t)},n.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=s.a.setTimeout((function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)},n.refreshXml_=function(){var e=this;this.requestMaster_((function(t,n){var i,r,s;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(i=e.masterPlaylistLoader_.master,r=e.masterPlaylistLoader_.sidxMapping_,s=oa(i.playlists,r),js(i,(function(e,t,n,i){if(e.playlists&&e.playlists.length){var a=e.playlists;s=ia(s,oa(a,r))}})),s),e.addSidxSegments_(e.media(),e.state,(function(t){e.refreshMedia_(e.media().id)})))}))},n.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var n=this.masterPlaylistLoader_.master.playlists,i=!this.media_||this.media_!==n[e];if(i?this.media_=n[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){!function e(){t.media().endList||(t.mediaUpdateTimeout=s.a.setTimeout((function(){t.trigger("mediaupdatetimeout"),e()}),Us(t.media(),Boolean(i))))}()}this.trigger("loadedplaylist")},t}(na),ua={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},da=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},ca=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),n=da(new Worker(t));n.objURL=t;var i=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(t),i.call(this)},n}},ha=function(e){return"var browserWorkerPolyFill = "+da.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},pa=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},fa=ca(ha(pa((function(){var t=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var i;return!!e[t]&&(i=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(i,1),i>-1)},this.trigger=function(t){var n,i,r,s;if(n=e[t])if(2===arguments.length)for(r=n.length,i=0;i>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},g=function(e){return n(w.hdlr,x[e])},m=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),n(w.mdhd,t)},f=function(e){return n(w.mdia,m(e),g(e.type),o(e))},a=function(e){return n(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return n(w.minf,"video"===e.type?n(w.vmhd,P):n(w.smhd,I),i(),y(e))},l=function(e,t){for(var i=[],r=t.length;r--;)i[r]=_(t[r]);return n.apply(null,[w.moof,a(e)].concat(i))},u=function(e){for(var t=e.length,i=[];t--;)i[t]=h(e[t]);return n.apply(null,[w.moov,c(4294967295)].concat(i).concat(d(e)))},d=function(e){for(var t=e.length,i=[];t--;)i[t]=T(e[t]);return n.apply(null,[w.mvex].concat(i))},c=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return n(w.mvhd,t)},v=function(e){var t,i,r=e.samples||[],s=new Uint8Array(4+r.length);for(i=0;i>>8),a.push(255&r[t].byteLength),a=a.concat(Array.prototype.slice.call(r[t]));for(t=0;t>>8),o.push(255&s[t].byteLength),o=o.concat(Array.prototype.slice.call(s[t]));if(i=[w.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),n(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([r.length],a,[s.length],o))),n(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.sarRatio[0],u=e.sarRatio[1];i.push(n(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u])))}return n.apply(null,i)},U=function(e){return n(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),r(e))},p=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return n(w.tkhd,t)},_=function(e){var t,i,r,s,a,o;return t=n(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/z),o=Math.floor(e.baseMediaDecodeTime%z),i=n(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),92,"audio"===e.type?(r=S(e,92),n(w.traf,t,i,r)):(s=v(e),r=S(e,s.length+92),n(w.traf,t,i,r,s))},h=function(e){return e.duration=e.duration||4294967295,n(w.trak,p(e),f(e))},T=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),n(w.trex,t)},V=function(e,t){var n=0,i=0,r=0,s=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(i=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(s=8)),[0,0,n|i|r|s,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,t){var i,r,s,a,o,l;for(t+=20+16*(a=e.samples||[]).length,s=V(a,t),(r=new Uint8Array(s.length+16*a.length)).set(s),i=s.length,l=0;l>>24,r[i++]=(16711680&o.duration)>>>16,r[i++]=(65280&o.duration)>>>8,r[i++]=255&o.duration,r[i++]=(4278190080&o.size)>>>24,r[i++]=(16711680&o.size)>>>16,r[i++]=(65280&o.size)>>>8,r[i++]=255&o.size,r[i++]=o.flags.isLeading<<2|o.flags.dependsOn,r[i++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,r[i++]=61440&o.flags.degradationPriority,r[i++]=15&o.flags.degradationPriority,r[i++]=(4278190080&o.compositionTimeOffset)>>>24,r[i++]=(16711680&o.compositionTimeOffset)>>>16,r[i++]=(65280&o.compositionTimeOffset)>>>8,r[i++]=255&o.compositionTimeOffset;return n(w.trun,r)},B=function(e,t){var i,r,s,a,o,l;for(t+=20+8*(a=e.samples||[]).length,s=V(a,t),(i=new Uint8Array(s.length+8*a.length)).set(s),r=s.length,l=0;l>>24,i[r++]=(16711680&o.duration)>>>16,i[r++]=(65280&o.duration)>>>8,i[r++]=255&o.duration,i[r++]=(4278190080&o.size)>>>24,i[r++]=(16711680&o.size)>>>16,i[r++]=(65280&o.size)>>>8,i[r++]=255&o.size;return n(w.trun,i)},S=function(e,t){return"audio"===e.type?B(e,t):F(e,t)};s=function(){return n(w.ftyp,k,E,k,A)};var G,X,Y,K,Q,J,Z,$,ee=function(e){return n(w.mdat,e)},te=l,ne=function(e){var t,n=s(),i=u(e);return(t=new Uint8Array(n.byteLength+i.byteLength)).set(n),t.set(i,n.byteLength),t},ie=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},re=function(e){var t,n,i=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,i.byteLength=0,t=0;t1&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},oe=function(e,t){var n,i,r,s,a,o=t||0,l=[];for(n=0;npe/2))){for((a=he()[e.samplerate])||(a=t[0].data),o=0;o=n?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},Te=function(e){var t,n,i=[];for(t=0;t=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Me.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Me.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Me.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Re=function(e,t,n){this.serviceNum=e,this.text="",this.currentWindow=new Me(-1),this.windows=[],this.stream=n,"string"==typeof t&&this.createTextDecoder(t)};Re.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new Me(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},Re.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Re.prototype.createTextDecoder=function(e){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Ne=function e(t){t=t||{},e.prototype.init.call(this);var n,i=this,r=t.captionServices||{},s={};Object.keys(r).forEach((function(e){n=r[e],/^SERVICE/.test(e)&&(s[e]=n.encoding)})),this.serviceEncodings=s,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Ne.prototype=new H,Ne.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Ne.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,i=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(i)},Ne.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,i=null,r=0,s=t[r++];for(e.seq=s>>6,e.sizeCode=63&s;r>5)&&i>0&&(n=s=t[r++]),this.pushServiceBlock(n,r,i),i>0&&(r+=i-1)},Ne.prototype.pushServiceBlock=function(e,t,n){var i,r=t,s=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,r));r>5,s.rowLock=(16&i)>>4,s.columnLock=(8&i)>>3,s.priority=7&i,i=n[++e],s.relativePositioning=(128&i)>>7,s.anchorVertical=127&i,i=n[++e],s.anchorHorizontal=i,i=n[++e],s.anchorPoint=(240&i)>>4,s.rowCount=15&i,i=n[++e],s.columnCount=63&i,i=n[++e],s.windowStyle=(56&i)>>3,s.penStyle=7&i,s.virtualRowCount=s.rowCount+1,e},Ne.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.winAttr;return i=n[++e],r.fillOpacity=(192&i)>>6,r.fillRed=(48&i)>>4,r.fillGreen=(12&i)>>2,r.fillBlue=3&i,i=n[++e],r.borderType=(192&i)>>6,r.borderRed=(48&i)>>4,r.borderGreen=(12&i)>>2,r.borderBlue=3&i,i=n[++e],r.borderType+=(128&i)>>5,r.wordWrap=(64&i)>>6,r.printDirection=(48&i)>>4,r.scrollDirection=(12&i)>>2,r.justify=3&i,i=n[++e],r.effectSpeed=(240&i)>>4,r.effectDirection=(12&i)>>2,r.displayEffect=3&i,e},Ne.prototype.flushDisplayed=function(e,t){for(var n=[],i=0;i<8;i++)t.windows[i].visible&&!t.windows[i].isEmpty()&&n.push(t.windows[i].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},Ne.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Ne.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<>4,r.offset=(12&i)>>2,r.penSize=3&i,i=n[++e],r.italics=(128&i)>>7,r.underline=(64&i)>>6,r.edgeType=(56&i)>>3,r.fontStyle=7&i,e},Ne.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penColor;return i=n[++e],r.fgOpacity=(192&i)>>6,r.fgRed=(48&i)>>4,r.fgGreen=(12&i)>>2,r.fgBlue=3&i,i=n[++e],r.bgOpacity=(192&i)>>6,r.bgRed=(48&i)>>4,r.bgGreen=(12&i)>>2,r.bgBlue=3&i,i=n[++e],r.edgeRed=(48&i)>>4,r.edgeGreen=(12&i)>>2,r.edgeBlue=3&i,e},Ne.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,i=n[++e],r.row=15&i,i=n[++e],r.column=63&i,e},Ne.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var Ue={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Be=function(e){return null===e?"":(e=Ue[e]||e,String.fromCharCode(e))},Fe=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ve=function(){for(var e=[],t=15;t--;)e.push("");return e},He=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,i,r,s;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),i=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Ve();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ve();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ve()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(i,r))s=Be((i=(3&i)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isExtCharacter(i,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),s=Be((i=(3&i)<<8)|r),this[this.mode_](e.pts,s),this.column_++;else if(this.isMidRowCode(i,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&r)&&this.addFormatting(e.pts,["i"]),1==(1&r)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(i,r))this.column_+=3&r;else if(this.isPAC(i,r)){var a=Fe.indexOf(7968&t);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&(this.clearFormatting(e.pts),this.row_=a),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(i)&&(0===r&&(r=null),s=Be(i),s+=Be(r),this[this.mode_](e.pts,s),this.column_+=s.length)}else this.lastControlCode_=null}};He.prototype=new H,He.prototype.flushDisplayed=function(e){var t=this.displayed_.map((function(e,t){try{return e.trim()}catch(e){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+t+"."}),""}}),this).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},He.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ve(),this.nonDisplayed_=Ve(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},He.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},He.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},He.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},He.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},He.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},He.prototype.isPAC=function(e,t){return e>=this.BASE_&&e=64&&t<=127},He.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},He.prototype.isNormalChar=function(e){return e>=32&&e<=127},He.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ve(),this.displayed_=Ve()),void 0!==t&&t!==this.row_)for(var n=0;n"}),"");this[this.mode_](e,n)},He.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce((function(e,t){return e+""}),"");this.formatting_=[],this[this.mode_](e,t)}},He.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},He.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},He.prototype.shiftRowsUp_=function(){var e;for(e=0;et&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Ge=function e(t){var n,i;e.prototype.init.call(this),this.type_=t||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=ze(e.dts,i),e.pts=ze(e.pts,i),n=e.dts,this.trigger("data",e))},this.flush=function(){i=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ge.prototype=new H;var Xe,Ye=Ge,Ke=ze,Qe=function(e,t,n){var i,r="";for(i=t;i>>2;d*=4,d+=3&u[7],o.timeStamp=d,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),n+=10,n+=a}while(n>>4>1&&(i+=t[i]+1),0===n.pid)n.type="pat",e(t.subarray(i),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(i),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,n]):this.processPes_(t,i,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=We.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=We.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new H,tt.STREAM_TYPES={h264:27,adts:15},(nt=function(){var e,t=this,n=!1,i={data:[],size:0},r={data:[],size:0},s={data:[],size:0},a=function(e,n,i){var r,s,a=new Uint8Array(e.size),o={type:n},l=0,u=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l>>3,c.pts*=4,c.pts+=(6&d[13])>>>1,c.dts=c.pts,64&h&&(c.dts=(14&d[14])<<27|(255&d[15])<<20|(254&d[16])<<12|(255&d[17])<<5|(254&d[18])>>>3,c.dts*=4,c.dts+=(6&d[18])>>>1)),c.data=d.subarray(9+d[8])),r="video"===n||o.packetLength<=e.size,(i||r)&&(e.size=0,e.data.length=0),r&&t.trigger("data",o)}};nt.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case We.H264_STREAM_TYPE:e=i,t="video";break;case We.ADTS_STREAM_TYPE:e=r,t="audio";break;case We.METADATA_STREAM_TYPE:e=s,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var i={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),n=!0,t.trigger("data",i)}})[o.type]()},this.reset=function(){i.size=0,i.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(i,"video"),a(r,"audio"),a(s,"timed-metadata")},this.flush=function(){if(!n&&e){var i={type:"metadata",tracks:[]};null!==e.video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",i)}n=!1,this.flushStreams_(),this.trigger("done")}}).prototype=new H;var st={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:et,TransportParseStream:tt,ElementaryStream:nt,TimestampRolloverStream:rt,CaptionStream:qe.CaptionStream,Cea608Stream:qe.Cea608Stream,Cea708Stream:qe.Cea708Stream,MetadataStream:it};for(var at in We)We.hasOwnProperty(at)&&(st[at]=We[at]);var ot,lt=st,ut=pe,dt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(ot=function(e){var t,n=0;ot.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes "+e+" to "+t+" in frame "+n+" outside syncword"})},this.push=function(i){var r,s,a,o,l,u=0;if(e||(n=0),"audio"===i.type){var d;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+i.data.byteLength)).set(a),t.set(i.data,a.byteLength)):t=i.data;u+7>5,l=(o=1024*(1+(3&t[u+6])))*ut/dt[(60&t[u+2])>>>2],t.byteLength-u>>6&3),channelcount:(1&t[u+2])<<2|(192&t[u+3])>>>6,samplerate:dt[(60&t[u+2])>>>2],samplingfrequencyindex:(60&t[u+2])>>>2,samplesize:16,data:t.subarray(u+7+s,u+r)}),n++,u+=r}else"number"!=typeof d&&(d=u),u++;"number"==typeof d&&(this.skipWarn_(d,u),d=null),t=t.subarray(u)}},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new H;var ct,ht,pt,ft=ot,mt=function(e){var t=e.byteLength,n=0,i=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+i},this.loadWord=function(){var r=e.byteLength-t,s=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");s.set(e.subarray(r,r+a)),n=new DataView(s.buffer).getUint32(0),i=8*a,t-=a},this.skipBits=function(e){var r;i>e?(n<<=e,i-=e):(e-=i,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),n<<=e,i-=e)},this.readBits=function(e){var r=Math.min(i,e),s=n>>>32-r;return(i-=r)>0?n<<=r:t>0&&this.loadWord(),(r=e-r)>0?s<>>e))return n<<=e,i-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(ht=function(){var e,t,n=0;ht.prototype.init.call(this),this.push=function(i){var r;t?((r=new Uint8Array(t.byteLength+i.data.byteLength)).set(t),r.set(i.data,t.byteLength),t=r):t=i.data;for(var s=t.byteLength;n3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new H,pt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(ct=function(){var e,t,n,i,r,s,a,o=new ht;ct.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,i=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:n,dts:i,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(a.subarray(1)),o.config=s(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var n,i=8,r=8;for(n=0;n=0?n:0,(16&e[t+5])>>4?n+20:n+10},_t=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Tt={isLikelyAacData:function(e){var t=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=bt(t,n))}(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:bt,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,i=e[t+4]<<3;return 6144&e[t+3]|i|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5>>2];t++}return null},parseAacTimestamp:function(e){var t,n,i;t=10,64&e[5]&&(t+=4,t+=_t(e.subarray(10,14)));do{if((n=_t(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){i=e.subarray(t+10,t+n+10);for(var r=0;r>>2;return a*=4,a+=3&s[7]}break}}t+=10,t+=n}while(t=3;)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255!=(255&e[l])||240!=(240&e[l+1]))l++;else{if(e.length-l<7)break;if(l+(o=Tt.parseAdtsSize(e,l))>e.length)break;s={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",s),l+=o}else{if(e.length-l<10)break;if(l+(o=Tt.parseId3TagSize(e,l))>e.length)break;r={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",r),l+=o}i=e.length-l,e=i>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new H;var St,wt,kt,Et,At=gt,Ct=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],jt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],xt=vt.H264Stream,Pt=Tt.isLikelyAacData,It=pe,Lt=function(e,t){t.stream=e,this.trigger("log",t)},Ot=function(e,t){for(var n=Object.keys(t),i=0;i=-1e4&&n<=45e3&&(!i||o>n)&&(i=s,o=n));return i?i.gop:null},this.alignGopsAtStart_=function(e){var t,n,i,r,s,o,l,u;for(s=e.byteLength,o=e.nalCount,l=e.duration,t=n=0;ti.pts?t++:(n++,s-=r.byteLength,o-=r.nalCount,l-=r.duration);return 0===n?e:n===e.length?null:((u=e.slice(n)).byteLength=s,u.duration=l,u.nalCount=o,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(e){var t,n,i,r,s,o,l;for(t=a.length-1,n=e.length-1,s=null,o=!1;t>=0&&n>=0;){if(i=a[t],r=e[n],i.pts===r.pts){o=!0;break}i.pts>r.pts?t--:(t===a.length-1&&(s=n),n--)}if(!o&&null===s)return null;if(0===(l=o?n:s))return e;var u=e.slice(l),d=u.reduce((function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e}),{byteLength:0,duration:0,nalCount:0});return u.byteLength=d.byteLength,u.duration=d.duration,u.nalCount=d.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(e){a=e}}).prototype=new H,(Et=function(e,t){this.numberOfTracks=0,this.metadataStream=t,void 0!==(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Et.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new H,Et.prototype.flush=function(e){var t,n,i,r,s=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,jt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ct.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,i=ne(this.pendingTracks),a.initSegment=new Uint8Array(i.byteLength),a.initSegment.set(i),a.data=new Uint8Array(this.pendingBytes),r=0;r=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Et.prototype.setRemux=function(e){this.remuxTracks=e},(kt=function(e){var t,n,i=this,r=!0;kt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="aac",r.metadataStream=new lt.MetadataStream,r.aacStream=new At,r.audioTimestampRolloverStream=new lt.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new lt.TimestampRolloverStream("timed-metadata"),r.adtsStream=new ft,r.coalesceStream=new Et(e,r.metadataStream),r.headOfPipeline=r.aacStream,r.aacStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.aacStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.metadataStream.on("timestamp",(function(e){r.aacStream.setTimestamp(e.timeStamp)})),r.aacStream.on("data",(function(s){"timed-metadata"!==s.type&&"audio"!==s.type||r.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:i.baseMediaDecodeTime},codec:"adts",type:"audio"},r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new wt(n,e),r.audioSegmentStream.on("log",i.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream),i.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Ot(this,r)},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new lt.MetadataStream,r.packetStream=new lt.TransportPacketStream,r.parseStream=new lt.TransportParseStream,r.elementaryStream=new lt.ElementaryStream,r.timestampRolloverStream=new lt.TimestampRolloverStream,r.adtsStream=new ft,r.h264Stream=new xt,r.captionStream=new lt.CaptionStream(e),r.coalesceStream=new Et(e,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream).pipe(r.timestampRolloverStream),r.timestampRolloverStream.pipe(r.h264Stream),r.timestampRolloverStream.pipe(r.adtsStream),r.timestampRolloverStream.pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",(function(s){var a;if("metadata"===s.type){for(a=s.tracks.length;a--;)t||"video"!==s.tracks[a].type?n||"audio"!==s.tracks[a].type||((n=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime):(t=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime;t&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new St(t,e),r.videoSegmentStream.on("log",i.getLogTrigger_("videoSegmentStream")),r.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,r.audioSegmentStream.setEarliestDts(t.dts-i.baseMediaDecodeTime))})),r.videoSegmentStream.on("processedGopsInfo",i.trigger.bind(i,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),r.videoSegmentStream.on("timingInfo",i.trigger.bind(i,"videoTimingInfo")),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),n&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new wt(n,e),r.audioSegmentStream.on("log",i.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),r.audioSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"audioSegmentTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream)),i.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("id3Frame",(function(e){e.dispatchType=r.metadataStream.dispatchType,i.trigger("id3Frame",e)})),r.coalesceStream.on("caption",this.trigger.bind(this,"caption")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),Ot(this,r)},this.setBaseMediaDecodeTime=function(i){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=i),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,ke(n),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,ke(t),r.captionStream.reset()),r.timestampRolloverStream&&r.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(n){n.stream=e,t.trigger("log",n)}},this.push=function(e){if(r){var t=Pt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){r=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new H;var Rt,Nt,Ut,Bt={Transmuxer:kt,VideoSegmentStream:St,AudioSegmentStream:wt,AUDIO_PROPERTIES:Ct,VIDEO_PROPERTIES:jt,generateSegmentTimingInfo:Mt},Ft=function(e){return e>>>0},Vt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Ht=Ft,qt=function e(t,n){var i,r,s,a,o,l=[];if(!n.length)return null;for(i=0;i1?i+r:t.byteLength,s===n[0]&&(1===n.length?l.push(t.subarray(i+8,a)):(o=e(t.subarray(i+8,a),n.slice(1))).length&&(l=l.concat(o))),i=a;return l},Wt=Ft,zt=W.getUint64,Gt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=zt(e.subarray(4)):t.baseMediaDecodeTime=Wt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},Xt=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Yt=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&n.flags[2],s=4&n.flags[2],a=1&n.flags[1],o=2&n.flags[1],l=4&n.flags[1],u=8&n.flags[1],d=i.getUint32(4),c=8;for(r&&(n.dataOffset=i.getInt32(c),c+=4),s&&d&&(t={flags:Xt(e.subarray(c,c+4))},c+=4,a&&(t.duration=i.getUint32(c),c+=4),o&&(t.size=i.getUint32(c),c+=4),u&&(1===n.version?t.compositionTimeOffset=i.getInt32(c):t.compositionTimeOffset=i.getUint32(c),c+=4),n.samples.push(t),d--);d--;)t={},a&&(t.duration=i.getUint32(c),c+=4),o&&(t.size=i.getUint32(c),c+=4),l&&(t.flags=Xt(e.subarray(c,c+4)),c+=4),u&&(1===n.version?t.compositionTimeOffset=i.getInt32(c):t.compositionTimeOffset=i.getUint32(c),c+=4),n.samples.push(t);return n},Kt=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},r=1&i.flags[2],s=2&i.flags[2],a=8&i.flags[2],o=16&i.flags[2],l=32&i.flags[2],u=65536&i.flags[0],d=131072&i.flags[0];return t=8,r&&(t+=4,i.baseDataOffset=n.getUint32(12),t+=4),s&&(i.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(i.defaultSampleDuration=n.getUint32(t),t+=4),o&&(i.defaultSampleSize=n.getUint32(t),t+=4),l&&(i.defaultSampleFlags=n.getUint32(t)),u&&(i.durationIsEmpty=!0),!r&&d&&(i.baseDataOffsetIsMoof=!0),i},Qt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},Jt="undefined"!=typeof window?window:void 0!==Qt?Qt:"undefined"!=typeof self?self:{},Zt=Pe,$t=qe.CaptionStream,en=function(e,t){for(var n=e,i=0;i0?Gt(u[0]).baseMediaDecodeTime:0,c=qt(s,["trun"]);t===l&&c.length>0&&(n=function(e,t,n){var i,r,s,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(r=0;r+40;){var l=t.shift();this.parse(l,s,a)}return(o=function(e,t,n){if(null===t)return null;var i=tn(e,t)[t]||{};return{seiNals:i.seiNals,logs:i.logs,timescale:n}}(e,n,i))&&o.logs&&(r.logs=r.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):r.logs.length?{logs:r.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;s?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={},r.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,i=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},rn=Ft,sn=function(e){return("00"+e.toString(16)).slice(-2)},an=W.getUint64;Rt=function(e,t){var n=qt(t,["moof","traf"]).reduce((function(t,n){var i,r,s=qt(n,["tfhd"])[0],a=rn(s[4]<<24|s[5]<<16|s[6]<<8|s[7]),o=e[a]||9e4,l=qt(n,["tfdt"])[0],u=new DataView(l.buffer,l.byteOffset,l.byteLength);return"bigint"==typeof(i=1===l[0]?an(l.subarray(4,12)):u.getUint32(4))?r=i/Jt.BigInt(o):"number"!=typeof i||isNaN(i)||(r=i/o),r11?(r.codec+=".",r.codec+=sn(d[9]),r.codec+=sn(d[10]),r.codec+=sn(d[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)?(d=c.subarray(28),"esds"===Vt(d.subarray(4,8))&&d.length>20&&0!==d[19]?(r.codec+="."+sn(d[19]),r.codec+="."+sn(d[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"):r.codec=r.codec.toLowerCase())}var h=qt(e,["mdia","mdhd"])[0];h&&(r.timescale=Ut(h)),n.push(r)})),n};var on=Rt,ln=Nt,un=(Ut=function(e){var t=0===e[0]?12:20;return rn(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},function(e){var t=31&e[1];return t<<=8,t|=e[2]}),dn=function(e){return!!(64&e[1])},cn=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},hn=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},pn={parseType:function(e,t){var n=un(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=dn(e),n=4+cn(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=dn(e),i=4+cn(e);if(n&&(i+=e[i]+1),1&e[i+5]){var r;r=3+((15&e[i+1])<<8|e[i+2])-4;for(var s=12+((15&e[i+10])<<8|e[i+11]);s=e.byteLength)return null;var n,i=null;return 192&(n=e[t+7])&&((i={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,i.pts*=4,i.pts+=(6&e[t+13])>>>1,i.dts=i.pts,64&n&&(i.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,i.dts*=4,i.dts+=(6&e[t+18])>>>1)),i},videoPacketContainsKeyFrame:function(e){for(var t=4+cn(e),n=e.subarray(t),i=0,r=0,s=!1;r3&&"slice_layer_without_partitioning_rbsp_idr"===hn(31&n[r+3])&&(s=!0),s}},fn=Ke,mn={};mn.ts=pn,mn.aac=Tt;var gn=pe,vn=function(e,t,n){for(var i,r,s,a,o=0,l=188,u=!1;l<=e.byteLength;)if(71!==e[o]||71!==e[l]&&l!==e.byteLength)o++,l++;else{switch(i=e.subarray(o,l),mn.ts.parseType(i,t.pid)){case"pes":r=mn.ts.parsePesType(i,t.table),s=mn.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&s&&(a=mn.ts.parsePesTime(i))&&(a.type="audio",n.audio.push(a),u=!0)}if(u)break;o+=188,l+=188}for(o=(l=e.byteLength)-188,u=!1;o>=0;)if(71!==e[o]||71!==e[l]&&l!==e.byteLength)o--,l--;else{switch(i=e.subarray(o,l),mn.ts.parseType(i,t.pid)){case"pes":r=mn.ts.parsePesType(i,t.table),s=mn.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&s&&(a=mn.ts.parsePesTime(i))&&(a.type="audio",n.audio.push(a),u=!0)}if(u)break;o-=188,l-=188}},yn=function(e,t,n){for(var i,r,s,a,o,l,u,d=0,c=188,h=!1,p={data:[],size:0};c=0;)if(71!==e[d]||71!==e[c])d--,c--;else{switch(i=e.subarray(d,c),mn.ts.parseType(i,t.pid)){case"pes":r=mn.ts.parsePesType(i,t.table),s=mn.ts.parsePayloadUnitStartIndicator(i),"video"===r&&s&&(a=mn.ts.parsePesTime(i))&&(a.type="video",n.video.push(a),h=!0)}if(h)break;d-=188,c-=188}},bn=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,i=0,r=188;r=3;){switch(mn.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){n=!0;break}if((a=mn.aac.parseId3TagSize(e,o))>e.length){n=!0;break}null===s&&(t=e.subarray(o,o+a),s=mn.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){n=!0;break}if((a=mn.aac.parseAdtsSize(e,o))>e.length){n=!0;break}null===r&&(t=e.subarray(o,o+a),r=mn.aac.parseSampleRate(t)),i++,o+=a;break;default:o++}if(n)return null}if(null===r||null===s)return null;var l=gn/r;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*i*l,pts:s+1024*i*l}]}}(e):bn(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;(void 0===n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=fn(e.dts,n),e.pts=fn(e.pts,n),e.dtsTime=e.dts/gn,e.ptsTime=e.pts/gn}))}if(e.video&&e.video.length){var i=t;if((void 0===i||isNaN(i))&&(i=e.video[0].dts),e.video.forEach((function(e){e.dts=fn(e.dts,i),e.pts=fn(e.pts,i),e.dtsTime=e.dts/gn,e.ptsTime=e.pts/gn})),e.firstKeyFrame){var r=e.firstKeyFrame;r.dts=fn(r.dts,i),r.pts=fn(r.pts,i),r.dtsTime=r.dts/gn,r.ptsTime=r.pts/gn}}}(n,t),n):null},Tn=function(){function e(e,t){this.options=t||{},this.self=e,this.init()}var t=e.prototype;return t.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Bt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var i=t.data;t.data=i.buffer,e.postMessage({action:"data",segment:t,byteOffset:i.byteOffset,byteLength:i.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var n={start:{decode:me(t.start.dts),presentation:me(t.start.pts)},end:{decode:me(t.end.dts),presentation:me(t.end.pts)},baseMediaDecodeTime:me(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=me(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:me(t.start.dts),presentation:me(t.start.pts)},end:{decode:me(t.end.dts),presentation:me(t.end.pts)},baseMediaDecodeTime:me(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=me(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:me(t.start),end:me(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:me(t.start),end:me(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new nn,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],logs:n&&n.logs||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,n=e.data,i=on(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:i,data:n},[n.buffer])},t.probeMp4Tracks=function(e){var t=e.data,n=ln(t);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,n=e.baseStartTime,i="number"!=typeof n||isNaN(n)?void 0:n*pe,r=_n(t,i),s=null;r&&((s={hasVideo:r.video&&2===r.video.length||!1,hasAudio:r.audio&&2===r.audio.length||!1}).hasVideo&&(s.videoStart=r.video[0].ptsTime),s.hasAudio&&(s.audioStart=r.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:s,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(fe(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(fe(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new Tn(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new Tn(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})))),ma=function(e){var t=e.transmuxer,n=e.bytes,i=e.audioAppendStart,r=e.gopsToAlignWith,s=e.remux,a=e.onData,o=e.onTrackInfo,l=e.onAudioTimingInfo,u=e.onVideoTimingInfo,d=e.onVideoSegmentTimingInfo,c=e.onAudioSegmentTimingInfo,h=e.onId3,p=e.onCaptions,f=e.onDone,m=e.onEndedTimeline,g=e.onTransmuxerLog,v=e.isEndOfTimeline,y={buffer:[]},b=v;if(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var i=e.data.segment,r=i.type,s=i.initSegment,a=i.captions,o=i.captionStreams,l=i.metadata,u=i.videoFrameDtsTime,d=i.videoFramePtsTime;t.buffer.push({captions:a,captionStreams:o,metadata:l});var c=e.data.segment.boxes||{data:e.data.segment.data},h={type:r,data:new Uint8Array(c.data,c.data.byteOffset,c.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};void 0!==u&&(h.videoFrameDtsTime=u),void 0!==d&&(h.videoFramePtsTime=d),n(h)}(n,y,a),"trackinfo"===n.data.action&&o(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,y),"audioTimingInfo"===n.data.action&&l(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&u(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&d(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&c(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&h([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&p(n.data.caption),"endedtimeline"===n.data.action&&(b=!1,m()),"log"===n.data.action&&g(n.data.log),"transmuxed"===n.data.type&&(b||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:y,callback:f}),ga(t))))},i&&t.postMessage({action:"setAudioAppendStart",appendStart:i}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),void 0!==s&&t.postMessage({action:"setRemux",remux:s}),n.byteLength){var _=n instanceof ArrayBuffer?n:n.buffer,T=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:_,byteOffset:T,byteLength:n.byteLength},[_])}v&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},ga=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():ma(e.currentTransmux))},va=function(e,t){e.postMessage({action:t}),ga(e)},ya=function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void va(t,e);t.transmuxQueue.push(va.bind(null,t,e))},ba=function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ma(e);e.transmuxer.transmuxQueue.push(e)},_a=function(e){ya("reset",e)},Ta=function(e){var t=new fa;t.currentTransmux=null,t.transmuxQueue=[];var n=t.terminate;return t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,n.call(t)},t.postMessage({action:"init",options:e}),t},Sa=function(e){var t=e.transmuxer,n=e.endAction||e.action,i=e.callback,r=u()({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function r(s){s.data.action===n&&(t.removeEventListener("message",r),s.data.data&&(s.data.data=new Uint8Array(s.data.data,e.byteOffset||0,e.byteLength||s.data.data.byteLength),e.data&&(e.data=s.data.data)),i(s.data))})),e.data){var s=e.data instanceof ArrayBuffer;r.byteOffset=s?0:e.data.byteOffset,r.byteLength=e.data.byteLength;var a=[s?e.data:e.data.buffer];t.postMessage(r,a)}else t.postMessage(r)},wa=2,ka=-101,Ea=-102,Aa=function(e){e.forEach((function(e){e.abort()}))},Ca=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:ka,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Ea,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:wa,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:wa,xhr:t}:null},ja=function(e,t,n){return function(i,r){var s=r.response,a=Ca(i,r);if(a)return n(a,e);if(16!==s.byteLength)return n({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:wa,xhr:r},e);for(var o=new DataView(s),l=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]),u=0;u1)return Na("multiple "+e+" codecs found as attributes: "+t[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[e]=null);t[e]=t[e][0]})),t},Fa=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},Va=function(e,t){var n=t.attributes||{},i=Ba(function(e){var t=e.attributes||{};if(t.CODECS)return Object(j.h)(t.CODECS)}(t)||[]);if(Ua(e,t)&&!i.audio&&!function(e,t){if(!Ua(e,t))return!0;var n=t.attributes||{},i=e.mediaGroups.AUDIO[n.AUDIO];for(var r in i)if(!i[r].uri&&!i[r].playlists)return!0;return!1}(e,t)){var r=Ba(Object(j.d)(e,n.AUDIO)||[]);r.audio&&(i.audio=r.audio)}return i},Ha=Zr("PlaylistSelector"),qa=function(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}},Wa=function(e,t){if(!e)return"";var n=s.a.getComputedStyle(e);return n?n[t]:""},za=function(e,t){var n=e.slice();e.sort((function(e,i){var r=t(e,i);return 0===r?n.indexOf(e)-n.indexOf(i):r}))},Ga=function(e,t){var n,i;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||s.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(i=t.attributes.BANDWIDTH),n-(i=i||s.a.Number.MAX_VALUE)},Xa=function(e,t,n,i,r,a){if(e){var o={bandwidth:t,width:n,height:i,limitRenditionByPlayerDimensions:r},l=e.playlists;ks.isAudioOnly(e)&&(l=a.getAudioTrackPlaylists_(),o.audioOnly=!0);var u=l.map((function(e){var t=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||s.a.Number.MAX_VALUE,width:t,height:n,playlist:e}}));za(u,(function(e,t){return e.bandwidth-t.bandwidth}));var d=(u=u.filter((function(e){return!ks.isIncompatible(e.playlist)}))).filter((function(e){return ks.isEnabled(e.playlist)}));d.length||(d=u.filter((function(e){return!ks.isDisabled(e.playlist)})));var c=d.filter((function(e){return e.bandwidth*ua.BANDWIDTH_VARIANCEn||e.height>i}))).filter((function(e){return e.width===y[0].width&&e.height===y[0].height})),h=b[b.length-1],_=b.filter((function(e){return e.bandwidth===h.bandwidth}))[0]),a.experimentalLeastPixelDiffSelector){var w=g.map((function(e){return e.pixelDiff=Math.abs(e.width-n)+Math.abs(e.height-i),e}));za(w,(function(e,t){return e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff})),T=w[0]}var k=T||_||S||p||d[0]||u[0];if(k&&k.playlist){var E="sortedPlaylistReps";return T?E="leastPixelDiffRep":_?E="resolutionPlusOneRep":S?E="resolutionBestRep":p?E="bandwidthBestRep":d[0]&&(E="enabledPlaylistReps"),Ha("choosing "+qa(k)+" using "+E+" with options",o),k.playlist}return Ha("could not choose a playlist with options",o),null}},Ya=function(){var e=this.useDevicePixelRatio&&s.a.devicePixelRatio||1;return Xa(this.playlists.master,this.systemBandwidth,parseInt(Wa(this.tech_.el(),"width"),10)*e,parseInt(Wa(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},Ka=function(e){var t=e.inbandTextTracks,n=e.metadataArray,i=e.timestampOffset,r=e.videoDuration;if(n){var a=s.a.WebKitDataCue||s.a.VTTCue,o=t.metadataTrack_;if(o&&(n.forEach((function(e){var t=e.cueTime+i;!("number"!=typeof t||s.a.isNaN(t)||t<0)&&t<1/0&&e.frames.forEach((function(e){var n=new a(t,t,e.value||e.url||e.data||"");n.frame=e,n.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Xr.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Xr.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Xr.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(n),o.addCue(n)}))})),o.cues&&o.cues.length)){for(var l=o.cues,u=[],d=0;d=e&&r.endTime<=t&&n.removeCue(r)},Ja=function(e){return"number"==typeof e&&isFinite(e)},Za=function(e){var t=e.startOfSegment,n=e.duration,i=e.segment,r=e.part,s=e.playlist,a=s.mediaSequence,o=s.id,l=s.segments,u=void 0===l?[]:l,d=e.mediaIndex,c=e.partIndex,h=e.timeline,p=u.length-1,f="mediaIndex/partIndex increment";e.getMediaInfoForTime?f="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(f="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(f+=" with independent "+e.independent);var m="number"==typeof c,g=e.segment.uri?"segment":"pre-segment",v=m?ds({preloadSegment:i})-1:0;return g+" ["+(a+d)+"/"+(a+p)+"]"+(m?" part ["+c+"/"+v+"]":"")+" segment start/end ["+i.start+" => "+i.end+"]"+(m?" part start/end ["+r.start+" => "+r.end+"]":"")+" startOfSegment ["+t+"] duration ["+n+"] timeline ["+h+"] selected by ["+f+"] playlist ["+o+"]"},$a=function(e){return e+"TimingInfo"},eo=function(e){var t=e.timelineChangeController,n=e.currentTimeline,i=e.segmentTimeline,r=e.loaderType,s=e.audioDisabled;if(n===i)return!1;if("audio"===r){var a=t.lastTimelineChange({type:"main"});return!a||a.to!==i}if("main"===r&&s){var o=t.pendingTimelineChange({type:"audio"});return!o||o.to!==i}return!1},to=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+1/30},no=function(e,t){if("hls"!==t)return null;var n,i,r=(n={audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo},i=0,["video","audio"].forEach((function(e){var t=n[e+"TimingInfo"];if(t){var r,a=t.start,o=t.end;"bigint"==typeof a||"bigint"==typeof o?r=s.a.BigInt(o)-s.a.BigInt(a):"number"==typeof a&&"number"==typeof o&&(r=o-a),void 0!==r&&r>i&&(i=r)}})),"bigint"==typeof i&&i=11,i.appendInitSegment_={audio:!0,video:!0},i.playlistOfLastInitSegment_={audio:null,video:null},i.callQueue_=[],i.loadQueue_=[],i.metadataQueue_={id3:[],caption:[]},i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=null,i.activeInitSegmentId_=null,i.initSegments_={},i.cacheEncryptionKeys_=t.cacheEncryptionKeys,i.keyCache_={},i.decrypter_=t.decrypter,i.syncController_=t.syncController,i.syncPoint_={segmentIndex:0,time:0},i.transmuxer_=i.createTransmuxer_(),i.triggerSyncInfoUpdate_=function(){return i.trigger("syncinfoupdate")},i.syncController_.on("syncinfoupdate",i.triggerSyncInfoUpdate_),i.mediaSource_.addEventListener("sourceopen",(function(){i.isEndOfStream_()||(i.ended_=!1)})),i.fetchAtBuffer_=!1,i.logger_=Zr("SegmentLoader["+i.loaderType_+"]"),Object.defineProperty(p()(i),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),i.sourceUpdater_.on("ready",(function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()})),"main"===i.loaderType_&&i.timelineChangeController_.on("pendingtimelinechange",(function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()})),"audio"===i.loaderType_&&i.timelineChangeController_.on("timelinechange",(function(){i.hasEnoughInfoToLoad_()&&i.processLoadQueue_(),i.hasEnoughInfoToAppend_()&&i.processCallQueue_()})),i}m()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return Ta({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&s.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,s.a.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},n.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&_a(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Xr.createTimeRanges();if("main"===this.loaderType_){var t=e.hasAudio,n=e.hasVideo,i=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!i)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Ks(e),i=this.initSegments_[n];return t&&!i&&e.bytes&&(this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),i||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Qs(e),i=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!i&&e.bytes&&(this.keyCache_[n]=i={resolvedUri:e.resolvedUri,bytes:e.bytes});var r={resolvedUri:(i||e).resolvedUri};return i&&(r.bytes=i.bytes),r},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var n=this.playlist_,i=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var r=null;if(n&&(n.id?r=n.id:n.uri&&(r=n.uri)),this.logger_("playlist update ["+r+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return null!==this.mediaIndex&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var s=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift ["+s+"]"),null!==this.mediaIndex)if(this.mediaIndex-=s,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var a=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!a.parts||!a.parts.length||!a.parts[this.partIndex])){var o=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=o}}i&&(i.mediaIndex-=s,i.mediaIndex<0?(i.mediaIndex=null,i.partIndex=null):(i.mediaIndex>=0&&(i.segment=e.segments[i.mediaIndex]),i.partIndex>=0&&i.segment.parts&&(i.part=i.segment.parts[i.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(s.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&_a(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},n.remove=function(e,t,n,i){if(void 0===n&&(n=function(){}),void 0===i&&(i=!1),t===1/0&&(t=this.duration_()),t<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var r=1,s=function(){0===--r&&n()};for(var a in!i&&this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(e,t,s)),(i||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,n,i){for(var r=Math.ceil((t-i)*R.ONE_SECOND_IN_TS),s=Math.ceil((n-i)*R.ONE_SECOND_IN_TS),a=e.slice(),o=e.length;o--&&!(e[o].pts<=s););if(-1===o)return a;for(var l=o+1;l--&&!(e[l].pts<=r););return l=Math.max(l,0),a.splice(l,o-l+1),a}(this.gopBuffer_,e,t,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(e,t,s)),this.inbandTextTracks_)Qa(e,t,this.inbandTextTracks_[a]);Qa(e,t,this.segmentMetadataTrack_),s()}else this.logger_("skipping remove because no source updater or starting media info")},n.monitorBuffer_=function(){this.checkBufferTimeout_&&s.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=s.a.setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&s.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=s.a.setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();e&&("number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},n.isEndOfStream_=function(e,t,n){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===n&&(n=this.partIndex),!t||!this.mediaSource_)return!1;var i="number"==typeof e&&t.segments[e],r=e+1===t.segments.length,s=!i||!i.parts||n+1===i.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&r&&s},n.chooseNextRequest_=function(){var e=this.buffered_(),t=rs(e)||0,n=ss(e,this.currentTime_()),i=!this.hasPlayed_()&&n>=1,r=n>=this.goalBufferLength_(),s=this.playlist_.segments;if(!s.length||i||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,n){t=t||[];for(var i=[],r=0,s=0;sn))return s}return 0===i.length?0:i[i.length-1]}(this.currentTimeline_,s,t);else if(null!==this.mediaIndex){var o=s[this.mediaIndex],l="number"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=o.end?o.end:t,o.parts&&o.parts[l+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=l+1):a.mediaIndex=this.mediaIndex+1}else{var u=ks.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),d=u.segmentIndex,c=u.startTime,h=u.partIndex;a.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),a.mediaIndex=d,a.startOfSegment=c,a.partIndex=h}var p=s[a.mediaIndex],f=p&&"number"==typeof a.partIndex&&p.parts&&p.parts[a.partIndex];if(!p||"number"==typeof a.partIndex&&!f)return null;if("number"!=typeof a.partIndex&&p.parts&&(a.partIndex=0,f=p.parts[0]),!n&&f&&!f.independent)if(0===a.partIndex){var m=s[a.mediaIndex-1],g=m.parts&&m.parts.length&&m.parts[m.parts.length-1];g&&g.independent&&(a.mediaIndex-=1,a.partIndex=m.parts.length-1,a.independent="previous segment")}else p.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");var v=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>=s.length-1&&v&&!this.seeking_()?null:this.generateSegmentInfo_(a)},n.generateSegmentInfo_=function(e){var t=e.independent,n=e.playlist,i=e.mediaIndex,r=e.startOfSegment,s=e.isSyncRequest,a=e.partIndex,o=e.forceTimestampOffset,l=e.getMediaInfoForTime,u=n.segments[i],d="number"==typeof a&&u.parts[a],c={requestId:"segment-loader-"+Math.random(),uri:d&&d.resolvedUri||u.resolvedUri,mediaIndex:i,partIndex:d?a:null,isSyncRequest:s,startOfSegment:r,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:u.timeline,duration:d&&d.duration||u.duration,segment:u,part:d,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;c.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:u.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:h});var p=rs(this.sourceUpdater_.audioBuffered());return"number"==typeof p&&(c.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(c.gopsToAlignWith=function(e,t,n){if(null==t||!e.length)return[];var i,r=Math.ceil((t-n+3)*R.ONE_SECOND_IN_TS);for(i=0;ir);i++);return e.slice(i)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),c},n.timestampOffsetForSegment_=function(e){return n=(t=e).segmentTimeline,i=t.currentTimeline,r=t.startOfSegment,s=t.buffered,t.overrideCheck||n!==i?n "+o+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var i=n;/^cc708_/.test(n)&&(i="SERVICE"+n.split("_")[1]);var r=t.textTracks().getTrackById(i);if(r)e[n]=r;else{var s=n,a=n,o=!1,l=(t.options_.vhs&&t.options_.vhs.captionServices||{})[i];l&&(s=l.label,a=l.language,o=l.default),e[n]=t.addRemoteTextTrack({kind:"captions",id:i,default:o,label:s,language:a},!1).track}}}(u,n.vhs_.tech_,e),Qa(a,o,u[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,i=e.timestampOffset;if(n){var r=s.a.WebKitDataCue||s.a.VTTCue;n.forEach((function(e){var n=e.stream;t[n].addCue(new r(e.startTime+i,e.endTime+i,e.text))}))}}({captionArray:l,inbandTextTracks:u,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),Ka({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:i,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(e){return e()})),this.metadataQueue_.caption.forEach((function(e){return e()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach((function(e){return e()}))},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach((function(e){return e()}))},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!eo({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.getCurrentMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),e&&e.trackInfo||this.currentMediaInfo_},n.getMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},n.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;var n=t.hasAudio,i=t.hasVideo,r=t.isMuxed;return!(i&&!e.videoTimingInfo)&&(!(n&&!this.audioDisabled_&&!r&&!e.audioTimingInfo)&&!eo({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var n=this.pendingSegment_;if(this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.part||n.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4)this.trigger("fmp4"),n.timingInfo.start=n[$a(t.type)].start;else{var i,r=this.getCurrentMediaInfo_(),s="main"===this.loaderType_&&r&&r.hasVideo;s&&(i=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:s,firstVideoFrameTimeForData:i,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:"main"===this.loaderType_});var a=this.chooseNextRequest_();if(a.mediaIndex!==n.mediaIndex||a.partIndex!==n.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t)}}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},n.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,i=e.map,r=e.playlist;if(i){var s=Ks(i);if(this.activeInitSegmentId_===s)return null;n=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=s}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=r,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null},n.handleQuotaExceededError_=function(e,t){var n=this,i=e.segmentInfo,r=e.type,a=e.bytes,o=this.sourceUpdater_.audioBuffered(),l=this.sourceUpdater_.videoBuffered();o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+is(o).join(", ")),l.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+is(l).join(", "));var u=o.length?o.start(0):0,d=o.length?o.end(o.length-1):0,c=l.length?l.start(0):0,h=l.length?l.end(l.length-1):0;if(d-u<=1&&h-c<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+a.byteLength+", audio buffer: "+is(o).join(", ")+", video buffer: "+is(l).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:i,type:r,bytes:a}));var p=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+p),this.remove(0,p,(function(){n.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=s.a.setTimeout((function(){n.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),n.quotaExceededErrorRetryTimeout_=null,n.processCallQueue_()}),1e3)}),!0)},n.handleAppendError_=function(e,t){var n=e.segmentInfo,i=e.type,r=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(i+" append of "+r.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:i,bytes:r}))},n.appendToSourceBuffer_=function(e){var t,n,i,r=e.segmentInfo,s=e.type,a=e.initSegment,o=e.data,l=e.bytes;if(!l){var u=[o],d=o.byteLength;a&&(u.unshift(a),d+=a.byteLength),i=0,(t={bytes:d,segments:u}).bytes&&(n=new Uint8Array(t.bytes),t.segments.forEach((function(e){n.set(e,i),i+=e.byteLength}))),l=n}this.sourceUpdater_.appendBuffer({segmentInfo:r,type:s,bytes:l},this.handleAppendError_.bind(this,{segmentInfo:r,type:s,bytes:l}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var i=this.pendingSegment_.segment,r=e+"TimingInfo";i[r]||(i[r]={}),i[r].transmuxerPrependedSeconds=n.prependedContentDuration||0,i[r].transmuxedPresentationStart=n.start.presentation,i[r].transmuxedDecodeStart=n.start.decode,i[r].transmuxedPresentationEnd=n.end.presentation,i[r].transmuxedDecodeEnd=n.end.decode,i[r].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,i=t.data;if(i&&i.byteLength&&("audio"!==n||!this.audioDisabled_)){var r=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:r,data:i})}},n.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push((function(){var n=u()({},e,{forceTimestampOffset:!0});u()(e,t.generateSegmentInfo_(n)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)}))},n.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var n=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),r=null!==this.mediaIndex,s=e.timeline!==this.currentTimeline_&&e.timeline>0,a=i||r&&s;this.logger_("Requesting "+Za(e)),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Ra({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:n,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:a,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(n){var i=n.message,r=n.level,s=n.stream;t.logger_(Za(e)+" logged from transmuxer stream "+s+" as a "+r+": "+i)}})},n.trimBackBuffer_=function(e){var t=function(e,t,n){var i=t-ua.BACK_BUFFER_LENGTH;e.length&&(i=Math.max(i,e.start(0)));var r=t-n;return Math.min(r,i)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var t=e.segment,n=e.part,i={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},r=e.playlist.segments[e.mediaIndex-1];if(r&&r.timeline===t.timeline&&(r.videoTimingInfo?i.baseStartTime=r.videoTimingInfo.transmuxedDecodeEnd:r.audioTimingInfo&&(i.baseStartTime=r.audioTimingInfo.transmuxedDecodeEnd)),t.key){var s=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);i.key=this.segmentKey(t.key),i.key.iv=s}return t.map&&(i.map=this.initSegmentForMap(t.map)),i},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<1/60?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+1/60):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")},n.segmentRequestFinished_=function(e,t,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Ea)return;return this.pause(),e.code===ka?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,t.stats),i.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var i=t[0].pts,r=0;r=i);r++);return e.slice(0,r).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(i)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,i=e.mediaIndex,r=e.firstVideoFrameTimeForData,s=e.currentVideoTimestampOffset,a=e.useVideoTimingInfo,o=e.videoTimingInfo,l=e.audioTimingInfo;if(void 0!==t)return t;if(!a)return l.start;var u=n.segments[i-1];return 0!==i&&u&&void 0!==u.start&&u.end===r+s?o.start:r},n.waitForAppendsToComplete_=function(e){var t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var n=t.hasAudio,i=t.hasVideo,r=t.isMuxed,s="main"===this.loaderType_&&i,a=!this.audioDisabled_&&n&&!r;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);s&&e.waitingOnAppends++,a&&e.waitingOnAppends++,s&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,n){return"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},n.getSegmentStartTimeForTimestampOffsetCalculation_=function(e){var t=e.videoTimingInfo,n=e.audioTimingInfo,i=e.timingInfo;return this.useDtsForTimestampOffset_?t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:n&&"number"==typeof n.transmuxedDecodeStart?n.transmuxedDecodeStart:i.start:i.start},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),n="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;n&&(e.timingInfo.end="number"==typeof n.end?n.end:n.start+e.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});var t=no(e,this.sourceType_);if(t&&("warn"===t.severity?Xr.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",!e.isSyncRequest||(this.trigger("syncinfoupdate"),e.hasAppendedData_)){this.logger_("Appended "+Za(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var n=e.segment,i=e.part,r=n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration,s=i&&i.end&&this.currentTime_()-i.end>3*e.playlist.partTargetDuration;if(r||s)return this.logger_("bad "+(r?"segment":"part")+" "+Za(e)),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}else this.logger_("Throwing away un-appended sync request "+Za(e))},n.recordThroughput_=function(e){if(e.duration<1/60)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+1/60);else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,i=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(i-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,i=t.end;if(Ja(n)&&Ja(i)){Qa(n,i,this.segmentMetadataTrack_);var r=s.a.WebKitDataCue||s.a.VTTCue,a={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:n,end:i},o=new r(n,i,JSON.stringify(a));o.value=a,this.segmentMetadataTrack_.addCue(o)}}},t}(Xr.EventTarget);function ro(){}var so,ao=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},oo=["video","audio"],lo=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},uo=function e(t,n){if(0!==n.queue.length){var i=0,r=n.queue[i];if("mediaSource"!==r.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!lo(t,n)){if(r.type!==t){if(null===(i=function(e,t){for(var n=0;n=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},n.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(e,t,n){var i=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===ka&&this.handleTimeout_(),e.code===Ea?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");var a=r.segment;if(a.map&&(a.map.bytes=t.map.bytes),r.bytes=t.bytes,"function"!=typeof s.a.WebVTT&&"function"==typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then((function(){return i.segmentRequestFinished_(e,t,n)}),(function(){return i.stopForError({message:"Error loading vtt.js"})}));a.requested=!0;try{this.parseVTTCues_(r)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(r,this.syncController_.timelines[r.timeline],this.playlist_),r.cues.length?r.timingInfo={start:r.cues[0].startTime,end:r.cues[r.cues.length-1].endTime}:r.timingInfo={start:r.startOfSegment,end:r.startOfSegment+r.duration},r.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");r.byteLength=r.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,r.cues.forEach((function(e){i.subtitlesTrack_.addCue(i.featuresNativeTextTracks_?new s.a.VTTCue(e.startTime,e.endTime,e.text):e)})),function(e){var t=e.cues;if(t)for(var n=0;n1&&i.push(t[s]);i.length&&i.forEach((function(t){return e.removeCue(t)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(e){var t,n=!1;if("function"!=typeof s.a.WebVTT)throw new jo;"function"==typeof s.a.TextDecoder?t=new s.a.TextDecoder("utf8"):(t=s.a.WebVTT.StringDecoder(),n=!0);var i=new s.a.WebVTT.Parser(s.a,s.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},i.oncue=e.cues.push.bind(e.cues),i.ontimestampmap=function(t){e.timestampmap=t},i.onparsingerror=function(e){Xr.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var r=e.segment.map.bytes;n&&(r=Ao(r)),i.parse(r)}var a=e.bytes;n&&(a=Ao(a)),i.parse(a),i.flush()},n.updateTimeMapping_=function(e,t,n){var i=e.segment;if(t)if(e.cues.length){var r=e.timestampmap,s=r.MPEGTS/R.ONE_SECOND_IN_TS-r.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=s,e.endTime+=s})),!n.syncInfo){var a=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(a,o-i.duration)}}}else i.empty=!0},t}(io),Po=function(e,t){for(var n=e.cues,i=0;i=r.adStartTime&&t<=r.adEndTime)return r}return null},Io=[{name:"VOD",run:function(e,t,n,i,r){if(n!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"ProgramDateTime",run:function(e,t,n,i,r){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var s=null,a=null,o=ls(t);r=r||0;for(var l=0;l=h)&&(a=h,s={time:c,segmentIndex:u.segmentIndex,partIndex:u.partIndex})}}return s}},{name:"Discontinuity",run:function(e,t,n,i,r){var s=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var a=null,o=0;o=c)&&(a=c,s={time:d.time,segmentIndex:l,partIndex:null})}}return s}},{name:"Playlist",run:function(e,t,n,i,r){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],Lo=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=Zr("SyncController"),n}m()(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,i){var r=this.runStrategies_(e,t,n,i);return r.length?this.selectSyncPoint_(r,{key:"time",value:i}):null},n.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var i=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+fs({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:i.segmentIndex,endIndex:0}))},n.runStrategies_=function(e,t,n,i){for(var r=[],s=0;s86400)Xr.log.warn("Not saving expired segment info. Media sequence gap "+n+" is too large.");else for(var i=n-1;i>=0;i--){var r=e.segments[i];if(r&&void 0!==r.start){t.syncInfo={mediaSequence:e.mediaSequence+i,time:r.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}},n.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,n=e.shouldSaveTimelineMapping,i=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),r=t.segment;i&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:r.start}));var s=r.dateTimeObject;r.discontinuity&&n&&s&&(this.timelineToDatetimeMappings[r.timeline]=-s.getTime()/1e3)},n.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},n.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},n.calculateSegmentTimeMapping_=function(e,t,n){var i,r,s=e.segment,a=e.part,o=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+o.time+"] [mapping: "+o.mapping+"]")),i=e.startOfSegment,r=t.end+o.mapping;else{if(!o)return!1;i=t.start+o.mapping,r=t.end+o.mapping}return a&&(a.start=i,a.end=r),(!s.start||io){var l=void 0;l=a<0?n.start-fs({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:r}):n.end+fs({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:r}),this.discontinuities[s]={time:l,accuracy:o}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(Xr.EventTarget),Oo=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}m()(t,e);var n=t.prototype;return n.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(e){var t=e.type,n=e.from,i=e.to;return"number"==typeof n&&"number"==typeof i&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,i=e.to;return"number"==typeof n&&"number"==typeof i&&(this.lastTimelineChanges_[t]={type:t,from:n,to:i},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Xr.EventTarget),Do=ca(ha(pa((function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function n(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var i=n((function(e){function t(e,t){for(var n=0;n-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,i=0;i>7))^e]=e;for(t=n=0;!c[t];t^=i||1,n=f[n]||1)for(s=(s=n^n<<1^n<<2^n<<3^n<<4)>>8^255&s^99,c[t]=s,h[s]=t,o=16843009*p[r=p[i=p[t]]]^65537*r^257*i^16843008*t,a=257*p[s]^16843008*s,e=0;e<4;e++)u[e][t]=a=a<<24^a>>>8,d[e][s]=o=o<<24^o>>>8;for(e=0;e<5;e++)u[e]=u[e].slice(0),d[e]=d[e].slice(0);return l}()),this._tables=[[l[0][0].slice(),l[0][1].slice(),l[0][2].slice(),l[0][3].slice(),l[0][4].slice()],[l[1][0].slice(),l[1][1].slice(),l[1][2].slice(),l[1][3].slice(),l[1][4].slice()]];var r=this._tables[0][4],s=this._tables[1],a=e.length,o=1;if(4!==a&&6!==a&&8!==a)throw new Error("Invalid aes key size");var u=e.slice(0),d=[];for(this._key=[u,d],t=a;t<4*a+28;t++)i=u[t-1],(t%a==0||8===a&&t%a==4)&&(i=r[i>>>24]<<24^r[i>>16&255]<<16^r[i>>8&255]<<8^r[255&i],t%a==0&&(i=i<<8^i>>>24^o<<24,o=o<<1^283*(o>>7))),u[t]=u[t-a]^i;for(n=0;t;n++,t--)i=u[3&n?t:t-4],d[n]=t<=4||n<4?i:s[0][r[i>>>24]]^s[1][r[i>>16&255]]^s[2][r[i>>8&255]]^s[3][r[255&i]]}return e.prototype.decrypt=function(e,t,n,i,r,s){var a,o,l,u,d=this._key[1],c=e^d[0],h=i^d[1],p=n^d[2],f=t^d[3],m=d.length/4-2,g=4,v=this._tables[1],y=v[0],b=v[1],_=v[2],T=v[3],S=v[4];for(u=0;u>>24]^b[h>>16&255]^_[p>>8&255]^T[255&f]^d[g],o=y[h>>>24]^b[p>>16&255]^_[f>>8&255]^T[255&c]^d[g+1],l=y[p>>>24]^b[f>>16&255]^_[c>>8&255]^T[255&h]^d[g+2],f=y[f>>>24]^b[c>>16&255]^_[h>>8&255]^T[255&p]^d[g+3],g+=4,c=a,h=o,p=l;for(u=0;u<4;u++)r[(3&-u)+s]=S[c>>>24]<<24^S[h>>16&255]<<16^S[p>>8&255]<<8^S[255&f]^d[g++],a=c,c=h,h=p,p=f,f=a},e}(),d=function(e){function t(){var t;return(t=e.call(this,a)||this).jobs=[],t.delay=1,t.timeout_=null,t}s(t,e);var n=t.prototype;return n.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},n.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(a),c=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},h=function(){function e(t,n,i,r){var s=e.STEP,a=new Int32Array(t.buffer),o=new Uint8Array(t.byteLength),l=0;for(this.asyncStream_=new d,this.asyncStream_.push(this.decryptChunk_(a.subarray(l,l+s),n,i,o)),l=s;l>2),m=new u(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),v=new Int32Array(g.buffer);for(i=n[0],r=n[1],s=n[2],a=n[3],p=0;p=0&&(t="main-desc"),t},Ro=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},No=function(e,t){t.activePlaylistLoader=e,e.load()},Uo={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],i=t.mediaTypes[e],r=t.blacklistCurrentPlaylist;Ro(n,i);var s=i.activeTrack(),a=i.activeGroup(),o=(a.filter((function(e){return e.default}))[0]||a[0]).id,l=i.tracks[o];if(s!==l){for(var u in Xr.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),i.tracks)i.tracks[u].enabled=i.tracks[u]===l;i.onTrackChanged()}else r({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],i=t.mediaTypes[e];Xr.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Ro(n,i);var r=i.activeTrack();r&&(r.mode="disabled"),i.onTrackChanged()}}},Bo={AUDIO:function(e,t,n){if(t){var i=n.tech,r=n.requestOptions,s=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();s.playlist(e,r),(!i.paused()||e.endList&&"none"!==i.preload())&&s.load()})),t.on("loadedplaylist",(function(){s.playlist(t.media(),r),i.paused()||s.load()})),t.on("error",Uo[e](e,n))}},SUBTITLES:function(e,t,n){var i=n.tech,r=n.requestOptions,s=n.segmentLoaders[e],a=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();s.playlist(e,r),s.track(a.activeTrack()),(!i.paused()||e.endList&&"none"!==i.preload())&&s.load()})),t.on("loadedplaylist",(function(){s.playlist(t.media(),r),i.paused()||s.load()})),t.on("error",Uo[e](e,n))}},Fo={AUDIO:function(e,t){var n=t.vhs,i=t.sourceType,r=t.segmentLoaders[e],s=t.requestOptions,a=t.master.mediaGroups,o=t.mediaTypes[e],l=o.groups,u=o.tracks,d=o.logger_,c=t.masterPlaylistLoader,h=ws(c.master);for(var p in a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},h&&(a[e].main.default.playlists=c.master.playlists)),a[e])for(var f in l[p]||(l[p]=[]),a[e][p]){var m=a[e][p][f],g=void 0;if(h?(d("AUDIO group '"+p+"' label '"+f+"' is a master playlist"),m.isMasterPlaylist=!0,g=null):g="vhs-json"===i&&m.playlists?new Bs(m.playlists[0],n,s):m.resolvedUri?new Bs(m.resolvedUri,n,s):m.playlists&&"dash"===i?new la(m.playlists[0],n,s,c):null,m=Xr.mergeOptions({id:f,playlistLoader:g},m),Bo[e](e,m.playlistLoader,t),l[p].push(m),void 0===u[f]){var v=new Xr.AudioTrack({id:f,kind:Mo(m),enabled:!1,language:m.language,default:m.default,label:f});u[f]=v}}r.on("error",Uo[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,i=t.vhs,r=t.sourceType,s=t.segmentLoaders[e],a=t.requestOptions,o=t.master.mediaGroups,l=t.mediaTypes[e],u=l.groups,d=l.tracks,c=t.masterPlaylistLoader;for(var h in o[e])for(var p in u[h]||(u[h]=[]),o[e][h])if(!o[e][h][p].forced){var f=o[e][h][p],m=void 0;if("hls"===r)m=new Bs(f.resolvedUri,i,a);else if("dash"===r){if(!f.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;m=new la(f.playlists[0],i,a,c)}else"vhs-json"===r&&(m=new Bs(f.playlists?f.playlists[0]:f.resolvedUri,i,a));if(f=Xr.mergeOptions({id:p,playlistLoader:m},f),Bo[e](e,f.playlistLoader,t),u[h].push(f),void 0===d[p]){var g=n.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;d[p]=g}}s.on("error",Uo[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,i=t.master.mediaGroups,r=t.mediaTypes[e],s=r.groups,a=r.tracks;for(var o in i[e])for(var l in s[o]||(s[o]=[]),i[e][o]){var u=i[e][o][l];if(/^(?:CC|SERVICE)/.test(u.instreamId)){var d=n.options_.vhs&&n.options_.vhs.captionServices||{},c={label:l,language:u.language,instreamId:u.instreamId,default:u.default&&u.autoselect};if(d[c.instreamId]&&(c=Xr.mergeOptions(c,d[c.instreamId])),void 0===c.default&&delete c.default,s[o].push(Xr.mergeOptions({id:l},u)),void 0===a[l]){var h=n.addRemoteTextTrack({id:c.instreamId,kind:"captions",default:c.default,language:c.language,label:c.label},!1).track;a[l]=h}}}}},Vo=function e(t,n){for(var i=0;i1&&ws(t.master))for(var l=0;l "+s+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,n)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=s.a.setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(s.a.clearInterval(this.abrTimer_),this.abrTimer_=null)},n.getAudioTrackPlaylists_=function(){var e=this.master(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;var n,i=e.mediaGroups.AUDIO,r=Object.keys(i);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{var s=i.main||r.length&&i[r[0]];for(var a in s)if(s[a].default){n={label:a};break}}if(!n)return t;var o=[];for(var l in i)if(i[l][n.label]){var u=i[l][n.label];if(u.playlists&&u.playlists.length)o.push.apply(o,u.playlists);else if(u.uri)o.push(u);else if(e.playlists.length)for(var d=0;d1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,n=this.tech_.currentTime(),i=this.bufferLowWaterLine(),r=this.bufferHighWaterLine();return function(e){var t=e.currentPlaylist,n=e.buffered,i=e.currentTime,r=e.nextPlaylist,s=e.bufferLowWaterLine,a=e.bufferHighWaterLine,o=e.duration,l=e.experimentalBufferBasedABR,u=e.log;if(!r)return Xr.log.warn("We received no playlist to switch to. Please check your stream."),!1;var d="allowing switch "+(t&&t.id||"null")+" -> "+r.id;if(!t)return u(d+" as current playlist is not set"),!0;if(r.id===t.id)return!1;var c=Boolean(es(n,i).length);if(!t.endList)return c||"number"!=typeof t.partTargetDuration?(u(d+" as current playlist is live"),!0):(u("not "+d+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var h=ss(n,i),p=l?ua.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:ua.MAX_BUFFER_LOW_WATER_LINE;if(om)&&h>=s){var v=d+" as forwardBuffer >= bufferLowWaterLine ("+h+" >= "+s+")";return l&&(v+=" and next bandwidth > current bandwidth ("+f+" > "+m+")"),u(v),!0}return u("not "+d+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:n,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:i,bufferHighWaterLine:r,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",(function(){e.checkABR_("bandwidthupdate"),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("timeout",(function(){e.experimentalBufferBasedABR&&e.mainSegmentLoader_.load()})),this.experimentalBufferBasedABR||this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")})),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()?(this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything((function(){Xr.browser.IE_VERSION||Xr.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())}))):this.logger_("skipping fastQualityChange because new media is same as old")},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()this.maxPlaylistRetries?1/0:Date.now()+1e3*t,n.excludeUntil=i,e.reason&&(n.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var l=this.selectPlaylist();if(!l)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var u=e.internal?this.logger_:Xr.log.warn,d=e.message?" "+e.message:"";u((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+d+" Switching to playlist "+l.id+"."),l.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),l.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var c=l.targetDuration/2*1e3||5e3,h="number"==typeof l.lastRequest&&Date.now()-l.lastRequest<=c;return this.switchMedia_(l,"exclude",a||h)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,i=[],r="all"===e;(r||"main"===e)&&i.push(this.masterPlaylistLoader_);var s=[];(r||"audio"===e)&&s.push("AUDIO"),(r||"subtitle"===e)&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),["main","audio","subtitle"].forEach((function(t){var r=n[t+"SegmentLoader_"];!r||e!==t&&"all"!==e||i.push(r)})),i.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=es(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:so.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var i=this.masterPlaylistLoader_.master,r=so.Playlist.seekable(t,n,so.Playlist.liveEdgeDelay(i,t));if(0!==r.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=so.Playlist.seekable(t,n,so.Playlist.liveEdgeDelay(i,t))).length)return}var s,a;this.seekable_&&this.seekable_.length&&(s=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>r.end(0)||r.start(0)>e.end(0)?this.seekable_=r:this.seekable_=Xr.createTimeRanges([[e.start(0)>r.start(0)?e.start(0):r.start(0),e.end(0)0&&(i=Math.max(i,n.end(n.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var i in n)n[i].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!n)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},n=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();t.video=t.main;var i=Va(this.master(),n),r={},s=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(r.video=i.video||t.main.videoCodec||j.b),t.main.isMuxed&&(r.video+=","+(i.audio||t.main.audioCodec||j.a)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||s)&&(r.audio=i.audio||t.main.audioCodec||t.audio.audioCodec||j.a,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),r.audio||r.video){var a,o={};if(["video","audio"].forEach((function(e){if(r.hasOwnProperty(e)&&(i=t[e].isFmp4,s=r[e],!(i?Object(j.c)(s):Object(j.g)(s)))){var n=t[e].isFmp4?"browser":"muxer";o[n]=o[n]||[],o[n].push(r[e]),"audio"===e&&(a=n)}var i,s})),s&&a&&n.attributes.AUDIO){var l=n.attributes.AUDIO;this.master().playlists.forEach((function(e){(e.attributes&&e.attributes.AUDIO)===l&&e!==n&&(e.excludeUntil=1/0)})),this.logger_("excluding audio group "+l+" as "+a+' does not support codec(s): "'+r.audio+'"')}if(!Object.keys(o).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var u=[];if(["video","audio"].forEach((function(t){var n=(Object(j.h)(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,i=(Object(j.h)(r[t]||"")[0]||{}).type;n&&i&&n.toLowerCase()!==i.toLowerCase()&&u.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+r[t]+'"')})),u.length)return void this.blacklistCurrentPlaylist({playlist:n,message:"Codec switching not supported: "+u.join(", ")+".",blacklistDuration:1/0,internal:!0})}return r}var d=Object.keys(o).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+o[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:n,internal:!0,message:d,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:n,message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(i){var r=t[i];if(-1===n.indexOf(r.id)){n.push(r.id);var s=Va(e.master,r),a=[];!s.audio||Object(j.g)(s.audio)||Object(j.c)(s.audio)||a.push("audio codec "+s.audio),!s.video||Object(j.g)(s.video)||Object(j.c)(s.video)||a.push("video codec "+s.video),s.text&&"stpp.ttml.im1t"===s.text&&a.push("text codec "+s.text),a.length&&(r.excludeUntil=1/0,e.logger_("excluding "+r.id+" for unsupported: "+a.join(", ")))}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=[],i=this.master().playlists,r=Ba(Object(j.h)(e)),s=Fa(r),a=r.video&&Object(j.h)(r.video)[0]||null,o=r.audio&&Object(j.h)(r.audio)[0]||null;Object.keys(i).forEach((function(e){var r=i[e];if(-1===n.indexOf(r.id)&&r.excludeUntil!==1/0){n.push(r.id);var l=[],u=Va(t.masterPlaylistLoader_.master,r),d=Fa(u);if(u.audio||u.video){if(d!==s&&l.push('codec count "'+d+'" !== "'+s+'"'),!t.sourceUpdater_.canChangeType()){var c=u.video&&Object(j.h)(u.video)[0]||null,h=u.audio&&Object(j.h)(u.audio)[0]||null;c&&a&&c.type.toLowerCase()!==a.type.toLowerCase()&&l.push('video codec "'+c.type+'" !== "'+a.type+'"'),h&&o&&h.type.toLowerCase()!==o.type.toLowerCase()&&l.push('audio codec "'+h.type+'" !== "'+o.type+'"')}l.length&&(r.excludeUntil=1/0,t.logger_("blacklisting "+r.id+": "+l.join(" && ")))}}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var i,r=n,a=0;a0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],i=n.buffered_(),r=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,n)){var i=t.start(0);e=i+(i===t.end(0)?0:.1)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+ns(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;for(var r=this.masterPlaylistController_.sourceUpdater_,s=this.tech_.buffered(),a=r.audioBuffer?r.audioBuffered():null,o=r.videoBuffer?r.videoBuffered():null,l=this.media(),u=l.partTargetDuration?l.partTargetDuration:2*(l.targetDuration-1/30),d=[a,o],c=0;c "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var i=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,r=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var s=ts(r,t);if(s.length>0){var a=s.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+s.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,i){if(void 0===i&&(i=!1),!e.length)return!1;var r=e.end(e.length-1)+.1;return!n.endList&&i&&(r=e.end(e.length-1)+3*n.targetDuration),t>r},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t2)return{start:r,end:s}}return null},e}(),Qo={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Jo={PlaylistLoader:Bs,Playlist:ks,utils:Zs,STANDARD_PLAYLIST_SELECTOR:Ya,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(ks.isEnabled);return za(t,(function(e,t){return Ga(e,t)})),t.filter((function(t){return!!Va(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:Ya,movingAverageBandwidthSelector:function(e){var t=-1,n=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var i=this.useDevicePixelRatio&&s.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(t=e*this.systemBandwidth+(1-e)*t,n=this.systemBandwidth),Xa(this.playlists.master,t,parseInt(Wa(this.tech_.el(),"width"),10)*i,parseInt(Wa(this.tech_.el(),"height"),10)*i,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Ga,comparePlaylistResolution:function(e,t){var n,i;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||s.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),n===(i=i||s.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-i},xhr:qs()};Object.keys(ua).forEach((function(e){Object.defineProperty(Jo,e,{get:function(){return Xr.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),ua[e]},set:function(t){Xr.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Xr.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):ua[e]=t}})}));var Zo=function(e,t){for(var n=t.media(),i=-1,r=0;r=1e7&&e>=1e7?Math.max(e,n):n}return e},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){Xr.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return n.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return n.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return n.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return n.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return is(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return is(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!s.a.localStorage)return!1;var t=tl();t=t?Xr.mergeOptions(t,e):e;try{s.a.localStorage.setItem("videojs-vhs",JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e;(e=n).representations=function(){var t=e.masterPlaylistController_.master(),n=ws(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((function(e){return!vs(e)})).map((function(t,n){return new Xo(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=s.a.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.createKeySessions_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),$o({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(t){e.logger_("error while creating EME key session",t),e.player_.error({message:"Failed to initialize media keys for EME",code:3})}))},n.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},n.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=el({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});this.player_.tech_.on("keystatuschange",(function(t){if("output-restricted"===t.status){var n=e.masterPlaylistController_.master();if(n&&n.playlists){var i,r=[];if(n.playlists.forEach((function(e){e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height>=720&&(!e.excludeUntil||e.excludeUntil<1/0)&&(e.excludeUntil=1/0,r.push(e))})),r.length)(i=Xr.log).warn.apply(i,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(r)),e.masterPlaylistController_.fastQualityChange_()}}})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==Xr.browser.IE_VERSION&&n?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=Xr.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),Zo(t,n.playlists)})),this.playlists.on("mediachange",(function(){Zo(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":"2.16.2","mux.js":"6.0.1","mpd-parser":"0.22.1","m3u8-parser":"4.8.0","aes-decrypter":"3.1.3"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return Eo.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&s.a.URL.revokeObjectURL&&(s.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return $s({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,i){return void 0===n&&(n=!0),void 0===i&&(i=2),ea({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:i,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(Xr.getComponent("Component")),il={name:"videojs-http-streaming",VERSION:"2.16.2",canHandleSource:function(e,t){void 0===t&&(t={});var n=Xr.mergeOptions(Xr.options,t);return il.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var i=Xr.mergeOptions(Xr.options,n);return t.vhs=new nl(e,t,i),Xr.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Xr.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=qs(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){var n=Object(x.a)(e);if(!n)return"";var i=il.getOverrideNative(t);return!Jo.supportsTypeNatively(n)||i?"maybe":""},getOverrideNative:function(e){void 0===e&&(e={});var t=e,n=t.vhs,i=void 0===n?{}:n,r=t.hls,s=void 0===r?{}:r,a=!(Xr.browser.IS_ANY_SAFARI||Xr.browser.IS_IOS),o=i.overrideNative,l=void 0===o?a:o,u=s.overrideNative;return void 0!==u&&u||l}};(Object(j.c)("avc1.4d400d,mp4a.40.2")&&Xr.getTech("Html5").registerSourceHandler(il,0),Xr.VhsHandler=nl,Object.defineProperty(Xr,"HlsHandler",{get:function(){return Xr.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),nl},configurable:!0}),Xr.VhsSourceHandler=il,Object.defineProperty(Xr,"HlsSourceHandler",{get:function(){return Xr.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),il},configurable:!0}),Xr.Vhs=Jo,Object.defineProperty(Xr,"Hls",{get:function(){return Xr.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Jo},configurable:!0}),Xr.use||(Xr.registerComponent("Hls",Jo),Xr.registerComponent("Vhs",Jo)),Xr.options.vhs=Xr.options.vhs||{},Xr.options.hls=Xr.options.hls||{},Xr.getPlugin&&Xr.getPlugin("reloadSourceOnError"))||(Xr.registerPlugin||Xr.plugin)("reloadSourceOnError",(function(e){!function e(t,n){var i=0,r=0,s=Xr.mergeOptions(Qo,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){r&&t.currentTime(r)},o=function(e){null!=e&&(r=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},l=function(){return Date.now()-i<1e3*s.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):s.getSource&&"function"==typeof s.getSource?(i=Date.now(),s.getSource.call(t,o)):void Xr.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},u=function e(){t.off("loadedmetadata",a),t.off("error",l),t.off("dispose",e)};t.on("error",l),t.on("dispose",u),t.reloadSourceOnError=function(n){u(),e(t,n)}}(this,e)}));t.default=Xr}.call(this,n(12))},function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return a[e];var n,s=String(e);return(n=i[s.toLowerCase()])?n:(n=r[s.toLowerCase()])||(1===s.length?s.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var s;if(s=i[t.toLowerCase()])return s===n;if(s=r[t.toLowerCase()])return s===n}else if("number"==typeof t)return t===n;return!1}};var i=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(s=97;s<123;s++)i[String.fromCharCode(s)]=s-32;for(var s=48;s<58;s++)i[s-48]=s;for(s=1;s<13;s++)i["f"+s]=s+111;for(s=0;s<10;s++)i["numpad "+s]=s+96;var a=t.names=t.title={};for(s in i)a[i[s]]=s;for(var o in r)i[o]=r[o]},function(e,t,n){"use strict";n.d(t,"i",(function(){return l})),n.d(t,"h",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"f",(function(){return c})),n.d(t,"e",(function(){return h})),n.d(t,"c",(function(){return p})),n.d(t,"g",(function(){return f})),n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return g}));var i=n(0),r=n.n(i),s={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},a=["video","audio","text"],o=["Video","Audio","Text"],l=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},u=function(e){void 0===e&&(e="");var t=e.split(","),n=[];return t.forEach((function(e){var t;e=e.trim(),a.forEach((function(i){var r=s[i].exec(e.toLowerCase());if(r&&!(r.length<=1)){t=i;var a=e.substring(0,r[1].length),o=e.replace(a,"");n.push({type:a,details:o,mediaType:i})}})),t||n.push({type:e,details:"",mediaType:"unknown"})})),n},d=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var i in n){var r=n[i];if(r.default&&r.playlists)return u(r.playlists[0].attributes.CODECS)}return null},c=function(e){return void 0===e&&(e=""),s.audio.test(e.trim().toLowerCase())},h=function(e){if(e&&"string"==typeof e){var t,n=e.toLowerCase().split(",").map((function(e){return l(e.trim())})),i="video";1===n.length&&c(n[0])?i="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),s.text.test(t.trim().toLowerCase()))&&(i="application");var r="mp4";return n.every((function(e){return s.mp4.test(e)}))?r="mp4":n.every((function(e){return s.webm.test(e)}))?r="webm":n.every((function(e){return s.ogg.test(e)}))&&(r="ogg"),i+"/"+r+';codecs="'+e+'"'}},p=function(e){return void 0===e&&(e=""),r.a.MediaSource&&r.a.MediaSource.isTypeSupported&&r.a.MediaSource.isTypeSupported(h(e))||!1},f=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;tt.timeline?1:-1}));var t,n},j=function(e){var t,n,i=[];return t=e,n=function(e,t,n,r){i=i.concat(e.playlists||[])},A.forEach((function(e){for(var i in t.mediaGroups[e])for(var r in t.mediaGroups[e][i]){var s=t.mediaGroups[e][i][r];n(s,e,i,r)}})),i},x=function(e){var t=e.playlist,n=e.mediaSequence;t.mediaSequence=n,t.segments.forEach((function(e,n){e.number=t.mediaSequence+n}))},P=function(e){var t=e.oldManifest,n=e.newManifest,i=t.playlists.concat(j(t)),r=n.playlists.concat(j(n));return n.timelineStarts=C([t.timelineStarts,n.timelineStarts]),function(e){var t=e.oldPlaylists,n=e.newPlaylists,i=e.timelineStarts;n.forEach((function(e){e.discontinuitySequence=p(i,(function(t){return t.timeline===e.timeline}));var n=function(e,t){for(var n=0;nn.timeline||n.segments.length&&e.timeline>n.segments[n.segments.length-1].timeline)&&e.discontinuitySequence--);n.segments[s].discontinuity&&!r.discontinuity&&(r.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),x({playlist:e,mediaSequence:n.segments[s].number})}}))}({oldPlaylists:i,newPlaylists:r,timelineStarts:n.timelineStarts}),n},I=function(e){return e&&e.uri+"-"+(t=e.byterange,n="bigint"==typeof t.offset||"bigint"==typeof t.length?s.a.BigInt(t.offset)+s.a.BigInt(t.length)-s.a.BigInt(1):t.offset+t.length-1,t.offset+"-"+n);var t,n},L=function(e){return d(e.reduce((function(e,t){var n=t.attributes.id+(t.attributes.lang||"");if(e[n]){var i;if(t.segments)t.segments[0]&&(t.segments[0].discontinuity=!0),(i=e[n].segments).push.apply(i,t.segments);t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)}else e[n]=t,e[n].attributes.timelineStarts=[];return e[n].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e}),{})).map((function(e){var t,n;return e.discontinuityStarts=(t=e.segments||[],n="discontinuity",t.reduce((function(e,t,i){return t[n]&&e.push(i),e}),[])),e}))},O=function(e,t){var n=I(e.sidx),i=n&&t[n]&&t[n].sidx;return i&&E(e,i,e.sidx.resolvedUri),e},D=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e)e[n]=O(e[n],t);return e},M=function(e){var t,n=e.attributes,i=e.segments,r=e.sidx,s=e.discontinuityStarts,a={attributes:(t={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},t["PROGRAM-ID"]=1,t),uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuityStarts:s,timelineStarts:n.timelineStarts,segments:i};return n.frameRate&&(a.attributes["FRAME-RATE"]=n.frameRate),n.contentProtection&&(a.contentProtection=n.contentProtection),r&&(a.sidx=r),a},R=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},N=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},U=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},B=function(e){return e?Object.keys(e).reduce((function(t,n){var i=e[n];return t.concat(i.playlists)}),[]):[]},F=function(e){var t,n=e.dashPlaylists,i=e.locations,r=e.sidxMapping,s=void 0===r?{}:r,a=e.previousManifest;if(!n.length)return{};var o=n[0].attributes,l=o.sourceDuration,u=o.type,d=o.suggestedPresentationDelay,c=o.minimumUpdatePeriod,h=L(n.filter(R)).map(M),f=L(n.filter(N)),m=L(n.filter(U)),g=n.map((function(e){return e.attributes.captionServices})).filter(Boolean),v={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:l,playlists:D(h,s)};c>=0&&(v.minimumUpdatePeriod=1e3*c),i&&(v.locations=i),"dynamic"===u&&(v.suggestedPresentationDelay=d);var y,b,_=0===v.playlists.length,T=f.length?function(e,t,n){var i;void 0===t&&(t={}),void 0===n&&(n=!1);var r=e.reduce((function(e,r){var s=r.attributes.role&&r.attributes.role.value||"",a=r.attributes.lang||"",o=r.attributes.label||"main";if(a&&!r.attributes.label){var l=s?" ("+s+")":"";o=""+r.attributes.lang+l}e[o]||(e[o]={language:a,autoselect:!0,default:"main"===s,playlists:[],uri:""});var u=O(function(e,t){var n,i=e.attributes,r=e.segments,s=e.sidx,a=e.mediaSequence,o=e.discontinuitySequence,l=e.discontinuityStarts,u={attributes:(n={NAME:i.id,BANDWIDTH:i.bandwidth,CODECS:i.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:"",targetDuration:i.duration,discontinuitySequence:o,discontinuityStarts:l,timelineStarts:i.timelineStarts,mediaSequence:a,segments:r};return i.contentProtection&&(u.contentProtection=i.contentProtection),s&&(u.sidx=s),t&&(u.attributes.AUDIO="audio",u.attributes.SUBTITLES="subs"),u}(r,n),t);return e[o].playlists.push(u),void 0===i&&"main"===s&&((i=r).default=!0),e}),{});i||(r[Object.keys(r)[0]].default=!0);return r}(f,s,_):null,S=m.length?function(e,t){return void 0===t&&(t={}),e.reduce((function(e,n){var i=n.attributes.lang||"text";return e[i]||(e[i]={language:i,default:!1,autoselect:!1,playlists:[],uri:""}),e[i].playlists.push(O(function(e){var t,n=e.attributes,i=e.segments,r=e.mediaSequence,s=e.discontinuityStarts,a=e.discontinuitySequence;void 0===i&&(i=[{uri:n.baseUrl,timeline:n.periodStart,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var o=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(o.CODECS=n.codecs),{attributes:o,uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,timelineStarts:n.timelineStarts,discontinuityStarts:s,discontinuitySequence:a,mediaSequence:r,segments:i}}(n),t)),e}),{})}(m,s):null,w=h.concat(B(T),B(S)),k=w.map((function(e){return e.timelineStarts}));return v.timelineStarts=C(k),y=w,b=v.timelineStarts,y.forEach((function(e){e.mediaSequence=0,e.discontinuitySequence=p(b,(function(t){return t.timeline===e.timeline})),e.segments&&e.segments.forEach((function(e,t){e.number=t}))})),T&&(v.mediaGroups.AUDIO.audio=T),S&&(v.mediaGroups.SUBTITLES.subs=S),g.length&&(v.mediaGroups["CLOSED-CAPTIONS"].cc=g.reduce((function(e,t){return t?(t.forEach((function(t){var n=t.channel,i=t.language;e[i]={autoselect:!1,default:!1,instreamId:n,language:i},t.hasOwnProperty("aspectRatio")&&(e[i].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[i].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[i]["3D"]=t["3D"])})),e):e}),{})),a?P({oldManifest:a,newManifest:v}):v},V=function(e,t,n){var i=e.NOW,r=e.clientOffset,s=e.availabilityStartTime,a=e.timescale,o=void 0===a?1:a,l=e.periodStart,u=void 0===l?0:l,d=e.minimumUpdatePeriod,c=(i+r)/1e3+(void 0===d?0:d)-(s+u);return Math.ceil((c*o-t)/n)},H=function(e,t){for(var n=e.type,i=e.minimumUpdatePeriod,r=void 0===i?0:i,s=e.media,a=void 0===s?"":s,o=e.sourceDuration,l=e.timescale,u=void 0===l?1:l,d=e.startNumber,c=void 0===d?1:d,h=e.periodStart,p=[],f=-1,m=0;mf&&(f=b);var _=void 0;if(y<0){var T=m+1;_=T===t.length?"dynamic"===n&&r>0&&a.indexOf("$Number$")>0?V(e,f,v):(o*u-f)/v:(t[T].t-f)/v}else _=y+1;for(var S=c+p.length+_,w=c+p.length;w=r?s:""+new Array(r-s.length+1).join("0")+s)}}(t))},z=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},r=e.initialization,s=void 0===r?{sourceURL:"",range:""}:r,a=_({baseUrl:e.baseUrl,source:W(s.sourceURL,n),range:s.range});return function(e,t){return e.duration||t?e.duration?w(e):H(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]}(e,t).map((function(t){n.Number=t.number,n.Time=t.time;var r=W(e.media||"",n),s=e.timescale||1,o=e.presentationTimeOffset||0,l=e.periodStart+(t.time-o)/s;return{uri:r,timeline:t.timeline,duration:t.duration,resolvedUri:Object(i.a)(e.baseUrl||"",r),map:a,number:t.number,presentationTime:l}}))},G=function(e,t){var n=e.duration,i=e.segmentUrls,r=void 0===i?[]:i,s=e.periodStart;if(!n&&!t||n&&t)throw new Error(y);var a,o=r.map((function(t){return function(e,t){var n=e.baseUrl,i=e.initialization,r=void 0===i?{}:i,s=_({baseUrl:n,source:r.sourceURL,range:r.range}),a=_({baseUrl:n,source:t.media,range:t.mediaRange});return a.map=s,a}(e,t)}));return n&&(a=w(e)),t&&(a=H(e,t)),a.map((function(t,n){if(o[n]){var i=o[n],r=e.timescale||1,a=e.presentationTimeOffset||0;return i.timeline=t.timeline,i.duration=t.duration,i.number=t.number,i.presentationTime=s+(t.time-a)/r,i}})).filter((function(e){return e}))},X=function(e){var t,n,i=e.attributes,r=e.segmentInfo;r.template?(n=z,t=u(i,r.template)):r.base?(n=k,t=u(i,r.base)):r.list&&(n=G,t=u(i,r.list));var s={attributes:i};if(!n)return s;var a=n(t,r.segmentTimeline);if(t.duration){var o=t,l=o.duration,d=o.timescale,c=void 0===d?1:d;t.duration=l/c}else a.length?t.duration=a.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return s.attributes=t,s.segments=a,r.base&&t.indexRange&&(s.sidx=a[0],s.segments=[]),s},Y=function(e,t){return h(e.childNodes).filter((function(e){return e.tagName===t}))},K=function(e){return e.textContent.trim()},Q=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),i=n[0],r=n[1],s=n[2],a=n[3],o=n[4],l=n[5];return 31536e3*parseFloat(i||0)+2592e3*parseFloat(r||0)+86400*parseFloat(s||0)+3600*parseFloat(a||0)+60*parseFloat(o||0)+parseFloat(l||0)},J={mediaPresentationDuration:function(e){return Q(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return Q(e)},suggestedPresentationDelay:function(e){return Q(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return Q(e)},start:function(e){return Q(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},frameRate:function(e){return function(e){return parseFloat(e.split("/").reduce((function(e,t){return e/t})))}(e)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?Q(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},Z=function(e){return e&&e.attributes?h(e.attributes).reduce((function(e,t){var n=J[t.name]||J.DEFAULT;return e[t.name]=n(t.value),e}),{}):{}},$={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},ee=function(e,t){return t.length?c(e.map((function(e){return t.map((function(t){return Object(i.a)(e,K(t))}))}))):e},te=function(e){var t=Y(e,"SegmentTemplate")[0],n=Y(e,"SegmentList")[0],i=n&&Y(n,"SegmentURL").map((function(e){return u({tag:"SegmentURL"},Z(e))})),r=Y(e,"SegmentBase")[0],s=n||t,a=s&&Y(s,"SegmentTimeline")[0],o=n||r||t,l=o&&Y(o,"Initialization")[0],d=t&&Z(t);d&&l?d.initialization=l&&Z(l):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});var c={template:d,segmentTimeline:a&&Y(a,"S").map((function(e){return Z(e)})),list:n&&u(Z(n),{segmentUrls:i,initialization:Z(l)}),base:r&&u(Z(r),{initialization:Z(l)})};return Object.keys(c).forEach((function(e){c[e]||delete c[e]})),c},ne=function(e,t,n){return function(i){var r,s=Z(i),o=ee(t,Y(i,"BaseURL")),l=Y(i,"Role")[0],d={role:Z(l)},h=u(e,s,d),p=Y(i,"Accessibility")[0],f="urn:scte:dash:cc:cea-608:2015"===(r=Z(p)).schemeIdUri?("string"!=typeof r.value?[]:r.value.split(";")).map((function(e){var t,n;if(n=e,/^CC\d=/.test(e)){var i=e.split("=");t=i[0],n=i[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:n}})):"urn:scte:dash:cc:cea-708:2015"===r.schemeIdUri?("string"!=typeof r.value?[]:r.value.split(";")).map((function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var n=e.split("="),i=n[0],r=n[1],s=void 0===r?"":r;t.channel=i,t.language=e,s.split(",").forEach((function(e){var n=e.split(":"),i=n[0],r=n[1];"lang"===i?t.language=r:"er"===i?t.easyReader=Number(r):"war"===i?t.aspectRatio=Number(r):"3D"===i&&(t["3D"]=Number(r))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;f&&(h=u(h,{captionServices:f}));var m=Y(i,"Label")[0];if(m&&m.childNodes.length){var g=m.childNodes[0].nodeValue.trim();h=u(h,{label:g})}var v=Y(i,"ContentProtection").reduce((function(e,t){var n=Z(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());var i=$[n.schemeIdUri];if(i){e[i]={attributes:n};var r=Y(t,"cenc:pssh")[0];if(r){var s=K(r);e[i].pssh=s&&Object(a.a)(s)}}return e}),{});Object.keys(v).length&&(h=u(h,{contentProtection:v}));var y=te(i),b=Y(i,"Representation"),_=u(n,y);return c(b.map(function(e,t,n){return function(i){var r=Y(i,"BaseURL"),s=ee(t,r),a=u(e,Z(i)),o=te(i);return s.map((function(e){return{segmentInfo:u(n,o),attributes:u(a,{baseUrl:e})}}))}}(h,o,_)))}},ie=function(e,t){return function(n,i){var r=ee(t,Y(n.node,"BaseURL")),s=u(e,{periodStart:n.attributes.start});"number"==typeof n.attributes.duration&&(s.periodDuration=n.attributes.duration);var a=Y(n.node,"AdaptationSet"),o=te(n.node);return c(a.map(ne(s,r,o)))}},re=function(e){if(""===e)throw new Error(m);var t,n,i=new o.DOMParser;try{n=(t=i.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(g);return n},se=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,i=n.manifestUri,r=void 0===i?"":i,s=n.NOW,a=void 0===s?Date.now():s,o=n.clientOffset,l=void 0===o?0:o,u=Y(e,"Period");if(!u.length)throw new Error(f);var d=Y(e,"Location"),h=Z(e),p=ee([r],Y(e,"BaseURL"));h.type=h.type||"static",h.sourceDuration=h.mediaPresentationDuration||0,h.NOW=a,h.clientOffset=l,d.length&&(h.locations=d.map(K));var m=[];return u.forEach((function(e,t){var n=Z(e),i=m[t-1];n.start=function(e){var t=e.attributes,n=e.priorPeriodAttributes,i=e.mpdType;return"number"==typeof t.start?t.start:n&&"number"==typeof n.start&&"number"==typeof n.duration?n.start+n.duration:n||"static"!==i?null:0}({attributes:n,priorPeriodAttributes:i?i.attributes:null,mpdType:h.type}),m.push({node:e,attributes:n})})),{locations:h.locations,representationInfo:c(m.map(ie(h,p)))}}(re(e),t),i=n.representationInfo.map(X);return F({dashPlaylists:i,locations:n.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})},ae=function(e){return function(e){var t=Y(e,"UTCTiming")[0];if(!t)return null;var n=Z(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(b)}return n}(re(e))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n(1),r=Object(i.k)([73,68,51]),s=function e(t,n){return void 0===n&&(n=0),(t=Object(i.k)(t)).length-n<10||!Object(i.a)(t,r,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=Object(i.k)(e))[t+5],r=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?r+20:r+10}(t,n),e(t,n))}},function(e,t,n){"use strict";var i=n(23),r=n.n(i),s=n(0),a=n.n(s);t.a=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=a.a.location&&a.a.location.href||"");var n="function"==typeof a.a.URL,i=/^\/\//.test(e),s=!a.a.location&&!/\/\//i.test(e);if(n?e=new a.a.URL(e,a.a.location||"http://example.com"):/\/\//i.test(e)||(e=r.a.buildAbsoluteURL(a.a.location&&a.a.location.href||"",e)),n){var o=new URL(t,e);return s?o.href.slice("http://example.com".length):i?o.href.slice(o.protocol.length):o.href}return r.a.buildAbsoluteURL(e,t)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,i,r,s,a,o,l;n=function(e){return 9e4*e},i=function(e,t){return e*t},r=function(e){return e/9e4},s=function(e,t){return e/t},a=function(e,t){return n(s(e,t))},o=function(e,t){return i(r(e),t)},l=function(e,t,n){return r(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:n,secondsToAudioTs:i,videoTsToSeconds:r,audioTsToSeconds:s,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l}},function(e,t,n){"use strict";n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return E}));var i,r=n(1),s=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"==typeof e?Object(r.h)(e):e}),a=function(e){e=Object(r.k)(e);for(var t=[],n=0;e.length>n;){var s=e[n],a=0,o=0,l=e[++o];for(o++;128&l;)a=(127&l)<<7,l=e[o],o++;a+=127&l;for(var u=0;u>>0,u=t.subarray(o+4,o+8);if(0===l)break;var d=o+l;if(d>t.length){if(i)break;d=t.length}var c=t.subarray(o+8,d);Object(r.a)(u,n[0])&&(1===n.length?a.push(c):a.push.apply(a,e(c,n.slice(1),i))),o=d}return a},l={EBML:Object(r.k)([26,69,223,163]),DocType:Object(r.k)([66,130]),Segment:Object(r.k)([24,83,128,103]),SegmentInfo:Object(r.k)([21,73,169,102]),Tracks:Object(r.k)([22,84,174,107]),Track:Object(r.k)([174]),TrackNumber:Object(r.k)([215]),DefaultDuration:Object(r.k)([35,227,131]),TrackEntry:Object(r.k)([174]),TrackType:Object(r.k)([131]),FlagDefault:Object(r.k)([136]),CodecID:Object(r.k)([134]),CodecPrivate:Object(r.k)([99,162]),VideoTrack:Object(r.k)([224]),AudioTrack:Object(r.k)([225]),Cluster:Object(r.k)([31,67,182,117]),Timestamp:Object(r.k)([231]),TimestampScale:Object(r.k)([42,215,177]),BlockGroup:Object(r.k)([160]),BlockDuration:Object(r.k)([155]),Block:Object(r.k)([161]),SimpleBlock:Object(r.k)([163])},u=[128,64,32,16,8,4,2,1],d=function(e,t,n,i){void 0===n&&(n=!0),void 0===i&&(i=!1);var s=function(e){for(var t=1,n=0;n=n.length)return n.length;var s=d(n,i,!1);if(Object(r.a)(t.bytes,s.bytes))return i;var a=d(n,i+s.length);return e(t,n,i+a.length+a.value+s.length)},p=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(e){return c(e)})):[c(e)]}(n),t=Object(r.k)(t);var i=[];if(!n.length)return i;for(var s=0;st.length?t.length:l+o.value,p=t.subarray(l,u);Object(r.a)(n[0],a.bytes)&&(1===n.length?i.push(p):i=i.concat(e(p,n.slice(1)))),s+=a.length+o.length+p.length}return i},f=n(10),m=Object(r.k)([0,0,0,1]),g=Object(r.k)([0,0,1]),v=Object(r.k)([0,0,3]),y=function(e){for(var t=[],n=1;n>1&63),-1!==n.indexOf(u)&&(s=a+l),a+=l+("h264"===t?1:2)}else a++}return e.subarray(0,0)},_={webm:Object(r.k)([119,101,98,109]),matroska:Object(r.k)([109,97,116,114,111,115,107,97]),flac:Object(r.k)([102,76,97,67]),ogg:Object(r.k)([79,103,103,83]),ac3:Object(r.k)([11,119]),riff:Object(r.k)([82,73,70,70]),avi:Object(r.k)([65,86,73]),wav:Object(r.k)([87,65,86,69]),"3gp":Object(r.k)([102,116,121,112,51,103]),mp4:Object(r.k)([102,116,121,112]),fmp4:Object(r.k)([115,116,121,112]),mov:Object(r.k)([102,116,121,112,113,116]),moov:Object(r.k)([109,111,111,118]),moof:Object(r.k)([109,111,111,102])},T={aac:function(e){var t=Object(f.a)(e);return Object(r.a)(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Object(f.a)(e);return Object(r.a)(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=p(e,[l.EBML,l.DocType])[0];return Object(r.a)(t,_.webm)},mkv:function(e){var t=p(e,[l.EBML,l.DocType])[0];return Object(r.a)(t,_.matroska)},mp4:function(e){return!T["3gp"](e)&&!T.mov(e)&&(!(!Object(r.a)(e,_.mp4,{offset:4})&&!Object(r.a)(e,_.fmp4,{offset:4}))||(!(!Object(r.a)(e,_.moof,{offset:4})&&!Object(r.a)(e,_.moov,{offset:4}))||void 0))},mov:function(e){return Object(r.a)(e,_.mov,{offset:4})},"3gp":function(e){return Object(r.a)(e,_["3gp"],{offset:4})},ac3:function(e){var t=Object(f.a)(e);return Object(r.a)(e,_.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+1880}},function(e,t){function n(t,i){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,i)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var r=i({HTML:"text/html",isHTML:function(e){return e===r.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),s=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===s.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"==typeof n.find)return n.find.call(e,t);for(var i=0;i=0&&c.splice(t,1)}function v(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var i=function(){0;return n.nc}();i&&(e.attrs.nonce=i)}return y(t,e.attrs),m(e,t),t}function y(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,i,r,s;if(t.transform&&e.css){if(!(s="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=s}if(t.singleton){var a=d++;n=u||(u=v(t)),i=S.bind(null,n,a,!1),r=S.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),m(e,t),t}(t),i=k.bind(null,n,t),r=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),i=w.bind(null,n),r=function(){g(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return p(n,t),function(e){for(var i=[],r=0;r0&&(d=setTimeout((function(){if(!l){l=!0,u.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}}),e.timeout)),u.setRequestHeader)for(a in f)f.hasOwnProperty(a)&&u.setRequestHeader(a,f[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(u.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(u),u.send(p||null),u}e.exports=o,e.exports.default=o,o.XMLHttpRequest=i.XMLHttpRequest||function(){},o.XDomainRequest="withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:i.XDomainRequest,function(e,t){for(var n=0;n=0))throw new x(C,new Error(e.tagName+"@"+n));for(var r=t.length-1;i"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function F(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(F(e,t))return!0}while(e=e.nextSibling)}function V(){this.ownerDocument=this}function H(e,t,n,i){e&&e._inc++,n.namespaceURI===s.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function q(e,t,n){if(e&&e._inc){e._inc++;var i=t.childNodes;if(n)i[i.length++]=n;else{for(var r=t.firstChild,s=0;r;)i[s++]=r,r=r.nextSibling;i.length=s,delete i[i.length]}}}function W(e,t){var n=t.previousSibling,i=t.nextSibling;return n?n.nextSibling=i:e.firstChild=i,i?i.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,q(e.ownerDocument,e),t}function z(e){return e&&e.nodeType===U.DOCUMENT_TYPE_NODE}function G(e){return e&&e.nodeType===U.ELEMENT_NODE}function X(e){return e&&e.nodeType===U.TEXT_NODE}function Y(e,t){var n=e.childNodes||[];if(r(n,G)||z(t))return!1;var i=r(n,z);return!(t&&i&&n.indexOf(i)>n.indexOf(t))}function K(e,t){var n=e.childNodes||[];if(r(n,(function(e){return G(e)&&e!==t})))return!1;var i=r(n,z);return!(t&&i&&n.indexOf(i)>n.indexOf(t))}function Q(e,t,n){if(!function(e){return e&&(e.nodeType===U.DOCUMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.ELEMENT_NODE)}(e))throw new x(A,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new x(C,"child not in parent");if(!function(e){return e&&(G(e)||X(e)||z(e)||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.COMMENT_NODE||e.nodeType===U.PROCESSING_INSTRUCTION_NODE)}(t)||z(t)&&e.nodeType!==U.DOCUMENT_NODE)throw new x(A,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function J(e,t,n){var i=e.childNodes||[],s=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=s.filter(G);if(a.length>1||r(s,X))throw new x(A,"More than one element or text in fragment");if(1===a.length&&!Y(e,n))throw new x(A,"Element in fragment can not be inserted before doctype")}if(G(t)&&!Y(e,n))throw new x(A,"Only one element can be added and only after doctype");if(z(t)){if(r(i,z))throw new x(A,"Only one doctype is allowed");var o=r(i,G);if(n&&i.indexOf(o)1||r(s,X))throw new x(A,"More than one element or text in fragment");if(1===a.length&&!K(e,n))throw new x(A,"Element in fragment can not be inserted before doctype")}if(G(t)&&!K(e,n))throw new x(A,"Only one element can be added and only after doctype");if(z(t)){if(r(i,(function(e){return z(e)&&e!==n})))throw new x(A,"Only one doctype is allowed");var o=r(i,G);if(n&&i.indexOf(o)=0;w--){if(""===(k=r[w]).prefix&&k.namespace===e.namespaceURI){c=k.namespace;break}}if(c!==e.namespaceURI)for(w=r.length-1;w>=0;w--){var k;if((k=r[w]).namespace===e.namespaceURI){k.prefix&&(d=k.prefix+":"+u);break}}}t.push("<",d);for(var E=0;E"),n&&/^script$/i.test(u))for(;l;)l.data?t.push(l.data):ge(l,t,n,i,r.slice()),l=l.nextSibling;else for(;l;)ge(l,t,n,i,r.slice()),l=l.nextSibling;t.push("")}else t.push("/>");return;case _:case S:for(l=e.firstChild;l;)ge(l,t,n,i,r.slice()),l=l.nextSibling;return;case p:return me(t,e.name,e.value);case f:return t.push(e.data.replace(/[<&>]/g,B));case m:return t.push("");case b:return t.push("\x3c!--",e.data,"--\x3e");case T:var x=e.publicId,P=e.systemId;if(t.push("");else if(P&&"."!=P)t.push(" SYSTEM ",P,">");else{var I=e.internalSubset;I&&t.push(" [",I,"]"),t.push(">")}return;case y:return t.push("");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ve(e,t,n){e[t]=n}x.prototype=Error.prototype,u(k,x),P.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],i=0;i0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&n[i]===e)return i;t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e];t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},u(c,U),u(c,U.prototype),V.prototype={nodeName:"#document",nodeType:_,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==S){for(var n=e.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,t),n=i}return e}return $(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===h&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),W(this,e)},replaceChild:function(e,t){$(this,e,t,Z),e.ownerDocument=this,t&&this.removeChild(t),G(e)&&(this.documentElement=e)},importNode:function(e,t){return function e(t,n,i){var r;switch(n.nodeType){case h:(r=n.cloneNode(!1)).ownerDocument=t;case S:break;case p:i=!0}r||(r=n.cloneNode(!1));if(r.ownerDocument=t,r.parentNode=null,i)for(var s=n.firstChild;s;)r.appendChild(e(t,s,i)),s=s.nextSibling;return r}(this,e,t)},getElementById:function(e){var t=null;return F(this.documentElement,(function(n){if(n.nodeType==h&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=l(e);return new I(this,(function(n){var i=[];return t.length>0&&F(n.documentElement,(function(r){if(r!==n&&r.nodeType===h){var s=r.getAttribute("class");if(s){var a=e===s;if(!a){var o=l(s);a=t.every((u=o,function(e){return u&&-1!==u.indexOf(e)}))}a&&i.push(r)}}var u})),i}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new P,(t.attributes=new O)._ownerElement=t,t},createDocumentFragment:function(){var e=new de;return e.ownerDocument=this,e.childNodes=new P,e},createTextNode:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new se;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new ce;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ue;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new ee,i=t.split(":"),r=n.attributes=new O;return n.childNodes=new P,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,r._ownerElement=n,n},createAttributeNS:function(e,t){var n=new te,i=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,n}},d(V,U),ee.prototype={nodeType:h,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===S?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,q(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new I(this,(function(t){var n=[];return F(t,(function(i){i===t||i.nodeType!=h||"*"!==e&&i.tagName!=e||n.push(i)})),n}))},getElementsByTagNameNS:function(e,t){return new I(this,(function(n){var i=[];return F(n,(function(r){r===n||r.nodeType!==h||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||i.push(r)})),i}))}},V.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,V.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,d(ee,U),te.prototype.nodeType=p,d(te,U),ne.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(E[A])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},d(ne,U),ie.prototype={nodeName:"#text",nodeType:f,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},d(ie,ne),re.prototype={nodeName:"#comment",nodeType:b},d(re,ne),se.prototype={nodeName:"#cdata-section",nodeType:m},d(se,ne),ae.prototype.nodeType=T,d(ae,U),oe.prototype.nodeType=w,d(oe,U),le.prototype.nodeType=v,d(le,U),ue.prototype.nodeType=g,d(ue,U),de.prototype.nodeName="#document-fragment",de.prototype.nodeType=S,d(de,U),ce.prototype.nodeType=y,d(ce,U),he.prototype.serializeToString=function(e,t,n){return pe.call(e,t,n)},U.prototype.toString=pe;try{if(Object.defineProperty){Object.defineProperty(I.prototype,"length",{get:function(){return L(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case h:case S:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case h:case S:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ve=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DocumentType=ae,t.DOMException=x,t.DOMImplementation=N,t.Element=ee,t.Node=U,t.NodeList=P,t.XMLSerializer=he},function(e,t){e.exports=function(e,t){var n,i=null;try{n=JSON.parse(e,t)}catch(e){i=e}return[i,n]}},function(e,t,n){var i=n(15);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var i=n(25);t.DOMImplementation=i.DOMImplementation,t.XMLSerializer=i.XMLSerializer,t.DOMParser=n(50).DOMParser},function(e,t,n){var i=n(53).getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},r=12;0===n.version?(n.earliestPresentationTime=t.getUint32(r),n.firstOffset=t.getUint32(r+4),r+=8):(n.earliestPresentationTime=i(e.subarray(r)),n.firstOffset=i(e.subarray(r+8)),r+=16),r+=2;var s=t.getUint16(r);for(r+=2;s>0;r+=12,s--)n.references.push({referenceType:(128&e[r])>>>7,referencedSize:2147483647&t.getUint32(r),subsegmentDuration:t.getUint32(r+4),startsWithSap:!!(128&e[r+8]),sapType:(112&e[r+8])>>>4,sapDeltaTime:268435455&t.getUint32(r+8)});return n}},function(e,t,n){var i=n(54),r=n(15),s=n(55),a=n(20);function o(t){var n="function"==typeof Map?new Map:void 0;return e.exports=o=function(e){if(null===e||!s(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,i(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),r(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,o(t)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){this.floatingStyles=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return".dj-is-floating.can-float {\n position: fixed;\n width:320px!important;\n height:180px!important;\n padding-top:0!important;\n ".concat(e.float_coords_desktop?e.float_coords_desktop.zIndex?"z-index:"+e.float_coords_desktop.zIndex+";":"":"z-index:100001;","\n ").concat(e.float_coords_desktop&&e.float_coords_desktop.marginLeft?"left:"+e.float_coords_desktop.marginLeft+"px;":"","\n ").concat(e.float_coords_desktop&&e.float_coords_desktop.marginTop?"top:"+e.float_coords_desktop.marginTop+"px;":"","\n ").concat(e.float_coords_desktop&&e.float_coords_desktop.marginRight?"right:"+e.float_coords_desktop.marginRight+"px;":"","\n ").concat(e.float_coords_desktop&&e.float_coords_desktop.marginBottom?"bottom:"+e.float_coords_desktop.marginBottom+"px;":"","\n \n }\n @media (max-width:640px) {\n .dj-is-floating.can-float {\n width:285px!important;\n height:160px!important;\n ").concat(e.float_coords_mobile?e.float_coords_mobile.zIndex?"z-index:"+e.float_coords_mobile.zIndex+";":"":"z-index:100001;","\n ").concat(e.float_coords_mobile&&e.float_coords_mobile.marginLeft?"left:"+e.float_coords_mobile.marginLeft+"px;":"","\n ").concat(e.float_coords_mobile&&e.float_coords_mobile.marginTop?"top:"+e.float_coords_mobile.marginTop+"px;":"","\n ").concat(e.float_coords_mobile&&e.float_coords_mobile.marginRight?"right:"+e.float_coords_mobile.marginRight+"px;":"","\n ").concat(e.float_coords_mobile&&e.float_coords_mobile.marginBottom?"bottom:"+e.float_coords_mobile.marginBottom+"px;":"","\n\n }\n .dj-float-dismiss-btn {\n ").concat(e.float_coords_mobile?"top-right"==e.float_coords_mobile.closeBtn?"right:-15px;top:-15px;":"left:-15px;top:-15px;":"right:-15px;top:-15px;","\n }\n }\n .dj-is-floating.can-float .ima-ad-container {\n max-width:100%;\n overflow:hidden;\n }\n .dj-float-dismiss-btn {\n background:#222;\n display: flex;\n align-items: center;\n justify-content: center;\n position:absolute;\n ").concat(e.float_coords_desktop?"top-right"==e.float_coords_desktop.closeBtn?"right:-15px; top:-15px;":"left:-15px; top:-15px;":"right:-15px; top:-15px;","\n color:#fff;\n width:30px;\n height:30px;\n border-radius:99px;\n z-index:100002;\n }\n .dj-float-dismiss-btn span {\n color:#fff;\n font-size:18px;\n }\n .dj-float-dismiss-btn:hover {\n cursor:pointer;\n }\n .ima-controls-div .ima-close-of {\n display:none;\n } \n .ima-controls-div.ima-controls-div-showing .ima-close-of {\n width:20px;\n height:20px;\n background: transparent;\n right: 0.5em;\n bottom: 0.3em;\n position: absolute;\n display:block;\n }")},this.nonLinearStyles=function(){return".nonlinearAd {\n position:absolute;\n top:0;\n left:0;\n width:100%;\n height:100%;\n display:flex;\n display: flex;\n align-items: center;\n justify-content: center;\n\n }\n .nonlinearAd img {\n max-width:100%;\n }\n .video-js, .vjs-poster {\n background-color:transparent!important;\n }"},this.omniViewStyles=function(e){return"#".concat(e," .vjs-big-play-button {\n display: none!important;\n }\n .ima-ad-container div:first-child div:first-child {position: initial}")},this.liveStyles=function(){return".vjs-time-control.vjs-time-divider, .vjs-current-time, .vjs-duration {\n display: none!important;\n }"},this.generalStyles=function(){return'\n div.vjs-subs-caps-button {display:none}\n .ima-ad-container div:first-child div:first-child {position: initial}\n .dj-float-dismiss-btn{padding-bottom:0}\n .dj-float-dismiss-btn span {padding-bottom:0}\n .vjs-control-bar * {color: inherit; font-size:inherit; position: initial; font-family: Arial, Helvetica, sans-serif}\n .vjs-remaining-time {padding-right: 0}\n .vjs-mute-control {position: initial}\n .vjs-mute-control span:first-child {color: #fff; position:initial; font-size: 1em}\n .vjs-chromecast-button .vjs-icon-placeholder, .vjs-airplay-button .vjs-icon-placeholder {background:url("data:image/svg+xml,%3Csvg%20fill=%22white%22%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20512%20512%22%3E%3Cpath%20d=%22M447.8,64H64c-23.6,0-42.7,19.1-42.7,42.7v63.9H64v-63.9h383.8v298.6H298.6V448H448c23.6,0,42.7-19.1,42.7-42.7V106.7%20C490.7,83.1,471.4,64,447.8,64z%20M21.3,383.6L21.3,383.6l0,63.9h63.9C85.2,412.2,56.6,383.6,21.3,383.6L21.3,383.6z%20M21.3,298.6V341%20c58.9,0,106.6,48.1,106.6,107h42.7C170.7,365.6,103.7,298.7,21.3,298.6z%20M213.4,448h42.7c-0.5-129.5-105.3-234.3-234.8-234.6l0,42.4%20C127.3,255.6,213.3,342,213.4,448z%22/%3E%3C/svg%3E") center center no-repeat;background-size:contain;display:inline-block;width:1.4em;height:1.4em; margin-top:2px}.vjs-chromecast-button:hover{cursor:pointer}.vjs-chromecast-button.vjs-chromecast-casting-state .vjs-icon-placeholder{background:url("data:image/svg+xml,%3Csvg%20fill=%22white%22%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%20512%20512%22%3E%3Cpath%20d=%22M447.8,64H64c-23.6,0-42.7,19.1-42.7,42.7v63.9H64v-63.9h383.8v298.6H298.6V448H448c23.6,0,42.7-19.1,42.7-42.7V106.7%20C490.7,83.1,471.4,64,447.8,64z%20M21.3,383.6L21.3,383.6l0,63.9h63.9C85.2,412.2,56.6,383.6,21.3,383.6L21.3,383.6z%20M21.3,298.6V341%20c58.9,0,106.6,48.1,106.6,107h42.7C170.7,365.6,103.7,298.7,21.3,298.6z%20M213.4,448h42.7c-0.5-129.5-105.3-234.3-234.8-234.6l0,42.4%20C127.3,255.6,213.3,342,213.4,448z%22/%3E%3C/svg%3E") center center no-repeat}.vjs-chromecast-button.vjs-chromecast-button-lg:not,.vjs-airplay-button.vjs-chromecast-button-lg:not(.vjs-hidden){display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;width:auto;padding:0 4px}.vjs-chromecast-button.vjs-chromecast-button-lg:not(.vjs-hidden) .vjs-chromecast-button-label,vjs-airplay-button.vjs-airplay-button-lg:not(.vjs-hidden) .vjs-airplay-button-label{-webkit-box-flex:1;flex-grow:1;margin-left:4px}.vjs-chromecast-button.vjs-chromecast-button-lg:not(.vjs-hidden) .vjs-icon-placeholder,.vjs-airplay-button.vjs-airplay-button-lg:not(.vjs-hidden) .vjs-icon-placeholder{-webkit-box-flex:1;flex-grow:1}.vjs-tech-chromecast{display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;overflow:hidden}.vjs-tech-chromecast .vjs-tech-chromecast-poster::after{content:" ";display:block;height:2px;width:100px;background-color:#ccc;position:absolute;left:calc(50% - 50px)}.vjs-tech-chromecast .vjs-tech-chromecast-poster-img{max-height:180px;width:auto;border:2px solid #ccc}.vjs-tech-chromecast .vjs-tech-chromecast-poster-img.vjs-tech-chromecast-poster-img-empty{width:160px;height:90px}.vjs-tech-chromecast .vjs-tech-chromecast-title-container{position:absolute;bottom:50%;margin-bottom:100px;color:#ccc;text-align:center}.vjs-tech-chromecast .vjs-tech-chromecast-title{font-size:22px}.vjs-tech-chromecast .vjs-tech-chromecast-title.vjs-tech-chromecast-title-empty{display:none}.vjs-tech-chromecast .vjs-tech-chromecast-subtitle{font-size:18px;padding-top:.5em}.vjs-tech-chromecast .vjs-tech-chromecast-subtitle.vjs-tech-chromecast-subtitle-empty{display:none}@media(max-width:400px){.vjs-remaining-time{display:none}.vjs-chromecast-button, .vjs-airplay-button{margin-left: auto!important}}\n '}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var i=n(3),r=n.n(i),s=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,i=0;i-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(s),h=String.fromCharCode(9),p=function(e){var t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),n={};return t[1]&&(n.length=parseInt(t[1],10)),t[2]&&(n.offset=parseInt(t[2],10)),n},f=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),i={},r=n.length;r--;)""!==n[r]&&((t=/([^=]*)=(.*)/.exec(n[r]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),i[t[0]]=t[1]);return i},m=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}r()(t,e);var n=t.prototype;return n.push=function(e){var t,n,i=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce((function(t,n){var i=n(e);return i===e?t:t.concat([i])}),[e]).forEach((function(e){for(var r=0;r0&&(a.duration=e.duration),0===e.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=s},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("com.apple.streamingkeydelivery"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:e.attributes});if("com.microsoft.playready"===e.attributes.KEYFORMAT)return this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.microsoft.playready"]={uri:e.attributes.URI});if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection=this.manifest.contentProtection||{},void(this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Object(d.a)(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),i={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(i.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else i=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,f=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){n={},e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange),i&&(n.key=i)},"stream-inf":function(){this.manifest.playlists=s,this.manifest.mediaGroups=this.manifest.mediaGroups||p,e.attributes?(a.attributes||(a.attributes={}),o()(a.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||p,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var n=this.manifest.mediaGroups[e.attributes.TYPE];n[e.attributes["GROUP-ID"]]=n[e.attributes["GROUP-ID"]]||{},t=n[e.attributes["GROUP-ID"]],(u={default:/yes/i.test(e.attributes.DEFAULT)}).default?u.autoselect=!0:u.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(u.language=e.attributes.LANGUAGE),e.attributes.URI&&(u.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(u.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(u.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(u.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=u}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){f+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(s.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),a.dateTimeString=e.dateTimeString,a.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):(this.manifest.targetDuration=e.duration,v.call(this,this.manifest))},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=e.data},"cue-out-cont":function(){a.cueOutCont=e.data},"cue-in":function(){a.cueIn=e.data},skip:function(){this.manifest.skip=g(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;l=!0;var n=this.manifest.segments.length,i=g(e.attributes);a.parts=a.parts||[],a.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty("offset")||(i.byterange.offset=b),b=i.byterange.offset+i.byterange.length);var r=a.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+r+" for segment #"+n,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((function(e,n){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+n+" lacks required attribute(s): LAST-PART"})}))},"server-control":function(){var t=this.manifest.serverControl=g(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),v.call(this,this.manifest),t.canSkipDateranges&&!t.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var t=this.manifest.segments.length,n=g(e.attributes),i=n.type&&"PART"===n.type;a.preloadHints=a.preloadHints||[],a.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=i?b:0,i&&(b=n.byterange.offset+n.byterange.length)));var r=a.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+r+" for segment #"+t,e.attributes,["TYPE","URI"]),n.type)for(var s=0;s .vjs-icon-placeholder:before, .video-js .vjs-big-play-button .vjs-icon-placeholder:before {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.vjs-button > .vjs-icon-placeholder:before, .video-js .vjs-big-play-button .vjs-icon-placeholder:before {\n text-align: center;\n}\n\n@font-face {\n font-family: VideoJS;\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABDkAAsAAAAAG6gAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV3hY21hcAAAAYQAAADaAAADPv749/pnbHlmAAACYAAAC3AAABHQZg6OcWhlYWQAAA3QAAAAKwAAADYZw251aGhlYQAADfwAAAAdAAAAJA+RCLFobXR4AAAOHAAAABMAAACM744AAGxvY2EAAA4wAAAASAAAAEhF6kqubWF4cAAADngAAAAfAAAAIAE0AIFuYW1lAAAOmAAAASUAAAIK1cf1oHBvc3QAAA/AAAABJAAAAdPExYuNeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS7wTiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGJHcRdyA4RZgQRADK3CxEAAHic7dFZbsMgAEXRS0ycyZnnOeG7y+qC8pU1dHusIOXxuoxaOlwZYWQB0Aea4quIEN4E9LzKbKjzDeM6H/mua6Lmc/p8yhg0lvdYx15ZG8uOLQOGjMp3EzqmzJizYMmKNRu27Nhz4MiJMxeu3Ljz4Ekqm7T8P52G8PP3lnTOVk++Z6iN6QZzNN1F7ptuN7eGOjDUoaGODHVsuvU8MdTO9Hd5aqgzQ50b6sJQl4a6MtS1oW4MdWuoO0PdG+rBUI+GejLUs6FeDPVqqDdDvRvqw1CfhpqM9At0iFLaAAB4nJ1YDXBTVRZ+5/22TUlJ8we0pHlJm7RJf5O8F2j6EymlSPkpxaL8U2xpa3DKj0CBhc2IW4eWKSokIoLsuMqssM64f+jA4HSdWXXXscBq67IOs3FXZ1ZYWVyRFdo899yXtIBQZ90k7717zz3v3HPPOfd854YCCj9cL9dL0RQFOqCbGJnrHb5EayiKIWN8iA/hWBblo6hUWm8TtCDwE80WMJus/irwyxOdxeB0MDb14VNJHnXYoLLSl6FfCUYO9nYPTA8Epg9090LprfbBbZ2hY0UlJUXHQp3/vtWkS6EBv8+rPMq5u9692f/dNxJNiqwC1xPE9TCUgCsSdQWgE3XQD25lkG4CN2xmTcOXWBOyser6RN6KnGbKSbmQ3+d0OI1m2W8QzLLkI2sykrWAgJJEtA8vGGW/2Q+CmT3n8zS9wZwu2DCvtuZKZN3xkrLh36yCZuUomQSqGpY8t/25VfHVhw8z4ebGBtfLb0ya9PCaDc+8dGTvk2dsh6z7WzvowlXKUSWo9MJ15a3KrEP2loOr2Ojhw6iW6hf2BDdEccQvZGpaAy7YovSwq8kr7HGllxpd71rkS6G0Sf11sl9OvMK1+jwPPODxjUwkOim9CU3ix1wNjXDfmJSEn618Bs6lpWwUpU+8PCqLMY650zjq8VhCIP17NEKTx3eaLL+s5Pi6yJWaWjTHLR1jYzPSV9VF/6Ojdb/1kO3Mk3uhHC0x6gc1BjlKQ+nQFxTYdaJkZ7ySVxLBbhR1dsboNXp1tCYKW2LRaEzpYcIx2BKNxaL0ZaUnSqfFoiNhHKR/GkX6PWUSAaJelQaqZL1EpoHNsajSEyPSoJ9IjhIxTdjHLmwZvhRDOiFTY/YeQnvrVZmiTQtGncECXtFTBZLOVwwMRgoXHAkXzMzPn1nAJJ8jYSbMDaqN2waGLzNhih/bZynUBMpIWSg7VYi7DRx2m8ALkIdRCJwI6ArJx2EI8kaDWeTQKeAFk9fjl/1AvwktjQ1P7NjyMGQyfd4vjipX6M/i52D7Cq80kqlcxEcGXRr/FEcgs0u5uGgB4VWuMFfpdn2Re6Hi3PqzmxWKsz6+ae2Pn9hXXw/fqM859UiGC0oKYYILJBqJrsn1Z1E5qOs9rQCiUQRREjm8yJcbHF5cUJufX1vAHlefw0XgUoboS3ETfQlTxBC4SOtuE8VPRJTBSCQSjZCpk7Gqzu+masaZ2y7Zjehho4F3g82BNDkAHpORG4+OCS+f6JTPmtRn/PH1kch6d04sp7AQb25aQ/pqUyXeQ8vrebG8OYQdXOQ+585u0sdW9rqalzRURiJ+9F4MweRFrKUjl1GUYhH1A27WOHw5cTFSFPMo9EeUIGnQTZHIaJ7AHLaOKsOODaNF9jkBjYG2QEsQ2xjMUAx2bBEbeTBWMHwskBjngq56S/yfgkBnWBa4K9sqKtq2t1UI8S9He5XuBRbawAdatrQEAi30Aks2+LM8WeCbalVZkWNylvJ+dqJnzVb+OHlSoKW8nPCP7Rd+CcZ2DdWAGqJ2CBFOphgywFFCFBNtfAbGtNPBCwxvygHeYMZMY9ZboBqwq/pVrsbgN5tkv152ODlbMfiqwGMBgxa4Exz3QhovRIUp6acqZmQzRq0ypDXS2TPLT02YIkQETnOE445oOGxOmXAqUJNNG7XgupMjPq2ua9asrj5yY/yuKteO1Kx0YNJTufrirLe1mZnat7OL6rnUdCWenpW6I8mAnbsY8KWs1PuSovCW9A/Z25PQ24a7cNOqgmTkLmBMgh4THgc4b9k2IVv1/g/F5nGljwPLfOgHAzJzh45V/4+WenTzmMtR5Z7us2Tys909UHqrPY7KbckoxRvRHhmVc3cJGE97uml0R1S0jdULVl7EvZtDFVBF35N9cEdjpgmAiOlFZ+Dtoh93+D3zzHr8RRNZQhnCNMNbcegOvpEwZoL+06cJQ07h+th3fZ/7PVbVC6ngTAV/KoLFuO6+2KFcU651gEb5ugPSIb1D+Xp8V4+k3sEIGnw5mYe4If4k1lFYr6SCzmM2EQ8iWtmwjnBI9kTwe1TlfAmXh7H02by9fW2gsjKwtv0aaURKil4OdV7rDL1MXIFNrhdxohcZXYTnq47WisrKitaObbf5+yvkLi5J6lCNZZ+B6GC38VNBZBDidSS/+mSvh6s+srgC8pyKMvDtt+de3c9fU76ZPfuM8ud4Kv0fyP/LqfepMT/3oZxSqpZaTa1DaQYLY8TFsHYbWYsPoRhRWfL5eSSQbhUGgGC3YLbVMk6PitTFNGpAsNrC6D1VNBKgBHMejaiuRWEWGgsSDBTJjqWIl8kJLlsaLJ2tXDr6xGfT85bM2Q06a46x2HTgvdnV8z5YDy/27J4zt6x2VtkzjoYpkq36kaBr4eQSg7tyiVweWubXZugtadl58ydapfbORfKsDTuZ0OBgx4cfdjCf5tbWNITnL120fdOi1RV1C3uKGzNdwYLcMvZ3BxoPyTOCD1XvXTp7U10gWCVmTV9b3r2z0SkGWovb2hp9I89O8a2smlyaO8muMU+dRmtzp60IzAoFpjLr1n388boLyf0dRvxhsHZ0qbWqDkwqvvpkj4l0fY6EIXRi5sQSrAvsVYwXRy4qJ2EVtD1AN7a0HWth9ymvL1xc3WTUKK/TAHA/bXDVtVWfOMfuGxGZv4Ln/jVr9jc3j1yMv0tndmyt9Vq88Y9gH1wtLX3KWjot5++jWHgAoZZkQ14wGQ20Fli71UmKJAy4xKMSTGbVdybW7FDDAut9XpD5AzWrYO7zQ8qffqF8+Ynd/clrHcdyxGy3a/3+mfNnzC/cBsveTjnTvXf1o6vzOlZw7WtqtdmPK/Errz/6NNtD72zmNOZfbmYdTGHfoofqI79Oc+R2n1lrnL6pOm0Up7kwxhTW12Amm7WYkXR2qYrF2AmgmbAsxZjwy1xpg/m1Je2vrp8v/nz2xpmlBg4E9hrMU341wVpTOh/OfmGvAnra8q6uctr60ZQHV3Q+WMQJykMj8ZsWn2QBOmmHMB+m5pDIpTFonYigiaKAhGEiAHF7EliVnQkjoLVIMPtJpBKHYd3A8GYH9jJzrWwmHx5Qjp7vDAX0suGRym1vtm/9W1/HyR8vczfMs6Sk8DSv855/5dlX9oQq52hT8syyp2rx5Id17IAyAM3wIjQPMOHzytEB64q6D5zT91yNbnx3V/nqnd017S9Y0605k3izoXLpsxde2n38yoOV9s1LcjwzNjbdX6asnBVaBj/6/DwKwPkpcqbDG7BnsXoSqWnUAmottYF6jMSdVyYZh3zVXCjwTiwwHH6sGuRiEHQGzuRX6whZkp123oy1BWE2mEfJ/tvIRtM4ZM5bDXiMsPMaAKOTyc5uL57rqyyc5y5JE5pm1i2S2iUX0CcaQ6lC6Zog7JqSqZmYlosl2K6pwNA84zRnQW6SaALYZQGW5lhCtU/W34N6o+bKfZ8cf3/Cl/+iTX3wBzpOY4mRkeNf3rptycGSshQWgGbYt5jFc2e0+DglIrwl6DVWQ7BuwaJ3Xk1J4VL5urnLl/Wf+gHU/hZoZdKNym6lG+I34FaNeZKcSpJIo2IeCVvpdsDGfKvzJnAwmeD37Ow65ZWwSowpgwX5T69s/rB55dP5BcpgDKFV8p7q2sn/1uc93bVzT/w6UrCqDTWvfCq/oCD/qZXNoUj8BL5Kp6GU017frfNXkAtiiyf/SOCEeLqnd8R/Ql9GlCRfctS6k5chvIBuQ1zCCjoCHL2DHNHIXxMJ3kQeO8lbsUXONeSfA5EjcG6/E+KdhN4bP04vBhdi883+BFBzQbxFbvZzQeY9LNBZc0FNfn5NwfDn6rCTnTw6R8o+gfpf5hCom33cRuiTlss3KHmZjD+BPN+5gXuA2ziS/Q73mLxUkpbKN/eqwz5uK0X9F3h2d1V4nGNgZGBgAOJd776+iue3+crAzc4AAje5Bfcg0xz9YHEOBiYQBQA8FQlFAHicY2BkYGBnAAGOPgaG//85+hkYGVCBMgBGGwNYAAAAeJxjYGBgYB8EmKOPgQEAQ04BfgAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAcICGAJYArQC4AMwA7AD3gQwBJYE3AUkBWYFigYgBmYGtAbqB1gIEghYCG4IhAi2COh4nGNgZGBgUGYoZWBnAAEmIOYCQgaG/2A+AwAYCQG2AHicXZBNaoNAGIZfE5PQCKFQ2lUps2oXBfOzzAESyDKBQJdGR2NQR3QSSE/QE/QEPUUPUHqsvsrXjTMw83zPvPMNCuAWP3DQDAejdm1GjzwS7pMmwi75XngAD4/CQ/oX4TFe4Qt7uMMbOzjuDc0EmXCP/C7cJ38Iu+RP4QEe8CU8pP8WHmOPX2EPz87TPo202ey2OjlnQSXV/6arOjWFmvszMWtd6CqwOlKHq6ovycLaWMWVydXKFFZnmVFlZU46tP7R2nI5ncbi/dDkfDtFBA2DDXbYkhKc+V0Bqs5Zt9JM1HQGBRTm/EezTmZNKtpcAMs9Yu6AK9caF76zoLWIWcfMGOSkVduvSWechqZsz040Ib2PY3urxBJTzriT95lipz+TN1fmAAAAeJxtkMl2wjAMRfOAhABlKm2h80C3+ajgCKKDY6cegP59TYBzukAL+z1Zsq8ctaJTTKPrsUQLbXQQI0EXKXroY4AbDDHCGBNMcYsZ7nCPB8yxwCOe8IwXvOIN7/jAJ76wxHfUqWX+OzgumWAjJMV17i0Ndlr6irLKO+qftdT7i6y4uFSUvCknay+lFYZIZaQcmfH/xIFdYn98bqhra1aKTM/6lWMnyaYirx1rFUQZFBkb2zJUtoXeJCeg0WnLtHeSFc3OtrnozNwqi0TkSpBMDB1nSde5oJXW23hTS2/T0LilglXX7dmFVxLnq5U0vYATHFk3zX3BOisoQHNDFDeZnqKDy9hRNawN7Vh727hFzcJ5c8TILrKZfH7tIPxAFP0BpLeJPA==) format("woff");\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-play, .video-js .vjs-play-control .vjs-icon-placeholder, .video-js .vjs-big-play-button .vjs-icon-placeholder:before {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-play:before, .video-js .vjs-play-control .vjs-icon-placeholder:before, .video-js .vjs-big-play-button .vjs-icon-placeholder:before {\n content: "\\F101";\n}\n\n.vjs-icon-play-circle {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-play-circle:before {\n content: "\\F102";\n}\n\n.vjs-icon-pause, .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-pause:before, .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before {\n content: "\\F103";\n}\n\n.vjs-icon-volume-mute, .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-volume-mute:before, .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before {\n content: "\\F104";\n}\n\n.vjs-icon-volume-low, .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-volume-low:before, .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before {\n content: "\\F105";\n}\n\n.vjs-icon-volume-mid, .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-volume-mid:before, .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before {\n content: "\\F106";\n}\n\n.vjs-icon-volume-high, .video-js .vjs-mute-control .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-volume-high:before, .video-js .vjs-mute-control .vjs-icon-placeholder:before {\n content: "\\F107";\n}\n\n.vjs-icon-fullscreen-enter, .video-js .vjs-fullscreen-control .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-fullscreen-enter:before, .video-js .vjs-fullscreen-control .vjs-icon-placeholder:before {\n content: "\\F108";\n}\n\n.vjs-icon-fullscreen-exit, .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-fullscreen-exit:before, .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before {\n content: "\\F109";\n}\n\n.vjs-icon-square {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-square:before {\n content: "\\F10A";\n}\n\n.vjs-icon-spinner {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-spinner:before {\n content: "\\F10B";\n}\n\n.vjs-icon-subtitles, .video-js .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js .vjs-subtitles-button .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-subtitles:before, .video-js .vjs-subs-caps-button .vjs-icon-placeholder:before,\n.video-js.video-js:lang(en-GB) .vjs-subs-caps-button .vjs-icon-placeholder:before,\n.video-js.video-js:lang(en-IE) .vjs-subs-caps-button .vjs-icon-placeholder:before,\n.video-js.video-js:lang(en-AU) .vjs-subs-caps-button .vjs-icon-placeholder:before,\n.video-js.video-js:lang(en-NZ) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js .vjs-subtitles-button .vjs-icon-placeholder:before {\n content: "\\F10C";\n}\n\n.vjs-icon-captions, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder,\n.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder, .video-js .vjs-captions-button .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-captions:before, .video-js:lang(en) .vjs-subs-caps-button .vjs-icon-placeholder:before,\n.video-js:lang(fr-CA) .vjs-subs-caps-button .vjs-icon-placeholder:before, .video-js .vjs-captions-button .vjs-icon-placeholder:before {\n content: "\\F10D";\n}\n\n.vjs-icon-chapters, .video-js .vjs-chapters-button .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-chapters:before, .video-js .vjs-chapters-button .vjs-icon-placeholder:before {\n content: "\\F10E";\n}\n\n.vjs-icon-share {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-share:before {\n content: "\\F10F";\n}\n\n.vjs-icon-cog {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-cog:before {\n content: "\\F110";\n}\n\n.vjs-icon-circle, .vjs-seek-to-live-control .vjs-icon-placeholder, .video-js .vjs-volume-level, .video-js .vjs-play-progress {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-circle:before, .vjs-seek-to-live-control .vjs-icon-placeholder:before, .video-js .vjs-volume-level:before, .video-js .vjs-play-progress:before {\n content: "\\F111";\n}\n\n.vjs-icon-circle-outline {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-circle-outline:before {\n content: "\\F112";\n}\n\n.vjs-icon-circle-inner-circle {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-circle-inner-circle:before {\n content: "\\F113";\n}\n\n.vjs-icon-hd {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-hd:before {\n content: "\\F114";\n}\n\n.vjs-icon-cancel, .video-js .vjs-control.vjs-close-button .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-cancel:before, .video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before {\n content: "\\F115";\n}\n\n.vjs-icon-replay, .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-replay:before, .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before {\n content: "\\F116";\n}\n\n.vjs-icon-facebook {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-facebook:before {\n content: "\\F117";\n}\n\n.vjs-icon-gplus {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-gplus:before {\n content: "\\F118";\n}\n\n.vjs-icon-linkedin {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-linkedin:before {\n content: "\\F119";\n}\n\n.vjs-icon-twitter {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-twitter:before {\n content: "\\F11A";\n}\n\n.vjs-icon-tumblr {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-tumblr:before {\n content: "\\F11B";\n}\n\n.vjs-icon-pinterest {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-pinterest:before {\n content: "\\F11C";\n}\n\n.vjs-icon-audio-description, .video-js .vjs-descriptions-button .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-audio-description:before, .video-js .vjs-descriptions-button .vjs-icon-placeholder:before {\n content: "\\F11D";\n}\n\n.vjs-icon-audio, .video-js .vjs-audio-button .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-audio:before, .video-js .vjs-audio-button .vjs-icon-placeholder:before {\n content: "\\F11E";\n}\n\n.vjs-icon-next-item {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-next-item:before {\n content: "\\F11F";\n}\n\n.vjs-icon-previous-item {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-previous-item:before {\n content: "\\F120";\n}\n\n.vjs-icon-picture-in-picture-enter, .video-js .vjs-picture-in-picture-control .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-picture-in-picture-enter:before, .video-js .vjs-picture-in-picture-control .vjs-icon-placeholder:before {\n content: "\\F121";\n}\n\n.vjs-icon-picture-in-picture-exit, .video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder {\n font-family: VideoJS;\n font-weight: normal;\n font-style: normal;\n}\n.vjs-icon-picture-in-picture-exit:before, .video-js.vjs-picture-in-picture .vjs-picture-in-picture-control .vjs-icon-placeholder:before {\n content: "\\F122";\n}\n\n.video-js {\n display: block;\n vertical-align: top;\n box-sizing: border-box;\n color: #fff;\n background-color: #000;\n position: relative;\n padding: 0;\n font-size: 10px;\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n font-family: Arial, Helvetica, sans-serif;\n word-break: initial;\n}\n.video-js:-moz-full-screen {\n position: absolute;\n}\n.video-js:-webkit-full-screen {\n width: 100% !important;\n height: 100% !important;\n}\n\n.video-js[tabindex="-1"] {\n outline: none;\n}\n\n.video-js *,\n.video-js *:before,\n.video-js *:after {\n box-sizing: inherit;\n}\n\n.video-js ul {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n list-style-position: outside;\n margin-left: 0;\n margin-right: 0;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.video-js.vjs-fluid,\n.video-js.vjs-16-9,\n.video-js.vjs-4-3,\n.video-js.vjs-9-16,\n.video-js.vjs-1-1 {\n width: 100%;\n max-width: 100%;\n}\n\n.video-js.vjs-fluid:not(.vjs-audio-only-mode),\n.video-js.vjs-16-9:not(.vjs-audio-only-mode),\n.video-js.vjs-4-3:not(.vjs-audio-only-mode),\n.video-js.vjs-9-16:not(.vjs-audio-only-mode),\n.video-js.vjs-1-1:not(.vjs-audio-only-mode) {\n height: 0;\n}\n\n.video-js.vjs-16-9:not(.vjs-audio-only-mode) {\n padding-top: 56.25%;\n}\n\n.video-js.vjs-4-3:not(.vjs-audio-only-mode) {\n padding-top: 75%;\n}\n\n.video-js.vjs-9-16:not(.vjs-audio-only-mode) {\n padding-top: 177.7777777778%;\n}\n\n.video-js.vjs-1-1:not(.vjs-audio-only-mode) {\n padding-top: 100%;\n}\n\n.video-js.vjs-fill:not(.vjs-audio-only-mode) {\n width: 100%;\n height: 100%;\n}\n\n.video-js .vjs-tech {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.video-js.vjs-audio-only-mode .vjs-tech {\n display: none;\n}\n\nbody.vjs-full-window {\n padding: 0;\n margin: 0;\n height: 100%;\n}\n\n.vjs-full-window .video-js.vjs-fullscreen {\n position: fixed;\n overflow: hidden;\n z-index: 1000;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n}\n\n.video-js.vjs-fullscreen:not(.vjs-ios-native-fs) {\n width: 100% !important;\n height: 100% !important;\n padding-top: 0 !important;\n}\n\n.video-js.vjs-fullscreen.vjs-user-inactive {\n cursor: none;\n}\n\n.vjs-hidden {\n display: none !important;\n}\n\n.vjs-disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n.video-js .vjs-offscreen {\n height: 1px;\n left: -9999px;\n position: absolute;\n top: 0;\n width: 1px;\n}\n\n.vjs-lock-showing {\n display: block !important;\n opacity: 1 !important;\n visibility: visible !important;\n}\n\n.vjs-no-js {\n padding: 20px;\n color: #fff;\n background-color: #000;\n font-size: 18px;\n font-family: Arial, Helvetica, sans-serif;\n text-align: center;\n width: 300px;\n height: 150px;\n margin: 0px auto;\n}\n\n.vjs-no-js a,\n.vjs-no-js a:visited {\n color: #66A8CC;\n}\n\n.video-js .vjs-big-play-button {\n font-size: 3em;\n line-height: 1.5em;\n height: 1.63332em;\n width: 3em;\n display: block;\n position: absolute;\n top: 10px;\n left: 10px;\n padding: 0;\n cursor: pointer;\n opacity: 1;\n border: 0.06666em solid #fff;\n background-color: #2B333F;\n background-color: rgba(43, 51, 63, 0.7);\n border-radius: 0.3em;\n transition: all 0.4s;\n}\n.vjs-big-play-centered .vjs-big-play-button {\n top: 50%;\n left: 50%;\n margin-top: -0.81666em;\n margin-left: -1.5em;\n}\n\n.video-js:hover .vjs-big-play-button,\n.video-js .vjs-big-play-button:focus {\n border-color: #fff;\n background-color: #73859f;\n background-color: rgba(115, 133, 159, 0.5);\n transition: all 0s;\n}\n\n.vjs-controls-disabled .vjs-big-play-button,\n.vjs-has-started .vjs-big-play-button,\n.vjs-using-native-controls .vjs-big-play-button,\n.vjs-error .vjs-big-play-button {\n display: none;\n}\n\n.vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button {\n display: block;\n}\n\n.video-js button {\n background: none;\n border: none;\n color: inherit;\n display: inline-block;\n font-size: inherit;\n line-height: inherit;\n text-transform: none;\n text-decoration: none;\n transition: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n\n.vjs-control .vjs-button {\n width: 100%;\n height: 100%;\n}\n\n.video-js .vjs-control.vjs-close-button {\n cursor: pointer;\n height: 3em;\n position: absolute;\n right: 0;\n top: 0.5em;\n z-index: 2;\n}\n.video-js .vjs-modal-dialog {\n background: rgba(0, 0, 0, 0.8);\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0));\n overflow: auto;\n}\n\n.video-js .vjs-modal-dialog > * {\n box-sizing: border-box;\n}\n\n.vjs-modal-dialog .vjs-modal-dialog-content {\n font-size: 1.2em;\n line-height: 1.5;\n padding: 20px 24px;\n z-index: 1;\n}\n\n.vjs-menu-button {\n cursor: pointer;\n}\n\n.vjs-menu-button.vjs-disabled {\n cursor: default;\n}\n\n.vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu {\n display: none;\n}\n\n.vjs-menu .vjs-menu-content {\n display: block;\n padding: 0;\n margin: 0;\n font-family: Arial, Helvetica, sans-serif;\n overflow: auto;\n}\n\n.vjs-menu .vjs-menu-content > * {\n box-sizing: border-box;\n}\n\n.vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu {\n display: none;\n}\n\n.vjs-menu li {\n list-style: none;\n margin: 0;\n padding: 0.2em 0;\n line-height: 1.4em;\n font-size: 1.2em;\n text-align: center;\n text-transform: lowercase;\n}\n\n.vjs-menu li.vjs-menu-item:focus,\n.vjs-menu li.vjs-menu-item:hover,\n.js-focus-visible .vjs-menu li.vjs-menu-item:hover {\n background-color: #73859f;\n background-color: rgba(115, 133, 159, 0.5);\n}\n\n.vjs-menu li.vjs-selected,\n.vjs-menu li.vjs-selected:focus,\n.vjs-menu li.vjs-selected:hover,\n.js-focus-visible .vjs-menu li.vjs-selected:hover {\n background-color: #fff;\n color: #2B333F;\n}\n\n.video-js .vjs-menu *:not(.vjs-selected):focus:not(:focus-visible),\n.js-focus-visible .vjs-menu *:not(.vjs-selected):focus:not(.focus-visible) {\n background: none;\n}\n\n.vjs-menu li.vjs-menu-title {\n text-align: center;\n text-transform: uppercase;\n font-size: 1em;\n line-height: 2em;\n padding: 0;\n margin: 0 0 0.3em 0;\n font-weight: bold;\n cursor: default;\n}\n\n.vjs-menu-button-popup .vjs-menu {\n display: none;\n position: absolute;\n bottom: 0;\n width: 10em;\n left: -3em;\n height: 0em;\n margin-bottom: 1.5em;\n border-top-color: rgba(43, 51, 63, 0.7);\n}\n\n.vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n background-color: #2B333F;\n background-color: rgba(43, 51, 63, 0.7);\n position: absolute;\n width: 100%;\n bottom: 1.5em;\n max-height: 15em;\n}\n\n.vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,\n.vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n max-height: 5em;\n}\n\n.vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n max-height: 10em;\n}\n\n.vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n max-height: 14em;\n}\n\n.vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,\n.vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,\n.vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content {\n max-height: 25em;\n}\n\n.vjs-workinghover .vjs-menu-button-popup.vjs-hover .vjs-menu,\n.vjs-menu-button-popup .vjs-menu.vjs-lock-showing {\n display: block;\n}\n\n.video-js .vjs-menu-button-inline {\n transition: all 0.4s;\n overflow: hidden;\n}\n\n.video-js .vjs-menu-button-inline:before {\n width: 2.222222222em;\n}\n\n.video-js .vjs-menu-button-inline:hover,\n.video-js .vjs-menu-button-inline:focus,\n.video-js .vjs-menu-button-inline.vjs-slider-active,\n.video-js.vjs-no-flex .vjs-menu-button-inline {\n width: 12em;\n}\n\n.vjs-menu-button-inline .vjs-menu {\n opacity: 0;\n height: 100%;\n width: auto;\n position: absolute;\n left: 4em;\n top: 0;\n padding: 0;\n margin: 0;\n transition: all 0.4s;\n}\n\n.vjs-menu-button-inline:hover .vjs-menu,\n.vjs-menu-button-inline:focus .vjs-menu,\n.vjs-menu-button-inline.vjs-slider-active .vjs-menu {\n display: block;\n opacity: 1;\n}\n\n.vjs-no-flex .vjs-menu-button-inline .vjs-menu {\n display: block;\n opacity: 1;\n position: relative;\n width: auto;\n}\n\n.vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu,\n.vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,\n.vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu {\n width: auto;\n}\n\n.vjs-menu-button-inline .vjs-menu-content {\n width: auto;\n height: 100%;\n margin: 0;\n overflow: hidden;\n}\n\n.video-js .vjs-control-bar {\n display: none;\n width: 100%;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 3em;\n background-color: #2B333F;\n background-color: rgba(43, 51, 63, 0.7);\n}\n\n.vjs-has-started .vjs-control-bar,\n.vjs-audio-only-mode .vjs-control-bar {\n display: flex;\n visibility: visible;\n opacity: 1;\n transition: visibility 0.1s, opacity 0.1s;\n}\n\n.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {\n visibility: visible;\n opacity: 0;\n pointer-events: none;\n transition: visibility 1s, opacity 1s;\n}\n\n.vjs-controls-disabled .vjs-control-bar,\n.vjs-using-native-controls .vjs-control-bar,\n.vjs-error .vjs-control-bar {\n display: none !important;\n}\n\n.vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar,\n.vjs-audio-only-mode.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n}\n\n.vjs-has-started.vjs-no-flex .vjs-control-bar {\n display: table;\n}\n\n.video-js .vjs-control {\n position: relative;\n text-align: center;\n margin: 0;\n padding: 0;\n height: 100%;\n width: 4em;\n flex: none;\n}\n\n.video-js .vjs-control.vjs-visible-text {\n width: auto;\n padding-left: 1em;\n padding-right: 1em;\n}\n\n.vjs-button > .vjs-icon-placeholder:before {\n font-size: 1.8em;\n line-height: 1.67;\n}\n\n.vjs-button > .vjs-icon-placeholder {\n display: block;\n}\n\n.video-js .vjs-control:focus:before,\n.video-js .vjs-control:hover:before,\n.video-js .vjs-control:focus {\n text-shadow: 0em 0em 1em white;\n}\n\n.video-js *:not(.vjs-visible-text) > .vjs-control-text {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.vjs-no-flex .vjs-control {\n display: table-cell;\n vertical-align: middle;\n}\n\n.video-js .vjs-custom-control-spacer {\n display: none;\n}\n\n.video-js .vjs-progress-control {\n cursor: pointer;\n flex: auto;\n display: flex;\n align-items: center;\n min-width: 4em;\n touch-action: none;\n}\n\n.video-js .vjs-progress-control.disabled {\n cursor: default;\n}\n\n.vjs-live .vjs-progress-control {\n display: none;\n}\n\n.vjs-liveui .vjs-progress-control {\n display: flex;\n align-items: center;\n}\n\n.vjs-no-flex .vjs-progress-control {\n width: auto;\n}\n\n.video-js .vjs-progress-holder {\n flex: auto;\n transition: all 0.2s;\n height: 0.3em;\n}\n\n.video-js .vjs-progress-control .vjs-progress-holder {\n margin: 0 10px;\n}\n\n.video-js .vjs-progress-control:hover .vjs-progress-holder {\n font-size: 1.6666666667em;\n}\n\n.video-js .vjs-progress-control:hover .vjs-progress-holder.disabled {\n font-size: 1em;\n}\n\n.video-js .vjs-progress-holder .vjs-play-progress,\n.video-js .vjs-progress-holder .vjs-load-progress,\n.video-js .vjs-progress-holder .vjs-load-progress div {\n position: absolute;\n display: block;\n height: 100%;\n margin: 0;\n padding: 0;\n width: 0;\n}\n\n.video-js .vjs-play-progress {\n background-color: #fff;\n}\n.video-js .vjs-play-progress:before {\n font-size: 0.9em;\n position: absolute;\n right: -0.5em;\n top: -0.3333333333em;\n z-index: 1;\n}\n\n.video-js .vjs-load-progress {\n background: rgba(115, 133, 159, 0.5);\n}\n\n.video-js .vjs-load-progress div {\n background: rgba(115, 133, 159, 0.75);\n}\n\n.video-js .vjs-time-tooltip {\n background-color: #fff;\n background-color: rgba(255, 255, 255, 0.8);\n border-radius: 0.3em;\n color: #000;\n float: right;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 1em;\n padding: 6px 8px 8px 8px;\n pointer-events: none;\n position: absolute;\n top: -3.4em;\n visibility: hidden;\n z-index: 1;\n}\n\n.video-js .vjs-progress-holder:focus .vjs-time-tooltip {\n display: none;\n}\n\n.video-js .vjs-progress-control:hover .vjs-time-tooltip,\n.video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip {\n display: block;\n font-size: 0.6em;\n visibility: visible;\n}\n\n.video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip {\n font-size: 1em;\n}\n\n.video-js .vjs-progress-control .vjs-mouse-display {\n display: none;\n position: absolute;\n width: 1px;\n height: 100%;\n background-color: #000;\n z-index: 1;\n}\n\n.vjs-no-flex .vjs-progress-control .vjs-mouse-display {\n z-index: 0;\n}\n\n.video-js .vjs-progress-control:hover .vjs-mouse-display {\n display: block;\n}\n\n.video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display {\n visibility: hidden;\n opacity: 0;\n transition: visibility 1s, opacity 1s;\n}\n\n.video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display {\n display: none;\n}\n\n.vjs-mouse-display .vjs-time-tooltip {\n color: #fff;\n background-color: #000;\n background-color: rgba(0, 0, 0, 0.8);\n}\n\n.video-js .vjs-slider {\n position: relative;\n cursor: pointer;\n padding: 0;\n margin: 0 0.45em 0 0.45em;\n /* iOS Safari */\n -webkit-touch-callout: none;\n /* Safari */\n -webkit-user-select: none;\n /* Konqueror HTML */\n /* Firefox */\n -moz-user-select: none;\n /* Internet Explorer/Edge */\n -ms-user-select: none;\n /* Non-prefixed version, currently supported by Chrome and Opera */\n user-select: none;\n background-color: #73859f;\n background-color: rgba(115, 133, 159, 0.5);\n}\n\n.video-js .vjs-slider.disabled {\n cursor: default;\n}\n\n.video-js .vjs-slider:focus {\n text-shadow: 0em 0em 1em white;\n box-shadow: 0 0 1em #fff;\n}\n\n.video-js .vjs-mute-control {\n cursor: pointer;\n flex: none;\n}\n.video-js .vjs-volume-control {\n cursor: pointer;\n margin-right: 1em;\n display: flex;\n}\n\n.video-js .vjs-volume-control.vjs-volume-horizontal {\n width: 5em;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control {\n visibility: visible;\n opacity: 0;\n width: 1px;\n height: 1px;\n margin-left: -1px;\n}\n\n.video-js .vjs-volume-panel {\n transition: width 1s;\n}\n.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control, .video-js .vjs-volume-panel:active .vjs-volume-control, .video-js .vjs-volume-panel:focus .vjs-volume-control, .video-js .vjs-volume-panel .vjs-volume-control:active, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control, .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active {\n visibility: visible;\n opacity: 1;\n position: relative;\n transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s;\n}\n.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control.vjs-volume-horizontal, .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal {\n width: 5em;\n height: 3em;\n margin-right: 0;\n}\n.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical, .video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control.vjs-volume-vertical, .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical {\n left: -3.5em;\n transition: left 0s;\n}\n.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active {\n width: 10em;\n transition: width 0.1s;\n}\n.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only {\n width: 4em;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical {\n height: 8em;\n width: 3em;\n left: -3000em;\n transition: visibility 1s, opacity 1s, height 1s 1s, width 1s 1s, left 1s 1s, top 1s 1s;\n}\n\n.video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal {\n transition: visibility 1s, opacity 1s, height 1s 1s, width 1s, left 1s 1s, top 1s 1s;\n}\n\n.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal {\n width: 5em;\n height: 3em;\n visibility: visible;\n opacity: 1;\n position: relative;\n transition: none;\n}\n\n.video-js.vjs-no-flex .vjs-volume-control.vjs-volume-vertical,\n.video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical {\n position: absolute;\n bottom: 3em;\n left: 0.5em;\n}\n\n.video-js .vjs-volume-panel {\n display: flex;\n}\n\n.video-js .vjs-volume-bar {\n margin: 1.35em 0.45em;\n}\n\n.vjs-volume-bar.vjs-slider-horizontal {\n width: 5em;\n height: 0.3em;\n}\n\n.vjs-volume-bar.vjs-slider-vertical {\n width: 0.3em;\n height: 5em;\n margin: 1.35em auto;\n}\n\n.video-js .vjs-volume-level {\n position: absolute;\n bottom: 0;\n left: 0;\n background-color: #fff;\n}\n.video-js .vjs-volume-level:before {\n position: absolute;\n font-size: 0.9em;\n z-index: 1;\n}\n\n.vjs-slider-vertical .vjs-volume-level {\n width: 0.3em;\n}\n.vjs-slider-vertical .vjs-volume-level:before {\n top: -0.5em;\n left: -0.3em;\n z-index: 1;\n}\n\n.vjs-slider-horizontal .vjs-volume-level {\n height: 0.3em;\n}\n.vjs-slider-horizontal .vjs-volume-level:before {\n top: -0.3em;\n right: -0.5em;\n}\n\n.video-js .vjs-volume-panel.vjs-volume-panel-vertical {\n width: 4em;\n}\n\n.vjs-volume-bar.vjs-slider-vertical .vjs-volume-level {\n height: 100%;\n}\n\n.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {\n width: 100%;\n}\n\n.video-js .vjs-volume-vertical {\n width: 3em;\n height: 8em;\n bottom: 8em;\n background-color: #2B333F;\n background-color: rgba(43, 51, 63, 0.7);\n}\n\n.video-js .vjs-volume-horizontal .vjs-menu {\n left: -2em;\n}\n\n.video-js .vjs-volume-tooltip {\n background-color: #fff;\n background-color: rgba(255, 255, 255, 0.8);\n border-radius: 0.3em;\n color: #000;\n float: right;\n font-family: Arial, Helvetica, sans-serif;\n font-size: 1em;\n padding: 6px 8px 8px 8px;\n pointer-events: none;\n position: absolute;\n top: -3.4em;\n visibility: hidden;\n z-index: 1;\n}\n\n.video-js .vjs-volume-control:hover .vjs-volume-tooltip,\n.video-js .vjs-volume-control:hover .vjs-progress-holder:focus .vjs-volume-tooltip {\n display: block;\n font-size: 1em;\n visibility: visible;\n}\n\n.video-js .vjs-volume-vertical:hover .vjs-volume-tooltip,\n.video-js .vjs-volume-vertical:hover .vjs-progress-holder:focus .vjs-volume-tooltip {\n left: 1em;\n top: -12px;\n}\n\n.video-js .vjs-volume-control.disabled:hover .vjs-volume-tooltip {\n font-size: 1em;\n}\n\n.video-js .vjs-volume-control .vjs-mouse-display {\n display: none;\n position: absolute;\n width: 100%;\n height: 1px;\n background-color: #000;\n z-index: 1;\n}\n\n.video-js .vjs-volume-horizontal .vjs-mouse-display {\n width: 1px;\n height: 100%;\n}\n\n.vjs-no-flex .vjs-volume-control .vjs-mouse-display {\n z-index: 0;\n}\n\n.video-js .vjs-volume-control:hover .vjs-mouse-display {\n display: block;\n}\n\n.video-js.vjs-user-inactive .vjs-volume-control .vjs-mouse-display {\n visibility: hidden;\n opacity: 0;\n transition: visibility 1s, opacity 1s;\n}\n\n.video-js.vjs-user-inactive.vjs-no-flex .vjs-volume-control .vjs-mouse-display {\n display: none;\n}\n\n.vjs-mouse-display .vjs-volume-tooltip {\n color: #fff;\n background-color: #000;\n background-color: rgba(0, 0, 0, 0.8);\n}\n\n.vjs-poster {\n display: inline-block;\n vertical-align: middle;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: contain;\n background-color: #000000;\n cursor: pointer;\n margin: 0;\n padding: 0;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 100%;\n}\n\n.vjs-has-started .vjs-poster,\n.vjs-using-native-controls .vjs-poster {\n display: none;\n}\n\n.vjs-audio.vjs-has-started .vjs-poster,\n.vjs-has-started.vjs-audio-poster-mode .vjs-poster {\n display: block;\n}\n\n.video-js .vjs-live-control {\n display: flex;\n align-items: flex-start;\n flex: auto;\n font-size: 1em;\n line-height: 3em;\n}\n\n.vjs-no-flex .vjs-live-control {\n display: table-cell;\n width: auto;\n text-align: left;\n}\n\n.video-js:not(.vjs-live) .vjs-live-control,\n.video-js.vjs-liveui .vjs-live-control {\n display: none;\n}\n\n.video-js .vjs-seek-to-live-control {\n align-items: center;\n cursor: pointer;\n flex: none;\n display: inline-flex;\n height: 100%;\n padding-left: 0.5em;\n padding-right: 0.5em;\n font-size: 1em;\n line-height: 3em;\n width: auto;\n min-width: 4em;\n}\n\n.vjs-no-flex .vjs-seek-to-live-control {\n display: table-cell;\n width: auto;\n text-align: left;\n}\n\n.video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,\n.video-js:not(.vjs-live) .vjs-seek-to-live-control {\n display: none;\n}\n\n.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge {\n cursor: auto;\n}\n\n.vjs-seek-to-live-control .vjs-icon-placeholder {\n margin-right: 0.5em;\n color: #888;\n}\n\n.vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder {\n color: red;\n}\n\n.video-js .vjs-time-control {\n flex: none;\n font-size: 1em;\n line-height: 3em;\n min-width: 2em;\n width: auto;\n padding-left: 1em;\n padding-right: 1em;\n}\n\n.vjs-live .vjs-time-control {\n display: none;\n}\n\n.video-js .vjs-current-time,\n.vjs-no-flex .vjs-current-time {\n display: none;\n}\n\n.video-js .vjs-duration,\n.vjs-no-flex .vjs-duration {\n display: none;\n}\n\n.vjs-time-divider {\n display: none;\n line-height: 3em;\n}\n\n.vjs-live .vjs-time-divider {\n display: none;\n}\n\n.video-js .vjs-play-control {\n cursor: pointer;\n}\n\n.video-js .vjs-play-control .vjs-icon-placeholder {\n flex: none;\n}\n\n.vjs-text-track-display {\n position: absolute;\n bottom: 3em;\n left: 0;\n right: 0;\n top: 0;\n pointer-events: none;\n}\n\n.video-js.vjs-controls-disabled .vjs-text-track-display,\n.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display {\n bottom: 1em;\n}\n\n.video-js .vjs-text-track {\n font-size: 1.4em;\n text-align: center;\n margin-bottom: 0.1em;\n}\n\n.vjs-subtitles {\n color: #fff;\n}\n\n.vjs-captions {\n color: #fc6;\n}\n\n.vjs-tt-cue {\n display: block;\n}\n\nvideo::-webkit-media-text-track-display {\n transform: translateY(-3em);\n}\n\n.video-js.vjs-controls-disabled video::-webkit-media-text-track-display,\n.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display {\n transform: translateY(-1.5em);\n}\n\n.video-js .vjs-picture-in-picture-control {\n cursor: pointer;\n flex: none;\n}\n.video-js.vjs-audio-only-mode .vjs-picture-in-picture-control {\n display: none;\n}\n\n.video-js .vjs-fullscreen-control {\n cursor: pointer;\n flex: none;\n}\n.video-js.vjs-audio-only-mode .vjs-fullscreen-control {\n display: none;\n}\n\n.vjs-playback-rate > .vjs-menu-button,\n.vjs-playback-rate .vjs-playback-rate-value {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.vjs-playback-rate .vjs-playback-rate-value {\n pointer-events: none;\n font-size: 1.5em;\n line-height: 2;\n text-align: center;\n}\n\n.vjs-playback-rate .vjs-menu {\n width: 4em;\n left: 0em;\n}\n\n.vjs-error .vjs-error-display .vjs-modal-dialog-content {\n font-size: 1.4em;\n text-align: center;\n}\n\n.vjs-error .vjs-error-display:before {\n color: #fff;\n content: "X";\n font-family: Arial, Helvetica, sans-serif;\n font-size: 4em;\n left: 0;\n line-height: 1;\n margin-top: -0.5em;\n position: absolute;\n text-shadow: 0.05em 0.05em 0.1em #000;\n text-align: center;\n top: 50%;\n vertical-align: middle;\n width: 100%;\n}\n\n.vjs-loading-spinner {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n opacity: 0.85;\n text-align: left;\n border: 6px solid rgba(43, 51, 63, 0.7);\n box-sizing: border-box;\n background-clip: padding-box;\n width: 50px;\n height: 50px;\n border-radius: 25px;\n visibility: hidden;\n}\n\n.vjs-seeking .vjs-loading-spinner,\n.vjs-waiting .vjs-loading-spinner {\n display: block;\n -webkit-animation: vjs-spinner-show 0s linear 0.3s forwards;\n animation: vjs-spinner-show 0s linear 0.3s forwards;\n}\n\n.vjs-loading-spinner:before,\n.vjs-loading-spinner:after {\n content: "";\n position: absolute;\n margin: -6px;\n box-sizing: inherit;\n width: inherit;\n height: inherit;\n border-radius: inherit;\n opacity: 1;\n border: inherit;\n border-color: transparent;\n border-top-color: white;\n}\n\n.vjs-seeking .vjs-loading-spinner:before,\n.vjs-seeking .vjs-loading-spinner:after,\n.vjs-waiting .vjs-loading-spinner:before,\n.vjs-waiting .vjs-loading-spinner:after {\n -webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite;\n animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite, vjs-spinner-fade 1.1s linear infinite;\n}\n\n.vjs-seeking .vjs-loading-spinner:before,\n.vjs-waiting .vjs-loading-spinner:before {\n border-top-color: white;\n}\n\n.vjs-seeking .vjs-loading-spinner:after,\n.vjs-waiting .vjs-loading-spinner:after {\n border-top-color: white;\n -webkit-animation-delay: 0.44s;\n animation-delay: 0.44s;\n}\n\n@keyframes vjs-spinner-show {\n to {\n visibility: visible;\n }\n}\n@-webkit-keyframes vjs-spinner-show {\n to {\n visibility: visible;\n }\n}\n@keyframes vjs-spinner-spin {\n 100% {\n transform: rotate(360deg);\n }\n}\n@-webkit-keyframes vjs-spinner-spin {\n 100% {\n -webkit-transform: rotate(360deg);\n }\n}\n@keyframes vjs-spinner-fade {\n 0% {\n border-top-color: #73859f;\n }\n 20% {\n border-top-color: #73859f;\n }\n 35% {\n border-top-color: white;\n }\n 60% {\n border-top-color: #73859f;\n }\n 100% {\n border-top-color: #73859f;\n }\n}\n@-webkit-keyframes vjs-spinner-fade {\n 0% {\n border-top-color: #73859f;\n }\n 20% {\n border-top-color: #73859f;\n }\n 35% {\n border-top-color: white;\n }\n 60% {\n border-top-color: #73859f;\n }\n 100% {\n border-top-color: #73859f;\n }\n}\n.video-js.vjs-audio-only-mode .vjs-captions-button {\n display: none;\n}\n\n.vjs-chapters-button .vjs-menu ul {\n width: 24em;\n}\n\n.video-js.vjs-audio-only-mode .vjs-descriptions-button {\n display: none;\n}\n\n.video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder {\n vertical-align: middle;\n display: inline-block;\n margin-bottom: -0.1em;\n}\n\n.video-js .vjs-subs-caps-button + .vjs-menu .vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before {\n font-family: VideoJS;\n content: "\\F10D";\n font-size: 1.5em;\n line-height: inherit;\n}\n\n.video-js.vjs-audio-only-mode .vjs-subs-caps-button {\n display: none;\n}\n\n.video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder {\n vertical-align: middle;\n display: inline-block;\n margin-bottom: -0.1em;\n}\n\n.video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before {\n font-family: VideoJS;\n content: " \\F11D";\n font-size: 1.5em;\n line-height: inherit;\n}\n\n.video-js.vjs-layout-small .vjs-current-time,\n.video-js.vjs-layout-small .vjs-time-divider,\n.video-js.vjs-layout-small .vjs-duration,\n.video-js.vjs-layout-small .vjs-remaining-time,\n.video-js.vjs-layout-small .vjs-playback-rate,\n.video-js.vjs-layout-small .vjs-volume-control, .video-js.vjs-layout-x-small .vjs-current-time,\n.video-js.vjs-layout-x-small .vjs-time-divider,\n.video-js.vjs-layout-x-small .vjs-duration,\n.video-js.vjs-layout-x-small .vjs-remaining-time,\n.video-js.vjs-layout-x-small .vjs-playback-rate,\n.video-js.vjs-layout-x-small .vjs-volume-control, .video-js.vjs-layout-tiny .vjs-current-time,\n.video-js.vjs-layout-tiny .vjs-time-divider,\n.video-js.vjs-layout-tiny .vjs-duration,\n.video-js.vjs-layout-tiny .vjs-remaining-time,\n.video-js.vjs-layout-tiny .vjs-playback-rate,\n.video-js.vjs-layout-tiny .vjs-volume-control {\n display: none;\n}\n.video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-x-small .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:hover, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal:active, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active, .video-js.vjs-layout-tiny .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover {\n width: auto;\n width: initial;\n}\n.video-js.vjs-layout-x-small .vjs-progress-control, .video-js.vjs-layout-tiny .vjs-progress-control {\n display: none;\n}\n.video-js.vjs-layout-x-small .vjs-custom-control-spacer {\n flex: auto;\n display: block;\n}\n.video-js.vjs-layout-x-small.vjs-no-flex .vjs-custom-control-spacer {\n width: auto;\n}\n\n.vjs-modal-dialog.vjs-text-track-settings {\n background-color: #2B333F;\n background-color: rgba(43, 51, 63, 0.75);\n color: #fff;\n height: 70%;\n}\n\n.vjs-text-track-settings .vjs-modal-dialog-content {\n display: table;\n}\n\n.vjs-text-track-settings .vjs-track-settings-colors,\n.vjs-text-track-settings .vjs-track-settings-font,\n.vjs-text-track-settings .vjs-track-settings-controls {\n display: table-cell;\n}\n\n.vjs-text-track-settings .vjs-track-settings-controls {\n text-align: right;\n vertical-align: bottom;\n}\n\n@supports (display: grid) {\n .vjs-text-track-settings .vjs-modal-dialog-content {\n display: grid;\n grid-template-columns: 1fr 1fr;\n grid-template-rows: 1fr;\n padding: 20px 24px 0px 24px;\n }\n\n .vjs-track-settings-controls .vjs-default-button {\n margin-bottom: 20px;\n }\n\n .vjs-text-track-settings .vjs-track-settings-controls {\n grid-column: 1/-1;\n }\n\n .vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,\n.vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content,\n.vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content {\n grid-template-columns: 1fr;\n }\n}\n.vjs-track-setting > select {\n margin-right: 1em;\n margin-bottom: 0.5em;\n}\n\n.vjs-text-track-settings fieldset {\n margin: 5px;\n padding: 3px;\n border: none;\n}\n\n.vjs-text-track-settings fieldset span {\n display: inline-block;\n}\n\n.vjs-text-track-settings fieldset span > select {\n max-width: 7.3em;\n}\n\n.vjs-text-track-settings legend {\n color: #fff;\n margin: 0 0 5px 0;\n}\n\n.vjs-text-track-settings .vjs-label {\n position: absolute;\n clip: rect(1px 1px 1px 1px);\n clip: rect(1px, 1px, 1px, 1px);\n display: block;\n margin: 0 0 5px 0;\n padding: 0;\n border: 0;\n height: 1px;\n width: 1px;\n overflow: hidden;\n}\n\n.vjs-track-settings-controls button:focus,\n.vjs-track-settings-controls button:active {\n outline-style: solid;\n outline-width: medium;\n background-image: linear-gradient(0deg, #fff 88%, #73859f 100%);\n}\n\n.vjs-track-settings-controls button:hover {\n color: rgba(43, 51, 63, 0.75);\n}\n\n.vjs-track-settings-controls button {\n background-color: #fff;\n background-image: linear-gradient(-180deg, #fff 88%, #73859f 100%);\n color: #2B333F;\n cursor: pointer;\n border-radius: 2px;\n}\n\n.vjs-track-settings-controls .vjs-default-button {\n margin-right: 1em;\n}\n\n@media print {\n .video-js > *:not(.vjs-tech):not(.vjs-poster) {\n visibility: hidden;\n }\n}\n.vjs-resize-manager {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n z-index: -1000;\n}\n\n.js-focus-visible .video-js *:focus:not(.focus-visible) {\n outline: none;\n}\n\n.video-js *:focus:not(:focus-visible) {\n outline: none;\n}\n',""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,i=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var r,s=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(s)?e:(r=0===s.indexOf("//")?s:0===s.indexOf("/")?n+s:i+s.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")}))}},function(e,t,n){var i=n(38);"string"==typeof i&&(i=[[e.i,i,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(19)(i,r);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(18)(!1)).push([e.i,"/*! videojs-tube - 2019-11-23\r\n * Copyright (c) 2016 CodeCanyon\r\n * Author by FaceTheme\r\n * @version 1.1.0 support videojs-7 */\r\n .video-js .vjs-play-progress{ background-color:#FFFFFF}.video-js{font-size:13px}.video-js.vjs-fullscreen{font-size:17px}.video-js .vjs-big-play-button,.vjs-big-play-centered .vjs-big-play-button{font-size:5em;line-height:1.34em;height:1.4em;width:1.4em;color:#b0b0b0;border:.05000em solid #b0b0b0;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;margin-top:-.7em;margin-left:-.7em;top:50%;left:50%}.video-js:hover .vjs-big-play-button,.video-js .vjs-big-play-button:focus{color:#ffffff;border-color:#ffffff;background-color:#d7d7d7;background-color:rgba(239, 239, 239, 0.7);transition:all 0s}.video-js .vjs-progress-control{position:absolute;top:0;left:0;margin:0;padding:0;width:100%;height:auto;-webkit-transform:translate(0,-100%);transform:translate(0,-100%)}.video-js .vjs-progress-control:hover .vjs-progress-holder,.video-js:hover .vjs-progress-holder{font-size:2em}.video-js .vjs-current-time{display:block;padding-right:0}.video-js .vjs-time-divider{display:block}.video-js .vjs-duration{display:block;padding-left:0}.video-js .vjs-remaining-time{margin-right:auto;visibility:hidden}.video-js .vjs-control-bar{background-color:transparent;background-image:linear-gradient(to bottom,rgba(23,23,23,0) 0,rgba(0,0,0,.4) 100%)}.video-js .vjs-play-progress:before{font-size:1em;top:-.34777777777em}.video-js .vjs-load-progress,.video-js .vjs-load-progress div{background-color:rgba(255,255,255,.4)}.video-js .vjs-slider{background-color:rgba(255,255,255,.2)}.video-js .vjs-play-control:before,.video-js .vjs-fullscreen-control:before{font-size:2.3em;line-height:1.33}.video-js .vjs-big-play-button{background-color: transparent;color: #fff;border-color: #fff;box-shadow: 0px 0px 20px rgba(0,0,0,0.9) inset, 0px 0px 20px rgba(0,0,0,0.9);text-shadow: 0 0 20px #000;}\r\n/* hide the captions settings item from the captions menu */\r\n.vjs-subs-caps-button,.vjs-picture-in-picture-control{display:none!important}\r\n",""])},function(e,t){},function(e,t){e.exports=function(e){if(!e)return!1;var t=n.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var n=Object.prototype.toString},function(e,t,n){"use strict";var i=n(0);e.exports=function(e,t){return void 0===t&&(t=!1),function(n,r,s){if(n)e(n);else if(r.statusCode>=400&&r.statusCode<=599){var a=s;if(t)if(i.TextDecoder){var o=function(e){void 0===e&&(e="");return e.toLowerCase().split(";").reduce((function(e,t){var n=t.split("="),i=n[0],r=n[1];return"charset"===i.trim()?r.trim():e}),"utf-8")}(r.headers&&r.headers["content-type"]);try{a=new TextDecoder(o).decode(s)}catch(e){}}else a=String.fromCharCode.apply(null,new Uint8Array(s));e({cause:a})}else e(null,s)}}},function(e,t,n){var i=n(2),r=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function s(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function o(){this.values=r(null)}function l(e,t,n,i){var r=i?e.split(i):[e];for(var s in r)if("string"==typeof r[s]){var a=r[s].split(n);if(2===a.length)t(a[0].trim(),a[1].trim())}}function u(e,t,n){var i=e;function r(){var t=a(e);if(null===t)throw new s(s.Errors.BadTimeStamp,"Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=r(),u(),"--\x3e"!==e.substr(0,3))throw new s(s.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),u(),t.endTime=r(),u(),function(e,t){var i=new o;l(e,(function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var s=t.split(","),a=s[0];i.integer(e,a),i.percent(e,a)&&i.set("snapToLines",!1),i.alt(e,a,["auto"]),2===s.length&&i.alt("lineAlign",s[1],["start","center","end"]);break;case"position":s=t.split(","),i.percent(e,s[0]),2===s.length&&i.alt("positionAlign",s[1],["start","center","end"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");try{t.line=i.get("line","auto")}catch(e){}t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100);try{t.align=i.get("align","center")}catch(e){t.align=i.get("align","middle")}try{t.position=i.get("position","auto")}catch(e){t.position=i.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=i.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}s.prototype=r(Error.prototype),s.prototype.constructor=s,s.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var i=0;i=0&&t<=100)&&(this.set(e,t),!0)}};var d=i.createElement&&i.createElement("textarea"),c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},p={v:"title",lang:"lang"},f={rt:"ruby"};function m(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function i(e,t){return!f[t.localName]||f[t.localName]===e.localName}function r(t,n){var i=c[t];if(!i)return null;var r=e.document.createElement(i),s=p[t];return s&&n&&(r[s]=n.trim()),r}for(var s,o,l=e.document.createElement("div"),u=l,m=[];null!==(s=n());)if("<"!==s[0])u.appendChild(e.document.createTextNode((o=s,d.innerHTML=o,o=d.textContent,d.textContent="",o)));else{if("/"===s[1]){m.length&&m[m.length-1]===s.substr(2).replace(">","")&&(m.pop(),u=u.parentNode);continue}var g,v=a(s.substr(1,s.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),u.appendChild(g);continue}var y=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(g=r(y[1],y[3])))continue;if(!i(u,g))continue;if(y[2]){var b=y[2].split(".");b.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var i=t?"background-color":"color",r=h[n];g.style[i]=r}})),g.className=b.join(" ")}m.push(y[1]),u.appendChild(g),u=g}return l}var g=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(e){for(var t=0;t=n[0]&&e<=n[1])return!0}return!1}function y(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function i(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function r(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var s=n.match(/^.*(\n|\r)/);return s?(e.length=0,s[0]):n}return"ruby"===t.tagName?r(e):t.childNodes?(i(e,t),r(e)):void 0}for(i(t,e);n=r(t);)for(var s=0;s=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,i=0,r=0;rc&&(d=d<0?-1:1,d*=Math.ceil(c/u)*u),a<0&&(d+=""===s.vertical?n.height:n.width,o=o.reverse()),r.move(h,d)}else{var p=r.lineHeight/n.height*100;switch(s.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],r=new T(t)}var f=function(e,t){for(var r,s=new T(e),a=1,o=0;ol&&(r=new T(e),a=l),e=new T(s)}return r||s}(r,o);t.move(f.toCSSCompatValues(n))}function w(){}b.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},b.prototype.formatStyle=function(e,t){return 0===e?0:e+t},_.prototype=r(b.prototype),_.prototype.constructor=_,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.lefte.left&&this.tope.top},T.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,i=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||i,height:e.height||t,bottom:e.bottom||i+(e.height||t),width:e.width||n}},w.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},w.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};w.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin="1.5%",n.appendChild(i),function(e){for(var t=0;t100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=r(e);t?(g=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(e){var t=r(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");y=t,this.hasBeenReset=!0}}}),this.displayState=void 0}s.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=s},function(e,t){var n={"":!0,up:!0};function i(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,r=0,s=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!i(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!i(e))throw new Error("RegionAnchorX must be between 0 and 100.");s=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!i(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!i(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!i(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var t=function(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}(e);!1===t?console.warn("Scroll: an invalid or illegal string was specified."):l=t}}})}},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";(function(e){var i=n(47),r=n(48),s=n(49);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(i)return F(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return j(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function g(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function v(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=l.from(t,i)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,i,r);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,i,r){var s,a=1,o=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(r){var d=-1;for(s=n;so&&(n=o-l),s=n;s>=0;s--){for(var c=!0,h=0;hr&&(i=r):i=r;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");i>s/2&&(i=s/2);for(var a=0;a>8,r=n%256,s.push(r),s.push(i);return s}(t,e.length-n),e,n,i)}function E(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r239?4:u>223?3:u>191?2:1;if(r+c<=n)switch(c){case 1:u<128&&(d=u);break;case 2:128==(192&(s=e[r+1]))&&(l=(31&u)<<6|63&s)>127&&(d=l);break;case 3:s=e[r+1],a=e[r+2],128==(192&s)&&128==(192&a)&&(l=(15&u)<<12|(63&s)<<6|63&a)>2047&&(l<55296||l>57343)&&(d=l);break;case 4:s=e[r+1],a=e[r+2],o=e[r+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&(l=(15&u)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&l<1114112&&(d=l)}null===d?(d=65533,c=1):d>65535&&(d-=65536,i.push(d>>>10&1023|55296),d=56320|1023&d),i.push(d),r+=c}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,i,r){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(r>>>=0)-(i>>>=0),a=(n>>>=0)-(t>>>=0),o=Math.min(s,a),u=this.slice(i,r),d=e.slice(t,n),c=0;cr)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return T(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function C(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;ri)&&(n=i);for(var r="",s=t;sn)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,i,r,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function O(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,s=Math.min(e.length-n,2);r>>8*(i?r:1-r)}function D(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,s=Math.min(e.length-n,4);r>>8*(i?r:3-r)&255}function M(e,t,n,i,r,s){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,i,s){return s||M(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function N(e,t,n,i,s){return s||M(e,0,n,8),r.write(e,t,n,i,52,8),n+8}l.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t0&&(r*=256);)i+=this[e+--t]*r;return i},l.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var i=this[e],r=1,s=0;++s=(r*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var i=t,r=1,s=this[e+--i];i>0&&(r*=256);)s+=this[e+--i]*r;return s>=(r*=128)&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),r.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),r.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),r.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),r.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,i){(e=+e,t|=0,n|=0,i)||L(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+r]=e/s&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);L(this,e,t,n,r-1,-r)}var s=0,a=1,o=0;for(this[t]=255&e;++s>0)-o&255;return t+n},l.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);L(this,e,t,n,r-1,-r)}var s=n-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t=0;--r)e[r+t]=this[r+n];else if(s<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===i){(t-=3)>-1&&s.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&s.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function V(e){return i.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,i){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(12))},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){var t,n,i=u(e),a=i[0],o=i[1],l=new s(function(e,t,n){return 3*(t+n)/4-n}(0,a,o)),d=0,c=o>0?a-4:a;for(n=0;n>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===o&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===o&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,s=[],a=0,o=n-r;ao?o:a+16383));1===r?(t=e[n-1],s.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],s.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return s.join("")};for(var i=[],r=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=a.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function d(e,t,n){for(var r,s,a=[],o=t;o>18&63]+i[s>>12&63]+i[s>>6&63]+i[63&s]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,i,r){var s,a,o=8*r-i-1,l=(1<>1,d=-7,c=n?r-1:0,h=n?-1:1,p=e[t+c];for(c+=h,s=p&(1<<-d)-1,p>>=-d,d+=o;d>0;s=256*s+e[t+c],c+=h,d-=8);for(a=s&(1<<-d)-1,s>>=-d,d+=i;d>0;a=256*a+e[t+c],c+=h,d-=8);if(0===s)s=1-u;else{if(s===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,i),s-=u}return(p?-1:1)*a*Math.pow(2,s-i)},t.write=function(e,t,n,i,r,s){var a,o,l,u=8*s-r-1,d=(1<>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:s-1,f=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+c>=1?h/l:h*Math.pow(2,1-c))*l>=2&&(a++,l/=2),a+c>=d?(o=0,a=d):a+c>=1?(o=(t*l-1)*Math.pow(2,r),a+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,r),a=0));r>=8;e[n+p]=255&o,p+=f,o/=256,r-=8);for(a=a<0;e[n+p]=255&a,p+=f,a/=256,u-=8);e[n+p-f]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){var i=n(16),r=n(25),s=n(51),a=n(52),o=r.DOMImplementation,l=i.NAMESPACE,u=a.ParseError,d=a.XMLReader;function c(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function p(){this.cdata=!1}function f(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function v(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var n=this.options,i=new d,r=n.domBuilder||new p,a=n.errorHandler,o=n.locator,u=n.xmlns||{},h=/\/x?html?$/.test(t),f=h?s.HTML_ENTITIES:s.XML_ENTITIES;o&&r.setDocumentLocator(o),i.errorHandler=function(e,t,n){if(!e){if(t instanceof p)return t;e=t}var i={},r=e instanceof Function;function s(t){var s=e[t];!s&&r&&(s=2==e.length?function(n){e(t,n)}:e),i[t]=s&&function(e){s("[xmldom "+t+"]\t"+e+m(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),i}(a,r,o),i.domBuilder=n.domBuilder||r,h&&(u[""]=l.HTML),u.xml=u.xml||l.XML;var g=n.normalizeLineEndings||c;return e&&"string"==typeof e?i.parse(g(e),u,f):i.errorHandler.error("invalid doc source"),r.doc},p.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,i){var r=this.doc,s=r.createElementNS(e,n||t),a=i.length;v(this,s),this.currentElement=s,this.locator&&f(this.locator,s);for(var o=0;o",lt:"<",quot:'"'}),t.HTML_ENTITIES=i({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),t.entityMap=t.HTML_ENTITIES},function(e,t,n){var i=n(16).NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,s=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+r.source+s.source+"*(?::"+r.source+s.source+"*)?$");function o(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function l(){}function u(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function d(e,t,n,r,s,a){function o(e,t,i){n.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,s),i)}for(var l,u=++t,d=0;;){var c=e.charAt(u);switch(c){case"=":if(1===d)l=e.slice(t,u),d=3;else{if(2!==d)throw new Error("attribute equal must after attrName");d=3}break;case"'":case'"':if(3===d||1===d){if(1===d&&(a.warning('attribute value must after "="'),l=e.slice(t,u)),t=u+1,!((u=e.indexOf(c,t))>0))throw new Error("attribute value no end '"+c+"' match");o(l,h=e.slice(t,u),t-1),d=5}else{if(4!=d)throw new Error('attribute value must after "="');o(l,h=e.slice(t,u),t),a.warning('attribute "'+l+'" missed start quot('+c+")!!"),t=u+1,d=5}break;case"/":switch(d){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:d=7,n.closed=!0;case 4:case 1:break;case 2:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==d&&n.setTagName(e.slice(t,u)),u;case">":switch(d){case 0:n.setTagName(e.slice(t,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=e.slice(t,u)).slice(-1)&&(n.closed=!0,h=h.slice(0,-1));case 2:2===d&&(h=l),4==d?(a.warning('attribute "'+h+'" missed quot(")!'),o(l,h,t)):(i.isHTML(r[""])&&h.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),o(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return u;case"€":c=" ";default:if(c<=" ")switch(d){case 0:n.setTagName(e.slice(t,u)),d=6;break;case 1:l=e.slice(t,u),d=2;break;case 4:var h=e.slice(t,u);a.warning('attribute "'+h+'" missed quot(")!!'),o(l,h,t);case 5:d=6}else switch(d){case 2:n.tagName;i.isHTML(r[""])&&l.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,t),t=u,d=1;break;case 5:a.warning('attribute space is required"'+l+'"!!');case 6:d=1,t=u;break;case 3:d=4,t=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function c(e,t,n){for(var r=e.tagName,s=null,a=e.length;a--;){var o=e[a],l=o.qName,u=o.value;if((p=l.indexOf(":"))>0)var d=o.prefix=l.slice(0,p),c=l.slice(p+1),h="xmlns"===d&&c;else c=l,d=null,h="xmlns"===l&&"";o.localName=c,!1!==h&&(null==s&&(s={},f(n,n={})),n[h]=s[h]=u,o.uri=i.XMLNS,t.startPrefixMapping(h,u))}for(a=e.length;a--;){(d=(o=e[a]).prefix)&&("xml"===d&&(o.uri=i.XML),"xmlns"!==d&&(o.uri=n[d||""]))}var p;(p=r.indexOf(":"))>0?(d=e.prefix=r.slice(0,p),c=e.localName=r.slice(p+1)):(d=null,c=e.localName=r);var m=e.uri=n[d||""];if(t.startElement(m,c,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=s,!0;if(t.endElement(m,c,r),s)for(d in s)Object.prototype.hasOwnProperty.call(s,d)&&t.endPrefixMapping(d)}function h(e,t,n,i,r){if(/^(?:script|textarea)$/i.test(n)){var s=e.indexOf("",t),a=e.substring(t+1,s);if(/[&<]/.test(a))return/^script$/i.test(n)?(r.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,i),r.characters(a,0,a.length),s)}return t+1}function p(e,t,n,i){var r=i[n];return null==r&&((r=e.lastIndexOf(""))t?(n.comment(e,t+4,r-t-4),r+3):(i.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,r-t-9),n.endCDATA(),r+3}var s=function(e,t){var n,i=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;n=r.exec(e);)if(i.push(n),n[1])return i}(e,t),a=s.length;if(a>1&&/!doctype/i.test(s[0][0])){var o=s[1][0],l=!1,u=!1;a>3&&(/^public$/i.test(s[2][0])?(l=s[3][0],u=a>4&&s[4][0]):/^system$/i.test(s[2][0])&&(u=s[3][0]));var d=s[a-1];return n.startDTD(o,l,u),n.endDTD(),d.index+d[0].length}}return-1}function g(e,t,n){var i=e.indexOf("?>",t);if(i){var r=e.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){r[0].length;return n.processingInstruction(r[1],r[2]),i+2}return-1}return-1}function v(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,l.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,n,r,s){function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(s.error("entity not found:"+e),e)}function l(t){if(t>k){var n=e.substring(k,t).replace(/&#?\w+;/g,a);T&&f(k),r.characters(n,0,t-k),k=t}}function f(t,n){for(;t>=b&&(n=_.exec(e));)y=n.index,b=y+n[0].length,T.lineNumber++;T.columnNumber=t-y+1}var y=0,b=0,_=/.*(?:\r\n?|\n)|.*$/g,T=r.locator,S=[{currentNSMap:t}],w={},k=0;for(;;){try{var E=e.indexOf("<",k);if(E<0){if(!e.substr(k).match(/^\s*$/)){var A=r.doc,C=A.createTextNode(e.substr(k));A.appendChild(C),r.currentElement=C}return}switch(E>k&&l(E),e.charAt(E+1)){case"/":var j=e.indexOf(">",E+3),x=e.substring(E+2,j).replace(/[ \t\n\r]+$/g,""),P=S.pop();j<0?(x=e.substring(E+2).replace(/[\s<].*/,""),s.error("end tag name: "+x+" is not complete:"+P.tagName),j=E+1+x.length):x.match(/\sk?k=j:l(Math.max(E,k)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},v.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=l,t.ParseError=o},function(e,t){var n=Math.pow(2,32);e.exports={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))100&&(i=100);var f=JSON.stringify({at:parseInt(t),tt:parseInt(n),ap:parseInt(i),uuid:r,vid:a,pid:o,cid:l,sid:s,dom:u,vti:d,plslg:c,isad:h,h:p}),m=new XMLHttpRequest;m.open("POST","https://telemetry.deja.media/rV"),m.setRequestHeader("Accept","application/json"),m.setRequestHeader("Content-Type","application/json"),m.send(f)},a=function(e){var t=this,r=15,a=0,o=0,l=Date.now()/1e3,u=0,d=0,c=this,h=0,p=e.dj_uuid;if("omniview"==p)var f=0;function m(e,t,n){t=o>100?t+Math.floor(o/100)*n:t;var i=parseInt(Math.min(e,t)/n*100);return Math.max(o,i>0?i:0)}var g=(new Date).getTime().toString(36)+function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="",i=0;i0){this.duration()<45&&(r=Math.max(3,parseInt(this.duration()/3))),l=Date.now()/1e3;var t=parseInt(this.duration()-this.remainingTime());o=m(h,t,this.duration()),s(0,t+1,h+1,o,p,g,e.vid,e.pid,e.cid,e.dom,e.vti,e.plslg,0,e.hash),a=t}else s(0,a+1,a+1,0,p,g,e.vid,e.pid,e.cid,e.dom,e.vti,e.plslg,0,e.hash)})),this.on("timeupdate",(function(){if("omniview"!=p)if(e.vid>0){var t=parseInt(this.duration()-this.remainingTime());h+=Date.now()/1e3-l,l=Date.now()/1e3,o=m(h,t,this.duration()),this.currentTime()/this.duration()*100>=75&&d<75&&(d=75,setTimeout((function(){c.trigger("content_75")}),250)),this.currentTime()/this.duration()*100>=50&&d<50&&(d=50,setTimeout((function(){c.trigger("content_50")}),250)),this.currentTime()/this.duration()*100>=25&&d<25&&(d=25,setTimeout((function(){c.trigger("content_25")}),250)),a+r==t&&(a=t,s(0,t,parseInt(h),o,p,g,e.vid,e.pid,e.cid,e.dom,e.vti,e.plslg,0,e.hash))}else 0==u&&(u=parseInt(this.currentTime())),a+r==parseInt(this.currentTime()-u)&&s(0,a+=r,a,0,p,g,e.vid,e.pid,e.cid,e.dom,e.vti,e.plslg,0,e.hash)})),this.on("ended",(function(){"omniview"!=p&&(o=m(h,f,this.duration()),o+=5,0!==d&&this.trigger("content_100"),d=0,s(0,this.duration(),h,o,p,g,e.vid,e.pid,e.cid,e.dom,e.vti,e.plslg,0,e.hash))})),this.on("replay",(function(){o+=5,h+=1,0!==d&&this.trigger("content_100"),d=0,s(0,this.duration(),h,parseInt(o),p,g,e.vid,e.pid,e.cid,e.dom,e.vti,e.plslg,0,e.hash)})),this.on("ads-ad-started",(function(){if(e.vid>0){var t=parseInt(this.duration()-this.remainingTime());o=m(h,t,this.duration()),s(0,t,h,o,p,g,e.vid,e.pid,e.cid,e.dom,e.vti,e.plslg,1,e.hash)}else s(0,a,a,0,p,g,e.vid,e.pid,e.cid,e.dom,e.vti,e.plslg,1,e.hash)}))};return r("dejavideoLogger",a),a.VERSION="0.0.1",a},"object"===o(t)&&void 0!==e?e.exports=a(n(5)):(r=[n(5)],void 0===(s="function"==typeof(i=a)?i.apply(t,r):i)||(e.exports=s))},,function(e,t){e.exports=function(){this.setAdXML=function(e,t,n,i){return"http"===e.substring(0,4)?'\n \n \n \n \n \n ")+(t?'\n \n \n \n "):"")+(n?'\n \n \n \n "):"")+"":e}}},,function(e,t,n){var i=n(61);"string"==typeof i&&(i=[[e.i,i,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(19)(i,r);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(18)(!1)).push([e.i,".vjs-ad-playing.vjs-ad-playing .vjs-progress-control{pointer-events:none}.vjs-ad-playing.vjs-ad-playing .vjs-play-progress{background-color:#ffe400}.vjs-ad-loading .vjs-loading-spinner{display:block;visibility:visible}.vjs-ad-playing .vjs-captions-button{display:none}.vjs-ad-playing .vjs-audio-button{display:none}.vjs-ad-loading .vjs-loading-spinner:before,.vjs-ad-loading .vjs-loading-spinner:after{-webkit-animation:vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite,vjs-spinner-fade 1.1s linear infinite;animation:vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite,vjs-spinner-fade 1.1s linear infinite}.vjs-ad-loading .vjs-loading-spinner:before{border-top-color:#fff}.vjs-ad-loading .vjs-loading-spinner:after{border-top-color:#fff;-webkit-animation-delay:0.44s;animation-delay:0.44s}.vjs-ad-loading .vjs-big-play-button,.vjs-ad-loading .vjs-poster,.vjs-ad-content-resuming .vjs-big-play-button,.vjs-ad-content-resuming .vjs-poster{display:none}\n",""])},function(e,t,n){var i=n(63);"string"==typeof i&&(i=[[e.i,i,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(19)(i,r);i.locals&&(e.exports=i.locals)},function(e,t,n){(e.exports=n(18)(!1)).push([e.i,'/**\n * Copyright 2014 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.ima-ad-container {\n top: 0em;\n position: absolute;\n display: none;\n width: 100%;\n height: 100%;\n}\n\n/* Move overlay if user fast-clicks play button. */\n.video-js.vjs-playing .bumpable-ima-ad-container {\n margin-top: -4em;\n}\n\n/* Move overlay when controls are active. */\n.video-js.vjs-user-inactive.vjs-playing .bumpable-ima-ad-container {\n margin-top: 0em;\n}\n\n.video-js.vjs-paused .bumpable-ima-ad-container,\n.video-js.vjs-playing:hover .bumpable-ima-ad-container,\n.video-js.vjs-user-active.vjs-playing .bumpable-ima-ad-container {\n margin-top: -4em;\n}\n\n.ima-controls-div {\n bottom: 0em;\n height: 1.4em;\n position: absolute;\n overflow: hidden;\n display: none;\n opacity: 1;\n background-color: rgba(7, 20, 30, .7);\n background: -moz-linear-gradient(\n bottom,\n rgba(7, 20, 30, .7) 0%,\n rgba(7, 20, 30, 0) 100%); /* FF3.6+ */\n background: -webkit-gradient(\n linear,\n left bottom,\n left top,\n color-stop(0%,rgba(7, 20, 30, .7)),\n color-stop(100%,rgba(7, 20, 30, 0))); /* Chrome,Safari4+ */\n background: -webkit-linear-gradient(\n bottom,\n rgba(7, 20, 30, .7) 0%,\n rgba(7, 20, 30, 0) 100%); /* Chrome10+,Safari5.1+ */\n background: -o-linear-gradient(bottom,\n rgba(7, 20, 30, .7) 0%,\n rgba(7, 20, 30, 0) 100%); /* Opera 11.10+ */\n background: -ms-linear-gradient(bottom,\n rgba(7, 20, 30, .7) 0%,\n rgba(7, 20, 30, 0) 100%); /* IE10+ */\n background: linear-gradient(to top,\n rgba(7, 20, 30, .7) 0%,\n rgba(7, 20, 30, 0) 100%); /* W3C */\n filter: progid:DXImageTransform.Microsoft.gradient(\n startColorstr=\'#0007141E\',\n endColorstr=\'#07141E\',GradientType=0 ); /* IE6-9 */\n}\n\n.ima-controls-div.ima-controls-div-showing {\n height: 3.7em;\n}\n\n.ima-countdown-div {\n height: 1em;\n color: #FFFFFF;\n text-shadow: 0 0 0.2em #000;\n cursor: default;\n}\n\n.ima-seek-bar-div {\n top: 1.2em;\n height: 0.3em;\n position: absolute;\n background: rgba(255, 255, 255, .4);\n}\n\n.ima-progress-div {\n width: 0em;\n height: 0.3em;\n background-color: #ECC546;\n}\n\n.ima-play-pause-div, .ima-mute-div, .ima-slider-div, .ima-fullscreen-div {\n width: 2.33em;\n height: 1.33em;\n top: 0.733em;\n left: 0em;\n position: absolute;\n color: #CCCCCC;\n font-size: 1.5em;\n line-height: 2;\n text-align: center;\n font-family: VideoJS;\n cursor: pointer;\n}\n\n.ima-mute-div {\n left: auto;\n right: 5.667em;\n}\n\n.ima-slider-div {\n left: auto;\n right: 2.33em;\n width: 3.33em;\n height: 0.667em;\n top: 1.33em;\n background-color: #555555;\n}\n\n.ima-slider-level-div {\n width: 100%;\n height: 0.667em;\n background-color: #ECC546;\n}\n\n.ima-fullscreen-div {\n left: auto;\n right: 0em;\n}\n\n.ima-playing:before {\n content: "\\F103";\n}\n\n.ima-paused:before {\n content: "\\F101";\n}\n\n.ima-playing:hover:before, .ima-paused:hover:before {\n text-shadow: 0 0 1em #fff;\n}\n\n.ima-non-muted:before {\n content: "\\F107";\n}\n\n.ima-muted:before {\n content: "\\F104";\n}\n\n.ima-non-muted:hover:before, .ima-muted:hover:before {\n text-shadow: 0 0 1em #fff;\n}\n\n.ima-non-fullscreen:before {\n content: "\\F108";\n}\n\n.ima-fullscreen:before {\n content: "\\F109";\n}\n\n.ima-non-fullscreen:hover:before, .ima-fullscreen:hover:before {\n text-shadow: 0 0 1em #fff;\n}\n',""])},function(e,t,n){"use strict";var i=n(5),r=n(0),s=n.n(r),a=n(2),o=n.n(a);var l=function(e,t){t.isImmediatePropagationStopped=function(){return!0},t.cancelBubble=!0,t.isPropagationStopped=function(){return!0}},u=function(e,t,n){l(0,n),e.trigger({type:t+n.type,originalEvent:n})};function d(e){"playing"===e.type?function(e,t){e.ads.isInAdMode()&&(e.ads.isContentResuming()?e.ads._contentEnding&&u(e,"content",t):u(e,"ad",t))}(this,e):"ended"===e.type?function(e,t){e.ads.isInAdMode()?e.ads.isContentResuming()?(l(0,t),e.trigger("resumeended")):u(e,"ad",t):e.ads._contentHasEnded||e.ads.stitchedAds()||(u(e,"content",t),e.trigger("readyforpostroll"))}(this,e):"loadstart"===e.type||"loadeddata"===e.type||"loadedmetadata"===e.type?function(e,t){if(!("loadstart"===t.type&&!e.ads._hasThereBeenALoadStartDuringPlayerLife||"loadeddata"===t.type&&!e.ads._hasThereBeenALoadedData||"loadedmetadata"===t.type&&!e.ads._hasThereBeenALoadedMetaData))if(e.ads.inAdBreak())u(e,"ad",t);else{if(e.currentSrc()!==e.ads.contentSrc)return;u(e,"content",t)}}(this,e):"play"===e.type?function(e,t){e.ads.inAdBreak()?u(e,"ad",t):e.ads.isContentResuming()&&u(e,"content",t)}(this,e):this.ads.isInAdMode()&&(this.ads.isContentResuming()?u(this,"content",e):u(this,"ad",e))}var c={},h=function(){!function(e){if(i.default.dom.isInFrame()&&"function"!=typeof s.a.__tcfapi){for(var t,n=s.a,r={};n;){try{if(n.frames.__tcfapiLocator){t=n;break}}catch(e){}if(n===s.a.top)break;n=n.parent}if(!t)return;s.a.__tcfapi=function(e,n,i,s){var a=Math.random()+"",o={__tcfapiCall:{command:e,parameter:s,version:n,callId:a}};r[a]=i,t.postMessage(o,"*")},s.a.addEventListener("message",(function(e){var t={};try{t="string"==typeof e.data?JSON.parse(e.data):e.data}catch(e){}var n=t.__tcfapiReturn;n&&"function"==typeof r[n.callId]&&(r[n.callId](n.returnValue,n.success),r[n.callId]=null)}),!1)}}(),"function"==typeof s.a.__tcfapi&&s.a.__tcfapi("addEventListener",2,(function(e,t){t&&(c=e)}))},p=function(e,t){return t?encodeURIComponent(e):e},f=function(e,t,n){if(e&&e[n])for(var i=e[n],r=Object.keys(i),s=0;s "+n.constructor._getName());for(var i=arguments.length,r=new Array(i>1?i-1:0),s=1;s0?e.currentTime()-e.seekable().end(0):e.currentTime();var n=e.$(".vjs-tech"),r=e.textTracks?e.textTracks():[],s=[],a={ended:e.ended(),currentSrc:e.currentSrc(),sources:e.currentSources(),src:e.tech_.src(),currentTime:t,type:e.currentType()};n&&(a.style=n.getAttribute("style"));for(var o=0;o0?e.seekable().end(0)+n.currentTime:e.currentTime(),e.currentTime(t)),e.paused()){var r=e.play();r&&r.catch&&r.catch((function(e){i.default.log.warn("Play promise rejected in IOS snapshot resume",e)}))}}else if(n.ended)e.currentTime(e.duration());else{e.currentTime(n.currentTime);var s=e.play();s&&s.catch&&s.catch((function(e){i.default.log.warn("Play promise rejected in snapshot resume",e)}))}e.ads.shouldRemoveAutoplay_&&(e.autoplay(!1),e.ads.shouldRemoveAutoplay_=!1)},d=function t(){if(e.off("contentcanplay",t),x&&e.clearTimeout(x),(s=e.el().querySelector(".vjs-tech")).readyState>1)return u();if(void 0===s.seekable)return u();if(s.seekable.length>0)return u();if(a--)e.setTimeout(t,50);else try{u()}catch(e){i.default.log.warn("Failed to resume the content after an advertisement",e)}};if("style"in n&&s.setAttribute("style",n.style||""),e.ads.videoElementRecycled())e.one("resumeended",(function(){delete e.ads.snapshot,t()})),e.one("contentloadedmetadata",l),i.default.browser.IS_IOS&&!e.autoplay()&&(e.autoplay(!0),e.ads.shouldRemoveAutoplay_=!0),e.src(n.sources),e.one("contentcanplay",d),x=e.setTimeout(d,2e3);else{if(l(),!e.ended()){var c=e.play();c&&c.catch&&c.catch((function(e){i.default.log.warn("Play promise rejected in snapshot restore",e)}))}delete e.ads.snapshot,t()}}(e,t):(e.volume(e.ads.preAdVolume_),t())}},L=function(e){function t(){return e.apply(this,arguments)||this}A(t,e),t._getName=function(){return"Preroll"};var n=t.prototype;return n.init=function(e,t,n){if(this.waitingForAdBreak=!0,e.addClass("vjs-ad-loading"),n||e.ads.nopreroll_)return this.resumeAfterNoPreroll(e);var i=e.ads.settings.timeout;"number"==typeof e.ads.settings.prerollTimeout&&(i=e.ads.settings.prerollTimeout),this._timeout=e.setTimeout((function(){e.trigger("adtimeout")}),i),t?this.handleAdsReady():this.adsReady=!1},n.onAdsReady=function(e){e.ads.inAdBreak()?i.default.log.warn("Unexpected adsready event (Preroll)"):(e.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())},n.handleAdsReady=function(){this.adsReady=!0,this.readyForPreroll()},n.afterLoadStart=function(e){var t=this.player;t.ads._hasThereBeenALoadStartDuringPlayerLife?e():(t.ads.debug("Waiting for loadstart..."),t.one("loadstart",(function(){t.ads.debug("Received loadstart event"),e()})))},n.noPreroll=function(){var e=this;this.afterLoadStart((function(){e.player.ads.debug("Skipping prerolls due to nopreroll event (Preroll)"),e.resumeAfterNoPreroll(e.player)}))},n.readyForPreroll=function(){var e=this.player;this.afterLoadStart((function(){e.ads.debug("Triggered readyforpreroll event (Preroll)"),e.trigger("readyforpreroll")}))},n.onAdsCanceled=function(e){var t=this;e.ads.debug("adscanceled (Preroll)"),this.afterLoadStart((function(){t.resumeAfterNoPreroll(e)}))},n.onAdsError=function(e){var t=this;i.default.log("adserror (Preroll)"),this.inAdBreak()?e.ads.endLinearAdMode():this.afterLoadStart((function(){t.resumeAfterNoPreroll(e)}))},n.startLinearAdMode=function(){var e=this.player;!this.adsReady||e.ads.inAdBreak()||this.isContentResuming()?i.default.log.warn("Unexpected startLinearAdMode invocation (Preroll)"):(this.clearTimeout(e),e.ads.adType="preroll",this.waitingForAdBreak=!1,I.start(e),e.ads._shouldBlockPlay=!1)},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(e.removeClass("vjs-ad-loading"),e.addClass("vjs-ad-content-resuming"),this.contentResuming=!0,I.end(e))},n.skipLinearAdMode=function(){var e=this,t=this.player;t.ads.inAdBreak()||this.isContentResuming()?i.default.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart((function(){t.trigger("adskip"),t.ads.debug("skipLinearAdMode (Preroll)"),e.resumeAfterNoPreroll(t)}))},n.onAdTimeout=function(e){var t=this;this.afterLoadStart((function(){e.ads.debug("adtimeout (Preroll)"),t.resumeAfterNoPreroll(e)}))},n.onNoPreroll=function(e){e.ads.inAdBreak()||this.isContentResuming()?i.default.log.warn("Unexpected nopreroll event (Preroll)"):this.noPreroll()},n.resumeAfterNoPreroll=function(e){if(this.contentResuming=!0,e.ads._shouldBlockPlay=!1,this.cleanupPartial(e),e.ads._playRequested||e.ads._pausedOnContentupdate)if(e.paused()){e.ads.debug("resumeAfterNoPreroll: attempting to resume playback (Preroll)");var t=e.play();t&&t.then&&t.then(null,(function(e){}))}else e.ads.debug("resumeAfterNoPreroll: already playing (Preroll)"),e.trigger("play"),e.trigger("playing")},n.cleanup=function(e){e.ads._hasThereBeenALoadStartDuringPlayerLife||i.default.log.warn("Leaving Preroll state before loadstart event can cause issues."),this.cleanupPartial(e)},n.cleanupPartial=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming"),this.clearTimeout(e)},n.clearTimeout=function(e){e.clearTimeout(this._timeout),this._timeout=null},t}(k.getState("AdState"));k.registerState("Preroll",L);var O=function(e){function t(){return e.apply(this,arguments)||this}A(t,e),t._getName=function(){return"BeforePreroll"};var n=t.prototype;return n.init=function(e){this.adsReady=!1,this.shouldResumeToContent=!1,e.ads._shouldBlockPlay=!e.ads.settings.allowVjsAutoplay||!e.autoplay()},n.onAdsReady=function(e){e.ads.debug("Received adsready event (BeforePreroll)"),this.adsReady=!0},n.onPlay=function(e){var t=k.getState("Preroll");e.ads.debug("Received play event (BeforePreroll)"),this.transitionTo(t,this.adsReady,this.shouldResumeToContent)},n.onAdsCanceled=function(e){e.ads.debug("adscanceled (BeforePreroll)"),this.shouldResumeToContent=!0},n.onAdsError=function(){this.player.ads.debug("adserror (BeforePreroll)"),this.shouldResumeToContent=!0},n.onNoPreroll=function(){this.player.ads.debug("Skipping prerolls due to nopreroll event (BeforePreroll)"),this.shouldResumeToContent=!0},n.skipLinearAdMode=function(){var e=this.player;e.trigger("adskip"),e.ads.debug("skipLinearAdMode (BeforePreroll)"),this.shouldResumeToContent=!0},n.onContentChanged=function(){this.init(this.player)},t}(k.getState("ContentState"));k.registerState("BeforePreroll",O);var D=function(e){function t(){return e.apply(this,arguments)||this}A(t,e),t._getName=function(){return"Midroll"};var n=t.prototype;return n.init=function(e){e.ads.adType="midroll",I.start(e),e.addClass("vjs-ad-loading")},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this.player;this.inAdBreak()&&(this.contentResuming=!0,e.addClass("vjs-ad-content-resuming"),e.removeClass("vjs-ad-loading"),I.end(e))},n.onAdsError=function(e){this.inAdBreak()&&e.ads.endLinearAdMode()},n.cleanup=function(e){e.removeClass("vjs-ad-loading"),e.removeClass("vjs-ad-content-resuming")},t}(k.getState("AdState"));k.registerState("Midroll",D);var M=function(e){function t(){return e.apply(this,arguments)||this}A(t,e),t._getName=function(){return"Postroll"};var n=t.prototype;return n.init=function(e){if(this.waitingForAdBreak=!0,e.ads._contentEnding=!0,e.ads.nopostroll_){this.resumeContent(e);var t=k.getState("AdsDone");this.transitionTo(t)}else{e.addClass("vjs-ad-loading");var n=e.ads.settings.timeout;"number"==typeof e.ads.settings.postrollTimeout&&(n=e.ads.settings.postrollTimeout),this._postrollTimeout=e.setTimeout((function(){e.trigger("adtimeout")}),n)}},n.startLinearAdMode=function(){var e=this.player;e.ads.inAdBreak()||this.isContentResuming()?i.default.log.warn("Unexpected startLinearAdMode invocation (Postroll)"):(e.ads.adType="postroll",e.clearTimeout(this._postrollTimeout),this.waitingForAdBreak=!1,I.start(e))},n.onAdStarted=function(e){e.removeClass("vjs-ad-loading")},n.endLinearAdMode=function(){var e=this,t=this.player,n=k.getState("AdsDone");this.inAdBreak()&&(t.removeClass("vjs-ad-loading"),this.resumeContent(t),I.end(t,(function(){e.transitionTo(n)})))},n.skipLinearAdMode=function(){var e=this.player;e.ads.inAdBreak()||this.isContentResuming()?i.default.log.warn("Unexpected skipLinearAdMode invocation"):(e.ads.debug("Postroll abort (skipLinearAdMode)"),e.trigger("adskip"),this.abort(e))},n.onAdTimeout=function(e){e.ads.debug("Postroll abort (adtimeout)"),this.abort(e)},n.onAdsError=function(e){e.ads.debug("Postroll abort (adserror)"),e.ads.inAdBreak()?e.ads.endLinearAdMode():this.abort(e)},n.onContentChanged=function(e){if(this.isContentResuming()){var t=k.getState("BeforePreroll");this.transitionTo(t)}else if(!this.inAdBreak()){var n=k.getState("Preroll");this.transitionTo(n)}},n.onNoPostroll=function(e){this.isContentResuming()||this.inAdBreak()?i.default.log.warn("Unexpected nopostroll event (Postroll)"):this.abort(e)},n.resumeContent=function(e){this.contentResuming=!0,e.addClass("vjs-ad-content-resuming")},n.abort=function(e){var t=k.getState("AdsDone");this.resumeContent(e),e.removeClass("vjs-ad-loading"),this.transitionTo(t)},n.cleanup=function(e){e.removeClass("vjs-ad-content-resuming"),e.clearTimeout(this._postrollTimeout),e.ads._contentEnding=!1},t}(k.getState("AdState"));k.registerState("Postroll",M);var R=function(e){function t(){return e.apply(this,arguments)||this}A(t,e),t._getName=function(){return"ContentPlayback"};var n=t.prototype;return n.init=function(e){e.ads._shouldBlockPlay=!1},n.onAdsReady=function(e){e.ads.debug("Received adsready event (ContentPlayback)"),e.ads.nopreroll_||(e.ads.debug("Triggered readyforpreroll event (ContentPlayback)"),e.trigger("readyforpreroll"))},n.onReadyForPostroll=function(e){var t=k.getState("Postroll");e.ads.debug("Received readyforpostroll event"),this.transitionTo(t)},n.startLinearAdMode=function(){var e=k.getState("Midroll");this.transitionTo(e)},t}(k.getState("ContentState"));k.registerState("ContentPlayback",R);var N=function(e){function t(){return e.apply(this,arguments)||this}A(t,e),t._getName=function(){return"StitchedContentPlayback"};var n=t.prototype;return n.init=function(){this.player.ads._shouldBlockPlay=!1},n.onContentChanged=function(){this.player.ads.debug("Received contentchanged event ("+this.constructor._getName()+")")},n.startLinearAdMode=function(){var e=k.getState("StitchedAdRoll");this.transitionTo(e)},t}(k.getState("ContentState"));k.registerState("StitchedContentPlayback",N);var U=function(e){function t(){return e.apply(this,arguments)||this}A(t,e),t._getName=function(){return"StitchedAdRoll"};var n=t.prototype;return n.init=function(){this.waitingForAdBreak=!1,this.contentResuming=!1,this.player.ads.adType="stitched",I.start(this.player)},n.onPlaying=function(){},n.onContentResumed=function(){},n.onAdEnded=function(){this.endLinearAdMode(),this.player.trigger("ended")},n.endLinearAdMode=function(){var e=k.getState("StitchedContentPlayback");I.end(this.player),this.transitionTo(e)},t}(k.getState("AdState"));k.registerState("StitchedAdRoll",U);var B=_.isMiddlewareMediatorSupported,F=i.default.getTech("Html5").Events,V={timeout:5e3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1,contentIsLive:void 0,liveCuePoints:!0,allowVjsAutoplay:i.default.options.normalizeAutoplay||!1},H=function(e){var t=this,n=i.default.mergeOptions(V,e),r=[];F.concat(["firstplay","loadedalldata"]).forEach((function(e){-1===r.indexOf(e)&&r.push(e)})),t.on(r,d),B()||function(e,t){t&&i.default.log("Using cancelContentPlay to block content playback"),e.on("play",b)}(t,n.debug),t.setTimeout((function(){t.ads._hasThereBeenALoadStartDuringPlayerLife||""===t.src()||i.default.log.error("videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see http://videojs.github.io/videojs-contrib-ads/integrator/getting-started.html")}),5e3),t.on("ended",(function(){t.hasClass("vjs-has-started")||t.addClass("vjs-has-started")})),t.on("contenttimeupdate",(function(){t.removeClass("vjs-waiting")})),t.on(["addurationchange","adcanplay"],(function(){if(!t.ads.settings.stitchedAds&&!t.hasStarted()&&(!t.ads.snapshot||t.currentSrc()!==t.ads.snapshot.currentSrc)&&t.ads.inAdBreak()){var e=t.play();e&&e.catch&&e.catch((function(e){i.default.log.warn("Play promise rejected when playing ad",e)}))}})),t.on("nopreroll",(function(){t.ads.debug("Received nopreroll event"),t.ads.nopreroll_=!0})),t.on("nopostroll",(function(){t.ads.debug("Received nopostroll event"),t.ads.nopostroll_=!0})),t.on("playing",(function(){t.ads._cancelledPlay=!1,t.ads._pausedOnContentupdate=!1})),t.on("play",(function(){t.ads._playRequested=!0})),t.one("loadstart",(function(){t.ads._hasThereBeenALoadStartDuringPlayerLife=!0})),t.on("loadeddata",(function(){t.ads._hasThereBeenALoadedData=!0})),t.on("loadedmetadata",(function(){t.ads._hasThereBeenALoadedMetaData=!0})),t.ads=function(e){return{disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,_shouldBlockPlay:!1,_playBlocked:!1,_playRequested:!1,adType:null,VERSION:"6.9.0",reset:function(){e.ads.disableNextSnapshotRestore=!1,e.ads._contentEnding=!1,e.ads._contentHasEnded=!1,e.ads.snapshot=null,e.ads.adType=null,e.ads._hasThereBeenALoadedData=!1,e.ads._hasThereBeenALoadedMetaData=!1,e.ads._cancelledPlay=!1,e.ads._shouldBlockPlay=!1,e.ads._playBlocked=!1,e.ads.nopreroll_=!1,e.ads.nopostroll_=!1,e.ads._playRequested=!1},startLinearAdMode:function(){e.ads._state.startLinearAdMode()},endLinearAdMode:function(){e.ads._state.endLinearAdMode()},skipLinearAdMode:function(){e.ads._state.skipLinearAdMode()},stitchedAds:function(e){return void 0!==e&&(i.default.log.warn("Using player.ads.stitchedAds() as a setter is deprecated, it should be set as an option upon initialization of contrib-ads."),this.settings.stitchedAds=!!e),this.settings.stitchedAds},videoElementRecycled:function(){if(e.ads.shouldPlayContentBehindAd(e))return!1;if(!this.snapshot)throw new Error("You cannot use videoElementRecycled while there is no snapshot.");var t=e.tech_.src()!==this.snapshot.src,n=e.currentSrc()!==this.snapshot.currentSrc;return t||n},isLive:function(t){return void 0===t&&(t=e),"boolean"==typeof t.ads.settings.contentIsLive?t.ads.settings.contentIsLive:t.duration()===1/0||"8"===i.default.browser.IOS_VERSION&&0===t.duration()},shouldPlayContentBehindAd:function(t){if(void 0===t&&(t=e),t)return!!t.ads.settings.liveCuePoints&&(!i.default.browser.IS_IOS&&!i.default.browser.IS_ANDROID&&t.duration()===1/0);throw new Error("shouldPlayContentBehindAd requires a player as a param")},shouldTakeSnapshots:function(t){return void 0===t&&(t=e),!this.shouldPlayContentBehindAd(t)&&!this.stitchedAds()},isInAdMode:function(){return this._state.isAdState()},isWaitingForAdBreak:function(){return this._state.isWaitingForAdBreak()},isContentResuming:function(){return this._state.isContentResuming()},isAdPlaying:function(){return this._state.inAdBreak()},inAdBreak:function(){return this._state.inAdBreak()},removeNativePoster:function(){var t=e.$(".vjs-tech");t&&t.removeAttribute("poster")},debug:function(){if(this.settings.debug){for(var e=arguments.length,t=new Array(e),n=0;nthis.seekCheckInterval+this.seekThreshold?this.contentPlayheadTracker.seeking=!0:this.contentPlayheadTracker.seeking=!1,this.contentPlayheadTracker.previousTime=this.vjsPlayer.currentTime()},r.prototype.checkForResize=function(){var e=this.getPlayerWidth(),t=this.getPlayerHeight();e==this.vjsPlayerDimensions.width&&t==this.vjsPlayerDimensions.height||(this.vjsPlayerDimensions.width=e,this.vjsPlayerDimensions.height=t,this.controller.onPlayerResize(e,t))},r.prototype.localContentEndedListener=function(){for(var e in this.contentComplete||(this.contentComplete=!0,this.controller.onContentComplete()),this.contentEndedListeners)"function"==typeof this.contentEndedListeners[e]&&this.contentEndedListeners[e]();clearInterval(this.updateTimeIntervalHandle),clearInterval(this.seekCheckIntervalHandle),clearInterval(this.resizeCheckIntervalHandle),this.vjsPlayer.el()&&this.vjsPlayer.one("play",this.setUpPlayerIntervals.bind(this))},r.prototype.onNoPostroll=function(){this.vjsPlayer.trigger("nopostroll")},r.prototype.playerDisposedListener=function(){this.contentEndedListeners=[],this.controller.onPlayerDisposed(),this.contentComplete=!0,this.vjsPlayer.off("contentended",this.boundContentEndedListener),this.vjsPlayer.ads.adTimeoutTimeout&&clearTimeout(this.vjsPlayer.ads.adTimeoutTimeout);var e=[this.updateTimeIntervalHandle,this.seekCheckIntervalHandle,this.resizeCheckIntervalHandle];for(var t in e)e[t]&&clearInterval(e[t])},r.prototype.onReadyForPreroll=function(){this.controller.onPlayerReadyForPreroll()},r.prototype.onAdTimeout=function(){this.controller.onAdTimeout()},r.prototype.onPlayerReady=function(){this.h5Player=document.getElementById(this.getPlayerId()).getElementsByClassName("vjs-tech")[0],this.h5Player.hasAttribute("autoplay")&&this.controller.setSetting("adWillAutoPlay",!0),this.onVolumeChange(),this.vjsPlayer.on("fullscreenchange",this.onFullscreenChange.bind(this)),this.vjsPlayer.on("volumechange",this.onVolumeChange.bind(this)),this.controller.onPlayerReady()},r.prototype.onFullscreenChange=function(){this.vjsPlayer.isFullscreen()?this.controller.onPlayerEnterFullscreen():this.controller.onPlayerExitFullscreen()},r.prototype.onVolumeChange=function(){var e=this.vjsPlayer.muted()?0:this.vjsPlayer.volume();this.controller.onPlayerVolumeChanged(e)},r.prototype.injectAdContainerDiv=function(e){this.vjsControls.el().parentNode.appendChild(e)},r.prototype.getContentPlayer=function(){return this.h5Player},r.prototype.getVolume=function(){return this.vjsPlayer.muted()?0:this.vjsPlayer.volume()},r.prototype.setVolume=function(e){this.vjsPlayer.volume(e),0==e?this.vjsPlayer.muted(!0):this.vjsPlayer.muted(!1)},r.prototype.unmute=function(){this.vjsPlayer.muted(!1)},r.prototype.mute=function(){this.vjsPlayer.muted(!0)},r.prototype.play=function(){this.vjsPlayer.play()},r.prototype.togglePlayback=function(){this.vjsPlayer.paused()?this.vjsPlayer.play():this.vjsPlayer.pause()},r.prototype.getPlayerWidth=function(){var e=(getComputedStyle(this.vjsPlayer.el())||{}).width;return e&&0!==parseFloat(e)||(e=(this.vjsPlayer.el().getBoundingClientRect()||{}).width),parseFloat(e)||this.vjsPlayer.width()},r.prototype.getPlayerHeight=function(){var e=(getComputedStyle(this.vjsPlayer.el())||{}).height;return e&&0!==parseFloat(e)||(e=(this.vjsPlayer.el().getBoundingClientRect()||{}).height),parseFloat(e)||this.vjsPlayer.height()},r.prototype.getPlayerOptions=function(){return this.vjsPlayer.options_},r.prototype.getPlayerId=function(){return this.vjsPlayer.id()},r.prototype.toggleFullscreen=function(){this.vjsPlayer.isFullscreen()?this.vjsPlayer.exitFullscreen():this.vjsPlayer.requestFullscreen()},r.prototype.getContentPlayheadTracker=function(){return this.contentPlayheadTracker},r.prototype.onAdError=function(e){this.vjsControls.show();var t=void 0!==e.getError?e.getError():e.stack;this.vjsPlayer.trigger({type:"adserror",data:{AdError:t,AdErrorEvent:e}})},r.prototype.onAdLog=function(e){var t=e.getAdData(),n=void 0!==t.adError?t.adError.getMessage():void 0;this.vjsPlayer.trigger({type:"adslog",data:{AdError:n,AdEvent:e}})},r.prototype.onAdBreakStart=function(){this.contentSource=this.vjsPlayer.currentSrc(),this.contentSourceType=this.vjsPlayer.currentType(),this.vjsPlayer.off("contentended",this.boundContentEndedListener),this.vjsPlayer.ads.startLinearAdMode(),this.vjsControls.hide(),this.vjsPlayer.pause()},r.prototype.onAdBreakEnd=function(){this.vjsPlayer.on("contentended",this.boundContentEndedListener),this.vjsPlayer.ads.inAdBreak()&&this.vjsPlayer.ads.endLinearAdMode(),this.vjsControls.show()},r.prototype.onAdStart=function(){this.vjsPlayer.trigger("ads-ad-started")},r.prototype.onAllAdsCompleted=function(){1==this.contentComplete&&(this.contentSource&&this.vjsPlayer.currentSrc()!=this.contentSource&&this.vjsPlayer.src({src:this.contentSource,type:this.contentSourceType}),this.controller.onContentAndAdsCompleted())},r.prototype.onAdsReady=function(){this.vjsPlayer.trigger("adsready")},r.prototype.changeSource=function(e){this.vjsPlayer.currentSrc()&&(this.vjsPlayer.currentTime(0),this.vjsPlayer.pause()),e&&this.vjsPlayer.src(e),this.vjsPlayer.one("loadedmetadata",this.seekContentToZero.bind(this))},r.prototype.seekContentToZero=function(){this.vjsPlayer.currentTime(0)},r.prototype.triggerPlayerEvent=function(e,t){this.vjsPlayer.trigger(e,t)},r.prototype.addContentEndedListener=function(e){this.contentEndedListeners.push(e)},r.prototype.reset=function(){this.vjsPlayer.off("contentended",this.boundContentEndedListener),this.vjsPlayer.on("contentended",this.boundContentEndedListener),this.vjsControls.show(),this.vjsPlayer.ads.inAdBreak()&&this.vjsPlayer.ads.endLinearAdMode(),this.contentPlayheadTracker.currentTime=0,this.contentComplete=!1};var s=function(e){this.controller=e,this.adContainerDiv=document.createElement("div"),this.controlsDiv=document.createElement("div"),this.countdownDiv=document.createElement("div"),this.seekBarDiv=document.createElement("div"),this.progressDiv=document.createElement("div"),this.playPauseDiv=document.createElement("div"),this.muteDiv=document.createElement("div"),this.sliderDiv=document.createElement("div"),this.sliderLevelDiv=document.createElement("div"),this.fullscreenDiv=document.createElement("div"),this.boundOnMouseUp=this.onMouseUp.bind(this),this.boundOnMouseMove=this.onMouseMove.bind(this),this.adPlayheadTracker={currentTime:0,duration:0,isPod:!1,adPosition:0,totalAds:0},this.controlPrefix=this.controller.getPlayerId()+"_",this.showCountdown=!0,!1===this.controller.getSettings().showCountdown&&(this.showCountdown=!1),this.isAdNonlinear=!1,this.createAdContainer()};s.prototype.createAdContainer=function(){this.assignControlAttributes(this.adContainerDiv,"ima-ad-container"),this.adContainerDiv.style.position="absolute",this.adContainerDiv.style.zIndex=1111,this.adContainerDiv.addEventListener("mouseenter",this.showAdControls.bind(this),!1),this.adContainerDiv.addEventListener("mouseleave",this.hideAdControls.bind(this),!1),this.adContainerDiv.addEventListener("click",this.onAdContainerClick.bind(this),!1),this.createControls(),this.controller.injectAdContainerDiv(this.adContainerDiv)},s.prototype.createControls=function(){this.assignControlAttributes(this.controlsDiv,"ima-controls-div"),this.controlsDiv.style.width="100%",this.controller.getIsMobile()?this.countdownDiv.style.display="none":(this.assignControlAttributes(this.countdownDiv,"ima-countdown-div"),this.countdownDiv.innerHTML=this.controller.getSettings().adLabel,this.countdownDiv.style.display=this.showCountdown?"block":"none"),this.assignControlAttributes(this.seekBarDiv,"ima-seek-bar-div"),this.seekBarDiv.style.width="100%",this.assignControlAttributes(this.progressDiv,"ima-progress-div"),this.assignControlAttributes(this.playPauseDiv,"ima-play-pause-div"),this.addClass(this.playPauseDiv,"ima-playing"),this.playPauseDiv.addEventListener("click",this.onAdPlayPauseClick.bind(this),!1),this.assignControlAttributes(this.muteDiv,"ima-mute-div"),this.addClass(this.muteDiv,"ima-non-muted"),this.muteDiv.addEventListener("click",this.onAdMuteClick.bind(this),!1),this.assignControlAttributes(this.sliderDiv,"ima-slider-div"),this.sliderDiv.addEventListener("mousedown",this.onAdVolumeSliderMouseDown.bind(this),!1),this.controller.getIsIos()&&(this.sliderDiv.style.display="none"),this.assignControlAttributes(this.sliderLevelDiv,"ima-slider-level-div"),this.assignControlAttributes(this.fullscreenDiv,"ima-fullscreen-div"),this.addClass(this.fullscreenDiv,"ima-non-fullscreen"),this.fullscreenDiv.addEventListener("click",this.onAdFullscreenClick.bind(this),!1),this.adContainerDiv.appendChild(this.controlsDiv),this.controlsDiv.appendChild(this.countdownDiv),this.controlsDiv.appendChild(this.seekBarDiv),this.controlsDiv.appendChild(this.playPauseDiv),this.controlsDiv.appendChild(this.muteDiv),this.controlsDiv.appendChild(this.sliderDiv),this.controlsDiv.appendChild(this.fullscreenDiv),this.seekBarDiv.appendChild(this.progressDiv),this.sliderDiv.appendChild(this.sliderLevelDiv)},s.prototype.onAdPlayPauseClick=function(){this.controller.onAdPlayPauseClick()},s.prototype.onAdMuteClick=function(){this.controller.onAdMuteClick()},s.prototype.onAdFullscreenClick=function(){this.controller.toggleFullscreen()},s.prototype.onAdsPaused=function(){this.controller.sdkImpl.adPlaying=!1,this.addClass(this.playPauseDiv,"ima-paused"),this.removeClass(this.playPauseDiv,"ima-playing"),this.showAdControls()},s.prototype.onAdsResumed=function(){this.onAdsPlaying(),this.showAdControls()},s.prototype.onAdsPlaying=function(){this.controller.sdkImpl.adPlaying=!0,this.addClass(this.playPauseDiv,"ima-playing"),this.removeClass(this.playPauseDiv,"ima-paused")},s.prototype.updateAdUi=function(e,t,n,i,r){var s=Math.floor(t/60),a=Math.floor(t%60);a.toString().length<2&&(a="0"+a);var o=": ";r>1&&(o=" ("+i+" "+this.controller.getSettings().adLabelNofN+" "+r+"): "),this.countdownDiv.innerHTML=this.controller.getSettings().adLabel+o+s+":"+a;var l=100*(e/n);this.progressDiv.style.width=l+"%"},s.prototype.unmute=function(){this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted"),this.sliderLevelDiv.style.width=100*this.controller.getPlayerVolume()+"%"},s.prototype.mute=function(){this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted"),this.sliderLevelDiv.style.width="0%"},s.prototype.onAdVolumeSliderMouseDown=function(){document.addEventListener("mouseup",this.boundOnMouseUp,!1),document.addEventListener("mousemove",this.boundOnMouseMove,!1)},s.prototype.onMouseMove=function(e){this.changeVolume(e)},s.prototype.onMouseUp=function(e){this.changeVolume(e),document.removeEventListener("mouseup",this.boundOnMouseUp),document.removeEventListener("mousemove",this.boundOnMouseMove)},s.prototype.changeVolume=function(e){var t=(e.clientX-this.sliderDiv.getBoundingClientRect().left)/this.sliderDiv.offsetWidth;t*=100,t=Math.min(Math.max(t,0),100),this.sliderLevelDiv.style.width=t+"%",0==this.percent?(this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted")):(this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted")),this.controller.setVolume(t/100)},s.prototype.showAdContainer=function(){this.adContainerDiv.style.display="block"},s.prototype.hideAdContainer=function(){this.adContainerDiv.style.display="none"},s.prototype.onAdContainerClick=function(){this.isAdNonlinear&&this.controller.togglePlayback()},s.prototype.reset=function(){this.hideAdContainer()},s.prototype.onAdError=function(){this.hideAdContainer()},s.prototype.onAdBreakStart=function(e){this.showAdContainer(),"application/javascript"!==e.getAd().getContentType()||this.controller.getSettings().showControlsForJSAds?this.controlsDiv.style.display="block":this.controlsDiv.style.display="none",this.onAdsPlaying(),this.hideAdControls()},s.prototype.onAdBreakEnd=function(){var e=this.controller.getCurrentAd();(null==e||e.isLinear())&&this.hideAdContainer(),this.controlsDiv.style.display="none",this.countdownDiv.innerHTML=""},s.prototype.onAllAdsCompleted=function(){this.hideAdContainer()},s.prototype.onLinearAdStart=function(){this.removeClass(this.adContainerDiv,"bumpable-ima-ad-container"),this.isAdNonlinear=!1},s.prototype.onNonLinearAdLoad=function(){this.adContainerDiv.style.display="block",this.addClass(this.adContainerDiv,"bumpable-ima-ad-container"),this.isAdNonlinear=!0},s.prototype.onPlayerEnterFullscreen=function(){this.addClass(this.fullscreenDiv,"ima-fullscreen"),this.removeClass(this.fullscreenDiv,"ima-non-fullscreen")},s.prototype.onPlayerExitFullscreen=function(){this.addClass(this.fullscreenDiv,"ima-non-fullscreen"),this.removeClass(this.fullscreenDiv,"ima-fullscreen")},s.prototype.onPlayerVolumeChanged=function(e){0==e?(this.addClass(this.muteDiv,"ima-muted"),this.removeClass(this.muteDiv,"ima-non-muted"),this.sliderLevelDiv.style.width="0%"):(this.addClass(this.muteDiv,"ima-non-muted"),this.removeClass(this.muteDiv,"ima-muted"),this.sliderLevelDiv.style.width=100*e+"%")},s.prototype.showAdControls=function(){this.controller.getSettings().disableAdControls||this.addClass(this.controlsDiv,"ima-controls-div-showing")},s.prototype.hideAdControls=function(){this.removeClass(this.controlsDiv,"ima-controls-div-showing")},s.prototype.assignControlAttributes=function(e,t){e.id=this.controlPrefix+t,e.className=this.controlPrefix+t+" "+t},s.prototype.getClassRegexp=function(e){return new RegExp("(^|[^A-Za-z-])"+e+"((?![A-Za-z-])|$)","gi")},s.prototype.elementHasClass=function(e,t){return this.getClassRegexp(t).test(e.className)},s.prototype.addClass=function(e,t){e.className=e.className.trim()+" "+t},s.prototype.removeClass=function(e,t){var n=this.getClassRegexp(t);e.className=e.className.trim().replace(n,"")},s.prototype.getAdContainerDiv=function(){return this.adContainerDiv},s.prototype.setShowCountdown=function(e){this.showCountdown=e,this.countdownDiv.style.display=this.showCountdown?"block":"none"};var a="2.1.0",o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=function(e){this.controller=e,this.adDisplayContainer=null,this.adDisplayContainerInitialized=!1,this.adsLoader=null,this.adsManager=null,this.adsRenderingSettings=null,this.adsResponse=null,this.currentAd=null,this.adTrackingTimer=null,this.allAdsCompleted=!1,this.adsActive=!1,this.adPlaying=!1,this.adMuted=!1,this.adBreakReadyListener=void 0,this.contentCompleteCalled=!1,this.isAdTimedOut=!1,this.adsManagerDimensions={width:0,height:0},this.autoPlayAdBreaks=!0,!1===this.controller.getSettings().autoPlayAdBreaks&&(this.autoPlayAdBreaks=!1),this.controller.getSettings().locale&&google.ima.settings.setLocale(this.controller.getSettings().locale),this.controller.getSettings().disableFlashAds&&google.ima.settings.setDisableFlashAds(this.controller.getSettings().disableFlashAds),this.controller.getSettings().disableCustomPlaybackForIOS10Plus&&google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.controller.getSettings().disableCustomPlaybackForIOS10Plus),this.controller.getSettings().ppid&&google.ima.settings.setPpid(this.controller.getSettings().ppid),this.controller.getSettings().featureFlags&&google.ima.settings.setFeatureFlags(this.controller.getSettings().featureFlags)};l.prototype.initAdObjects=function(){this.adDisplayContainer=new google.ima.AdDisplayContainer(this.controller.getAdContainerDiv(),this.controller.getContentPlayer()),this.adsLoader=new google.ima.AdsLoader(this.adDisplayContainer),this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),0==this.controller.getSettings().vpaidAllowed&&this.adsLoader.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.DISABLED),void 0!==this.controller.getSettings().vpaidMode&&this.adsLoader.getSettings().setVpaidMode(this.controller.getSettings().vpaidMode),this.controller.getSettings().locale&&this.adsLoader.getSettings().setLocale(this.controller.getSettings().locale),this.controller.getSettings().numRedirects&&this.adsLoader.getSettings().setNumRedirects(this.controller.getSettings().numRedirects),this.controller.getSettings().sessionId&&this.adsLoader.getSettings().setSessionId(this.controller.getSettings().sessionId),this.adsLoader.getSettings().setPlayerType("videojs-ima"),this.adsLoader.getSettings().setPlayerVersion(a),this.adsLoader.getSettings().setAutoPlayAdBreaks(this.autoPlayAdBreaks),this.adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoaded.bind(this),!1),this.adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsLoaderError.bind(this),!1),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-loader",adsLoader:this.adsLoader})},l.prototype.requestAds=function(){var e=new google.ima.AdsRequest;if(this.controller.getSettings().adTagUrl?e.adTagUrl=this.controller.getSettings().adTagUrl:e.adsResponse=this.controller.getSettings().adsResponse,this.controller.getSettings().forceNonLinearFullSlot&&(e.forceNonLinearFullSlot=!0),this.controller.getSettings().vastLoadTimeout&&(e.vastLoadTimeout=this.controller.getSettings().vastLoadTimeout),this.controller.getSettings().omidMode&&window.console.warn("The additional setting `omidMode` has been removed. Use `omidVendorAccess` instead."),this.controller.getSettings().omidVendorAccess){e.omidAccessModeRules={};var t=this.controller.getSettings().omidVendorAccess;Object.keys(t).forEach((function(n){e.omidAccessModeRules[n]=t[n]}))}e.linearAdSlotWidth=this.controller.getPlayerWidth(),e.linearAdSlotHeight=this.controller.getPlayerHeight(),e.nonLinearAdSlotWidth=this.controller.getSettings().nonLinearWidth||this.controller.getPlayerWidth(),e.nonLinearAdSlotHeight=this.controller.getSettings().nonLinearHeight||this.controller.getPlayerHeight(),e.setAdWillAutoPlay(this.controller.adsWillAutoplay()),e.setAdWillPlayMuted(this.controller.adsWillPlayMuted());var n=this.controller.getSettings().adsRequest;n&&"object"===(void 0===n?"undefined":o(n))&&Object.keys(n).forEach((function(t){e[t]=n[t]})),this.adsLoader.requestAds(e),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-request",AdsRequest:e})},l.prototype.onAdsManagerLoaded=function(e){this.createAdsRenderingSettings(),this.adsManager=e.getAdsManager(this.controller.getContentPlayheadTracker(),this.adsRenderingSettings),this.adsManager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,this.onAdError.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.AD_BREAK_READY,this.onAdBreakReady.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.onContentPauseRequested.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.onContentResumeRequested.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,this.onAllAdsCompleted.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,this.onAdLoaded.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.STARTED,this.onAdStarted.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,this.onAdComplete.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.SKIPPED,this.onAdComplete.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.LOG,this.onAdLog.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED,this.onAdPaused.bind(this)),this.adsManager.addEventListener(google.ima.AdEvent.Type.RESUMED,this.onAdResumed.bind(this)),this.controller.playerWrapper.vjsPlayer.trigger({type:"ads-manager",adsManager:this.adsManager}),this.autoPlayAdBreaks||this.initAdsManager();var t=this.controller.getSettings().preventLateAdStart;t?t&&!this.isAdTimedOut&&this.controller.onAdsReady():this.controller.onAdsReady(),this.controller.getSettings().adsManagerLoadedCallback&&this.controller.getSettings().adsManagerLoadedCallback()},l.prototype.onAdsLoaderError=function(e){window.console.warn("AdsLoader error: "+e.getError()),this.controller.onErrorLoadingAds(e),this.adsManager&&this.adsManager.destroy()},l.prototype.initAdsManager=function(){try{var e=this.controller.getPlayerWidth(),t=this.controller.getPlayerHeight();this.adsManagerDimensions.width=e,this.adsManagerDimensions.height=t,this.adsManager.init(e,t,google.ima.ViewMode.NORMAL),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.initializeAdDisplayContainer()}catch(e){this.onAdError(e)}},l.prototype.createAdsRenderingSettings=function(){if(this.adsRenderingSettings=new google.ima.AdsRenderingSettings,this.adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete=!0,this.controller.getSettings().adsRenderingSettings)for(var e in this.controller.getSettings().adsRenderingSettings)""!==e&&(this.adsRenderingSettings[e]=this.controller.getSettings().adsRenderingSettings[e])},l.prototype.onAdError=function(e){var t=void 0!==e.getError?e.getError():e.stack;window.console.warn("Ad error: "+t),this.adsManager.destroy(),this.controller.onAdError(e),this.adsActive=!1,this.adPlaying=!1},l.prototype.onAdBreakReady=function(e){this.adBreakReadyListener(e)},l.prototype.onContentPauseRequested=function(e){this.adsActive=!0,this.adPlaying=!0,this.controller.onAdBreakStart(e)},l.prototype.onContentResumeRequested=function(e){this.adsActive=!1,this.adPlaying=!1,this.controller.onAdBreakEnd()},l.prototype.onAllAdsCompleted=function(e){this.allAdsCompleted=!0,this.controller.onAllAdsCompleted()},l.prototype.onAdLoaded=function(e){e.getAd().isLinear()||(this.controller.onNonLinearAdLoad(),this.controller.playContent())},l.prototype.onAdStarted=function(e){this.currentAd=e.getAd(),this.currentAd.isLinear()?(this.adTrackingTimer=setInterval(this.onAdPlayheadTrackerInterval.bind(this),250),this.controller.onLinearAdStart()):this.controller.onNonLinearAdStart()},l.prototype.onAdPaused=function(){this.controller.onAdsPaused()},l.prototype.onAdResumed=function(e){this.controller.onAdsResumed()},l.prototype.onAdComplete=function(){this.currentAd.isLinear()&&clearInterval(this.adTrackingTimer)},l.prototype.onAdLog=function(e){this.controller.onAdLog(e)},l.prototype.onAdPlayheadTrackerInterval=function(){if(null!==this.adsManager){var e=this.adsManager.getRemainingTime(),t=this.currentAd.getDuration(),n=t-e;n=n>0?n:0;var i=0,r=void 0;this.currentAd.getAdPodInfo()&&(r=this.currentAd.getAdPodInfo().getAdPosition(),i=this.currentAd.getAdPodInfo().getTotalAds()),this.controller.onAdPlayheadUpdated(n,e,t,r,i)}},l.prototype.onContentComplete=function(){this.adsLoader&&(this.adsLoader.contentComplete(),this.contentCompleteCalled=!0),(this.adsManager&&this.adsManager.getCuePoints()&&!this.adsManager.getCuePoints().includes(-1)||!this.adsManager)&&this.controller.onNoPostroll(),this.allAdsCompleted&&this.controller.onContentAndAdsCompleted()},l.prototype.onPlayerDisposed=function(){this.adTrackingTimer&&clearInterval(this.adTrackingTimer),this.adsManager&&(this.adsManager.destroy(),this.adsManager=null)},l.prototype.onPlayerReadyForPreroll=function(){if(this.autoPlayAdBreaks){this.initAdsManager();try{this.controller.showAdContainer(),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.adsManager.start()}catch(e){this.onAdError(e)}}},l.prototype.onAdTimeout=function(){this.isAdTimedOut=!0},l.prototype.onPlayerReady=function(){this.initAdObjects(),(this.controller.getSettings().adTagUrl||this.controller.getSettings().adsResponse)&&"onLoad"===this.controller.getSettings().requestMode&&this.requestAds()},l.prototype.onPlayerEnterFullscreen=function(){this.adsManager&&this.adsManager.resize(window.screen.width,window.screen.height,google.ima.ViewMode.FULLSCREEN)},l.prototype.onPlayerExitFullscreen=function(){this.adsManager&&this.adsManager.resize(this.controller.getPlayerWidth(),this.controller.getPlayerHeight(),google.ima.ViewMode.NORMAL)},l.prototype.onPlayerVolumeChanged=function(e){this.adsManager&&this.adsManager.setVolume(e),this.adMuted=0==e},l.prototype.onPlayerResize=function(e,t){this.adsManager&&(this.adsManagerDimensions.width=e,this.adsManagerDimensions.height=t,this.adsManager.resize(e,t,google.ima.ViewMode.NORMAL))},l.prototype.getCurrentAd=function(){return this.currentAd},l.prototype.setAdBreakReadyListener=function(e){this.adBreakReadyListener=e},l.prototype.isAdPlaying=function(){return this.adPlaying},l.prototype.isAdMuted=function(){return this.adMuted},l.prototype.pauseAds=function(){this.adsManager.pause(),this.adPlaying=!1},l.prototype.resumeAds=function(){this.adsManager.resume(),this.adPlaying=!0},l.prototype.unmute=function(){this.adsManager.setVolume(1),this.adMuted=!1},l.prototype.mute=function(){this.adsManager.setVolume(0),this.adMuted=!0},l.prototype.setVolume=function(e){this.adsManager.setVolume(e),this.adMuted=0==e},l.prototype.initializeAdDisplayContainer=function(){this.adDisplayContainer&&(this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0))},l.prototype.playAdBreak=function(){this.autoPlayAdBreaks||(this.controller.showAdContainer(),this.adsManager.setVolume(this.controller.getPlayerVolume()),this.adsManager.start())},l.prototype.addEventListener=function(e,t){this.adsManager&&this.adsManager.addEventListener(e,t)},l.prototype.getAdsManager=function(){return this.adsManager},l.prototype.reset=function(){this.adsActive=!1,this.adPlaying=!1,this.adTrackingTimer&&clearInterval(this.adTrackingTimer),this.adsManager&&(this.adsManager.destroy(),this.adsManager=null),this.adsLoader&&!this.contentCompleteCalled&&this.adsLoader.contentComplete(),this.contentCompleteCalled=!1,this.allAdsCompleted=!1};var u=function(e,t){this.settings={},this.contentAndAdsEndedListeners=[],this.isMobile=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i),this.isIos=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i),this.initWithSettings(t);var n={debug:this.settings.debug,timeout:this.settings.timeout,prerollTimeout:this.settings.prerollTimeout},i=Object.assign({},n,t.contribAdsSettings||{});this.playerWrapper=new r(e,i,this),this.adUi=new s(this),this.sdkImpl=new l(this)};u.IMA_DEFAULTS={adLabel:"Advertisement",adLabelNofN:"of",debug:!1,disableAdControls:!1,prerollTimeout:1e3,preventLateAdStart:!1,requestMode:"onLoad",showControlsForJSAds:!0,timeout:5e3},u.prototype.initWithSettings=function(e){this.settings=Object.assign({},u.IMA_DEFAULTS,e||{}),this.warnAboutDeprecatedSettings(),this.showCountdown=!0,!1===this.settings.showCountdown&&(this.showCountdown=!1)},u.prototype.warnAboutDeprecatedSettings=function(){var e=this;["adWillAutoplay","adsWillAutoplay","adWillPlayMuted","adsWillPlayMuted"].forEach((function(t){void 0!==e.settings[t]&&console.warn("WARNING: videojs.ima setting "+t+" is deprecated")}))},u.prototype.getSettings=function(){return this.settings},u.prototype.getIsMobile=function(){return this.isMobile},u.prototype.getIsIos=function(){return this.isIos},u.prototype.injectAdContainerDiv=function(e){this.playerWrapper.injectAdContainerDiv(e)},u.prototype.getAdContainerDiv=function(){return this.adUi.getAdContainerDiv()},u.prototype.getContentPlayer=function(){return this.playerWrapper.getContentPlayer()},u.prototype.getContentPlayheadTracker=function(){return this.playerWrapper.getContentPlayheadTracker()},u.prototype.requestAds=function(){this.sdkImpl.requestAds()},u.prototype.setSetting=function(e,t){this.settings[e]=t},u.prototype.onErrorLoadingAds=function(e){this.adUi.onAdError(),this.playerWrapper.onAdError(e)},u.prototype.onAdPlayPauseClick=function(){this.sdkImpl.isAdPlaying()?(this.adUi.onAdsPaused(),this.sdkImpl.pauseAds()):(this.adUi.onAdsPlaying(),this.sdkImpl.resumeAds())},u.prototype.onAdMuteClick=function(){this.sdkImpl.isAdMuted()?(this.playerWrapper.unmute(),this.adUi.unmute(),this.sdkImpl.unmute()):(this.playerWrapper.mute(),this.adUi.mute(),this.sdkImpl.mute())},u.prototype.setVolume=function(e){this.playerWrapper.setVolume(e),this.sdkImpl.setVolume(e)},u.prototype.getPlayerVolume=function(){return this.playerWrapper.getVolume()},u.prototype.toggleFullscreen=function(){this.playerWrapper.toggleFullscreen()},u.prototype.onAdError=function(e){this.adUi.onAdError(),this.playerWrapper.onAdError(e)},u.prototype.onAdBreakStart=function(e){this.playerWrapper.onAdBreakStart(),this.adUi.onAdBreakStart(e)},u.prototype.showAdContainer=function(){this.adUi.showAdContainer()},u.prototype.onAdBreakEnd=function(){this.playerWrapper.onAdBreakEnd(),this.adUi.onAdBreakEnd()},u.prototype.onAllAdsCompleted=function(){this.adUi.onAllAdsCompleted(),this.playerWrapper.onAllAdsCompleted()},u.prototype.onAdsPaused=function(){this.adUi.onAdsPaused()},u.prototype.onAdsResumed=function(){this.adUi.onAdsResumed()},u.prototype.onAdPlayheadUpdated=function(e,t,n,i,r){this.adUi.updateAdUi(e,t,n,i,r)},u.prototype.onAdLog=function(e){this.playerWrapper.onAdLog(e)},u.prototype.getCurrentAd=function(){return this.sdkImpl.getCurrentAd()},u.prototype.playContent=function(){this.playerWrapper.play()},u.prototype.onLinearAdStart=function(){this.adUi.onLinearAdStart(),this.playerWrapper.onAdStart()},u.prototype.onNonLinearAdLoad=function(){this.adUi.onNonLinearAdLoad()},u.prototype.onNonLinearAdStart=function(){this.adUi.onNonLinearAdLoad(),this.playerWrapper.onAdStart()},u.prototype.getPlayerWidth=function(){return this.playerWrapper.getPlayerWidth()},u.prototype.getPlayerHeight=function(){return this.playerWrapper.getPlayerHeight()},u.prototype.onAdsReady=function(){this.playerWrapper.onAdsReady()},u.prototype.onPlayerResize=function(e,t){this.sdkImpl.onPlayerResize(e,t)},u.prototype.onContentComplete=function(){this.sdkImpl.onContentComplete()},u.prototype.onNoPostroll=function(){this.playerWrapper.onNoPostroll()},u.prototype.onContentAndAdsCompleted=function(){for(var e in this.contentAndAdsEndedListeners)"function"==typeof this.contentAndAdsEndedListeners[e]&&this.contentAndAdsEndedListeners[e]()},u.prototype.onPlayerDisposed=function(){this.contentAndAdsEndedListeners=[],this.sdkImpl.onPlayerDisposed()},u.prototype.onPlayerReadyForPreroll=function(){this.sdkImpl.onPlayerReadyForPreroll()},u.prototype.onAdTimeout=function(){this.sdkImpl.onAdTimeout()},u.prototype.onPlayerReady=function(){this.sdkImpl.onPlayerReady()},u.prototype.onPlayerEnterFullscreen=function(){this.adUi.onPlayerEnterFullscreen(),this.sdkImpl.onPlayerEnterFullscreen()},u.prototype.onPlayerExitFullscreen=function(){this.adUi.onPlayerExitFullscreen(),this.sdkImpl.onPlayerExitFullscreen()},u.prototype.onPlayerVolumeChanged=function(e){this.adUi.onPlayerVolumeChanged(e),this.sdkImpl.onPlayerVolumeChanged(e)},u.prototype.setContentWithAdTag=function(e,t){this.reset(),this.settings.adTagUrl=t||this.settings.adTagUrl,this.playerWrapper.changeSource(e)},u.prototype.setContentWithAdsResponse=function(e,t){this.reset(),this.settings.adsResponse=t||this.settings.adsResponse,this.playerWrapper.changeSource(e)},u.prototype.setContentWithAdsRequest=function(e,t){this.reset(),this.settings.adsRequest=t||this.settings.adsRequest,this.playerWrapper.changeSource(e)},u.prototype.reset=function(){this.sdkImpl.reset(),this.playerWrapper.reset(),this.adUi.reset()},u.prototype.addContentEndedListener=function(e){this.playerWrapper.addContentEndedListener(e)},u.prototype.addContentAndAdsEndedListener=function(e){this.contentAndAdsEndedListeners.push(e)},u.prototype.setAdBreakReadyListener=function(e){this.sdkImpl.setAdBreakReadyListener(e)},u.prototype.setShowCountdown=function(e){this.adUi.setShowCountdown(e),this.showCountdown=e,this.adUi.countdownDiv.style.display=this.showCountdown?"block":"none"},u.prototype.initializeAdDisplayContainer=function(){this.sdkImpl.initializeAdDisplayContainer()},u.prototype.playAdBreak=function(){this.sdkImpl.playAdBreak()},u.prototype.addEventListener=function(e,t){this.sdkImpl.addEventListener(e,t)},u.prototype.getAdsManager=function(){return this.sdkImpl.getAdsManager()},u.prototype.getPlayerId=function(){return this.playerWrapper.getPlayerId()},u.prototype.changeAdTag=function(e){this.reset(),this.settings.adTagUrl=e},u.prototype.pauseAd=function(){this.adUi.onAdsPaused(),this.sdkImpl.pauseAds()},u.prototype.resumeAd=function(){this.adUi.onAdsPlaying(),this.sdkImpl.resumeAds()},u.prototype.togglePlayback=function(){this.playerWrapper.togglePlayback()},u.prototype.adsWillAutoplay=function(){return void 0!==this.settings.adsWillAutoplay?this.settings.adsWillAutoplay:void 0!==this.settings.adWillAutoplay?this.settings.adWillAutoplay:!!this.playerWrapper.getPlayerOptions().autoplay},u.prototype.adsWillPlayMuted=function(){return void 0!==this.settings.adsWillPlayMuted?this.settings.adsWillPlayMuted:void 0!==this.settings.adWillPlayMuted?this.settings.adWillPlayMuted:void 0!==this.playerWrapper.getPlayerOptions().muted?this.playerWrapper.getPlayerOptions().muted:0==this.playerWrapper.getVolume()},u.prototype.triggerPlayerEvent=function(e,t){this.playerWrapper.triggerPlayerEvent(e,t)};var d=function(e,t,n){this.vjsPlayer=e,this.daiController=n,this.vjsControls=this.vjsPlayer.getChild("controlBar"),this.h5Player=null,this.vjsPlayer.on("dispose",this.playerDisposedListener.bind(this)),this.vjsPlayer.on("pause",this.onPause.bind(this)),this.vjsPlayer.on("play",this.onPlay.bind(this)),this.vjsPlayer.on("seeked",this.onSeekEnd.bind(this)),this.vjsPlayer.ready(this.onPlayerReady.bind(this)),this.vjsPlayer.ads(t)};d.prototype.playerDisposedListener=function(){this.contentEndedListeners=[],this.daiController.onPlayerDisposed()},d.prototype.onPause=function(){this.daiController.isInAdBreak()&&this.vjsControls.show()},d.prototype.onPlay=function(){this.daiController.isInAdBreak()&&this.vjsControls.hide()},d.prototype.onSeekEnd=function(){this.daiController.onSeekEnd(this.vjsPlayer.currentTime())},d.prototype.onPlayerReady=function(){this.h5Player=document.getElementById(this.getPlayerId()).getElementsByClassName("vjs-tech")[0],this.daiController.onPlayerReady()},d.prototype.getStreamPlayer=function(){return this.h5Player},d.prototype.getVjsPlayer=function(){return this.vjsPlayer},d.prototype.getPlayerOptions=function(){return this.vjsPlayer.options_},d.prototype.getPlayerId=function(){return this.vjsPlayer.id()},d.prototype.onAdError=function(e){this.vjsControls.show();var t=void 0!==e.getError?e.getError():e.stack;this.vjsPlayer.trigger({type:"adserror",data:{AdError:t,AdErrorEvent:e}})},d.prototype.onAdBreakStart=function(){this.vjsControls.hide()},d.prototype.onAdBreakEnd=function(){this.vjsControls.show()},d.prototype.reset=function(){this.vjsControls.show()};var c=function(e){this.daiController=e,this.streamPlayer=null,this.vjsPlayer=null,this.streamManager=null,this.uiSettings=new google.ima.dai.api.UiSettings,this.isAdBreak=!1,this.isSnapback=!1,this.snapForwardTime=0,this.timedMetadata,this.metadataLoaded={},this.SOURCE_TYPES={hls:"application/x-mpegURL",dash:"application/dash+xml"}};c.prototype.initImaDai=function(){this.streamPlayer=this.daiController.getStreamPlayer(),this.vjsPlayer=this.daiController.getVjsPlayer(),this.createAdUiDiv(),this.daiController.getSettings().locale&&this.uiSettings.setLocale(this.daiController.getSettings().locale),this.streamManager=new google.ima.dai.api.StreamManager(this.streamPlayer,this.adUiDiv,this.uiSettings),this.streamPlayer.addEventListener("pause",this.onStreamPause),this.streamPlayer.addEventListener("play",this.onStreamPlay),this.streamManager.addEventListener([google.ima.dai.api.StreamEvent.Type.LOADED,google.ima.dai.api.StreamEvent.Type.ERROR,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED],this.onStreamEvent.bind(this),!1),this.vjsPlayer.textTracks().onaddtrack=this.onAddTrack.bind(this),this.vjsPlayer.trigger({type:"stream-manager",StreamManager:this.streamManager}),this.requestStream()},c.prototype.onAddTrack=function(e){var t=this,n=e.track;"metadata"===n.kind&&(n.mode="hidden",n.oncuechange=function(e){var i=!0,r=!1,s=void 0;try{for(var a,o=n.activeCues_[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){var l=a.value,u={};u[l.value.key]=l.value.data,t.streamManager.onTimedMetadata(u)}}catch(e){r=!0,s=e}finally{try{!i&&o.return&&o.return()}finally{if(r)throw s}}})},c.prototype.createAdUiDiv=function(){var e=document.createElement("div");e.id="ad-ui",e.style.height="calc(100% - 3em)",this.streamPlayer.parentNode.appendChild(e),this.adUiDiv=e},c.prototype.onStreamPause=function(){this.isAdBreak&&(this.adUiDiv.style.display="none")},c.prototype.onStreamPlay=function(){this.isAdBreak&&(this.adUiDiv.style.display="block")},c.prototype.onSeekEnd=function(e){if("live"!==this.daiController.getSettings().streamType)if(this.isSnapback)this.isSnapback=!1;else{var t=this.streamManager.previousCuePointForStreamTime(e);t&&!t.played&&(this.isSnapback=!0,this.snapForwardTime=e,this.vjsPlayer.currentTime(t.start))}},c.prototype.onStreamEvent=function(e){switch(e.type){case google.ima.dai.api.StreamEvent.Type.LOADED:this.loadUrl(e.getStreamData().url);break;case google.ima.dai.api.StreamEvent.Type.ERROR:window.console.warn("Error loading stream, attempting to play backup stream. "+e.getStreamData().errorMessage),this.daiController.onErrorLoadingAds(e),this.daiController.getSettings().fallbackStreamUrl&&this.loadurl(this.daiController.getSettings().fallbackStreamUrl);break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED:this.isAdBreak=!0,this.adUiDiv.style.display="block",this.daiController.onAdBreakStart();break;case google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED:this.isAdBreak=!1,this.adUiDiv.style.display="none",this.daiController.onAdBreakEnd(),this.snapForwardTime&&this.snapForwardTime>this.vjsPlayer.currentTime()&&(this.vjsPlayer.currentTime(this.snapForwardTime),this.snapForwardTime=0)}},c.prototype.loadUrl=function(e){this.vjsPlayer.ready(function(){var t=this.daiController.getSettings().streamFormat;this.vjsPlayer.src({src:e,type:this.SOURCE_TYPES[t]});var n=this.daiController.getSettings().bookmarkTime;if(n){var i=this.streamManager.streamTimeForContentTime(n);this.isSnapback=!0,this.vjsPlayer.currentTime(i)}}.bind(this))},c.prototype.requestStream=function(){var e=void 0,t=this.daiController.getSettings().streamType;if("vod"===t?((e=new google.ima.dai.api.VODStreamRequest).contentSourceId=this.daiController.getSettings().cmsId,e.videoId=this.daiController.getSettings().videoId):"live"===t?(e=new google.ima.dai.api.LiveStreamRequest).assetKey=this.daiController.getSettings().assetKey:window.console.warn("No valid stream type selected"),e.format=this.daiController.getSettings().streamFormat,this.daiController.getSettings().apiKey&&(e.apiKey=this.daiController.getSettings().apiKey),this.daiController.getSettings().authToken&&(e.authToken=this.daiController.getSettings().authToken),this.daiController.getSettings().adTagParameters&&(e.adTagParameters=this.daiController.getSettings().adTagParameters),this.daiController.getSettings().streamActivityMonitorId&&(e.streamActivityMonitorId=this.daiController.getSettings().streamActivityMonitorId),this.daiController.getSettings().omidMode){e.omidAccessModeRules={};var n=this.daiController.getSettings().omidMode;n.FULL&&(e.omidAccessModeRules[google.ima.OmidAccessMode.FULL]=n.FULL),n.DOMAIN&&(e.omidAccessModeRules[google.ima.OmidAccessMode.DOMAIN]=n.DOMAIN),n.LIMITED&&(e.omidAccessModeRules[google.ima.OmidAccessMode.LIMITED]=n.LIMITED)}this.streamManager.requestStream(e),this.vjsPlayer.trigger({type:"stream-request",StreamRequest:e})},c.prototype.onPlayerReady=function(){this.initImaDai()},c.prototype.onPlayerDisposed=function(){this.streamManager&&this.streamManager.reset()},c.prototype.getStreamManager=function(){return this.StreamManager},c.prototype.reset=function(){this.StreamManager&&this.StreamManager.reset()};var h=function(e,t){this.inAdBreak=!1,this.settings={},this.isMobile=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i),this.isIos=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i),this.initWithSettings(t);var n={debug:this.settings.debug,timeout:this.settings.timeout,prerollTimeout:this.settings.prerollTimeout},i=Object.assign({},n,t.contribAdsSettings||{});this.playerWrapper=new d(e,i,this),this.sdkImpl=new c(this)};function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}h.IMA_DEFAULTS={adLabel:"Advertisement",adLabelNofN:"of",debug:!1,disableAdControls:!1,showControlsForJSAds:!0},h.prototype.initWithSettings=function(e){this.settings=Object.assign({},h.IMA_DEFAULTS,e||{}),this.warnAboutDeprecatedSettings(),this.showCountdown=!0,!1===this.settings.showCountdown&&(this.showCountdown=!1)},h.prototype.warnAboutDeprecatedSettings=function(){var e=this;[].forEach((function(t){void 0!==e.settings[t]&&console.warn("WARNING: videojs.imaDai setting "+t+" is deprecated")}))},h.prototype.getSettings=function(){return this.settings},h.prototype.getIsMobile=function(){return this.isMobile},h.prototype.getIsIos=function(){return this.isIos},h.prototype.getStreamPlayer=function(){return this.playerWrapper.getStreamPlayer()},h.prototype.getVjsPlayer=function(){return this.playerWrapper.getVjsPlayer()},h.prototype.requestStream=function(){this.sdkImpl.requestStream()},h.prototype.setSetting=function(e,t){this.settings[e]=t},h.prototype.onErrorLoadingAds=function(e){this.playerWrapper.onAdError(e)},h.prototype.onAdError=function(e){this.playerWrapper.onAdError(e)},h.prototype.onAdBreakStart=function(){this.inAdBreak=!0,this.playerWrapper.onAdBreakStart()},h.prototype.onAdBreakEnd=function(){this.inAdBreak=!1,this.playerWrapper.onAdBreakEnd()},h.prototype.onPlayerDisposed=function(){this.contentAndAdsEndedListeners=[],this.sdkImpl.onPlayerDisposed()},h.prototype.isInAdBreak=function(){return this.inAdBreak},h.prototype.onSeekEnd=function(e){this.sdkImpl.onSeekEnd(e)},h.prototype.onPlayerReady=function(){this.sdkImpl.onPlayerReady()},h.prototype.reset=function(){this.sdkImpl.reset(),this.playerWrapper.reset()},h.prototype.addEventListener=function(e,t){this.sdkImpl.addEventListener(e,t)},h.prototype.getStreamManager=function(){return this.sdkImpl.getStreamManager()},h.prototype.getPlayerId=function(){return this.playerWrapper.getPlayerId()},h.prototype.streamWillAutoplay=function(){return void 0!==this.settings.streamWillAutoplay?this.settings.streamWillAutoplay:!!this.playerWrapper.getPlayerOptions().autoplay},h.prototype.triggerPlayerEvent=function(e,t){this.playerWrapper.triggerPlayerEvent(e,t)};var f=function(e,t){this.controller=new u(e,t),this.addContentAndAdsEndedListener=function(e){this.controller.addContentAndAdsEndedListener(e)}.bind(this),this.addContentEndedListener=function(e){this.controller.addContentEndedListener(e)}.bind(this),this.addEventListener=function(e,t){this.controller.addEventListener(e,t)}.bind(this),this.changeAdTag=function(e){this.controller.changeAdTag(e)}.bind(this),this.getAdsManager=function(){return this.controller.getAdsManager()}.bind(this),this.initializeAdDisplayContainer=function(){this.controller.initializeAdDisplayContainer()}.bind(this),this.pauseAd=function(){this.controller.pauseAd()}.bind(this),this.playAdBreak=function(){this.controller.playAdBreak()}.bind(this),this.requestAds=function(){this.controller.requestAds()}.bind(this),this.resumeAd=function(){this.controller.resumeAd()}.bind(this),this.setAdBreakReadyListener=function(e){this.controller.setAdBreakReadyListener(e)}.bind(this),this.setContentWithAdTag=function(e,t){this.controller.setContentWithAdTag(e,t)}.bind(this),this.setContentWithAdsResponse=function(e,t){this.controller.setContentWithAdsResponse(e,t)}.bind(this),this.setContentWithAdsRequest=function(e,t){this.controller.setContentWithAdsRequest(e,t)}.bind(this),this.setShowCountdown=function(e){this.controller.setShowCountdown(e)}.bind(this)},m=function(e,t){this.controller=new h(e,t),this.streamEndedListener=function(e){this.controller.addStreamEndedListener(e)}.bind(this),this.addEventListener=function(e,t){this.controller.addEventListener(e,t)}.bind(this),this.getStreamManager=function(){return this.controller.getStreamManager()}.bind(this)},g=function e(t,n){p(this,e),"hls"===(t=t.toLowerCase())||"dash"===t?"dash"!==t?"string"==typeof n?(this.streamFormat=t,this.assetKey=n):window.console.error("assetKey error: value must be string."):window.console.error("streamFormat error: DASH streams are notcurrently supported by this plugin."):window.console.error("VodStream error: incorrect streamFormat.")},v=function e(t,n,i){p(this,e),"hls"===(t=t.toLowerCase())||"dash"===t?"dash"!==t?"string"==typeof n?"string"==typeof i?(this.streamFormat=t,this.cmsId=n,this.videoId=i):window.console.error("videoId error: value must be string."):window.console.error("cmsId error: value must be string."):window.console.error("streamFormat error: DASH streams are notcurrently supported by this plugin."):window.console.error("VodStream error: incorrect streamFormat.")},y=i.default.registerPlugin||i.default.plugin;y("ima",(function(e){this.ima=new f(this,e)})),y("imaDai",(function(e,t){if(e instanceof g)t.streamType="live",t.assetKey=e.assetKey;else{if(!(e instanceof v))return void window.console.error("initDai() first parameter must be an instance of LiveStream or VodStream.");t.streamType="vod",t.cmsId=e.cmsId,t.videoId=e.videoId}t.streamFormat=e.streamFormat,this.imaDai=new m(this,t)}))},function(e,t){e.exports=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;fetch("https://vast-errors.deja.workers.dev/api/ad_exception",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({error_code:e.errorCode,error_message:e.errorMessage,campaign_id:t,player_slug:n})})}null==i?null==evt||r(evt):r(i.data.AdError.data,n,t)}},,,,,,,function(e,t){e.exports=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=null;this.passBackPreload=function(e,n,r){var s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t&&fetch(r+"/passback/"+n+"/outstream").then((function(e){return e.text()})).then((function(t){""!=t&&void 0!==(null!=t?t:void 0)&&i(e,t,s)})).catch((function(e){console.warn("Something went wrong.",e)}))};var i=function(t,i,r){n=document.createElement("iframe");var s="\n \n \n \n \n \n \n