PageSourceSearch

https://www.kolel.org/_nuxt/8edfbf9.js

js kolel.org collected 2026-09-24 09:36:25 UTC 604,292 bytes, 2 lines download raw bytes

1/*! For license information please see LICENSES */
2(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{1002:function(e,t,n){"use strict";function r(object,e){return void 0===e&&(e=Object),e&&"function"==typeof e.freeze?e.freeze(object):object}var o=r({HTML:"text/html",isHTML:function(e){return e===o.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),l=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===l.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});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<e.length;i++)if(Object.prototype.hasOwnProperty.call(e,i)){var r=e[i];if(t.call(void 0,r,i,e))return r}},t.freeze=r,t.MIME_TYPE=o,t.NAMESPACE=l},1030:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},1031:function(e,t){function n(t,p){return e.exports=n=Object.setPrototypeOf||function(e,p){return e.__proto__=p,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,p)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},1074:function(e,t,n){(function(t){var r,o=void 0!==t?t:"undefined"!=typeof window?window:{},l=n(962);"undefined"!=typeof document?r=document:(r=o["__GLOBAL_DOCUMENT_CACHE@4"])||(r=o["__GLOBAL_DOCUMENT_CACHE@4"]=l),e.exports=r}).call(this,n(99))},1075: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.default=e.exports,e.exports.__esModule=!0},1076:function(e,t,n){var r=n(1031);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},1077:function(e,t,n){"use strict";var r=n(1168),o=n.n(r),l=n(952),c=n.n(l),d="http://example.com";t.a=function(e,t){if(/^[a-z]+:/i.test(t))return t;/^data:/.test(e)&&(e=c.a.location&&c.a.location.href||"");var n="function"==typeof c.a.URL,r=/^\/\//.test(e),l=!c.a.location&&!/\/\//i.test(e);if(n?e=new c.a.URL(e,c.a.location||d):/\/\//i.test(e)||(e=o.a.buildAbsoluteURL(c.a.location&&c.a.location.href||"",e)),n){var h=new URL(t,e);return l?h.href.slice(d.length):r?h.href.slice(h.protocol.length):h.href}return o.a.buildAbsoluteURL(e,t)}},1078:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r=n(952),o=n.n(r);function l(t){for(var s,n=(s=t,o.a.atob?o.a.atob(s):e.from(s,"base64").toString("binary")),r=new Uint8Array(n.length),i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}}).call(this,n(643).Buffer)},1079:function(e,t,n){var r=n(1002),o=r.find,l=r.NAMESPACE;function c(input){return""!==input}function d(e,element){return e.hasOwnProperty(element)||(e[element]=!0),e}function h(input){if(!input)return[];var e=function(input){return input?input.split(/[\t\n\f\r ]+/).filter(c):[]}(input);return Object.keys(e.reduce(d,{}))}function f(e,t){for(var p in e)Object.prototype.hasOwnProperty.call(e,p)&&(t[p]=e[p])}function m(e,t){var n=e.prototype;if(!(n instanceof t)){function r(){}r.prototype=t.prototype,f(n,r=new r),e.prototype=n=r}n.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),n.constructor=e)}var v={},y=v.ELEMENT_NODE=1,_=v.ATTRIBUTE_NODE=2,T=v.TEXT_NODE=3,S=v.CDATA_SECTION_NODE=4,E=v.ENTITY_REFERENCE_NODE=5,k=v.ENTITY_NODE=6,C=v.PROCESSING_INSTRUCTION_NODE=7,w=v.COMMENT_NODE=8,I=v.DOCUMENT_NODE=9,x=v.DOCUMENT_TYPE_NODE=10,A=v.DOCUMENT_FRAGMENT_NODE=11,O=v.NOTATION_NODE=12,P={},L={},D=(P.INDEX_SIZE_ERR=(L[1]="Index size error",1),P.DOMSTRING_SIZE_ERR=(L[2]="DOMString size error",2),P.HIERARCHY_REQUEST_ERR=(L[3]="Hierarchy request error",3)),M=(P.WRONG_DOCUMENT_ERR=(L[4]="Wrong document",4),P.INVALID_CHARACTER_ERR=(L[5]="Invalid character",5),P.NO_DATA_ALLOWED_ER
vendor: 13,998 bytes, line 2
2R=(L[6]="No data allowed",6),P.NO_MODIFICATION_ALLOWED_ERR=(L[7]="No modification allowed",7),P.NOT_FOUND_ERR=(L[8]="Not found",8)),N=(P.NOT_SUPPORTED_ERR=(L[9]="Not supported",9),P.INUSE_ATTRIBUTE_ERR=(L[10]="Attribute in use",10));P.INVALID_STATE_ERR=(L[11]="Invalid state",11),P.SYNTAX_ERR=(L[12]="Syntax error",12),P.INVALID_MODIFICATION_ERR=(L[13]="Invalid modification",13),P.NAMESPACE_ERR=(L[14]="Invalid namespace",14),P.INVALID_ACCESS_ERR=(L[15]="Invalid access",15);function R(code,e){if(e instanceof Error)var t=e;else t=this,Error.call(this,L[code]),this.message=L[code],Error.captureStackTrace&&Error.captureStackTrace(this,R);return t.code=code,e&&(this.message=this.message+": "+e),t}function U(){}function B(e,t){this._node=e,this._refresh=t,j(this)}function j(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);Ie(e,"length",n.length),f(n,e),e._inc=t}}function F(){}function H(e,t){for(var i=e.length;i--;)if(e[i]===t)return i}function V(e,t,n,r){if(r?t[H(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var o=e.ownerDocument;o&&(r&&Q(o,e,r),function(e,t,n){e&&e._inc++,n.namespaceURI===l.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(o,e,n))}}function W(e,t,n){var i=H(t,n);if(!(i>=0))throw new R(M,new Error(e.tagName+"@"+n));for(var r=t.length-1;i<r;)t[i]=t[++i];if(t.length=r,e){var o=e.ownerDocument;o&&(Q(o,e,n),n.ownerElement=null)}}function z(){}function G(){}function X(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function K(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(K(e,t))return!0}while(e=e.nextSibling)}function Y(){this.ownerDocument=this}function Q(e,t,n,r){e&&e._inc++,n.namespaceURI===l.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function $(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var o=t.firstChild,i=0;o;)r[i++]=o,o=o.nextSibling;r.length=i,delete r[r.length]}}}function J(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,$(e.ownerDocument,e),t}function Z(e){return e&&e.nodeType===G.DOCUMENT_TYPE_NODE}function ee(e){return e&&e.nodeType===G.ELEMENT_NODE}function te(e){return e&&e.nodeType===G.TEXT_NODE}function ie(e,t){var n=e.childNodes||[];if(o(n,ee)||Z(t))return!1;var r=o(n,Z);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function ne(e,t){var n=e.childNodes||[];if(o(n,(function(e){return ee(e)&&e!==t})))return!1;var r=o(n,Z);return!(t&&r&&n.indexOf(r)>n.indexOf(t))}function re(e,t,n){if(!function(e){return e&&(e.nodeType===G.DOCUMENT_NODE||e.nodeType===G.DOCUMENT_FRAGMENT_NODE||e.nodeType===G.ELEMENT_NODE)}(e))throw new R(D,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new R(M,"child not in parent");if(!function(e){return e&&(ee(e)||te(e)||Z(e)||e.nodeType===G.DOCUMENT_FRAGMENT_NODE||e.nodeType===G.COMMENT_NODE||e.nodeType===G.PROCESSING_INSTRUCTION_NODE)}(t)||Z(t)&&e.nodeType!==G.DOCUMENT_NODE)throw new R(D,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function ae(e,t,n){var r=e.childNodes||[],l=t.childNodes||[];if(t.nodeType===G.DOCUMENT_FRAGMENT_NODE){var c=l.filter(ee);if(c.length>1||o(l,te))throw new R(D,"More than one element or text in fragment");if(1===c.length&&!ie(e,n))throw new R(D,"Element in fragment can not be inserted before doctype")}if(ee(t)&&!ie(e,n))throw new R(D,"Only one element can be added and only after doctype");if(Z(t)){if(o(r,Z))throw new R(D,"Only one doctype is allowed");var d=o(r,ee);if(n&&r.indexOf(d)<r.indexOf(n))throw new R(D,"Doctype can only be inserted before an element");if(!n&&d)throw new R(D,"Doctype can not be appended since element is present")}}function se(e,t,n){var r=e.childNodes||[],l=t.childNodes||[];if(t.nodeType===G.DOCUMENT_FRAGMENT_NODE){var c=l.filter(ee);if(c.length>1||o(l,te))throw new R(D,"More than one element or text in fragment");if(1===c.length&&!ne(e,n))throw new R(D,"Element in fragment can not be inserted before doctype")}if(ee(t)&&!ne(e,n))throw new R(D,"Only one element can be added and only after doctype");if(Z(t)){if(o(r,(function(e){return Z(e)&&e!==n})))throw new R(D,"Only one doctype is allowed");var d=o(r,ee);if(n&&r.indexOf(d)<r.indexOf(n))throw new R(D,"Doctype can only be inserted before an element")}}function oe(e,t,n,r){re(e,t,n),e.nodeType===G.DOCUMENT_NODE&&(r||ae)(e,t,n);var o=t.parentNode;if(o&&o.removeChild(t),t.nodeType===A){var l=t.firstChild;if(null==l)return t;var c=t.lastChild}else l=c=t;var pre=n?n.previousSibling:e.lastChild;l.previousSibling=pre,c.nextSibling=n,pre?pre.nextSibling=l:e.firstChild=l,null==n?e.lastChild=c:n.previousSibling=c;do{l.parentNode=e}while(l!==c&&(l=l.nextSibling));return $(e.ownerDocument||e,e),t.nodeType==A&&(t.firstChild=t.lastChild=null),t}function ue(){this._nsMap={}}function le(){}function ce(){}function de(){}function he(){}function pe(){}function fe(){}function me(){}function ge(){}function ve(){}function ye(){}function _e(){}function be(){}function Te(e,t){var n=[],r=9==this.nodeType&&this.documentElement||this,o=r.prefix,l=r.namespaceURI;if(l&&null==o&&null==(o=r.lookupPrefix(l)))var c=[{namespace:l,prefix:null}];return ke(this,n,e,t,c),n.join("")}function Se(e,t,n){var r=e.prefix||"",o=e.namespaceURI;if(!o)return!1;if("xml"===r&&o===l.XML||o===l.XMLNS)return!1;for(var i=n.length;i--;){var c=n[i];if(c.prefix===r)return c.namespace!==o}return!0}function Ee(e,t,n){e.push(" ",t,'="',n.replace(/[<&"]/g,X),'"')}function ke(e,t,n,r,o){if(o||(o=[]),r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case y:var c=e.attributes,d=c.length,h=e.firstChild,f=e.tagName,m=f;if(!(n=l.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var v,k=0;k<c.length;k++)if("xmlns"===c.item(k).name){v=c.item(k).value;break}if(!v)for(var O=o.length-1;O>=0;O--){if(""===(P=o[O]).prefix&&P.namespace===e.namespaceURI){v=P.namespace;break}}if(v!==e.namespaceURI)for(O=o.length-1;O>=0;O--){var P;if((P=o[O]).namespace===e.namespaceURI){P.prefix&&(m=P.prefix+":"+f);break}}}t.push("<",m);for(var i=0;i<d;i++){"xmlns"==(L=c.item(i)).prefix?o.push({prefix:L.localName,namespace:L.value}):"xmlns"==L.nodeName&&o.push({prefix:"",namespace:L.value})}for(i=0;i<d;i++){var L,D,M;if(Se(L=c.item(i),0,o))Ee(t,(D=L.prefix||"")?"xmlns:"+D:"xmlns",M=L.namespaceURI),o.push({prefix:D,namespace:M});ke(L,t,n,r,o)}if(f===m&&Se(e,0,o))Ee(t,(D=e.prefix||"")?"xmlns:"+D:"xmlns",M=e.namespaceURI),o.push({prefix:D,namespace:M});if(h||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(f)){if(t.push(">"),n&&/^script$/i.test(f))for(;h;)h.data?t.push(h.data):ke(h,t,n,r,o.slice()),h=h.nextSibling;else for(;h;)ke(h,t,n,r,o.slice()),h=h.nextSibling;t.push("</",m,">")}else t.push("/>");return;case I:case A:for(h=e.firstChild;h;)ke(h,t,n,r,o.slice()),h=h.nextSibling;return;case _:return Ee(t,e.name,e.value);case T:return t.push(e.data.replace(/[<&]/g,X).replace(/]]>/g,"]]&gt;"));case S:return t.push("<![CDATA[",e.data,"]]>");case w:return t.push("\x3c!--",e.data,"--\x3e");case x:var N=e.publicId,R=e.systemId;if(t.push("<!DOCTYPE ",e.name),N)t.push(" PUBLIC ",N),R&&"."!=R&&t.push(" ",R),t.push(">");else if(R&&"."!=R)t.push(" SYSTEM ",R,">");else{var sub=e.internalSubset;sub&&t.push(" [",sub,"]"),t.push(">")}return;case C:return t.push("<?",e.target," ",e.data,"?>");case E:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function Ce(e,t,n){var r;switch(t.nodeType){case y:(r=t.cloneNode(!1)).ownerDocument=e;case A:break;case _:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var o=t.firstChild;o;)r.appendChild(Ce(e,o,n)),o=o.nextSibling;return r}function we(e,t,n){var r=new t.constructor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var l=t[o];"object"!=typeof l&&l!=r[o]&&(r[o]=l)}switch(t.childNodes&&(r.childNodes=new U),r.ownerDocument=e,r.nodeType){case y:var c=t.attributes,d=r.attributes=new F,h=c.length;d._ownerElement=r;for(var i=0;i<h;i++)r.setAttributeNode(we(e,c.item(i),!0));break;case _:n=!0}if(n)for(var f=t.firstChild;f;)r.appendChild(we(e,f,n)),f=f.nextSibling;return r}function Ie(object,e,t){object[e]=t}R.prototype=Error.prototype,f(P,R),U.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],i=0;i<this.length;i++)ke(this[i],n,e,t);return n.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},B.prototype.item=function(i){return j(this),this[i]},m(B,U),F.prototype={length:0,item:U.prototype.item,getNamedItem:function(e){for(var i=this.length;i--;){var t=this[i];if(t.nodeName==e)return t}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new R(N);var n=this.getNamedItem(e.nodeName);return V(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new R(N);return t=this.getNamedItemNS(e.namespaceURI,e.localName),V(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return W(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return W(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var i=this.length;i--;){var n=this[i];if(n.localName==t&&n.namespaceURI==e)return n}return null}},z.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var r=new Y;if(r.implementation=this,r.childNodes=new U,r.doctype=n||null,n&&r.appendChild(n),t){var o=r.createElementNS(e,t);r.appendChild(o)}return r},createDocumentType:function(e,t,n){var r=new fe;return r.name=e,r.nodeName=e,r.publicId=t||"",r.systemId=n||"",r}},G.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return oe(this,e,t)},replaceChild:function(e,t){oe(this,e,t,se),t&&this.removeChild(t)},removeChild:function(e){return J(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return we(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==T&&e.nodeType==T?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var map=t._nsMap;if(map)for(var n in map)if(Object.prototype.hasOwnProperty.call(map,n)&&map[n]===e)return n;t=t.nodeType==_?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var map=t._nsMap;if(map&&e in map&&Object.prototype.hasOwnProperty.call(map,e))return map[e];t=t.nodeType==_?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},f(v,G),f(v,G.prototype),Y.prototype={nodeName:"#document",nodeType:I,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==A){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return oe(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===y&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),J(this,e)},replaceChild:function(e,t){oe(this,e,t,se),e.ownerDocument=this,t&&this.removeChild(t),ee(e)&&(this.documentElement=e)},importNode:function(e,t){return Ce(this,e,t)},getElementById:function(e){var t=null;return K(this.documentElement,(function(n){if(n.nodeType==y&&n.getAttribute("id")==e)return t=n,!0})),t},getElementsByClassName:function(e){var t=h(e);return new B(this,(function(base){var n=[];return t.length>0&&K(base.documentElement,(function(r){if(r!==base&&r.nodeType===y){var o=r.getAttribute("class");if(o){var l=e===o;if(!l){var c=h(o);l=t.every((d=c,function(element){return d&&-1!==d.indexOf(element)}))}l&&n.push(r)}}var d})),n}))},createElement:function(e){var t=new ue;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new U,(t.attributes=new F)._ownerElement=t,t},createDocumentFragment:function(){var e=new ye;return e.ownerDocument=this,e.childNodes=new U,e},createTextNode:function(data){var e=new de;return e.ownerDocument=this,e.appendData(data),e},createComment:function(data){var e=new he;return e.ownerDocument=this,e.appendData(data),e},createCDATASection:function(data){var e=new pe;return e.ownerDocument=this,e.appendData(data),e},createProcessingInstruction:function(e,data){var t=new _e;return t.ownerDocument=this,t.tagName=t.target=e,t.nodeValue=t.data=data,t},createAttribute:function(e){var t=new le;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ve;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new ue,r=t.split(":"),o=n.attributes=new F;return n.childNodes=new U,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,o._ownerElement=n,n},createAttributeNS:function(e,t){var n=new le,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},m(Y,G),ue.prototype={nodeType:y,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)}
2,appendChild:function(e){return e.nodeType===A?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,$(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 r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new B(this,(function(base){var t=[];return K(base,(function(n){n===base||n.nodeType!=y||"*"!==e&&n.tagName!=e||t.push(n)})),t}))},getElementsByTagNameNS:function(e,t){return new B(this,(function(base){var n=[];return K(base,(function(r){r===base||r.nodeType!==y||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||n.push(r)})),n}))}},Y.prototype.getElementsByTagName=ue.prototype.getElementsByTagName,Y.prototype.getElementsByTagNameNS=ue.prototype.getElementsByTagNameNS,m(ue,G),le.prototype.nodeType=_,m(le,G),ce.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(text){text=this.data+text,this.nodeValue=this.data=text,this.length=text.length},insertData:function(e,text){this.replaceData(e,0,text)},appendChild:function(e){throw new Error(L[D])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,text){text=this.data.substring(0,e)+text+this.data.substring(e+t),this.nodeValue=this.data=text,this.length=text.length}},m(ce,G),de.prototype={nodeName:"#text",nodeType:T,splitText:function(e){var text=this.data,t=text.substring(e);text=text.substring(0,e),this.data=this.nodeValue=text,this.length=text.length;var n=this.ownerDocument.createTextNode(t);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},m(de,ce),he.prototype={nodeName:"#comment",nodeType:w},m(he,ce),pe.prototype={nodeName:"#cdata-section",nodeType:S},m(pe,ce),fe.prototype.nodeType=x,m(fe,G),me.prototype.nodeType=O,m(me,G),ge.prototype.nodeType=k,m(ge,G),ve.prototype.nodeType=E,m(ve,G),ye.prototype.nodeName="#document-fragment",ye.prototype.nodeType=A,m(ye,G),_e.prototype.nodeType=C,m(_e,G),be.prototype.serializeToString=function(e,t,n){return Te.call(e,t,n)},G.prototype.toString=Te;try{if(Object.defineProperty){function xe(e){switch(e.nodeType){case y:case A:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(xe(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(B.prototype,"length",{get:function(){return j(this),this.$$length}}),Object.defineProperty(G.prototype,"textContent",{get:function(){return xe(this)},set:function(data){switch(this.nodeType){case y:case A:for(;this.firstChild;)this.removeChild(this.firstChild);(data||String(data))&&this.appendChild(this.ownerDocument.createTextNode(data));break;default:this.data=data,this.value=data,this.nodeValue=data}}}),Ie=function(object,e,t){object["$$"+e]=t}}}catch(e){}t.DocumentType=fe,t.DOMException=R,t.DOMImplementation=z,t.Element=ue,t.Node=G,t.NodeList=U,t.XMLSerializer=be},1080:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(963),o=Object(r.k)([73,68,51]),l=function e(t,n){return void 0===n&&(n=0),(t=Object(r.k)(t)).length-n<10||!Object(r.a)(t,o,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=Object(r.k)(e))[t+5],o=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?o+20:o+10}(t,n),e(t,n))}},1156: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 l[e];var n,c=String(e);return(n=r[c.toLowerCase()])?n:(n=o[c.toLowerCase()])||(1===c.length?c.charCo
2deAt(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 l;if(l=r[t.toLowerCase()])return l===n;if(l=o[t.toLowerCase()])return l===n}else if("number"==typeof t)return t===n;return!1}};var r=(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},o=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(i=97;i<123;i++)r[String.fromCharCode(i)]=i-32;for(var i=48;i<58;i++)r[i-48]=i;for(i=1;i<13;i++)r["f"+i]=i+111;for(i=0;i<10;i++)r["numpad "+i]=i+96;var l=t.names=t.title={};for(i in r)l[r[i]]=i;for(var c in o)r[c]=o[c]},1157:function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},1158:function(e,t,n){"use strict";var r=n(952),o=n(1030),l=n(1159);d.httpHandler=n(1160);function c(e,t,n){var r=e;return l(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=o({},t,{uri:e}),r.callback=n,r}function d(e,t,n){return h(t=c(e,t,n))}function h(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,body){t||(t=!0,e.callback(n,r,body))};function r(){var body=void 0;if(body=f.response?f.response:f.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(f),S)try{body=JSON.parse(body)}catch(e){}return body}function o(e){return clearTimeout(m),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,E)}function l(){if(!h){var t;clearTimeout(m),t=e.useXDR&&void 0===f.status?200:1223===f.status?204:f.status;var o=E,l=null;return 0!==t?(o={body:r(),statusCode:t,method:y,headers:{},url:v,rawRequest:f},f.getAllResponseHeaders&&(o.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),o=e.slice(n+1).trim();void 0===t[r]?t[r]=o:Array.isArray(t[r])?t[r].push(o):t[r]=[t[r],o]})),t):t}(f.getAllResponseHeaders()))):l=new Error("Internal XMLHttpRequest Error"),n(l,o,o.body)}}var c,h,f=e.xhr||null;f||(f=e.cors||e.useXDR?new d.XDomainRequest:new d.XMLHttpRequest);var m,v=f.url=e.uri||e.url,y=f.method=e.method||"GET",body=e.body||e.data,_=f.headers=e.headers||{},T=!!e.sync,S=!1,E={body:void 0,headers:{},statusCode:0,method:y,url:v,rawRequest:f};if("json"in e&&!1!==e.json&&(S=!0,_.accept||_.Accept||(_.Accept="application/json"),"GET"!==y&&"HEAD"!==y&&(_["content-type"]||_["Content-Type"]||(_["Content-Type"]="application/json"),body=JSON.stringify(!0===e.json?body:e.json))),f.onreadystatechange=function(){4===f.readyState&&setTimeout(l,0)},f.onload=l,f.onerror=o,f.onprogress=function(){},f.onabort=function(){h=!0},f.ontimeout=o,f.open(y,v,!T,e.username,e.password),T||(f.withCredentials=!!e.withCredentials),!T&&e.timeout>0&&(m=setTimeout((function(){if(!h){h=!0,f.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",o(e)}}),e.timeout)),f.setRequestHeader)for(c in _)_.hasOwnProperty(c)&&f.setRequestHeader(c,_[c]);else if(e.headers&&!function(e){for(var i in e)if(e.hasOwnProperty(i))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(f.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(f),f.send(body||null),f}e.exports=d,e.exports.default=d,d.XMLHttpRequest=r.XMLHttpRequest||function(){},d.XDomainRequest="withCredentials"in new d.XMLHttpRequest?d.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var i=0;i<e.length;i++)t(e[i])}(["get","put","post","patch","head","delete"],(function(e){d["delete"===e?"del":e]=function(t,n,r){return(n=c(t,n,r)).method=e.toUpperCase(),h(n)}}))},1159: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},1160:function(e,t,n){"use strict";var r=n(952);e.exports=function(e,t){return void 0===t&&(t=!1),function(n,o,l){if(n)e(n);else if(o.statusCode>=400&&o.statusCode<=599){var c=l;if(t)if(r.TextDecoder){var d=function(e){void 0===e&&(e="");return e.toLowerCase().split(";").reduce((function(e,t){var n=t.split("="),r=n[0],o=n[1];return"charset"===r.trim()?o.trim():e}),"utf-8")}(o.headers&&o.headers["content-type"]);try{c=new TextDecoder(d).decode(l)}catch(e){}}else c=String.fromCharCode.apply(null,new Uint8Array(l));e({cause:c})}else e(null,l)}}},1161:function(e,t,n){var r=n(952),o=e.exports={WebVTT:n(1162),VTTCue:n(1163),VTTRegion:n(1164)};r.vttjs=o,r.WebVTT=o.WebVTT;var l=o.VTTCue,c=o.VTTRegion,d=r.VTTCue,h=r.VTTRegion;o.shim=function(){r.VTTCue=l,r.VTTRegion=c},o.restore=function(){r.VTTCue=d,r.VTTRegion=h},r.VTTCue||o.shim()},1162:function(e,t,n){var r=n(1074),o=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}}();
vendor: 8,456 bytes, line 2
2function l(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function c(input){function e(e,t,s,n){return 3600*(0|e)+60*(0|t)+(0|s)+(0|n)/1e3}var t=input.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return t?t[3]?e(t[1],t[2],t[3].replace(":",""),t[4]):t[1]>59?e(t[1],t[2],0,t[4]):e(0,t[1],t[2],t[4]):null}function d(){this.values=o(null)}function h(input,e,t,n){var r=n?input.split(n):[input];for(var i in r)if("string"==typeof r[i]){var o=r[i].split(t);if(2===o.length)e(o[0].trim(),o[1].trim())}}function f(input,e,t){var n=input;function r(){var e=c(input);if(null===e)throw new l(l.Errors.BadTimeStamp,"Malformed timestamp: "+n);return input=input.replace(/^[^\sa-zA-Z-]+/,""),e}function o(){input=input.replace(/^\s+/,"")}if(o(),e.startTime=r(),o(),"--\x3e"!==input.substr(0,3))throw new l(l.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);input=input.substr(3),o(),e.endTime=r(),o(),function(input,e){var n=new d;h(input,(function(e,r){switch(e){case"region":for(var i=t.length-1;i>=0;i--)if(t[i].id===r){n.set(e,t[i].region);break}break;case"vertical":n.alt(e,r,["rl","lr"]);break;case"line":var o=r.split(","),l=o[0];n.integer(e,l),n.percent(e,l)&&n.set("snapToLines",!1),n.alt(e,l,["auto"]),2===o.length&&n.alt("lineAlign",o[1],["start","center","end"]);break;case"position":o=r.split(","),n.percent(e,o[0]),2===o.length&&n.alt("positionAlign",o[1],["start","center","end"]);break;case"size":n.percent(e,r);break;case"align":n.alt(e,r,["start","center","end","left","right"])}}),/:/,/\s/),e.region=n.get("region",null),e.vertical=n.get("vertical","");try{e.line=n.get("line","auto")}catch(e){}e.lineAlign=n.get("lineAlign","start"),e.snapToLines=n.get("snapToLines",!0),e.size=n.get("size",100);try{e.align=n.get("align","center")}catch(t){e.align=n.get("align","middle")}try{e.position=n.get("position","auto")}catch(t){e.position=n.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},e.align)}e.positionAlign=n.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},e.align)}(input,e)}l.prototype=o(Error.prototype),l.prototype.constructor=l,l.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},d.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,a){for(var n=0;n<a.length;++n)if(t===a[n]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var m=r.createElement&&r.createElement("textarea"),v={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},y={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)"},_={v:"title",lang:"lang"},T={rt:"ruby"};function S(e,input){function t(){if(!input)return null;var e,t=input.match(/^([^<]*)(<[^>]*>?)?/);return e=t[1]?t[1]:t[2],input=input.substr(e.length),e}function n(e,element){return!T[element.localName]||T[element.localName]===e.localName}function r(t,n){var r=v[t];if(!r)return null;var element=e.document.createElement(r),o=_[t];return o&&n&&(element[o]=n.trim()),element}for(var o,s,l=e.document.createElement("div"),d=l,h=[];null!==(o=t());)if("<"!==o[0])d.appendChild(e.document.createTextNode((s=o,m.innerHTML=s,s=m.textContent,m.textContent="",s)));else{if("/"===o[1]){h.length&&h[h.length-1]===o.substr(2).replace(">","")&&(h.pop(),d=d.parentNode);continue}var f,S=c(o.substr(1,o.length-2));if(S){f=e.document.createProcessingInstruction("timestamp",S),d.appendChild(f);continue}var E=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!E)continue;if(!(f=r(E[1],E[3])))continue;if(!n(d,f))continue;if(E[2]){var k=E[2].split(".");k.forEach((function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(y.hasOwnProperty(n)){var r=t?"background-color":"color",o=y[n];f.style[r]=o}})),f.className=k.join(" ")}h.push(E[1]),d.appendChild(f),d=f}return l}var E=[[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 k(e){for(var i=0;i<E.length;i++){var t=E[i];if(e>=t[0]&&e<=t[1])return!0}return!1}function C(e){var t=[],text="";if(!e||!e.childNodes)return"ltr";function n(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function r(e){if(!e||!e.length)return null;var t=e.pop(),text=t.textContent||t.innerText;if(text){var o=text.match(/^.*(\n|\r)/);return o?(e.length=0,o[0]):text}return"ruby"===t.tagName?r(e):t.childNodes?(n(e,t),r(e)):void 0}for(n(t,e);text=r(t);)for(var i=0;i<text.length;i++)if(k(text.charCodeAt(i)))return"rtl";return"ltr"}function w(){}function I(e,t,n){w.call(this),this.cue=t,this.cueDiv=S(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:C(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(r),this.div.appendChild(this.cueDiv);var o=0;switch(t.positionAlign){case"start":o=t.position;break;case"center":o=t.position-t.size/2;break;case"end":o=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(o,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(o,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function x(e){var t,n,r,o;if(e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,o=e.div.offsetTop;var l=(l=e.div.childNodes)&&(l=l[0])&&l.getClientRects&&l.getClientRects();e=e.div.getBoundingClientRect(),t=l?Math.max(l[0]&&l[0].height||0,e.height/l.length):0}this.left=e.left,this.right=e.right,this.top=e.top||o,this.height=e.height||n,this.bottom=e.bottom||o+(e.height||n),this.width=e.width||r,this.lineHeight=void 0!==t?t:e.lineHeight}function A(e,t,n,r){var o=new x(t),l=t.cue,c=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var track=e.track,t=track.textTrackList,n=0,i=0;i<t.length&&t[i]!==track;i++)"showing"===t[i].mode&&n++;return-1*++n}(l),d=[];if(l.snapToLines){var h;
vendor: 5,296 bytes, line 2
2switch(l.vertical){case"":d=["+y","-y"],h="height";break;case"rl":d=["+x","-x"],h="width";break;case"lr":d=["-x","+x"],h="width"}var f=o.lineHeight,m=f*Math.round(c),v=n[h]+f,y=d[0];Math.abs(m)>v&&(m=m<0?-1:1,m*=Math.ceil(v/f)*f),c<0&&(m+=""===l.vertical?n.height:n.width,d=d.reverse()),o.move(y,m)}else{var _=o.lineHeight/n.height*100;switch(l.lineAlign){case"center":c-=_/2;break;case"end":c-=_}switch(l.vertical){case"":t.applyStyles({top:t.formatStyle(c,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(c,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(c,"%")})}d=["+y","-x","+x","-y"],o=new x(t)}var T=function(b,e){for(var t,o=new x(b),l=1,i=0;i<e.length;i++){for(;b.overlapsOppositeAxis(n,e[i])||b.within(n)&&b.overlapsAny(r);)b.move(e[i]);if(b.within(n))return b;var p=b.intersectPercentage(n);l>p&&(t=new x(b),l=p),b=new x(o)}return t||o}(o,d);t.move(T.toCSSCompatValues(n))}function O(){}w.prototype.applyStyles=function(e,div){for(var t in div=div||this.div,e)e.hasOwnProperty(t)&&(div.style[t]=e[t])},w.prototype.formatStyle=function(e,t){return 0===e?0:e+t},I.prototype=o(w.prototype),I.prototype.constructor=I,x.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}},x.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},x.prototype.overlapsAny=function(e){for(var i=0;i<e.length;i++)if(this.overlaps(e[i]))return!0;return!1},x.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},x.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},x.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)},x.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}},x.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,r=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||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},O.StringDecoder=function(){return{decode:function(data){if(!data)return"";if("string"!=typeof data)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(data))}}},O.convertCueToDOMTree=function(e,t){return e&&t?S(e,t):null};O.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(e){for(var i=0;i<e.length;i++)if(e[i].hasBeenReset||!e[i].displayState)return!0;return!1}(t)){var o=[],l=x.getSimpleBoxPosition(r),c={font:Math.round(.05*l.height*100)/100+"px sans-serif"};!function(){for(var n,d,i=0;i<t.length;i++)d=t[i],n=new I(e,d,c),r.appendChild(n.div),A(0,n,l,o),d.displayState=n.div,o.push(x.getSimpleBoxPosition(n))}()}else for(var i=0;i<t.length;i++)r.appendChild(t[i].displayState)},O.Parser=function(e,t,n){n||(n=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},O.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof l))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(data){var e=this;function t(){for(var t=e.buffer,n=0;n<t.length&&"\r"!==t[n]&&"\n"!==t[n];)++n;var line=t.substr(0,n);return"\r"===t[n]&&++n,"\n"===t[n]&&++n,e.buffer=t.substr(n),line}function n(input){input.match(/X-TIMESTAMP-MAP/)?h(input,(function(t,n){if("X-TIMESTAMP-MAP"===t)!function(input){var t=new d;h(input,(function(e,n){switch(e){case"MPEGT":t.integer(e+"S",n);break;case"LOCA":t.set(e+"L",c(n))}}),/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:t.get("MPEGTS"),LOCAL:t.get("LOCAL")})}(n)}),/=/):h(input,(function(t,n){if("Region"===t)!function(input){var t=new d;if(h(input,(function(e,n){switch(e){case"id":t.set(e,n);break;case"width":t.percent(e,n);break;case"lines":t.integer(e,n);break;case"regionanchor":case"viewportanchor":var r=n.split(",");if(2!==r.length)break;var o=new d;if(o.percent("x",r[0]),o.percent("y",r[1]),!o.has("x")||!o.has("y"))break;t.set(e+"X",o.get("x")),t.set(e+"Y",o.get("y"));break;case"scroll":t.alt(e,n,["up"])}}),/=/,/\s/),t.has("id")){var n=new(e.vttjs.VTTRegion||e.window.VTTRegion);n.width=t.get("width",100),n.lines=t.get("lines",3),n.regionAnchorX=t.get("regionanchorX",0),n.regionAnchorY=t.get("regionanchorY",100),n.viewportAnchorX=t.get("viewportanchorX",0),n.viewportAnchorY=t.get("viewportanchorY",100),n.scroll=t.get("scroll",""),e.onregion&&e.onregion(n),e.regi
vendor: 4,855 bytes, line 2
2onList.push({id:t.get("id"),region:n})}}(n)}),/:/)}data&&(e.buffer+=e.decoder.decode(data,{stream:!0}));try{var line;if("INITIAL"===e.state){if(!/\r\n|\n/.test(e.buffer))return this;var r=(line=t()).match(/^WEBVTT([ \t].*)?$/);if(!r||!r[0])throw new l(l.Errors.BadSignature);e.state="HEADER"}for(var o=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(o?o=!1:line=t(),e.state){case"HEADER":/:/.test(line)?n(line):line||(e.state="ID");continue;case"NOTE":line||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(line)){e.state="NOTE";break}if(!line)continue;e.cue=new(e.vttjs.VTTCue||e.window.VTTCue)(0,0,"");try{e.cue.align="center"}catch(t){e.cue.align="middle"}if(e.state="CUE",-1===line.indexOf("--\x3e")){e.cue.id=line;continue}case"CUE":try{f(line,e.cue,e.regionList)}catch(t){e.reportOrThrowError(t),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var m=-1!==line.indexOf("--\x3e");if(!line||m&&(o=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+="\n"),e.cue.text+=line.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":line||(e.state="ID");continue}}}catch(t){e.reportOrThrowError(t),"CUETEXT"===e.state&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state="INITIAL"===e.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new l(l.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=O},1163:function(e,t){var n={"":1,lr:1,rl:1},r={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function o(e){return"string"==typeof e&&(!!r[e.toLowerCase()]&&e.toLowerCase())}function l(e,t,text){this.hasBeenReset=!1;var r="",l=!1,c=e,d=t,h=text,f=null,m="",v=!0,y="auto",_="start",T="auto",S="auto",E=100,k="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(e){r=""+e}},pauseOnExit:{enumerable:!0,get:function(){return l},set:function(e){l=!!e}},startTime:{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");c=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");d=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return h},set:function(e){h=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return f},set:function(e){f=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return m},set:function(e){var t=function(e){return"string"==typeof e&&!!n[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");m=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return v},set:function(e){v=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return y},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");y=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return _},set:function(e){var t=o(e);t?(_=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return T},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");T=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return S},set:function(e){var t=o(e);t?(S=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return E},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");E=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return k},set:function(e){var t=o(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");k=t,this.hasBeenReset=!0}}}),this.displayState=void 0}l.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=l},1164:function(e,t){var n={"":!0,up:!0};function r(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,t=3,o=0,l=100,c=0,d=100,h="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!r(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 l},set:function(e){if(!r(e))throw new Error("RegionAnchorX must be between 0 and 100.");l=e}},regionAnchorX:{enumerable:!0,get:function(){return o}
2,set:function(e){if(!r(e))throw new Error("RegionAnchorY must be between 0 and 100.");o=e}},viewportAnchorY:{enumerable:!0,get:function(){return d},set:function(e){if(!r(e))throw new Error("ViewportAnchorY must be between 0 and 100.");d=e}},viewportAnchorX:{enumerable:!0,get:function(){return c},set:function(e){if(!r(e))throw new Error("ViewportAnchorX must be between 0 and 100.");c=e}},scroll:{enumerable:!0,get:function(){return h},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."):h=t}}})}},1165:function(e,t,n){var r=n(1031),o=n(1166);function l(t,n,c){return o()?(e.exports=l=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=l=function(e,t,n){var a=[null];a.push.apply(a,t);var o=new(Function.bind.apply(e,a));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),l.apply(null,arguments)}e.exports=l,e.exports.default=e.exports,e.exports.__esModule=!0},1166: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.default=e.exports,e.exports.__esModule=!0},1167:function(e,t,n){var r=n(1031);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}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},1168:function(e,t,n){var r,o,l,c,d;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,o=/^([^\/?#]*)([^]*)$/,l=/(?:\/|^)\.(?=\/)/g,c=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,d={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=d.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=d.normalizePath(r.path),d.buildURLFromParts(r)}var l=d.parseURL(t);if(!l)throw new Error("Error trying to parse relative URL.");if(l.scheme)return n.alwaysNormalize?(l.path=d.normalizePath(l.path),d.buildURLFromParts(l)):t;var c=d.parseURL(e);if(!c)throw new Error("Error trying to parse base URL.");if(!c.netLoc&&c.path&&"/"!==c.path[0]){var h=o.exec(c.path);c.netLoc=h[1],c.path=h[2]}c.netLoc&&!c.path&&(c.path="/");var f={scheme:c.scheme,netLoc:l.netLoc,path:null,params:l.params,query:l.query,fragment:l.fragment};if(!l.netLoc&&(f.netLoc=c.netLoc,"/"!==l.path[0]))if(l.path){var m=c.path,v=m.substring(0,m.lastIndexOf("/")+1)+l.path;f.path=d.normalizePath(v)}else f.path=c.path,l.params||(f.params=c.params,l.query||(f.query=c.query));return null===f.path&&(f.path=n.alwaysNormalize?d.normalizePath(l.path):l.path),d.buildURLFromParts(f)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(path){for(path=path.split("").reverse().join("").replace(l,"");path.length!==(path=path.replace(c,"")).length;);return path.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=d},1169:function(e,t,n){"use strict";n.d(t,"i",(function(){return h})),n.d(t,"h",(function(){return f})),n.d(t,"d",(function(){return m})),n.d(t,"f",(function(){return v})),n.d(t,"e",(function(){return y})),n.d(t,"c",(function(){return _})),n.d(t,"g",(function(){return T})),n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return E}));var r=n(952),o=n.n(r),l={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^/},c=["video","audio","text"],d=["Video","Audio","Text"],h=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},f=function(e){void 0===e&&(e="");var t=e.split(","),n=[];return t.forEach((function(e){var t;
2e=e.trim(),c.forEach((function(r){var o=l[r].exec(e.toLowerCase());if(o&&!(o.length<=1)){t=r;var c=e.substring(0,o[1].length),details=e.replace(c,"");n.push({type:c,details:details,mediaType:r})}})),t||n.push({type:e,details:"",mediaType:"unknown"})})),n},m=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var r in n){var o=n[r];if(o.default&&o.playlists)return f(o.playlists[0].attributes.CODECS)}return null},v=function(e){return void 0===e&&(e=""),l.audio.test(e.trim().toLowerCase())},y=function(e){if(e&&"string"==typeof e){var t,n=e.toLowerCase().split(",").map((function(e){return h(e.trim())})),r="video";1===n.length&&v(n[0])?r="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),l.text.test(t.trim().toLowerCase()))&&(r="application");var o="mp4";return n.every((function(e){return l.mp4.test(e)}))?o="mp4":n.every((function(e){return l.webm.test(e)}))?o="webm":n.every((function(e){return l.ogg.test(e)}))&&(o="ogg"),r+"/"+o+';codecs="'+e+'"'}},_=function(e){return void 0===e&&(e=""),o.a.MediaSource&&o.a.MediaSource.isTypeSupported&&o.a.MediaSource.isTypeSupported(y(e))||!1},T=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var i=0;i<d.length;i++){if(l["muxer"+d[i]].test(e))return!0}return!1}))},S="mp4a.40.2",E="avc1.4d400d"},1170:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,o=/^application\/dash\+xml/i,l=function(e){return r.test(e)?"hls":o.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},1171:function(e,t,n){var r=n(1079);t.DOMImplementation=r.DOMImplementation,t.XMLSerializer=r.XMLSerializer,t.DOMParser=n(1172).DOMParser},1172:function(e,t,n){var r=n(1002),o=n(1079),l=n(1173),c=n(1174),d=o.DOMImplementation,h=r.NAMESPACE,f=c.ParseError,m=c.XMLReader;function v(e){this.options=e||{locator:{}}}function y(){this.cdata=!1}function _(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function T(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function S(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 E(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}v.prototype.parseFromString=function(source,e){var t=this.options,n=new m,r=t.domBuilder||new y,o=t.errorHandler,c=t.locator,d=t.xmlns||{},f=/\/x?html?$/.test(e),v=f?l.HTML_ENTITIES:l.XML_ENTITIES;return c&&r.setDocumentLocator(c),n.errorHandler=function(e,t,n){if(!e){if(t instanceof y)return t;e=t}var r={},o=e instanceof Function;function l(t){var l=e[t];!l&&o&&(l=2==e.length?function(n){e(t,n)}:e),r[t]=l&&function(e){l("[xmldom "+t+"]\t"+e+T(n))}||function(){}}return n=n||{},l("warning"),l("error"),l("fatalError"),r}(o,r,c),n.domBuilder=t.domBuilder||r,f&&(d[""]=h.HTML),d.xml=d.xml||h.XML,source&&"string"==typeof source?n.parse(source,d,v):n.errorHandler.error("invalid doc source"),r.doc},y.prototype={startDocument:function(){this.doc=(new d).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var o=this.doc,l=o.createElementNS(e,n||t),c=r.length;E(this,l),this.currentElement=l,this.locator&&_(this.locator,l);for(var i=0;i<c;i++){e=r.getURI(i);var d=r.getValue(i),h=(n=r.getQName(i),o.createAttributeNS(e,n));this.locator&&_(r.getLocator(i),h),h.value=h.nodeValue=d,l.setAttributeNode(h)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,data){var ins=this.doc.createProcessingInstruction(e,data);this.locator&&_(this.locator,ins),E(this,ins)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=S.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&_(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=S.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&_(this.locator,r),E(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var dt=r.createDocumentType(e,t,n);this.locator&&_(this.locator,dt),E(this,dt),this.doc.doctype=dt}},warning:function(e){console.warn("[xmldom warning]\t"+e,T(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,T(this.locator))},fatalError:function(e){throw new f(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){y.prototype[e]=function(){return null}})),t.__DOMHandler=y,t.DOMParser=v,t.DOMImplementation=o.DOMImplementation,t.XMLSerializer
2=o.XMLSerializer},1173:function(e,t,n){var r=n(1002).freeze;t.XML_ENTITIES=r({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=r({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
vendor: 9,905 bytes, line 2
2:"⊄",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},1174:function(e,t,n){var r=n(1002).NAMESPACE,o=/[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]/,l=new RegExp("[\\-\\.0-9"+o.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),c=new RegExp("^"+o.source+l.source+"*(?::"+o.source+l.source+"*)?$");function d(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,d)}function h(){}function f(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function m(source,e,t,n,o,l){function c(e,n,r){t.attributeNames.hasOwnProperty(e)&&l.fatalError("Attribute "+e+" redefined"),t.addValue(e,n,r)}for(var d,p=++e,s=0;;){var h=source.charAt(p);switch(h){case"=":if(1===s)d=source.slice(e,p),s=3;else{if(2!==s)throw new Error("attribute equal must after attrName");s=3}break;case"'":case'"':if(3===s||1===s){if(1===s&&(l.warning('attribute value must after "="'),d=source.slice(e,p)),e=p+1,!((p=source.indexOf(h,e))>0))throw new Error("attribute value no end '"+h+"' match");c(d,f=source.slice(e,p).replace(/&#?\w+;/g,o),e-1),s=5}else{if(4!=s)throw new Error('attribute value must after "="');c(d,f=source.slice(e,p).replace(/&#?\w+;/g,o),e),l.warning('attribute "'+d+'" missed start quot('+h+")!!"),e=p+1,s=5}break;case"/":switch(s){case 0:t.setTagName(source.slice(e,p));case 5:case 6:case 7:s=7,t.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return l.error("unexpected end of input"),0==s&&t.setTagName(source.slice(e,p)),p;case">":switch(s){case 0:t.setTagName(source.slice(e,p));case 5:case 6:case 7:break;case 4:case 1:"/"===(f=source.slice(e,p)).slice(-1)&&(t.closed=!0,f=f.slice(0,-1));case 2:2===s&&(f=d),4==s?(l.warning('attribute "'+f+'" missed quot(")!'),c(d,f.replace(/&#?\w+;/g,o),e)):(r.isHTML(n[""])&&f.match(/^(?:disabled|checked|selected)$/i)||l.warning('attribute "'+f+'" missed value!! "'+f+'" instead!!'),c(f,f,e));break;case 3:throw new Error("attribute value missed!!")}return p;case"€":h=" ";default:if(h<=" ")switch(s){case 0:t.setTagName(source.slice(e,p)),s=6;break;case 1:d=source.slice(e,p),s=2;break;case 4:var f=source.slice(e,p).replace(/&#?\w+;/g,o);l.warning('attribute "'+f+'" missed quot(")!!'),c(d,f,e);case 5:s=6}else switch(s){case 2:t.tagName;r.isHTML(n[""])&&d.match(/^(?:disabled|checked|selected)$/i)||l.warning('attribute "'+d+'" missed value!! "'+d+'" instead2!!'),c(d,d,e),e=p,s=1;break;case 5:l.warning('attribute space is required"'+d+'"!!');case 6:s=1,e=p;break;case 3:s=4,e=p;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}p++}}function v(e,t,n){for(var o=e.tagName,l=null,i=e.length;i--;){var a=e[i],c=a.qName,d=a.value;if((v=c.indexOf(":"))>0)var h=a.prefix=c.slice(0,v),f=c.slice(v+1),m="xmlns"===h&&f;else f=c,h=null,m="xmlns"===c&&"";a.localName=f,!1!==m&&(null==l&&(l={},T(n,n={})),n[m]=l[m]=d,a.uri=r.XMLNS,t.startPrefixMapping(m,d))}for(i=e.length;i--;){(h=(a=e[i]).prefix)&&("xml"===h&&(a.uri=r.XML),"xmlns"!==h&&(a.uri=n[h||""]))}var v;(v=o.indexOf(":"))>0?(h=e.prefix=o.slice(0,v),f=e.localName=o.slice(v+1)):(h=null,f=e.localName=o);var y=e.uri=n[h||""];if(t.startElement(y,f,o,e),!e.closed)return e.currentNSMap=n,e.localNSMap=l,!0;if(t.endElement(y,f,o),l)for(h in l)Object.prototype.hasOwnProperty.call(l,h)&&t.endPrefixMapping(h)}function y(source,e,t,n,r){if(/^(?:script|textarea)$/i.test(t)){var o=source.indexOf("</"+t+">",e),text=source.substring(e+1,o);if(/[&<]/.test(text))return/^script$/i.test(t)?(r.characters(text,0,text.length),o):(text=text.replace(/&#?\w+;/g,n),r.characters(text,0,text.length),o)}return e+1}function _(source,e,t,n){var r=n[t];return null==r&&((r=source.lastIndexOf("</"+t+">"))<e&&(r=source.lastIndexOf("</"+t)),n[t]=r),r<e}function T(source,e){for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}function S(source,e,t,n){if("-"===source.charAt(e+2))return"-"===source.charAt(e+3)?(r=source.indexOf("--\x3e",e+4))>e?(t.comment(source,e+4,r-e-4),r+3):(n.error("Unclosed comment"),-1):-1;if("CDATA["==source.substr(e+3,6)){var r=source.indexOf("]]>",e+9);return t.startCDATA(),t.characters(source,e+9,r-e-9),t.endCDATA(),r+3}var o=function(source,e){var t,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=e,r.exec(source);for(;t=r.exec(source);)if(n.push(t),t[1])return n}(source,e),l=o.length;if(l>1&&/!doctype/i.test(o[0][0])){var c=o[1][0],d=!1,h=!1;l>3&&(/^public$/i.test(o[2][0])?(d=o[3][0],h=l>4&&o[4][0]):/^system$/i.test(o[2][0])&&(h=o[3][0]));var f=o[l-1];return t.startDTD(c,d,h),t.endDTD(),f.index+f[0].length}return-1}function E(source,e,t){var n=source.indexOf("?>",e);if(n){var r=source.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){r[0].length;return t.processingInstruction(r[1],r[2]),n+2}return-1}return-1}function k(){this.attributeNames={}}d.prototype=new Error,d.prototype.name=d.name,h.prototype={parse:function(source,e,t){var n=this.domBuilder;n.startDocument(),T(e,e={}),function(source,e,t,n,o){function l(code){if(code>65535){var e=55296+((code-=65536)>>10),t=56320+(1023&code);return String.fromCharCode(e,t)}return String.fromCharCode(code)}function c(a){var e=a.slice(1,-1);return e in t?t[e]:"#"===e.charAt(0)?l(parseInt(e.substr(1).replace("x","0x"))):(o.error("entity not found:"+a),a)}function h(e){if(e>P){var t=source.substring(P,e).replace(/&#?\w+;/g,c);x&&T(P),n.characters(t,0,e-P),P=e}}function T(p,e){for(;p>=w&&(e=I.exec(source));)C=e.index,w=C+e[0].length,x.lineNumber++;x.columnNumber=p-C+1}var C=0,w=0,I=/.*(?:\r\n?|\n)|.*$/g,x=n.locator,A=[{currentNSMap:e}],O={},P=0;for(;;){try{var L=source.indexOf("<",P);if(L<0){if(!source.substr(P).match(/^\s*$/)){var D=n.doc,text=D.createTextNode(source.substr(P));D.appendChild(text),n.currentElement=text}return}switch(L>P&&h(L),source.charAt(L+1)){case"/":var M=source.indexOf(">",L+3),N=source.substring(L+2,M).replace(/[ \t\n\r]+$/g,""),R=A.pop();M<0?(N=source.substring(L+2).replace(/[\s<].*/,""),o.error("end tag name: "+N+" is not complete:"+R.tagName),M=L+1+N.length):N.match(/\s</)&&(N=N.replace(/[\s<].*/,""),o.error("end tag name: "+N+" maybe not complete"),M=L+1+N.length);var U=R.localNSMap,B=R.tagName==N;if(B||R.tagName&&R.tagName.toLowerCase()==N.toLowerCase()){if(n.endElement(R.uri,R.localName,N),U)for(var j in U)Object.prototype.hasOwnProperty.call(U,j)&&n.endPrefixMapping(j);B||o.fatalError("end tag name: "+N+" is not match the current start tagName:"+R.tagName)}else A.push(R);M++;break;case"?":x&&T(L),M=E(source,L,n);break;case"!":x&&T(L),M=S(source,L,n,o);break;default:x&&T(L);var F=new k,H=A[A.length-1].currentNSMap,V=(M=m(source,L,F,H,c,o),F.length);if(!F.closed&&_(source,M,F.tagName,O)&&(F.closed=!0,t.nbsp||o.warning("unclosed xml attribute")),x&&V){for(var W=f(x,{}),i=0;i<V;i++){var a=F[i];T(a.offset),a.locator=f(x,{})}n.locator=W,v(F,n,H)&&A.push(F),n.locator=x}else v(F,n,H)&&A.push(F);r.isHTML(F.uri)&&!F.closed?M=y(source,M,F.tagName,c,n):M++}}catch(e){if(e instanceof d)throw e;o.error("element parse error: "+e),M=-1}M>P?P=M:h(Math.max(L,P)+1)}}(source,e,t,n,this.errorHandler),n.endDocument()}},k.prototype={setTagName:function(e){if(!c.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!c.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(i){return this[i].localName},getLocator:function(i){return this[i].locator},getQName:function(i){return this[i].qName},getURI:function(i){return this[i].uri},getValue:function(i){return this[i].value}},t.XMLReader=h,t.ParseError=d},1175:function(e,t,n){var r=n(1176).getUint64;e.exports=function(data){var view=new DataView(data.buffer,data.byteOffset,data.byteLength),e={version:data[0],flags:new Uint8Array(data.subarray(1,4)),references:[],referenceId:view.getUint32(4),timescale:view.getUint32(8)},i=12;0===e.version?(e.earliestPresentationTime=view.getUint32(i),e.firstOffset=view.getUint32(i+4),i+=8):(e.earliestPresentationTime=r(data.subarray(i)),e.firstOffset=r(data.subarray(i+8)),i+=16),i+=2;var t=view.getUint16(i);for(i+=2;t>0;i+=12,t--)e.references.push({referenceType:(128&data[i])>>>7,referencedSize:2147483647&view.getUint32(i),subsegmentDuration:view.getUint32(i+4),startsWithSap:!!(128&data[i+8]),sapType:(112&data[i+8])>>>4,sapDeltaTime:268435455&view.getUint32(i+8)});return e}},1176:function(e,t){var n=Math.pow(2,32);e.exports={getUint64:function(e){var t,r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getBigUint64?(t=r.getBigUint64(0))<Number.MAX_SAFE_INTEGER?
2Number(t):t:r.getUint32(0)*n+r.getUint32(4)},MAX_UINT32:n}},1177:function(e,t){var n,r,o,l,c,d,h,f=9e4;n=function(e){return e*f},r=function(e,t){return e*t},o=function(e){return e/f},l=function(e,t){return e/t},c=function(e,t){return n(l(e,t))},d=function(e,t){return r(o(e),t)},h=function(e,t,n){return o(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:f,secondsToVideoTs:n,secondsToAudioTs:r,videoTsToSeconds:o,audioTsToSeconds:l,audioTsToVideoTs:c,videoTsToAudioTs:d,metadataTsToSeconds:h}},1226:function(e,t,n){"use strict";n.d(t,"a",(function(){return P})),n.d(t,"b",(function(){return L}));var r,o=n(963),l=(new Uint8Array([79,112,117,115,72,101,97,100]),function(path){return"string"==typeof path?Object(o.h)(path):path}),c=function(e){e=Object(o.k)(e);for(var t=[],i=0;e.length>i;){var n=e[i],l=0,c=0,d=e[++c];for(c++;128&d;)l=(127&d)<<7,d=e[c],c++;l+=127&d;for(var h=0;h<r.length;h++){var f=r[h],m=f.id,v=f.parser;if(n===m){t.push(v(e.subarray(c,c+l)));break}}i+=l+c}return t};r=[{id:3,parser:function(e){var desc={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&desc.flags&&(desc.dependsOnEsId=e[desc.size]<<8|e[desc.size+1],desc.size+=2),64&desc.flags){var t=e[desc.size];desc.url=Object(o.c)(e.subarray(desc.size+1,desc.size+1+t)),desc.size+=t}return 32&desc.flags&&(desc.ocrEsId=e[desc.size]<<8|e[desc.size+1],desc.size+=2),desc.descriptors=c(e.subarray(desc.size))||[],desc}},{id:4,parser:function(e){return{tag:4,oti:e[0],streamType:e[1],bufferSize:e[2]<<16|e[3]<<8|e[4],maxBitrate:e[5]<<24|e[6]<<16|e[7]<<8|e[8],avgBitrate:e[9]<<24|e[10]<<16|e[11]<<8|e[12],descriptors:c(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var d=function e(t,n,r){void 0===r&&(r=!1),n=function(e){return Array.isArray(e)?e.map((function(p){return l(p)})):[l(e)]}(n),t=Object(o.k)(t);var c=[];if(!n.length)return c;for(var i=0;i<t.length;){var d=(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0,h=t.subarray(i+4,i+8);if(0===d)break;var f=i+d;if(f>t.length){if(r)break;f=t.length}var data=t.subarray(i+8,f);Object(o.a)(h,n[0])&&(1===n.length?c.push(data):c.push.apply(c,e(data,n.slice(1),r))),i=f}return c},h={EBML:Object(o.k)([26,69,223,163]),DocType:Object(o.k)([66,130]),Segment:Object(o.k)([24,83,128,103]),SegmentInfo:Object(o.k)([21,73,169,102]),Tracks:Object(o.k)([22,84,174,107]),Track:Object(o.k)([174]),TrackNumber:Object(o.k)([215]),DefaultDuration:Object(o.k)([35,227,131]),TrackEntry:Object(o.k)([174]),TrackType:Object(o.k)([131]),FlagDefault:Object(o.k)([136]),CodecID:Object(o.k)([134]),CodecPrivate:Object(o.k)([99,162]),VideoTrack:Object(o.k)([224]),AudioTrack:Object(o.k)([225]),Cluster:Object(o.k)([31,67,182,117]),Timestamp:Object(o.k)([231]),TimestampScale:Object(o.k)([42,215,177]),BlockGroup:Object(o.k)([160]),BlockDuration:Object(o.k)([155]),Block:Object(o.k)([161]),SimpleBlock:Object(o.k)([163])},f=[128,64,32,16,8,4,2,1],m=function(e,t,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1);var l=function(e){for(var t=1,i=0;i<f.length&&!(e&f[i]);i++)t++;return t}(e[t]),c=e.subarray(t,t+l);return n&&((c=Array.prototype.slice.call(e,t,t+l))[0]^=f[l-1]),{length:l,value:Object(o.b)(c,{signed:r}),bytes:c}},v=function e(path){return"string"==typeof path?path.match(/.{1,2}/g).map((function(p){return e(p)})):"number"==typeof path?Object(o.f)(path):path},y=function e(t,n,r){if(r>=n.length)return n.length;var l=m(n,r,!1);if(Object(o.a)(t.bytes,l.bytes))return r;var c=m(n,r+l.length);return e(t,n,r+c.length+c.value+l.length)},_=function e(t,n){n=function(e){return Array.isArray(e)?e.map((function(p){return v(p)})):[v(e)]}(n),t=Object(o.k)(t);var r=[];if(!n.length)return r;for(var i=0;i<t.length;){var l=m(t,i,!1),c=m(t,i+l.length),d=i+l.length+c.length;127===c.value&&(c.value=y(l,t,d),c.value!==t.length&&(c.value-=d));var h=d+c.value>t.length?t.length:d+c.value,data=t.subarray(d,h);Object(o.a)(n[0],l.bytes)&&(1===n.length?r.push(data):r=r.concat(e(data,n.slice(1)))),i+=l.length+c.length+data.length}return r},T=n(1080),S=Object(o.k)([0,0,0,1]),E=Object(o.k)([0,0,1]),k=Object(o.k)([0,0,3]),C=function(e){for(var t=[],i=1;i<e.length-2;)Object(o.a)(e.subarray(i,i+3),k)&&(t.push(i+2),i++),i++;if(0===t.length)return e;var n=e.length-t.length,r=new Uint8Array(n),l=0;for(i=0;i<n;l++,i++)l===t[0]&&(l++,t.shift()),r[i]=e[l];return r},w=function(e,t,n,r){void 0===r&&(r=1/0),e=Object(o.k)(e),n=[].concat(n);for(var l,i=0,c=0;i<e.length&&(c<r||l);){var d=void 0;if(Object(o.a)(e.subarray(i),S)?d=4:Object(o.a)(e.subarray(i),E)&&(d=3),d){if(c++,l)return C(e.subarray(l,i));var h=void 0;"h264"===t?h=31&e[i+d]:"h265"===t&&(h=e[i+d]>>1&63),-1!==n.indexOf(h)&&(l=i+d),i+=d+("h264"===t?1:2)}else i++}return e.subarray(0,0)},I={webm:Object(o.k)([119,101,98,109]),matroska:Object(o.k)([109,97,116,114,111,115,107,97]),flac:Object(o.k)([102,76,97,67]),ogg:Object(o.k)([79,103,103,83]),ac3:Object(o.k)([11,119]),riff:Object(o.k)([82,73,70,70]),avi:Object(o.k)([65,86,73]),wav:Object(o.k)([87,65,86,69]),"3gp":Object(o.k)([102,116,121,112,51,103]),mp4:Object(o.k)([102,116,121,112]),fmp4:Object(o.k)([115,116,121,112]),mov:Object(o.k)([102,116,121,112,113,116]),moov:Object(o.k)([109,111,111,118]),moof:Object(o.k)([109,111,111,102])},x={aac:function(e){var t=Object(T.a)(e);return Object(o.a)(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=Object(T.a)(e);return Object(o.a)(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=_(e,[h.EBML,h.DocType])[0];return Object(o.a)(t,I.webm)},mkv:function(e){var t=_(e,[h.EBML,h.DocType])[0];return Object(o.a)(t,I.matroska)},mp4:function(e){return!x["3gp"](e)&&!x.mov(e)&&(!(!Object(o.a)(e,I.mp4,{offset:4})&&!Object(o.a)(e,I.fmp4,{offset:4}))||(!(!Object(o.a)(e,I.moof,{offset:4})&&!Object(o.a)(e,I.moov,{offset:4}))||void 0))},mov:function(e){return Object(o.a)(e,I.mov,{offset:4})},"3gp":function(e){return Object(o.a)(e,I["3gp"],{offset:4})},ac3:function(e){var t=Object(T.a)(e);return Object(o.a)(e,I.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var i=0;i+188<e.length&&i<188;){if(71===e[i]&&71===e[i+188])return!0;
2i+=1}return!1},flac:function(e){var t=Object(T.a)(e);return Object(o.a)(e,I.flac,{offset:t})},ogg:function(e){return Object(o.a)(e,I.ogg)},avi:function(e){return Object(o.a)(e,I.riff)&&Object(o.a)(e,I.avi,{offset:8})},wav:function(e){return Object(o.a)(e,I.riff)&&Object(o.a)(e,I.wav,{offset:8})},h264:function(e){return function(e,t,n){return w(e,"h264",t,n)}(e,7,3).length},h265:function(e){return function(e,t,n){return w(e,"h265",t,n)}(e,[32,33],3).length}},A=Object.keys(x).filter((function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e})).concat(["ts","h264","h265"]);A.forEach((function(e){var t=x[e];x[e]=function(e){return t(Object(o.k)(e))}}));var O=x,P=function(e){e=Object(o.k)(e);for(var i=0;i<A.length;i++){var t=A[i];if(O[t](e))return t}return""},L=function(e){return d(e,["moof"]).length>0}},1231:function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n(1076),o=n.n(r),l=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<n;++i)t[i].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),o=t.length,l=0;l<o;++l)t[l].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(data){e.push(data)}))},e}(),c=n(1030),d=n.n(c),h=n(1075),f=n.n(h),m=n(1078),v=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return o()(t,e),t.prototype.push=function(data){var e;for(this.buffer+=data,e=this.buffer.indexOf("\n");e>-1;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)},t}(l),y=String.fromCharCode(9),_=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},T=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),r={},i=n.length;i--;)""!==n[i]&&((t=/([^=]*)=(.*)/.exec(n[i]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),r[t[0]]=t[1]);return r},S=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}o()(t,e);var n=t.prototype;return n.push=function(line){var e,t,n=this;0!==(line=line.trim()).length&&("#"===line[0]?this.tagMappers.reduce((function(e,t){var n=t(line);return n===line?e:e.concat([n])}),[line]).forEach((function(r){for(var i=0;i<n.customParsers.length;i++)if(n.customParsers[i].call(n,r))return;if(0===r.indexOf("#EXT"))if(r=r.replace("\r",""),e=/^#EXTM3U/.exec(r))n.trigger("data",{type:"tag",tagType:"m3u"});else{if(e=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(r))return t={type:"tag",tagType:"inf"},e[1]&&(t.duration=parseFloat(e[1])),e[2]&&(t.title=e[2]),void n.trigger("data",t);if(e=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(r))return t={type:"tag",tagType:"targetduration"},e[1]&&(t.duration=parseInt(e[1],10)),void n.trigger("data",t);if(e=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(r))return t={type:"tag",tagType:"version"},e[1]&&(t.version=parseInt(e[1],10)),void n.trigger("data",t);if(e=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(r))return t={type:"tag",tagType:"media-sequence"},e[1]&&(t.number=parseInt(e[1],10)),void n.trigger("data",t);if(e=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(r))return t={type:"tag",tagType:"discontinuity-sequence"},e[1]&&(t.number=parseInt(e[1],10)),void n.trigger("data",t);if(e=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(r))return t={type:"tag",tagType:"playlist-type"},e[1]&&(t.playlistType=e[1]),void n.trigger("data",t);if(e=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(r))return t=d()(_(e[1]),{type:"tag",tagType:"byterange"}),void n.trigger("data",t);if(e=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(r))return t={type:"tag",tagType:"allow-cache"},e[1]&&(t.allowed=!/NO/.test(e[1])),void n.trigger("data",t);if(e=/^#EXT-X-MAP:?(.*)$/.exec(r)){if(t={type:"tag",tagType:"map"},e[1]){var o=T(e[1]);o.URI&&(t.uri=o.URI),o.BYTERANGE&&(t.byterange=_(o.BYTERANGE))}n.trigger("data",t)}else if(e=/^#EXT-X-STREAM-INF:?(.*)$/.exec(r)){if(t={type:"tag",tagType:"stream-inf"},e[1]){if(t.attributes=T(e[1]),t.attributes.RESOLUTION){var l=t.attributes.RESOLUTION.split("x"),c={};l[0]&&(c.width=parseInt(l[0],10)),l[1]&&(c.height=parseInt(l[1],10)),t.attributes.RESOLUTION=c}
2t.attributes.BANDWIDTH&&(t.attributes.BANDWIDTH=parseInt(t.attributes.BANDWIDTH,10)),t.attributes["PROGRAM-ID"]&&(t.attributes["PROGRAM-ID"]=parseInt(t.attributes["PROGRAM-ID"],10))}n.trigger("data",t)}else{if(e=/^#EXT-X-MEDIA:?(.*)$/.exec(r))return t={type:"tag",tagType:"media"},e[1]&&(t.attributes=T(e[1])),void n.trigger("data",t);if(e=/^#EXT-X-ENDLIST/.exec(r))n.trigger("data",{type:"tag",tagType:"endlist"});else if(e=/^#EXT-X-DISCONTINUITY/.exec(r))n.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(e=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(r))return t={type:"tag",tagType:"program-date-time"},e[1]&&(t.dateTimeString=e[1],t.dateTimeObject=new Date(e[1])),void n.trigger("data",t);if(e=/^#EXT-X-KEY:?(.*)$/.exec(r))return t={type:"tag",tagType:"key"},e[1]&&(t.attributes=T(e[1]),t.attributes.IV&&("0x"===t.attributes.IV.substring(0,2).toLowerCase()&&(t.attributes.IV=t.attributes.IV.substring(2)),t.attributes.IV=t.attributes.IV.match(/.{8}/g),t.attributes.IV[0]=parseInt(t.attributes.IV[0],16),t.attributes.IV[1]=parseInt(t.attributes.IV[1],16),t.attributes.IV[2]=parseInt(t.attributes.IV[2],16),t.attributes.IV[3]=parseInt(t.attributes.IV[3],16),t.attributes.IV=new Uint32Array(t.attributes.IV))),void n.trigger("data",t);if(e=/^#EXT-X-START:?(.*)$/.exec(r))return t={type:"tag",tagType:"start"},e[1]&&(t.attributes=T(e[1]),t.attributes["TIME-OFFSET"]=parseFloat(t.attributes["TIME-OFFSET"]),t.attributes.PRECISE=/YES/.test(t.attributes.PRECISE)),void n.trigger("data",t);if(e=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(r))return t={type:"tag",tagType:"cue-out-cont"},e[1]?t.data=e[1]:t.data="",void n.trigger("data",t);if(e=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(r))return t={type:"tag",tagType:"cue-out"},e[1]?t.data=e[1]:t.data="",void n.trigger("data",t);if(e=/^#EXT-X-CUE-IN:?(.*)?$/.exec(r))return t={type:"tag",tagType:"cue-in"},e[1]?t.data=e[1]:t.data="",void n.trigger("data",t);if((e=/^#EXT-X-SKIP:(.*)$/.exec(r))&&e[1])return(t={type:"tag",tagType:"skip"}).attributes=T(e[1]),t.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(t.attributes["SKIPPED-SEGMENTS"]=parseInt(t.attributes["SKIPPED-SEGMENTS"],10)),t.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(t.attributes["RECENTLY-REMOVED-DATERANGES"]=t.attributes["RECENTLY-REMOVED-DATERANGES"].split(y)),void n.trigger("data",t);if((e=/^#EXT-X-PART:(.*)$/.exec(r))&&e[1])return(t={type:"tag",tagType:"part"}).attributes=T(e[1]),["DURATION"].forEach((function(e){t.attributes.hasOwnProperty(e)&&(t.attributes[e]=parseFloat(t.attributes[e]))})),["INDEPENDENT","GAP"].forEach((function(e){t.attributes.hasOwnProperty(e)&&(t.attributes[e]=/YES/.test(t.attributes[e]))})),t.attributes.hasOwnProperty("BYTERANGE")&&(t.attributes.byterange=_(t.attributes.BYTERANGE)),void n.trigger("data",t);if((e=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(r))&&e[1])return(t={type:"tag",tagType:"server-control"}).attributes=T(e[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach((function(e){t.attributes.hasOwnProperty(e)&&(t.attributes[e]=parseFloat(t.attributes[e]))})),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach((function(e){t.attributes.hasOwnProperty(e)&&(t.attributes[e]=/YES/.test(t.attributes[e]))})),void n.trigger("data",t);if((e=/^#EXT-X-PART-INF:(.*)$/.exec(r))&&e[1])return(t={type:"tag",tagType:"part-inf"}).attributes=T(e[1]),["PART-TARGET"].forEach((function(e){t.attributes.hasOwnProperty(e)&&(t.attributes[e]=parseFloat(t.attributes[e]))})),void n.trigger("data",t);if((e=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(r))&&e[1])return(t={type:"tag",tagType:"preload-hint"}).attributes=T(e[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach((function(e){if(t.attributes.hasOwnProperty(e)){t.attributes[e]=parseInt(t.attributes[e],10);var n="BYTERANGE-LENGTH"===e?"length":"offset";t.attributes.byterange=t.attributes.byterange||{},t.attributes.byterange[n]=t.attributes[e],delete t.attributes[e]}})),void n.trigger("data",t);if((e=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(r))&&e[1])return(t={type:"tag",tagType:"rendition-report"}).attributes=T(e[1]),["LAST-MSN","LAST-PART"].forEach((function(e){t.attributes.hasOwnProperty(e)&&(t.attributes[e]=parseInt(t.attributes[e],10))})),void n.trigger("data",t);n.trigger("data",{type:"tag",data:r.slice(4)})}}}else n.trigger("data",{type:"comment",text:r.slice(1)})})):this.trigger("data",{type:"uri",uri:line}))},n.addParser=function(e){var t=this,n=e.expression,r=e.customType,o=e.dataParser,l=e.segment;"function"!=typeof o&&(o=function(line){return line}),this.customParsers.push((function(line){if(n.exec(line))return t.trigger("data",{type:"custom",data:o(line),customType:r,segment:l}),!0}))},n.addTagMapper=function(e){var t=e.expression,map=e.map;this.tagMappers.push((function(line){return t.test(line)?map(line):line}))},t}(l),E=function(e){var t={};return Object.keys(e).forEach((function(n){var r;t[(r=n,r.toLowerCase().replace(/-(\w)/g,(function(a){return a[1].toUpperCase()})))]=e[n]})),t},k=function(e){var t=e.serverControl,n=e.targetDuration,r=e.partTargetDuration;if(t){var o="#EXT-X-SERVER-CONTROL",l="holdBack",c="partHoldBack",d=n&&3*n,h=r&&2*r;n&&!t.hasOwnProperty(l)&&(t[l]=d,this.trigger("info",{message:o+" defaulting HOLD-BACK to targetDuration * 3 ("+d+")."})),d&&t[l]<d&&(this.trigger("warn",{message:o+" clamping HOLD-BACK ("+t[l]+") to targetDuration * 3 ("+d+")"}),t[l]=d),r&&!t.hasOwnProperty(c)&&(t[c]=3*r,this.trigger("info",{message:o+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[c]+")."})),r&&t[c]<h&&(this.trigger("warn",{message:o+" clamping PART-HOLD-BACK ("+t[c]+") to partTargetDuration * 2 ("+h+")."}),t[c]=h)}},C=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new v,t.parseStream=new S,t.lineStream.pipe(t.parseStream);var n,r,o=f()(t),l=[],c={},h=!1,y=function(){},_={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},T=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var C=0,w=0;return t.on("end",(function(){c.uri||!c.parts&&!c.preloadHints||(!c.map&&n&&(c.map=n),!c.key&&r&&(c.key=r),c.timeline||"number"!=typeof T||(c.timeline=T),t.manifest.preloadSegment=c)})),t.parseStream.on("data",(function(e){var t,f;({tag:function(){({version:function(){e.version&&(this.manifest.version=e.version)},"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var t={};"length"in e&&(c.byterange=t,t.length=e.length,"offset"in e||(e.offset=C)),"offset"in e&&(c.byterange=t,t.offset=e.offset),C=t.offset+t.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),e.duration>0&&(c.duration=e.duration),0===e.duration&&(c.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=l},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(m.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"}),r={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(r.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else r=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,T=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={}
2,e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange),r&&(n.key=r)},"stream-inf":function(){this.manifest.playlists=l,this.manifest.mediaGroups=this.manifest.mediaGroups||_,e.attributes?(c.attributes||(c.attributes={}),d()(c.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||_,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"]],(f={default:/yes/i.test(e.attributes.DEFAULT)}).default?f.autoselect=!0:f.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(f.language=e.attributes.LANGUAGE),e.attributes.URI&&(f.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(f.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(f.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(f.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=f}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){T+=1,c.discontinuity=!0,this.manifest.discontinuityStarts.push(l.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),c.dateTimeString=e.dateTimeString,c.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,k.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(){c.cueOut=e.data},"cue-out-cont":function(){c.cueOutCont=e.data},"cue-in":function(){c.cueIn=e.data},skip:function(){this.manifest.skip=E(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;h=!0;var n=this.manifest.segments.length,r=E(e.attributes);c.parts=c.parts||[],c.parts.push(r),r.byterange&&(r.byterange.hasOwnProperty("offset")||(r.byterange.offset=w),w=r.byterange.offset+r.byterange.length);var o=c.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+o+" for segment #"+n,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((function(e,i){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+i+" lacks required attribute(s): LAST-PART"})}))},"server-control":function(){var t=this.manifest.serverControl=E(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),k.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=E(e.attributes),r=n.type&&"PART"===n.type;c.preloadHints=c.preloadHints||[],c.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=r?w:0,r&&(w=n.byterange.offset+n.byterange.length)));var o=c.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+o+" for segment #"+t,e.attributes,["TYPE","URI"]),n.type)for(var i=0;i<c.preloadHints.length-1;i++){var l=c.preloadHints[i];l.type&&(l.type===n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+o+" for segment #"+t+" has the same TYPE "+n.type+" as preload hint #"+i}))}},"rendition-report":function(){var t=E(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var n=this.manifest.renditionReports.length-1,r=["LAST-MSN","URI"];h&&r.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+n,e.attributes,r)},"part-inf":function(){this.manifest.partInf=E(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),k.call(this,this.manifest)}}[e.tagType]||y).call(o)}
2,uri:function(){c.uri=e.uri,l.push(c),this.manifest.targetDuration&&!("duration"in c)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),c.duration=this.manifest.targetDuration),r&&(c.key=r),c.timeline=T,n&&(c.map=n),w=0,c={}},comment:function(){},custom:function(){e.segment?(c.custom=c.custom||{},c.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(o)})),t}o()(t,e);var n=t.prototype;return n.warnOnMissingAttributes_=function(e,t,n){var r=[];n.forEach((function(e){t.hasOwnProperty(e)||r.push(e)})),r.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+r.join(", ")})},n.push=function(e){this.lineStream.push(e)},n.end=function(){this.lineStream.push("\n"),this.trigger("end")},n.addParser=function(e){this.parseStream.addParser(e)},n.addTagMapper=function(e){this.parseStream.addTagMapper(e)},t}(l)},1232:function(e,t,n){"use strict";n.d(t,"a",(function(){return L})),n.d(t,"b",(function(){return B})),n.d(t,"c",(function(){return pe})),n.d(t,"d",(function(){return fe}));var r=n(1077),o=n(952),l=n.n(o),c=n(1078),d=n(1171),h=function(e){return!!e&&"object"==typeof e},f=function e(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(t,source){return"object"!=typeof source||Object.keys(source).forEach((function(n){Array.isArray(t[n])&&Array.isArray(source[n])?t[n]=t[n].concat(source[n]):h(t[n])&&h(source[n])?t[n]=e(t[n],source[n]):t[n]=source[n]})),t}),{})},m=function(e){return Object.keys(e).map((function(t){return e[t]}))},v=function(e){return e.reduce((function(e,t){return e.concat(t)}),[])},y=function(e){if(!e.length)return[];for(var t=[],i=0;i<e.length;i++)t.push(e[i]);return t},_=function(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i;return-1},T="INVALID_NUMBER_OF_PERIOD",S="DASH_EMPTY_MANIFEST",E="DASH_INVALID_XML",k="NO_BASE_URL",C="SEGMENT_TIME_UNSPECIFIED",w="UNSUPPORTED_UTC_TIMING_SCHEME",I=function(e){var t=e.baseUrl,n=void 0===t?"":t,o=e.source,source=void 0===o?"":o,c=e.range,d=void 0===c?"":c,h=e.indexRange,f=void 0===h?"":h,m={uri:source,resolvedUri:Object(r.a)(n||"",source)};if(d||f){var v,y=(d||f).split("-"),_=l.a.BigInt?l.a.BigInt(y[0]):parseInt(y[0],10),T=l.a.BigInt?l.a.BigInt(y[1]):parseInt(y[1],10);_<Number.MAX_SAFE_INTEGER&&"bigint"==typeof _&&(_=Number(_)),T<Number.MAX_SAFE_INTEGER&&"bigint"==typeof T&&(T=Number(T)),"bigint"==typeof(v="bigint"==typeof T||"bigint"==typeof _?l.a.BigInt(T)-l.a.BigInt(_)+l.a.BigInt(1):T-_+1)&&v<Number.MAX_SAFE_INTEGER&&(v=Number(v)),m.byterange={length:v,offset:_}}return m},x=function(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},A={static:function(e){var t=e.duration,n=e.timescale,r=void 0===n?1:n,o=e.sourceDuration,l=e.periodDuration,c=x(e.endNumber),d=t/r;return"number"==typeof c?{start:0,end:c}:"number"==typeof l?{start:0,end:l/d}:{start:0,end:o/d}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,r=e.availabilityStartTime,o=e.timescale,l=void 0===o?1:o,c=e.duration,d=e.periodStart,h=void 0===d?0:d,f=e.minimumUpdatePeriod,m=void 0===f?0:f,v=e.timeShiftBufferDepth,y=void 0===v?1/0:v,_=x(e.endNumber),T=(t+n)/1e3,S=r+h,E=T+m-S,k=Math.ceil(E*l/c),C=Math.floor((T-S-y)*l/c),w=Math.floor((T-S)*l/c);return{start:Math.max(0,C),end:"number"==typeof _?_:Math.min(k,w)}}},O=function(e){var t=e.type,n=e.duration,r=e.timescale,o=void 0===r?1:r,l=e.periodDuration,c=e.sourceDuration,d=A[t](e),h=function(e,t){for(var n=[],i=e;i<t;i++)n.push(i);return n}(d.start,d.end).map(function(e){return function(t){var n=e.duration,r=e.timescale,o=void 0===r?1:r,l=e.periodStart,c=e.startNumber;return{number:(void 0===c?1:c)+t,duration:n/o,timeline:l,time:t*n}}}(e));if("static"===t){var f=h.length-1,m="number"==typeof l?l:c;h[f].duration=m-n/o*f}return h},P=function(e){var t=e.baseUrl,n=e.initialization,r=void 0===n?{}:n,o=e.sourceDuration,l=e.indexRange,c=void 0===l?"":l,d=e.periodStart,h=e.presentationTime,f=e.number,m=void 0===f?0:f,v=e.duration;if(!t)throw new Error(k);var y=I({baseUrl:t,source:r.sourceURL,range:r.range}),_=I({baseUrl:t,source:t,indexRange:c});if(_.map=y,v){var T=O(e);T.length&&(_.duration=T[0].duration,_.timeline=T[0].timeline)}
2else o&&(_.duration=o,_.timeline=d);return _.presentationTime=h||d,_.number=m,[_]},L=function(e,t,n){var r,o=e.sidx.map?e.sidx.map:null,c=e.sidx.duration,d=e.timeline||0,h=e.sidx.byterange,f=h.offset+h.length,m=t.timescale,v=t.references.filter((function(e){return 1!==e.referenceType})),y=[],_=e.endList?"static":"dynamic",T=e.sidx.timeline,S=T,E=e.mediaSequence||0;r="bigint"==typeof t.firstOffset?l.a.BigInt(f)+t.firstOffset:f+t.firstOffset;for(var i=0;i<v.length;i++){var k=t.references[i],C=k.referencedSize,w=k.subsegmentDuration,I=void 0;I="bigint"==typeof r?r+l.a.BigInt(C)-l.a.BigInt(1):r+C-1;var x=P({baseUrl:n,timescale:m,timeline:d,periodStart:T,presentationTime:S,number:E,duration:w,sourceDuration:c,indexRange:r+"-"+I,type:_})[0];o&&(x.map=o),y.push(x),r+="bigint"==typeof r?l.a.BigInt(C):C,S+=w/m,E++}return e.segments=y,e},D=["AUDIO","SUBTITLES"],M=function(e){return(t=e,n=function(e){return e.timeline},m(t.reduce((function(e,t){return t.forEach((function(t){e[n(t)]=t})),e}),{}))).sort((function(a,b){return a.timeline>b.timeline?1:-1}));var t,n},N=function(e){var t,n,r=[];return t=e,n=function(e,t,n,label){r=r.concat(e.playlists||[])},D.forEach((function(e){for(var r in t.mediaGroups[e])for(var o in t.mediaGroups[e][r]){var l=t.mediaGroups[e][r][o];n(l,e,r,o)}})),r},R=function(e){var t=e.playlist,n=e.mediaSequence;t.mediaSequence=n,t.segments.forEach((function(e,n){e.number=t.mediaSequence+n}))},U=function(e){var t=e.oldManifest,n=e.newManifest,r=t.playlists.concat(N(t)),o=n.playlists.concat(N(n));return n.timelineStarts=M([t.timelineStarts,n.timelineStarts]),function(e){var t=e.oldPlaylists,n=e.newPlaylists,r=e.timelineStarts;n.forEach((function(e){e.discontinuitySequence=_(r,(function(t){return t.timeline===e.timeline}));var n=function(e,t){for(var i=0;i<e.length;i++)if(e[i].attributes.NAME===t)return e[i];return null}(t,e.attributes.NAME);if(n&&!e.sidx){var o=e.segments[0],l=_(n.segments,(function(e){return Math.abs(e.presentationTime-o.presentationTime)<.016666666666666666}));if(-1===l)return R({playlist:e,mediaSequence:n.mediaSequence+n.segments.length}),e.segments[0].discontinuity=!0,e.discontinuityStarts.unshift(0),void((!n.segments.length&&e.timeline>n.timeline||n.segments.length&&e.timeline>n.segments[n.segments.length-1].timeline)&&e.discontinuitySequence--);n.segments[l].discontinuity&&!o.discontinuity&&(o.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),R({playlist:e,mediaSequence:n.segments[l].number})}}))}({oldPlaylists:r,newPlaylists:o,timelineStarts:n.timelineStarts}),n},B=function(e){return e&&e.uri+"-"+(t=e.byterange,n="bigint"==typeof t.offset||"bigint"==typeof t.length?l.a.BigInt(t.offset)+l.a.BigInt(t.length)-l.a.BigInt(1):t.offset+t.length-1,t.offset+"-"+n);var t,n},j=function(e){return m(e.reduce((function(e,t){var n=t.attributes.id+(t.attributes.lang||"");if(e[n]){var r;if(t.segments)t.segments[0]&&(t.segments[0].discontinuity=!0),(r=e[n].segments).push.apply(r,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(a,e,i){return e[n]&&a.push(i),a}),[])),e}))},F=function(e,t){var n=B(e.sidx),r=n&&t[n]&&t[n].sidx;return r&&L(e,r,e.sidx.resolvedUri),e},H=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var i in e)e[i]=F(e[i],t);return e},V=function(e){var t,n=e.attributes,r=e.segments,o=e.sidx,l=e.discontinuityStarts,c={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:l,timelineStarts:n.timelineStarts,segments:r};return n.contentProtection&&(c.contentProtection=n.contentProtection),o&&(c.sidx=o),c},W=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},z=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},G=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},X=function(e){return e?Object.keys(e).reduce((function(t,label){var n=e[label];return t.concat(n.playlists)}),[]):[]},K=function(e){var t,n=e.dashPlaylists,r=e.locations,o=e.sidxMapping,l=void 0===o?{}:o,c=e.previousManifest;if(!n.length)return{};var d=n[0].attributes,h=d.sourceDuration,f=d.type,m=d.suggestedPresentationDelay,v=d.minimumUpdatePeriod,y=j(n.filter(W)).map(V),T=j(n.filter(z)),S=j(n.filter(G)),E=n.map((function(e){return e.attributes.captionServices}
2)).filter(Boolean),k={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:h,playlists:H(y,l)};v>=0&&(k.minimumUpdatePeriod=1e3*v),r&&(k.locations=r),"dynamic"===f&&(k.suggestedPresentationDelay=m);var C,w,I=0===k.playlists.length,x=T.length?function(e,t,n){var r;void 0===t&&(t={}),void 0===n&&(n=!1);var o=e.reduce((function(a,e){var o=e.attributes.role&&e.attributes.role.value||"",l=e.attributes.lang||"",label=e.attributes.label||"main";if(l&&!e.attributes.label){var c=o?" ("+o+")":"";label=""+e.attributes.lang+c}a[label]||(a[label]={language:l,autoselect:!0,default:"main"===o,playlists:[],uri:""});var d=F(function(e,t){var n,r=e.attributes,o=e.segments,l=e.sidx,c=e.mediaSequence,d=e.discontinuitySequence,h=e.discontinuityStarts,f={attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===r.type,timeline:r.periodStart,resolvedUri:"",targetDuration:r.duration,discontinuitySequence:d,discontinuityStarts:h,timelineStarts:r.timelineStarts,mediaSequence:c,segments:o};return r.contentProtection&&(f.contentProtection=r.contentProtection),l&&(f.sidx=l),t&&(f.attributes.AUDIO="audio",f.attributes.SUBTITLES="subs"),f}(e,n),t);return a[label].playlists.push(d),void 0===r&&"main"===o&&((r=e).default=!0),a}),{});return r||(o[Object.keys(o)[0]].default=!0),o}(T,l,I):null,A=S.length?function(e,t){return void 0===t&&(t={}),e.reduce((function(a,e){var label=e.attributes.lang||"text";return a[label]||(a[label]={language:label,default:!1,autoselect:!1,playlists:[],uri:""}),a[label].playlists.push(F(function(e){var t,n=e.attributes,r=e.segments,o=e.mediaSequence,l=e.discontinuityStarts,c=e.discontinuitySequence;void 0===r&&(r=[{uri:n.baseUrl,timeline:n.periodStart,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var d=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(d.CODECS=n.codecs),{attributes:d,uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,timelineStarts:n.timelineStarts,discontinuityStarts:l,discontinuitySequence:c,mediaSequence:o,segments:r}}(e),t)),a}),{})}(S,l):null,O=y.concat(X(x),X(A)),P=O.map((function(e){return e.timelineStarts}));return k.timelineStarts=M(P),C=O,w=k.timelineStarts,C.forEach((function(e){e.mediaSequence=0,e.discontinuitySequence=_(w,(function(t){return t.timeline===e.timeline})),e.segments&&e.segments.forEach((function(e,t){e.number=t}))})),x&&(k.mediaGroups.AUDIO.audio=x),A&&(k.mediaGroups.SUBTITLES.subs=A),E.length&&(k.mediaGroups["CLOSED-CAPTIONS"].cc=E.reduce((function(e,t){return t?(t.forEach((function(t){var n=t.channel,r=t.language;e[r]={autoselect:!1,default:!1,instreamId:n,language:r},t.hasOwnProperty("aspectRatio")&&(e[r].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[r].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[r]["3D"]=t["3D"])})),e):e}),{})),c?U({oldManifest:c,newManifest:k}):k},Y=function(e,time,t){var n=e.NOW,r=e.clientOffset,o=e.availabilityStartTime,l=e.timescale,c=void 0===l?1:l,d=e.periodStart,h=void 0===d?0:d,f=e.minimumUpdatePeriod,m=(n+r)/1e3+(void 0===f?0:f)-(o+h);return Math.ceil((m*c-time)/t)},Q=function(e,t){for(var n=e.type,r=e.minimumUpdatePeriod,o=void 0===r?0:r,l=e.media,c=void 0===l?"":l,d=e.sourceDuration,h=e.timescale,f=void 0===h?1:h,m=e.startNumber,v=void 0===m?1:m,y=e.periodStart,_=[],time=-1,T=0;T<t.length;T++){var S=t[T],E=S.d,k=S.r||0,C=S.t||0;time<0&&(time=C),C&&C>time&&(time=C);var w=void 0;if(k<0){var I=T+1;w=I===t.length?"dynamic"===n&&o>0&&c.indexOf("$Number$")>0?Y(e,time,E):(d*f-time)/E:(t[I].t-time)/E}else w=k+1;for(var x=v+_.length+w,A=v+_.length;A<x;)_.push({number:A,duration:E/f,time:time,timeline:y}),time+=E,A++}return _},$=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,J=function(e,t){return e.replace($,function(e){return function(t,n,r,o){if("$$"===t)return"$";if(void 0===e[n])return t;var l=""+e[n];return"RepresentationID"===n?l:(o=r?parseInt(o,10):1,l.length>=o?l:""+new Array(o-l.length+1).join("0")+l)}}(t))},Z=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},o=e.initialization,l=void 0===o?{sourceURL:"",range:""}:o,c=I({baseUrl:e.baseUrl,source:J(l.sourceURL,n),range:l.range}),d=function(e,t){return e.duration||t?e.duration?O(e):Q(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]}(e,t);return d.map((function(t){n.Number=t.number,n.Time=t.time;var o=J(e.media||"",n),l=e.timescale||1,d=e.presentationTimeOffset||0,h=e.periodStart+(t.time-d)/l;return{uri:o,timeline:t.timeline,duration:t.duration,resolvedUri:Object(r.a)(e.baseUrl||"",o),map:c,number:t.number,presentationTime:h}}))},ee=function(e,t){var n=e.duration,r=e.segmentUrls,o=void 0===r?[]:r,l=e.periodStart;if(!n&&!t||n&&t)throw new Error(C);var c,d=o.map((function(t){return function(e,t){var n=e.baseUrl,r=e.initialization,o=void 0===r?{}:r,l=I({baseUrl:n,source:o.sourceURL,range:o.range}),c=I({baseUrl:n,source:t.media,range:t.mediaRange});return c.map=l,c}(e,t)}));return n&&(c=O(e)),t&&(c=Q(e,t)),c.map((function(t,n){if(d[n]){var r=d[n],o=e.timescale||1,c=e.presentationTimeOffset||0;return r.timeline=t.timeline,r.duration=t.duration,r.number=t.number,r.presentationTime=l+(t.time-c)/o,r}})).filter((function(e){return e}))},te=function(e){var t,n,r=e.attributes,o=e.segmentInfo;o.template?(n=Z,t=f(r,o.template)):o.base?(n=P,t=f(r,o.base)):o.list&&(n=ee,t=f(r,o.list));var l={attributes:r};if(!n)return l;var c=n(t,o.segmentTimeline);if(t.duration){var d=t,h=d.duration,m=d.timescale,v=void 0===m?1:m;t.duration=h/v}else c.length?t.duration=c.reduce((function(e,t){return Math.max(e,Math.ceil(t.duration))}),0):t.duration=0;return l.attributes=t,l.segments=c,o.base&&t.indexRange&&(l.sidx=c[0],l.segments=[]),l},ie=function(element,e){return y(element.childNodes).filter((function(t){return t.tagName===e}))},ne=function(element){return element.textContent.trim()},re=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),r=n[0],o=n[1],l=n[2],c=n[3],d=n[4],h=n[5];
2return 31536e3*parseFloat(r||0)+2592e3*parseFloat(o||0)+86400*parseFloat(l||0)+3600*parseFloat(c||0)+60*parseFloat(d||0)+parseFloat(h||0)},ae={mediaPresentationDuration:function(e){return re(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 re(e)},suggestedPresentationDelay:function(e){return re(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return re(e)},start:function(e){return re(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},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)?re(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}},se=function(e){return e&&e.attributes?y(e.attributes).reduce((function(a,e){var t=ae[e.name]||ae.DEFAULT;return a[e.name]=t(e.value),a}),{}):{}},oe={"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"},ue=function(e,t){return t.length?v(e.map((function(e){return t.map((function(t){return Object(r.a)(e,ne(t))}))}))):e},le=function(e){var t=ie(e,"SegmentTemplate")[0],n=ie(e,"SegmentList")[0],r=n&&ie(n,"SegmentURL").map((function(s){return f({tag:"SegmentURL"},se(s))})),o=ie(e,"SegmentBase")[0],l=n||t,c=l&&ie(l,"SegmentTimeline")[0],d=n||o||t,h=d&&ie(d,"Initialization")[0],template=t&&se(t);template&&h?template.initialization=h&&se(h):template&&template.initialization&&(template.initialization={sourceURL:template.initialization});var m={template:template,segmentTimeline:c&&ie(c,"S").map((function(s){return se(s)})),list:n&&f(se(n),{segmentUrls:r,initialization:se(h)}),base:o&&f(se(o),{initialization:se(h)})};return Object.keys(m).forEach((function(e){m[e]||delete m[e]})),m},ce=function(e,t,n){return function(r){var o,l=se(r),d=ue(t,ie(r,"BaseURL")),h=ie(r,"Role")[0],m={role:se(h)},y=f(e,l,m),_=ie(r,"Accessibility")[0],T="urn:scte:dash:cc:cea-608:2015"===(o=se(_)).schemeIdUri?("string"!=typeof o.value?[]:o.value.split(";")).map((function(e){var t,n;if(n=e,/^CC\d=/.test(e)){var r=e.split("=");t=r[0],n=r[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:n}})):"urn:scte:dash:cc:cea-708:2015"===o.schemeIdUri?("string"!=typeof o.value?[]:o.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("="),r=n[0],o=n[1],l=void 0===o?"":o;t.channel=r,t.language=e,l.split(",").forEach((function(e){var n=e.split(":"),r=n[0],o=n[1];"lang"===r?t.language=o:"er"===r?t.easyReader=Number(o):"war"===r?t.aspectRatio=Number(o):"3D"===r&&(t["3D"]=Number(o))}))}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})):void 0;T&&(y=f(y,{captionServices:T}));var label=ie(r,"Label")[0];if(label&&label.childNodes.length){var S=label.childNodes[0].nodeValue.trim();y=f(y,{label:S})}var E=ie(r,"ContentProtection").reduce((function(e,t){var n=se(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());var r=oe[n.schemeIdUri];if(r){e[r]={attributes:n};
2var o=ie(t,"cenc:pssh")[0];if(o){var l=ne(o);e[r].pssh=l&&Object(c.a)(l)}}return e}),{});Object.keys(E).length&&(y=f(y,{contentProtection:E}));var k=le(r),C=ie(r,"Representation"),w=f(n,k);return v(C.map(function(e,t,n){return function(r){var o=ie(r,"BaseURL"),l=ue(t,o),c=f(e,se(r)),d=le(r);return l.map((function(e){return{segmentInfo:f(n,d),attributes:f(c,{baseUrl:e})}}))}}(y,d,w)))}},de=function(e,t){return function(n,r){var o=ue(t,ie(n.node,"BaseURL")),l=f(e,{periodStart:n.attributes.start});"number"==typeof n.attributes.duration&&(l.periodDuration=n.attributes.duration);var c=ie(n.node,"AdaptationSet"),d=le(n.node);return v(c.map(ce(l,o,d)))}},he=function(e){if(""===e)throw new Error(S);var t,n,r=new d.DOMParser;try{n=(t=r.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(E);return n},pe=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,o=void 0===r?"":r,l=n.NOW,c=void 0===l?Date.now():l,d=n.clientOffset,h=void 0===d?0:d,f=ie(e,"Period");if(!f.length)throw new Error(T);var m=ie(e,"Location"),y=se(e),_=ue([o],ie(e,"BaseURL"));y.type=y.type||"static",y.sourceDuration=y.mediaPresentationDuration||0,y.NOW=c,y.clientOffset=h,m.length&&(y.locations=m.map(ne));var S=[];return f.forEach((function(e,t){var n=se(e),r=S[t-1];n.start=function(e){var t=e.attributes,n=e.priorPeriodAttributes,r=e.mpdType;return"number"==typeof t.start?t.start:n&&"number"==typeof n.start&&"number"==typeof n.duration?n.start+n.duration:n||"static"!==r?null:0}({attributes:n,priorPeriodAttributes:r?r.attributes:null,mpdType:y.type}),S.push({node:e,attributes:n})})),{locations:y.locations,representationInfo:v(S.map(de(y,_)))}}(he(e),t),r=n.representationInfo.map(te);return K({dashPlaylists:r,locations:n.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})},fe=function(e){return function(e){var t=ie(e,"UTCTiming")[0];if(!t)return null;var n=se(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;default:throw new Error(w)}return n}(he(e))}},952: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(99))},961:function(e,t,n){"use strict";(function(e){for(var r,o=n(952),l=n.n(o),c=n(1074),d=n.n(c),h=n(1030),f=n.n(h),m=n(1156),v=n.n(m),y=n(1075),_=n.n(y),T=n(1076),S=n.n(T),E=n(1157),k=n.n(E),C=n(1158),w=n.n(C),I=n(1161),x=n.n(I),A=n(1165),O=n.n(A),P=n(1167),L=n.n(P),D=n(1077),M=n(1231),N=n(1169),R=n(1170),U=n(963),B=n(1232),j=n(1175),F=n.n(j),H=n(1080),V=n(1226),W=n(1177),z="7.20.3",G={},X=function(e,t){return G[e]=G[e]||[],t&&(G[e]=G[e].concat(t)),G[e]},K=function(e,t){var n=X(e).indexOf(t);return!(n<=-1)&&(G[e]=G[e].slice(),G[e].splice(n,1),!0)},Y={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"]],$=Q[0],i=0;i<Q.length;i++)if(Q[i][1]in d.a){r=Q[i];break}if(r){for(var J=0;J<r.length;J++)Y[$[J]]=r[J];Y.prefixed=r[0]!==$[0]}var Z=[];var ee=function e(t){var n,r="info",o=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];n("log",r,t)};return n=function(e,t){return function(n,r,o){var c=t.levels[r],d=new RegExp("^("+c+")$");if("log"!==n&&o.unshift(n.toUpperCase()+":"),o.unshift(e+":"),Z){Z.push([].concat(o));var h=Z.length-1e3;Z.splice(0,h>0?h:0)}if(l.a.console){var f=l.a.console[n];f||"debug"!==n||(f=l.a.console.info||l.a.console.log),f&&c&&d.test(n)&&f[Array.isArray(o)?"apply":"call"](l.a.
2console,o)}}}(t,o),o.createLogger=function(n){return e(t+": "+n)},o.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},o.level=function(e){if("string"==typeof e){if(!o.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(o.history=function(){return Z?[].concat(Z):[]}).filter=function(e){return(Z||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},o.history.clear=function(){Z&&(Z.length=0)},o.history.disable=function(){null!==Z&&(Z.length=0,Z=null)},o.history.enable=function(){null===Z&&(Z=[])},o.error=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return n("error",r,t)},o.warn=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return n("warn",r,t)},o.debug=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return n("debug",r,t)},o}("VIDEOJS"),te=ee.createLogger,ie=Object.prototype.toString,ne=function(object){return se(object)?Object.keys(object):[]};function re(object,e){ne(object).forEach((function(t){return e(object[t],t)}))}function ae(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign?f.a.apply(void 0,[e].concat(n)):(n.forEach((function(source){source&&re(source,(function(t,n){e[n]=t}))})),e)}function se(e){return!!e&&"object"==typeof e}function oe(e){return se(e)&&"[object Object]"===ie.call(e)&&e.constructor===Object}function ue(e,t){if(!e||!t)return"";if("function"==typeof l.a.getComputedStyle){var n;try{n=l.a.getComputedStyle(e)}catch(e){return""}return n?n.getPropertyValue(t)||n[t]:""}return""}var le,ce=l.a.navigator&&l.a.navigator.userAgent||"",de=/AppleWebKit\/([\d.]+)/i.exec(ce),he=de?parseFloat(de.pop()):null,pe=/iPod/i.test(ce),fe=(le=ce.match(/OS (\d+)_/i))&&le[1]?le[1]:null,me=/Android/i.test(ce),ge=function(){var e=ce.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),ve=me&&ge<5&&he<537,ye=/Firefox/i.test(ce),_e=/Edg/i.test(ce),be=!_e&&(/Chrome/i.test(ce)||/CriOS/i.test(ce)),Te=function(){var e=ce.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Se=function(){var e=/MSIE\s(\d+)\.\d/.exec(ce),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(ce)&&/rv:11.0/.test(ce)&&(t=11),t}(),Ee=/Safari/i.test(ce)&&!be&&!me&&!_e,ke=/Windows/i.test(ce),Ce=Boolean(De()&&("ontouchstart"in l.a||l.a.navigator.maxTouchPoints||l.a.DocumentTouch&&l.a.document instanceof l.a.DocumentTouch)),we=/iPad/i.test(ce)||Ee&&Ce&&!/iPhone/i.test(ce),Ie=/iPhone/i.test(ce)&&!we,xe=Ie||we||pe,Ae=(Ee||xe)&&!be,Oe=Object.freeze({__proto__:null,IS_IPOD:pe,IOS_VERSION:fe,IS_ANDROID:me,ANDROID_VERSION:ge,IS_NATIVE_ANDROID:ve,IS_FIREFOX:ye,IS_EDGE:_e,IS_CHROME:be,CHROME_VERSION:Te,IE_VERSION:Se,IS_SAFARI:Ee,IS_WINDOWS:ke,TOUCH_ENABLED:Ce,IS_IPAD:we,IS_IPHONE:Ie,IS_IOS:xe,IS_ANY_SAFARI:Ae});function Pe(e){return"string"==typeof e&&Boolean(e.trim())}function Le(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function De(){return d.a===l.a.document}function Me(e){return se(e)&&1===e.nodeType}function Ne(){try{return l.a.parent!==l.a.self}catch(e){return!0}}function Re(e){return function(t,n){if(!Pe(t))return d.a[e](null);Pe(n)&&(n=d.a.querySelector(n));var r=Me(n)?n:d.a;return r[e]&&r[e](t)}}function Ue(e,t,n,content){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var r=d.a.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(ee.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?Be(r,n):r[e]===n&&"tabIndex"!==e||(r[e]=n)})),Object.getOwnPropertyNames(n).forEach((function(e){r.setAttribute(e,n[e])})),content&&nt(r,content),r}
2function Be(e,text){return void 0===e.textContent?e.innerText=text:e.textContent=text,e}function je(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Fe(element,e){return Le(e),element.classList?element.classList.contains(e):(t=e,new RegExp("(^|\\s)"+t+"($|\\s)")).test(element.className);var t}function He(element,e){return element.classList?element.classList.add(e):Fe(element,e)||(element.className=(element.className+" "+e).trim()),element}function qe(element,e){return element?(element.classList?element.classList.remove(e):(Le(e),element.className=element.className.split(/\s+/).filter((function(t){return t!==e})).join(" ")),element):(ee.warn("removeClass was called with an element that doesn't exist"),null)}function Ve(element,e,t){var n=Fe(element,e);if("function"==typeof t&&(t=t(element,e)),"boolean"!=typeof t&&(t=!n),t!==n)return t?He(element,e):qe(element,e),element}function We(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var r=t[n];null==r||!1===r?e.removeAttribute(n):e.setAttribute(n,!0===r?"":r)}))}function ze(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var r=e.attributes,i=r.length-1;i>=0;i--){var o=r[i].name,l=r[i].value;"boolean"!=typeof e[o]&&-1===n.indexOf(","+o+",")||(l=null!==l),t[o]=l}return t}function Ge(e,t){return e.getAttribute(t)}function Xe(e,t,n){e.setAttribute(t,n)}function Ke(e,t){e.removeAttribute(t)}function Ye(){d.a.body.focus(),d.a.onselectstart=function(){return!1}}function Qe(){d.a.onselectstart=function(){return!0}}function $e(e){if(e&&e.getBoundingClientRect&&e.parentNode){var rect=e.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==rect[e]&&(t[e]=rect[e])})),t.height||(t.height=parseFloat(ue(e,"height"))),t.width||(t.width=parseFloat(ue(e,"width"))),t}}function Je(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,n=e.offsetHeight,r=0,o=0;e.offsetParent&&e!==d.a[Y.fullscreenElement];)r+=e.offsetLeft,o+=e.offsetTop,e=e.offsetParent;return{left:r,top:o,width:t,height:n}}function Ze(e,t){var n={x:0,y:0};if(xe)for(var r=e;r&&"html"!==r.nodeName.toLowerCase();){var o=ue(r,"transform");
2if(/^matrix/.test(o)){var l=o.slice(7,-1).split(/,\s/).map(Number);n.x+=l[4],n.y+=l[5]}else if(/^matrix3d/.test(o)){var c=o.slice(9,-1).split(/,\s/).map(Number);n.x+=c[12],n.y+=c[13]}r=r.parentNode}var d={},h=Je(t.target),f=Je(e),m=f.width,v=f.height,y=t.offsetY-(f.top-h.top),_=t.offsetX-(f.left-h.left);return t.changedTouches&&(_=t.changedTouches[0].pageX-f.left,y=t.changedTouches[0].pageY+f.top,xe&&(_-=n.x,y-=n.y)),d.y=1-Math.max(0,Math.min(1,y/v)),d.x=Math.max(0,Math.min(1,_/m)),d}function et(e){return se(e)&&3===e.nodeType}function tt(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function it(content){return"function"==typeof content&&(content=content()),(Array.isArray(content)?content:[content]).map((function(e){return"function"==typeof e&&(e=e()),Me(e)||et(e)?e:"string"==typeof e&&/\S/.test(e)?d.a.createTextNode(e):void 0})).filter((function(e){return e}))}function nt(e,content){return it(content).forEach((function(t){return e.appendChild(t)})),e}function at(e,content){return nt(tt(e),content)}function st(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 ot,ut=Re("querySelector"),lt=Re("querySelectorAll"),ct=Object.freeze({__proto__:null,isReal:De,isEl:Me,isInFrame:Ne,createEl:Ue,textContent:Be,prependTo:je,hasClass:Fe,addClass:He,removeClass:qe,toggleClass:Ve,setAttributes:We,getAttributes:ze,getAttribute:Ge,setAttribute:Xe,removeAttribute:Ke,blockTextSelection:Ye,unblockTextSelection:Qe,getBoundingClientRect:$e,findPosition:Je,getPointerPosition:Ze,isTextNode:et,emptyEl:tt,normalizeContent:it,appendContent:nt,insertContent:at,isSingleLeftClick:st,$:ut,$$:lt}),ht=!1,pt=function(){if(!1!==ot.options.autoSetup){var e=Array.prototype.slice.call(d.a.getElementsByTagName("video")),t=Array.prototype.slice.call(d.a.getElementsByTagName("audio")),n=Array.prototype.slice.call(d.a.getElementsByTagName("video-js")),r=e.concat(t,n);if(r&&r.length>0)for(var i=0,o=r.length;i<o;i++){var l=r[i];if(!l||!l.getAttribute){ft(1);break}void 0===l.player&&null!==l.getAttribute("data-setup")&&ot(l)}else ht||ft(1)}};function ft(e,t){De()&&(t&&(ot=t),l.a.setTimeout(pt,e))}function mt(){ht=!0,l.a.removeEventListener("load",mt)}De()&&("complete"===d.a.readyState?mt():l.a.addEventListener("load",mt));var gt,vt=function(e){var style=d.a.createElement("style");return style.className=e,style},yt=function(e,content){e.styleSheet?e.styleSheet.cssText=content:e.textContent=content},_t=3;function bt(){return _t++}l.a.WeakMap||(gt=function(){function e(){this.vdata="vdata"+Math.floor(l.a.performance&&l.a.performance.now()||Date.now()),this.data={}}var t=e.prototype;return t.set=function(e,t){var n=e[this.vdata]||bt();return e[this.vdata]||(e[this.vdata]=n),this.data[n]=t,this},t.get=function(e){var t=e[this.vdata];if(t)return this.data[t];ee("We have no data for this element",e)},t.has=function(e){return e[this.vdata]in this.data},t.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var Tt,St=l.a.WeakMap?new WeakMap:new gt;function Et(e,t){if(St.has(e)){var data=St.get(e);0===data.handlers[t].length&&(delete data.handlers[t],e.removeEventListener?e.removeEventListener(t,data.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,data.dispatcher)),Object.getOwnPropertyNames(data.handlers).length<=0&&(delete data.handlers,delete data.dispatcher,delete data.disabled),0===Object.getOwnPropertyNames(data).length&&St.delete(e)}}function kt(e,t,n,r){n.forEach((function(n){e(t,n,r)}))}function Ct(e){if(e.fixed_)return e;function t(){return!0}function n(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){var r=e||l.a.event;for(var o in e={},r)"layerX"!==o&&"layerY"!==o&&"keyLocation"!==o&&"webkitMovementX"!==o&&"webkitMovementY"!==o&&"path"!==o&&("returnValue"===o&&r.preventDefault||(e[o]=r[o]));if(e.target||(e.target=e.srcElement||d.a),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){r.preventDefault&&r.preventDefault(),e.returnValue=!1,r.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),e.cancelBubble=!0,r.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=n,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=n,null!==e.clientX&&void 0!==e.clientX){var c=d.a.documentElement,body=d.a.body;e.pageX=e.clientX+(c&&c.scrollLeft||body&&body.scrollLeft||0)-(c&&c.clientLeft||body&&body.clientLeft||0),e.pageY=e.clientY+(c&&
2c.scrollTop||body&&body.scrollTop||0)-(c&&c.clientTop||body&&body.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}var wt=["touchstart","touchmove"];function It(e,t,n){if(Array.isArray(t))return kt(It,e,t,n);St.has(e)||St.set(e,{});var data=St.get(e);if(data.handlers||(data.handlers={}),data.handlers[t]||(data.handlers[t]=[]),n.guid||(n.guid=bt()),data.handlers[t].push(n),data.dispatcher||(data.disabled=!1,data.dispatcher=function(t,n){if(!data.disabled){t=Ct(t);var r=data.handlers[t.type];if(r)for(var o=r.slice(0),l=0,c=o.length;l<c&&!t.isImmediatePropagationStopped();l++)try{o[l].call(e,t,n)}catch(e){ee.error(e)}}}),1===data.handlers[t].length)if(e.addEventListener){var r=!1;(function(){if("boolean"!=typeof Tt){Tt=!1;try{var e=Object.defineProperty({},"passive",{get:function(){Tt=!0}});l.a.addEventListener("test",null,e),l.a.removeEventListener("test",null,e)}catch(e){}}return Tt})()&&wt.indexOf(t)>-1&&(r={passive:!0}),e.addEventListener(t,data.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,data.dispatcher)}function xt(e,t,n){if(St.has(e)){var data=St.get(e);if(data.handlers){if(Array.isArray(t))return kt(xt,e,t,n);var r=function(e,t){data.handlers[t]=[],Et(e,t)};if(void 0!==t){var o=data.handlers[t];if(o)if(n){if(n.guid)for(var l=0;l<o.length;l++)o[l].guid===n.guid&&o.splice(l--,1);Et(e,t)}else r(e,t)}else for(var c in data.handlers)Object.prototype.hasOwnProperty.call(data.handlers||{},c)&&r(e,c)}}}function At(e,t,n){var r=St.has(e)?St.get(e):{},o=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=Ct(t),r.dispatcher&&r.dispatcher.call(e,t,n),o&&!t.isPropagationStopped()&&!0===t.bubbles)At.call(null,o,t,n);else if(!o&&!t.defaultPrevented&&t.target&&t.target[t.type]){St.has(t.target)||St.set(t.target,{});var l=St.get(t.target);t.target[t.type]&&(l.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),l.disabled=!1)}return!t.defaultPrevented}function Ot(e,t,n){if(Array.isArray(t))return kt(Ot,e,t,n);var r=function r(){xt(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||bt(),It(e,t,r)}function Pt(e,t,n){var r=function r(){xt(e,t,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||bt(),It(e,t,r)}var Lt,Dt=Object.freeze({__proto__:null,fixEvent:Ct,on:It,off:xt,trigger:At,one:Ot,any:Pt}),Mt=30,Nt=function(e,t,n){t.guid||(t.guid=bt());var r=t.bind(e);return r.guid=n?n+"_"+t.guid:t.guid,r},Rt=function(e,t){var n=l.a.performance.now();return function(){var r=l.a.performance.now();r-n>=t&&(e.apply(void 0,arguments),n=r)}},Ut=function(){};Ut.prototype.allowedEvents_={},Ut.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},It(this,e,t),this.addEventListener=n},Ut.prototype.addEventListener=Ut.prototype.on,Ut.prototype.off=function(e,t){xt(this,e,t)},Ut.prototype.removeEventListener=Ut.prototype.off,Ut.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Ot(this,e,t),this.addEventListener=n},Ut.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Pt(this,e,t),this.addEventListener=n},Ut.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Ct(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),At(this,e)},Ut.prototype.dispatchEvent=Ut.prototype.trigger,Ut.prototype.queueTrigger=function(e){var t=this;Lt||(Lt=new Map);var n=e.type||e,map=Lt.get(this);map||(map=new Map,Lt.set(this,map));var r=map.get(n);map.delete(n),l.a.clearTimeout(r);var o=l.a.setTimeout((function(){0===map.size&&(map=null,Lt.delete(t)),t.trigger(e)}),0);map.set(n,o)};var Bt=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},jt=function(object){return object instanceof Ut||!!object.eventBusEl_&&["on","one","off","trigger"].every((function(e){return"function"==typeof object[e]}))},Ft=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},Ht=function(e,t,n){if(!e||!e.nodeName&&!jt(e))throw new Error("Invalid target for "+Bt(t)+"#"+n+"; must be a DOM node or evented object.")},qt=function(e,t,n){if(!Ft(e))throw new Error("Invalid event type for "+Bt(t)+"#"+n+"; must be a non-empty string or array.")},Vt=function(e,t,n){if("function"!=typeof e)throw new Error("Invalid listener for "+Bt(t)+"#"+n+"; must be a function.")},Wt=function(e,t,n){var r,o,l,c=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return c?(r=e.eventBusEl_,t.length>=3&&t.shift(),o=t[0],l=t[1]):(r=t[0],o=t[1],l=t[2]),Ht(r,e,n),qt(o,e,n),Vt(l,e,n),{isTargetingSelf:c,target:r,type:o,listener:l=Nt(e,l)}},zt=function(e,t,n,r){Ht(e,e,t),e.nodeName?Dt[t](e,n,r):e[t](n,r)},Gt={on:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Wt(this,n,"on"),l=o.isTargetingSelf,c=o.target,d=o.type,h=o.listener;if(zt(c,"on",d,h),!l){var f=function(){return e.off(c,d,h)};f.guid=h.guid;var m=function(){return e.off("dispose",f)};m.guid=h.guid,zt(this,"on","dispose",f),zt(c,"on","dispose",m)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Wt(this,n,"one"),l=o.isTargetingSelf,c=o.target,d=o.type,h=o.listener;if(l)zt(c,"one",d,h);else{var f=function t(){e.off(c,d,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];h.apply(null,r)};f.guid=h.guid,zt(c,"one",d,f)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Wt(this,n,"any"),l=o.isTargetingSelf,c=o.target,d=o.type,h=o.listener;if(l)zt(c,"any",d,h);else{var f=function t(){e.off(c,d,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];h.apply(null,r)};f.guid=h.guid,zt(c,"any",d,f)}},off:function(e,t,n){if(!e||Ft(e))xt(this.eventBusEl_,e,t);else{var r=e,o=t;Ht(r,this,"off"),qt(o,this,"off"),Vt(n,this,"off"),n=Nt(this,n),this.off("dispose",n),r.nodeName?(xt(r,o,n),xt(r,"dispose",n)):jt(r)&&(r.off(o,n),r.off("dispose",n))}},trigger:function(e,t){Ht(this.eventBusEl_,this,"trigger");var n=e&&"string"!=typeof e?e.type:e;if(!Ft(n)){var r="Invalid event type for "+Bt(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(!e)throw new Error(r);(this.log||ee).error(r)}return At(this.eventBusEl_,e,t)}};function Xt(e,t){void 0===t&&(t={});var n=t.eventBusKey;if(n){if(!e[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');e.eventBusEl_=e[n]}else e.eventBusEl_=Ue("span",{className:"vjs-event-bus"});return ae(e,Gt),e.eventedCallbacks&&e.eventedCallbacks.forEach((function(e){e()}
2)),e.on("dispose",(function(){e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&St.has(e)&&St.delete(e)})),l.a.setTimeout((function(){e.eventBusEl_=null}),0)})),e}var Kt={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),re(e,(function(e,r){n.state[r]!==e&&((t=t||{})[r]={from:n.state[r],to:e}),n.state[r]=e})),t&&jt(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Yt(e,t){return ae(e,Kt),e.state=ae({},e.state,t),"function"==typeof e.handleStateChanged&&jt(e)&&e.on("statechanged",e.handleStateChanged),e}var Qt=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},$t=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))};function Jt(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(source){source&&re(source,(function(t,n){oe(t)?(oe(e[n])||(e[n]={}),e[n]=Jt(e[n],t)):e[n]=t}))})),e}var Zt=function(){function e(){this.map_={}}var t=e.prototype;return t.has=function(e){return e in this.map_},t.delete=function(e){var t=this.has(e);return delete this.map_[e],t},t.set=function(e,t){return this.map_[e]=t,this},t.forEach=function(e,t){for(var n in this.map_)e.call(t,this.map_[n],n,this)},e}(),ei=l.a.Map?l.a.Map:Zt,ti=function(){function e(){this.set_={}}var t=e.prototype;return t.has=function(e){return e in this.set_},t.delete=function(e){var t=this.has(e);return delete this.set_[e],t},t.add=function(e){return this.set_[e]=1,this},t.forEach=function(e,t){for(var n in this.set_)e.call(t,n,n,this)},e}(),ii=l.a.Set?l.a.Set:ti,ni=function(){function e(e,t,n){var r=this;if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Jt({},this.options_),t=this.options_=Jt(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var o=e&&e.id&&e.id()||"no_player";this.id_=o+"_component_"+bt()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach((function(e){return r.addClass(e)})),!1!==t.evented&&(Xt(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Yt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new ii,this.setIntervalIds_=new ii,this.rafIds_=new ii,this.namedRafs_=new ei,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var t=e.prototype;return t.dispose=function(e){if(void 0===e&&(e={}),!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var i=this.children_.length-1;i>=0;i--)this.children_[i].dispose&&this.children_[i].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_=Jt(this.options_,e),this.options_):this.options_},t.el=function(){return this.el_},t.createEl=function(e,t,n){return Ue(e,t,n)},t.localize=function(e,t,n){void 0===n&&(n=e);var code=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),o=r&&r[code],l=code&&code.split("-")[0],c=r&&r[l],d=n;return o&&o[e]?d=o[e]:c&&c[e]&&(d=c[e]),t&&(d=d.replace(/\{(\d+)\}/g,(function(e,n){var r=t[n-1],o=r;return void 0===r&&(o=e),o}))),d},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<e;n++)t[n]=arguments[n];t=t.reduce((function(e,t){return e.concat(t)}),[]);for(var r=this,i=0;i<t.length;i++)if(!(r=r.getChild(t[i]))||!r.getChild)return;return r},t.addChild=function(t,n,r){var component,o;if(void 0===n&&(n={}),void 0===r&&(r=this.children_.length),"string"==typeof t){o=$t(t);var l=n.componentClass||o;n.name=o;var c=e.getComponent(l);
2if(!c)throw new Error("Component "+l+" does not exist");if("function"!=typeof c)return null;component=new c(this.player_||this,n)}else component=t;if(component.parentComponent_&&component.parentComponent_.removeChild(component),this.children_.splice(r,0,component),component.parentComponent_=this,"function"==typeof component.id&&(this.childIndex_[component.id()]=component),(o=o||component.name&&$t(component.name()))&&(this.childNameIndex_[o]=component,this.childNameIndex_[Qt(o)]=component),"function"==typeof component.el&&component.el()){var d=null;this.children_[r+1]&&(this.children_[r+1].el_?d=this.children_[r+1].el_:Me(this.children_[r+1])&&(d=this.children_[r+1])),this.contentEl().insertBefore(component.el(),d)}return component},t.removeChild=function(component){if("string"==typeof component&&(component=this.getChild(component)),component&&this.children_){for(var e=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===component){e=!0,this.children_.splice(i,1);break}if(e){component.parentComponent_=null,this.childIndex_[component.id()]=null,this.childNameIndex_[$t(component.name())]=null,this.childNameIndex_[Qt(component.name())]=null;var t=component.el();t&&t.parentNode===this.contentEl()&&this.contentEl().removeChild(component.el())}}},t.initChildren=function(){var t=this,n=this.options_.children;if(n){var r,o=this.options_,l=e.getComponent("Tech");(r=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!r.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var r,o;return"string"==typeof e?o=n[r=e]||t.options_[r]||{}:(r=e.name,o=e),{name:r,opts:o}})).filter((function(t){var n=e.getComponent(t.opts.componentClass||$t(t.name));return n&&!l.isTech(n)})).forEach((function(e){var n=e.name,r=e.opts;if(void 0!==o[n]&&(r=o[n]),!1!==r){!0===r&&(r={}),r.playerOptions=t.options_.playerOptions;var l=t.addChild(n,r);l&&(t[n]=l)}}))}},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 ut(e,t||this.contentEl())},t.$$=function(e,t){return lt(e,t||this.contentEl())},t.hasClass=function(e){return Fe(this.el_,e)},t.addClass=function(e){He(this.el_,e)},t.removeClass=function(e){qe(this.el_,e)},t.toggleClass=function(e,t){Ve(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 Ge(this.el_,e)},t.setAttribute=function(e,t){Xe(this.el_,e,t)},t.removeAttribute=function(e){Ke(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 r=this.el_.style[e],o=r.indexOf("px");return-1!==o?parseInt(r.slice(0,o),10):parseInt(this.el_["offset"+$t(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=ue(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+$t(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_&&(v.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(r){1===r.touches.length&&(n={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=l.a.performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(n){var r=t.touches[0].pageX-n.pageX,o=t.touches[0].pageY-n.pageY;Math.sqrt(r*r+o*o)>10&&(e=!1)}}));var r=function(){e=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){(n=null,!0===e)&&(l.a.performance.now()-t<200&&(r.preventDefault(),this.trigger("tap")))}))},t.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Nt(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,r=this;return e=Nt(this,e),this.clearTimersOnDispose_(),n=l.a.setTimeout((function(){r.setTimeoutIds_.has(n)&&r.setTimeoutIds_.delete(n),e()}),t),this.setTimeoutIds_.add(n),n},t.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),l.a.clearTimeout(e)),e},t.setInterval=function(e,t){e=Nt(this,e),this.clearTimersOnDispose_();var n=l.a.setInterval(e,t);return this.setIntervalIds_.add(n),n},t.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),l.a.clearInterval(e)),e},t.requestAnimationFrame=function(e){var t,n=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Nt(this,e),t=l.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=Nt(this,t);var r=this.requestAnimationFrame((function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}));return this.namedRafs_.set(e,r),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),l.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"]].forEac
2h((function(t){var n=t[0],r=t[1];e[n].forEach((function(t,n){return e[r](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 r,o=e.getComponent("Tech"),l=o&&o.isTech(n),c=e===n||e.prototype.isPrototypeOf(n.prototype);if(l||!c)throw r=l?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+r+".");t=$t(t),e.components_||(e.components_={});var d=e.getComponent("Player");if("Player"===t&&d&&d.players){var h=d.players,f=Object.keys(h);if(h&&f.length>0&&f.map((function(e){return h[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[Qt(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function ri(e,t,n,r){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,r,n.length-1),n[r][t]}function ai(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:ri.bind(null,"start",0,e),end:ri.bind(null,"end",1,e)},l.a.Symbol&&l.a.Symbol.iterator&&(t[l.a.Symbol.iterator]=function(){return(e||[]).values()}),t}function si(e,t){return Array.isArray(e)?ai(e):void 0===e||void 0===t?ai():ai([[e,t]])}function oi(e,t){var n,r,o=0;if(!t)return 0;e&&e.length||(e=si(0,0));for(var i=0;i<e.length;i++)n=e.start(i),(r=e.end(i))>t&&(r=t),o+=r-n;return o/t}function ui(e){if(e instanceof ui)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:se(e)&&("number"==typeof e.code&&(this.code=e.code),ae(this,e)),this.message||(this.message=ui.defaultMessages[this.code]||"")}ni.prototype.supportsRaf_="function"==typeof l.a.requestAnimationFrame&&"function"==typeof l.a.cancelAnimationFrame,ni.registerComponent("Component",ni),ui.prototype.code=0,ui.prototype.message="",ui.prototype.status=null,ui.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],ui.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 ci=0;ci<ui.errorTypes.length;ci++)ui[ui.errorTypes[ci]]=ci,ui.prototype[ui.errorTypes[ci]]=ci;function di(e){return null!=e&&"function"==typeof e.then}function hi(e){di(e)&&e.then(null,(function(e){}))}var pi=function(track){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(e,t,i){return track[t]&&(e[t]=track[t]),e}),{cues:track.cues&&Array.prototype.map.call(track.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},fi=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=pi(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(track){return-1===n.indexOf(track)})).map(pi))},mi=function(e,t){return e.forEach((function(track){var e=t.addRemoteTextTrack(track).track;!track.src&&track.cues&&track.cues.forEach((function(t){return e.addCue(t)}))})),t.textTracks()},gi=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleKeyDown_=function(e){return r.handleKeyDown(e)},r.close_=function(e){return r.close(e)},r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=Ue("div",{className:"vjs-modal-dialog-content"},{role:"document"}),r.descEl_=Ue("p",{className:"vjs-modal-dialog-description vjs-control-text",id:r.el().getAttribute("aria-describedby")}),Be(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}S()(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 desc=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(desc+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),desc},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_.pauseOnOpe
2n&&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 r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,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(content){var e=this.contentEl(),t=e.parentNode,n=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,t.removeChild(e),this.empty(),at(e,content),this.trigger("modalfill"),n?t.insertBefore(e,n):t.appendChild(e);var r=this.getChild("closeButton");r&&t.appendChild(r.el_)},n.empty=function(){this.trigger("beforemodalempty"),tt(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=d.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(),v.a.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(v.a.isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),r=this.el_.querySelector(":focus"),i=0;i<n.length;i++)if(r===n[i]){t=i;break}d.a.activeElement===this.el_&&(t=0),e.shiftKey&&0===t?(n[n.length-1].focus(),e.preventDefault()):e.shiftKey||t!==n.length-1||(n[0].focus(),e.preventDefault())}},n.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(function(e){return(e instanceof l.a.HTMLAnchorElement||e instanceof l.a.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof l.a.HTMLInputElement||e instanceof l.a.HTMLSelectElement||e instanceof l.a.HTMLTextAreaElement||e instanceof l.a.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof l.a.HTMLIFrameElement||e instanceof l.a.HTMLObjectElement||e instanceof l.a.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")}))},t}(ni);gi.prototype.options_={pauseOnOpen:!0,temporary:!0},ni.registerComponent("ModalDialog",gi);var vi=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(_()(n),"length",{get:function(){return this.tracks_.length}});for(var i=0;i<t.length;i++)n.addTrack(t[i]);return n}S()(t,e);var n=t.prototype;return n.addTrack=function(track){var e=this,t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(track)&&(this.tracks_.push(track),this.trigger({track:track,type:"addtrack",target:this})),track.labelchange_=function(){e.trigger({track:track,type:"labelchange",target:e})},jt(track)&&track.addEventListener("labelchange",track.labelchange_)},n.removeTrack=function(e){for(var track,i=0,t=this.length;i<t;i++)if(this[i]===e){(track=this[i]).off&&track.off(),this.tracks_.splice(i,1);break}track&&this.trigger({track:track,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var track=this[i];if(track.id===e){t=track;break}}return t},t}(Ut);for(var yi in vi.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},vi.prototype.allowedEvents_)vi.prototype["on"+yi]=null;var _i=function(e,track){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&track.id!==e[i].id&&(e[i].enabled=!1)},bi=function(e){function t(t){var n;void 0===t&&(t=[]);for(var i=t.length-1;i>=0;i--)if(t[i].enabled){_i(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,n}S()(t,e);var n=t.prototype;return n.addTrack=function(track){var t=this;track.enabled&&_i(this,track),e.prototype.addTrack.call(this,track),track.addEventListener&&(track.enabledChange_=function(){t.changing_||(t.changing_=!0,_i(t,track),t.changing_=!1,t.trigger("change"))},track.addEventListener("enabledchange",track.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(vi),Ti=function(e,track){for(var i=0;i<e.length;i++)Object.keys(e[i]).length&&track.id!==e[i].id&&(e[i].selected=!1)},Si=function(e){function t(t){var n;void 0===t&&(t=[]);for(var i=t.length-1;i>=0;i--)if(t[i].selected){Ti(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(_()(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}S()(t,e);var n=t.prototype;return n.addTrack=function(track){var t=this;track.selected&&Ti(this,track),e.prototype.addTrack.call(this,track),track.addEventListener&&(track.selectedChange_=function(){t.changing_||(t.changing_=!0,Ti(t,track),t.changing_=!1,t.trigger("change"))},track.addEventListener("selectedchange",track.selectedChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(vi),Ei=function(e){function t(){return e.apply(this,arguments)||this}S()(t,e);var n=t.prototype;return n.addTrack=function(track){var t=this;e.prototype.addTrack.call(this,track),this.queueChange_||(this.queueChange_=function(){return t.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return t.trigger("selectedlanguagechange")}),track.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(track.kind)&&track.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(vi),ki=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var i=0,t=e.length;i<t;i++)this.addTrackElement_(e[i])}var t=e.prototype;return t.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}
2),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(track){for(var e,i=0,t=this.trackElements_.length;i<t;i++)if(track===this.trackElements_[i].track){e=this.trackElements_[i];break}return e},t.removeTrackElement_=function(e){for(var i=0,t=this.trackElements_.length;i<t;i++)if(e===this.trackElements_[i]){this.trackElements_[i].track&&"function"==typeof this.trackElements_[i].track.off&&this.trackElements_[i].track.off(),"function"==typeof this.trackElements_[i].off&&this.trackElements_[i].off(),this.trackElements_.splice(i,1);break}},e}(),Ci=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var t=this.length||0,i=0,n=e.length;this.cues_=e,this.length_=e.length;var r=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<n)for(i=t;i<n;i++)r.call(this,i)},t.getCueById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===e){t=r;break}}return t},e}(),wi={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Ii={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},xi={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Ai={disabled:"disabled",hidden:"hidden",showing:"showing"},Oi=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var r={id:t.id||"vjs_track_"+bt(),kind:t.kind||"",language:t.language||""},label=t.label||"",o=function(e){Object.defineProperty(_()(n),e,{get:function(){return r[e]},set:function(){}})};for(var l in r)o(l);return Object.defineProperty(_()(n),"label",{get:function(){return label},set:function(e){e!==label&&(label=e,this.trigger("labelchange"))}}),n}return S()(t,e),t}(Ut),Pi=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],a=d.a.createElement("a");a.href=e;for(var details={},i=0;i<t.length;i++)details[t[i]]=a[t[i]];return"http:"===details.protocol&&(details.host=details.host.replace(/:80$/,"")),"https:"===details.protocol&&(details.host=details.host.replace(/:443$/,"")),details.protocol||(details.protocol=l.a.location.protocol),details.host||(details.host=l.a.location.host),details},Li=function(e){if(!e.match(/^https?:\/\//)){var a=d.a.createElement("a");a.href=e,e=a.href}return e},Di=function(path){if("string"==typeof path){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(path);if(e)return e.pop().toLowerCase()}return""},Mi=function(e,t){void 0===t&&(t=l.a.location);var n=Pi(e);return(":"===n.protocol?t.protocol:n.protocol)+n.host!==t.protocol+t.host},Ni=Object.freeze({__proto__:null,parseUrl:Pi,getAbsoluteURL:Li,getFileExtension:Di,isCrossOrigin:Mi}),Ri=function(e,track){var t=new l.a.WebVTT.Parser(l.a,l.a.vttjs,l.a.WebVTT.StringDecoder()),n=[];t.oncue=function(e){track.addCue(e)},t.onparsingerror=function(e){n.push(e)},t.onflush=function(){track.trigger({type:"loadeddata",target:track})},t.parse(e),n.length>0&&(l.a.console&&l.a.console.groupCollapsed&&l.a.console.groupCollapsed("Text Track parsing errors for "+track.src),n.forEach((function(e){return ee.error(e)})),l.a.console&&l.a.console.groupEnd&&l.a.console.groupEnd()),t.flush()},Ui=function(e,track){var t={uri:e},n=Mi(e);n&&(t.cors=n);var r="use-credentials"===track.tech_.crossOrigin();r&&(t.withCredentials=r),w()(t,Nt(this,(function(e,t,n){if(e)return ee.error(e,t);track.loaded_=!0,"function"!=typeof l.a.WebVTT?track.tech_&&track.tech_.any(["vttjsloaded","vttjserror"],(function(e){if("vttjserror"!==e.type)return Ri(n,track);ee.error("vttjs failed to load, stopping trying to process "+track.src)})):Ri(n,track)})))},Bi=function(e){function t(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var r=Jt(t,{kind:xi[t.kind]||"subtitles",language:t.language||t.srclang||""}),o=Ai[r.mode]||"disabled",l=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(o="hidden"),(n=e.call(this,r)||this).tech_=r.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var c=new Ci(n.cues_),d=new Ci(n.activeCues_),h=!1;n.timeupdateHandler=Nt(_()(n),(function(e){void 0===e&&(e={}),this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,h&&(this.trigger("cuechange"),h=!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"!==o&&n.startTracking(),Object.defineProperties(_()(n),{default:{get:function(){return l},set:function(){}},mode:{get:function(){return o}
2,set:function(e){Ai[e]&&o!==e&&(o=e,this.preload_||"disabled"===o||0!==this.cues.length||Ui(this.src,this),this.stopTracking(),"disabled"!==o&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?c:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return d;for(var e=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;i<n;i++){var r=this.cues[i];(r.startTime<=e&&r.endTime>=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(h=!1,t.length!==this.activeCues_.length)h=!0;else for(var o=0;o<t.length;o++)-1===this.activeCues_.indexOf(t[o])&&(h=!0);return this.activeCues_=t,d.setCues_(this.activeCues_),d},set:function(){}}}),r.src?(n.src=r.src,n.preload_||(n.loaded_=!0),(n.preload_||"subtitles"!==r.kind&&"captions"!==r.kind)&&Ui(n.src,_()(n))):n.loaded_=!0,n}S()(t,e);var n=t.prototype;return n.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)},n.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)},n.addCue=function(e){var t=e;if(l.a.vttjs&&!(e instanceof l.a.vttjs.VTTCue)){for(var n in t=new l.a.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)n in t||(t[n]=e[n]);t.id=e.id,t.originalCue_=e}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},n.removeCue=function(e){for(var i=this.cues_.length;i--;){var t=this.cues_[i];if(t===e||t.originalCue_&&t.originalCue_===e){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break}}},t}(Oi);Bi.prototype.allowedEvents_={cuechange:"cuechange"};var ji=function(e){function t(t){var n;void 0===t&&(t={});var r=Jt(t,{kind:Ii[t.kind]||""});n=e.call(this,r)||this;var o=!1;return Object.defineProperty(_()(n),"enabled",{get:function(){return o},set:function(e){"boolean"==typeof e&&e!==o&&(o=e,this.trigger("enabledchange"))}}),r.enabled&&(n.enabled=r.enabled),n.loaded_=!0,n}return S()(t,e),t}(Oi),Fi=function(e){function t(t){var n;void 0===t&&(t={});var r=Jt(t,{kind:wi[t.kind]||""});n=e.call(this,r)||this;var o=!1;return Object.defineProperty(_()(n),"selected",{get:function(){return o},set:function(e){"boolean"==typeof e&&e!==o&&(o=e,this.trigger("selectedchange"))}}),r.selected&&(n.selected=r.selected),n}return S()(t,e),t}(Oi),Hi=function(e){function t(t){var n,r;void 0===t&&(t={}),n=e.call(this)||this;var track=new Bi(t);return n.kind=track.kind,n.src=track.src,n.srclang=track.language,n.label=track.label,n.default=track.default,Object.defineProperties(_()(n),{readyState:{get:function(){return r}},track:{get:function(){return track}}}),r=0,track.addEventListener("loadeddata",(function(){r=2,n.trigger({type:"load",target:_()(n)})})),n}return S()(t,e),t}(Ut);Hi.prototype.allowedEvents_={load:"load"},Hi.NONE=0,Hi.LOADING=1,Hi.LOADED=2,Hi.ERROR=3;var qi={audio:{ListClass:bi,TrackClass:ji,capitalName:"Audio"},video:{ListClass:Si,TrackClass:Fi,capitalName:"Video"},text:{ListClass:Ei,TrackClass:Bi,capitalName:"Text"}};Object.keys(qi).forEach((function(e){qi[e].getterName=e+"Tracks",qi[e].privateName=e+"Tracks_"}));var Vi={remoteText:{ListClass:Ei,TrackClass:Bi,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:ki,TrackClass:Hi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Wi=f()({},qi,Vi);Vi.names=Object.keys(Vi),qi.names=Object.keys(qi),Wi.names=[].concat(Vi.names).concat(qi.names);var zi=function(e){function t(t,n){var r;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(r=e.call(this,null,t,n)||this).onDurationChange_=function(e){return r.onDurationChange(e)},r.trackProgress_=function(e){return r.trackProgress(e)},r.trackCurrentTime_=function(e){return r.trackCurrentTime(e)},r.stopTrackingCurrentTime_=function(e){return r.stopTrackingCurrentTime(e)},r.disposeSourceHandler_=function(e){return r.disposeSourceHandler(e)}
2,r.queuedHanders_=new Set,r.hasStarted_=!1,r.on("playing",(function(){this.hasStarted_=!0})),r.on("loadstart",(function(){this.hasStarted_=!1})),Wi.names.forEach((function(e){var n=Wi[e];t&&t[n.getterName]&&(r[n.privateName]=t[n.getterName])})),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(track){!1===t["native"+track+"Tracks"]&&(r["featuresNative"+track+"Tracks"]=!1)})),!1===t.nativeCaptions||!1===t.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.preloadTextTracks=!1!==t.preloadTextTracks,r.autoRemoteTextTracks_=new Wi.text.ListClass,r.initTrackListeners(),t.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}S()(t,e);var n=t.prototype;return n.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",(function(){return t.setTimeout((function(){return t.triggerSourceset(e)}),1)})),this.trigger({src:e,type:"sourceset"})},n.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},n.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},n.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Nt(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},n.onDurationChange=function(e){this.duration_=this.duration()},n.buffered=function(){return si(0,0)},n.bufferedPercent=function(){return oi(this.buffered(),this.duration_)},n.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},n.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},n.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},n.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.dispose=function(){this.clearTracks(qi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;
2(e=[].concat(e)).forEach((function(e){for(var n=t[e+"Tracks"]()||[],i=n.length;i--;){var track=n[i];"text"===e&&t.removeRemoteTextTrack(track),n.removeTrack(track)}}))},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],i=e.length;i--;){var track=e[i];this.removeRemoteTextTrack(track)}},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(e){return void 0!==e&&(this.error_=new ui(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?si(0,0):si()},n.play=function(){},n.setScrubbing=function(){},n.scrubbing=function(){},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;qi.names.forEach((function(t){var n=qi[t],r=function(){e.trigger(t+"trackchange")},o=e[n.getterName]();o.addEventListener("removetrack",r),o.addEventListener("addtrack",r),e.on("dispose",(function(){o.removeEventListener("removetrack",r),o.removeEventListener("addtrack",r)}))}))},n.addWebVttScript_=function(){var e=this;if(!l.a.WebVTT)if(d.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&oe(x.a)&&Object.keys(x.a).length>0)return void this.trigger("vttjsloaded");var script=d.a.createElement("script");script.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",script.onload=function(){e.trigger("vttjsloaded")},script.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){script.onload=null,script.onerror=null})),l.a.WebVTT=!0,this.el().parentNode.appendChild(script)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},o=function(e){return t.removeTrack(e.track)};n.on("addtrack",r),n.on("removetrack",o),this.addWebVttScript_();var l=function(){return e.trigger("texttrackchange")},c=function(){l();for(var i=0;i<t.length;i++){var track=t[i];track.removeEventListener("cuechange",l),"showing"===track.mode&&track.addEventListener("cuechange",l)}};c(),t.addEventListener("change",c),t.addEventListener("addtrack",c),t.addEventListener("removetrack",c),this.on("dispose",(function(){n.off("addtrack",r),n.off("removetrack",o),t.removeEventListener("change",c),t.removeEventListener("addtrack",c),t.removeEventListener("removetrack",c);for(var i=0;i<t.length;i++){t[i].removeEventListener("cuechange",l)}}))},n.addTextTrack=function(e,label,t){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,label,n,r){void 0===r&&(r={});var o=e.textTracks();r.kind=t,label&&(r.label=label),n&&(r.language=n),r.tech=e;var track=new Wi.text.TrackClass(r);return o.addTrack(track),track}(this,e,label,t)},n.createRemoteTextTrack=function(e){var track=Jt(e,{tech:this});return new Vi.remoteTextEl.TrackClass(track)},n.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var r=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(ee.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==t&&this.ready((function(){return n.autoRemoteTextTracks_.addTrack(r.track)})),r},n.removeRemoteTextTrack=function(track){var e=this.remoteTextTrackEls().getTrackElementByTrack_(track);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(track),this.autoRemoteTextTracks_.removeTrack(track)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var e=this.options_.Promise||l.a.Promise;if(e)return e.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.requestVideoFrameCallback=function(e){var t=this,n=bt();return!this.isReady_||this.paused()?(this.queuedHanders_.add(n),this.one("playing",(function(){t.queuedHanders_.has(n)&&(t.queuedH
2anders_.delete(n),e())}))):this.requestNamedAnimationFrame(n,e),n},n.cancelVideoFrameCallback=function(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},t.canPlayType=function(){return""},t.canPlaySource=function(e,n){return t.canPlayType(e.type)},t.isTech=function(component){return component.prototype instanceof t||component instanceof t||component===t},t.registerTech=function(e,n){if(t.techs_||(t.techs_={}),!t.isTech(n))throw new Error("Tech "+e+" must be a Tech");if(!t.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!t.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=$t(e),t.techs_[e]=n,t.techs_[Qt(e)]=n,"Tech"!==e&&t.defaultTechOrder_.push(e),n},t.getTech=function(e){if(e)return t.techs_&&t.techs_[e]?t.techs_[e]:(e=$t(e),l.a&&l.a.videojs&&l.a.videojs[e]?(ee.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),l.a.videojs[e]):void 0)},t}(ni);Wi.names.forEach((function(e){var t=Wi[e];zi.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),zi.prototype.featuresVolumeControl=!0,zi.prototype.featuresMuteControl=!0,zi.prototype.featuresFullscreenResize=!1,zi.prototype.featuresPlaybackRate=!1,zi.prototype.featuresProgressEvents=!1,zi.prototype.featuresSourceset=!1,zi.prototype.featuresTimeupdateEvents=!1,zi.prototype.featuresNativeTextTracks=!1,zi.prototype.featuresVideoFrameCallback=!1,zi.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var r=e.sourceHandlers;r||(r=e.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,t)},e.canPlayType=function(t){for(var n,r=e.sourceHandlers||[],i=0;i<r.length;i++)if(n=r[i].canPlayType(t))return n;return""},e.selectSourceHandler=function(source,t){for(var n=e.sourceHandlers||[],i=0;i<n.length;i++)if(n[i].canHandleSource(source,t))return n[i];return null},e.canPlaySource=function(t,n){var r=e.selectSourceHandler(t,n);return r?r.canHandleSource(t,n):""};["seekable","seeking","duration"].forEach((function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})}),e.prototype),e.prototype.setSource=function(source){var t=e.selectSourceHandler(source,this.options_);t||(e.nativeSourceHandler?t=e.nativeSourceHandler:ee.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),t!==e.nativeSourceHandler&&(this.currentSource_=source),this.sourceHandler_=t.handleSource(source,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},ni.registerComponent("Tech",zi),zi.registerTech("Tech",zi),zi.defaultTechOrder_=[];var Gi={},Xi={},Ki={};function Yi(e,t,n){e.setTimeout((function(){return tn(t,Gi[t.type],n,e)}),1)}function Qi(e,t,n,r){void 0===r&&(r=null);var o="call"+$t(n),l=e.reduce(en(o),r),c=l===Ki,d=c?null:t[n](l);return function(e,t,n,r){for(var i=e.length-1;i>=0;i--){var o=e[i];o[t]&&o[t](r,n)}}(e,n,d,c),d}var $i={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Ji={setCurrentTime:1,setMuted:1,setVolume:1},Zi={play:1,pause:1};function en(e){return function(t,n){return t===Ki?Ki:n[e]?n[e](t):t}}function tn(e,t,n,r,o,l){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===o&&(o=[]),void 0===l&&(l=!1);var c=t,d=c[0],h=c.slice(1);if("string"==typeof d)tn(e,Gi[d],n,r,o,l);else if(d){var f=function(e,t){var n=Xi[e.id()],r=null;if(null==n)return r=t(e),Xi[e.id()]=[[t,r]],r;for(var i=0;i<n.length;i++){var o=n[i],l=o[0],c=o[1];l===t&&(r=c)}return null===r&&(r=t(e),n.push([t,r])),r}(r,d);if(!f.setSource)return o.push(f),tn(e,h,n,r,o,l);f.setSource(ae({},e),(function(t,c){if(t)return tn(e,h,n,r,o,l);o.push(f),tn(c,e.type===c.type?h:Gi[c.type],n,r,o,l)}))}else h.length?tn(e,h,n,r,o,l):l?n(e,o):tn(e,Gi["*"],n,r,o,!0)}var nn={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/d
2ash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},rn=function(e){void 0===e&&(e="");var t=Di(e);return nn[t.toLowerCase()]||""},an=function e(t){if(Array.isArray(t)){var n=[];t.forEach((function(t){t=e(t),Array.isArray(t)?n=n.concat(t):se(t)&&n.push(t)})),t=n}else t="string"==typeof t&&t.trim()?[sn({src:t})]:se(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[sn(t)]:[];return t};function sn(e){if(!e.type){var t=rn(e.src);t&&(e.type=t)}return e}var on=function(e){function t(t,n,r){var o,l=Jt({createEl:!1},n);if(o=e.call(this,t,l,r)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var i=0,c=n.playerOptions.techOrder;i<c.length;i++){var d=$t(c[i]),h=zi.getTech(d);if(d||(h=ni.getComponent(d)),h&&h.isSupported()){t.loadTech_(d);break}}return o}return S()(t,e),t}(ni);ni.registerComponent("MediaLoader",on);var un=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).options_.controlText&&r.controlText(r.options_.controlText),r.handleMouseOver_=function(e){return r.handleMouseOver(e)},r.handleMouseOut_=function(e){return r.handleMouseOut(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.emitTapEvents(),r.enable(),r}S()(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={}),t=ae({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&ee.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=ae({role:"button"},n),this.tabIndex_=t.tabIndex;var r=Ue(e,t,n);return r.appendChild(Ue("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=Ue("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(text,e){if(void 0===e&&(e=this.el()),void 0===text)return this.controlText_||"Need Text";var t=this.localize(text);this.controlText_=text,Be(this.controlTextEl_,t),this.nonIconControl||this.player_.options_.noUITitleAttributes||e.setAttribute("title",t)},n.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},n.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))},n.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},n.handleLanguagechange=function(){this.controlText(this.controlText_)},n.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},n.handleKeyDown=function(t){v.a.isEventKey(t,"Space")||v.a.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(ni);ni.registerComponent("ClickableComponent",un);var ln=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update(),r.update_=function(e){return r.update(e)},t.on("posterchange",r.update_),r}S()(t,e);var n=t.prototype;return n.dispose=function(){this.player().off("posterchange",this.update_),e.prototype.dispose.call(this)},n.createEl=function(){return Ue("div",{className:"vjs-poster",tabIndex:-1})},n.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},n.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},n.handleClick=function(e){if(this.player_.controls()){var t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(Se||_e)&&t||this.player_.tech(!0).focus(),this.player_.paused()?hi(this.player_.play()):this.player_.pause()}},t}(un);ni.registerComponent("PosterImage",ln);var cn={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',
2script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function dn(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 hn(e,style,t){try{e.style[style]=t}catch(e){return}}var pn=function(e){function t(t,n,r){var o;o=e.call(this,t,n,r)||this;var c=function(e){return o.updateDisplay(e)};return t.on("loadstart",(function(e){return o.toggleDisplay(e)})),t.on("texttrackchange",c),t.on("loadedmetadata",(function(e){return o.preselectTrack(e)})),t.ready(Nt(_()(o),(function(){if(t.tech_&&t.tech_.featuresNativeTextTracks)this.hide();else{t.on("fullscreenchange",c),t.on("playerresize",c),l.a.addEventListener("orientationchange",c),t.on("dispose",(function(){return l.a.removeEventListener("orientationchange",c)}));for(var e=this.options_.playerOptions.tracks||[],i=0;i<e.length;i++)this.player_.addRemoteTextTrack(e[i],!0);this.preselectTrack()}}))),o}S()(t,e);var n=t.prototype;return n.preselectTrack=function(){for(var e,t,n,r={captions:1,subtitles:1},o=this.player_.textTracks(),l=this.player_.cache_.selectedLanguage,i=0;i<o.length;i++){var track=o[i];l&&l.enabled&&l.language&&l.language===track.language&&track.kind in r?track.kind===l.kind?n=track:n||(n=track):l&&!l.enabled?(n=null,e=null,t=null):track.default&&("descriptions"!==track.kind||e?track.kind in r&&!t&&(t=track):e=track)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof l.a.WebVTT&&l.a.WebVTT.processCues(l.a,[],this.el_)},n.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],r=0;r<e.length;++r){var track=e[r];"showing"===track.mode&&n.push(track)}this.updateForTrack(n)}else{for(var o=null,l=null,i=e.length;i--;){var c=e[i];"showing"===c.mode&&("descriptions"===c.kind?o=c:l=c)}l?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(l)):o&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(o))}},n.updateDisplayState=function(track){for(var e=this.player_.textTrackSettings.getValues(),t=track.activeCues,i=t.length;i--;){var n=t[i];if(n){var r=n.displayState;if(e.color&&(r.firstChild.style.color=e.color),e.textOpacity&&hn(r.firstChild,"color",dn(e.color||"#fff",e.textOpacity)),e.backgroundColor&&(r.firstChild.style.backgroundColor=e.backgroundColor),e.backgroundOpacity&&hn(r.firstChild,"backgroundColor",dn(e.backgroundColor||"#000",e.backgroundOpacity)),e.windowColor&&(e.windowOpacity?hn(r,"backgroundColor",dn(e.windowColor,e.windowOpacity)):r.style.backgroundColor=e.windowColor),e.edgeStyle&&("dropshadow"===e.edgeStyle?r.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===e.edgeStyle?r.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===e.edgeStyle?r.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===e.edgeStyle&&(r.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),e.fontPercent&&1!==e.fontPercent){var o=l.a.parseFloat(r.style.fontSize);r.style.fontSize=o*e.fontPercent+"px",r.style.height="auto",r.style.top="auto"}e.fontFamily&&"default"!==e.fontFamily&&("small-caps"===e.fontFamily?r.firstChild.style.fontVariant="small-caps":r.firstChild.style.fontFamily=cn[e.fontFamily])}}},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof l.a.WebVTT&&!e.every((function(track){return!track.activeCues}))){for(var t=[],i=0;i<e.length;++i)for(var track=e[i],n=0;n<track.activeCues.length;++n)t.push(track.activeCues[n]);l.a.WebVTT.processCues(l.a,t,this.el_);for(var r=0;r<e.length;++r){for(var o=e[r],c=0;c<o.activeCues.length;++c){var d=o.activeCues[c].displayState;He(d,"vjs-text-track-cue"),He(d,"vjs-text-track-cue-"+(o.language?o.language:r)),o.language&&Xe(d,"lang",o.language)}this.player_.textTrackSettings&&this.updateDisplayState(o)}}},t}(ni);ni.registerComponent("TextTrackDisplay",pn);var fn=function(e){function t(){return e.apply(this,arguments)||this}return S()(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"
2Video Player"),r=Ue("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[n])}),o=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return o.appendChild(r),o},t}(ni);ni.registerComponent("LoadingSpinner",fn);var mn=function(e){function t(){return e.apply(this,arguments)||this}S()(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r=Ue("button",t=ae({className:this.buildCSSClass()},t),n=ae({type:"button"},n));return r.appendChild(Ue("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(r),r},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return ee.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),ni.prototype.addChild.call(this,e,t)},n.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},n.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},n.handleKeyDown=function(t){v.a.isEventKey(t,"Space")||v.a.isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(un);ni.registerComponent("Button",mn);var gn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).mouseused_=!1,r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r}S()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-big-play-button"},n.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var n=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return hi(t),void(!this.player_.tech(!0)||(Se||_e)&&n||this.player_.tech(!0).focus())}var r=this.player_.getChild("controlBar"),o=r&&r.getChild("playToggle");if(o){var l=function(){return o.focus()};di(t)?t.then(l,(function(){})):this.setTimeout(l,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}(mn);gn.prototype.controlText_="Play Video",ni.registerComponent("BigPlayButton",gn);var vn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).controlText(n&&n.controlText||r.localize("Close")),r}S()(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){v.a.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(mn);ni.registerComponent("CloseButton",vn);var yn=function(e){function t(t,n){var r;return void 0===n&&(n={}),r=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,r.on(t,"play",(function(e){return r.handlePlay(e)})),r.on(t,"pause",(function(e){return r.handlePause(e)})),n.replay&&r.on(t,"ended",(function(e){return r.handleEnded(e)})),r}S()(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()?hi(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}(mn);yn.prototype.controlText_="Play",ni.registerComponent("PlayToggle",yn);var _n=function(e,t){e=e<0?0:e;var s=Math.floor(e%60),n=Math.floor(e/60%60),r=Math.floor(e/3600),o=Math.floor(t/60%60),l=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=n=s="-"),(r=r>0||l>0?r+":":"")+(n=((r||o>=10)&&n<10?"0"+n:n)+":")+(s=s<10?"0"+s:s)},bn=_n;function Tn(e,t){return void 0===t&&(t=e),bn(e,t)}var Sn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["timeupdate","ended"],(function(e){return r.updateContent(e)})),r.updateTextNode_(),r}S()(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"}),span=Ue("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return n.appendChild(span),this.contentEl_=Ue("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(time){var e=this;void 0===time&&(time=0),time=Tn(time),this.formattedTime_!==time&&(this.formattedTime_=time,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(e.contentEl_){var t=e.textNode_;t&&e.contentEl_.firstChild!==t&&(t=null,ee.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),e.textNode_=d.a.createTextNode(e.formattedTime_),e.textNode_&&(t?e.contentEl_.replaceChild(e.textNode_,t):e.contentEl_.appendChild(e.textNode_))}})))},n.updateContent=function(e){},t}(ni);Sn.prototype.labelText_="Time",Sn.prototype.controlText_="Time",ni.registerComponent("TimeDisplay",Sn);var En=function(e){function t(){return e.apply(this,arguments)||this}S()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var time;time=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(time)},t}(Sn);En.prototype.labelText_="Current Time",En.prototype.controlText_="Current Time",ni.registerComponent("CurrentTimeDisplay",En);var kn=function(e){function t(t,n){var r,o=function(e){return r.updateContent(e)};return(r=e.call(this,t,n)||this).on(t,"durationchange",o),r.on(t,"loadstart",o),r.on(t,"loadedmetadata",o),r}S()(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}(Sn);kn.prototype.labelText_="Duration",kn.prototype.controlText_="Duration",ni.registerComponent("DurationDisplay",kn);var Cn=function(e){function t(){return e.apply(this,arguments)||this}return S()(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),div=e.prototype.createEl.call(this,"div"),span=e.prototype.createEl.call(this,"span",{textContent:"/"});return div.appendChild(span),t.appendChild(div),t},t}(ni);ni.registerComponent("TimeDivider",Cn);var wn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"durationchange",(function(e){return r.updateContent(e)})),r}S()(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(Ue("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){var time;"number"==typeof this.player_.duration()&&(time=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(time))},t}(Sn);wn.prototype.labelText_="Remaining Time",wn.prototype.controlText_="Remaining Time",ni.registerComponent("RemainingTimeDisplay",wn);var In=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateShowing(),r.on(r.player(),"durationchange",(function(e){return r.updateShowing(e)})),r}S()(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_=Ue("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Ue("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(d.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}(ni);ni.registerComponent("LiveDisplay",In);var xn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).updateLiveEdgeStatus(),r.player_.liveTracker&&(r.updateLiveEdgeStatusHandler_=function(e){return r.updateLiveEdgeStatus(e)},r.on(r.player_.liveTracker,"liveedgechange",r.updateLiveEdgeStatusHandler_)),r}S()(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_=Ue("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}(mn);xn.prototype.controlText_="Seek to live, currently playing live",ni.registerComponent("SeekToLive",xn);var An=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},On=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseDown_=function(e){return r.handleMouseDown(e)},r.handleMouseUp_=function(e){return r.handleMouseUp(e)},r.handleKeyDown_=function(e){return r.handleKeyDown(e)},r.handleClick_=function(e){return r.handleClick(e)},r.handleMouseMove_=function(e){return r.handleMouseMove(e)},r.update_=function(e){return r.update(e)},r.bar=r.getChild(r.options_.barName),r.vertical(!!r.options_.vertical),r.enable(),r}S()(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,r){return void 0===n&&(n={}),void 0===r&&(r={}),n.className=n.className+" vjs-slider",n=ae({tabIndex:0},n),r=ae({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),e.prototype.createEl.call(this,t,n,r)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||be||e.preventDefault(),Ye(),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;Qe(),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 progress=this.getProgress();return progress===this.progress_||(this.progress_=progress,this.requestNamedAnimationFrame("Slider#update",(function(){var t=e.vertical()?"height":"width";e.bar.el().style[t]=(100*progress).toFixed(2)+"%"}))),progress}},n.getProgress=function(){return Number(An(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=Ze(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){v.a.isEventKey(t,"Left")||v.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):v.a.isEventKey(t,"Right")||v.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}(ni);ni.registerComponent("Slider",On);var Pn=function(time,e){return An(time/e*100,0,100).toFixed(2)+"%"},Ln=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).partEls_=[],r.on(t,"progress",(function(e){return r.update(e)})),r}S()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=Ue("span",{className:"vjs-control-text"}),r=Ue("span",{textContent:this.localize("Loaded")}),o=d.a.createTextNode(": ");return this.percentageEl_=Ue("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(r),n.appendChild(o),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(),r=e&&e.isLive()?e.seekableEnd():t.player_.duration(),o=t.player_.bufferedEnd(),l=t.partEls_,c=Pn(o,r);t.percent_!==c&&(t.el_.style.width=c,Be(t.percentageEl_,c),t.percent_=c);for(var i=0;i<n.length;i++){var d=n.start(i),h=n.end(i),f=l[i];f||(f=t.el_.appendChild(Ue()),l[i]=f),f.dataset.start===d&&f.dataset.end===h||(f.dataset.start=d,f.dataset.end=h,f.style.left=Pn(d,o),f.style.width=Pn(h-d,o))}for(var m=l.length;m>n.length;m--)t.el_.removeChild(l[m-1]);l.length=n.length}))},t}(ni);ni.registerComponent("LoadProgressBar",Ln);var Dn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Rt(Nt(_()(r),r.update),Mt),r}S()(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,content){var n=Je(this.el_),r=$e(this.player_.el()),o=e.width*t;if(r&&n){var l=e.left-r.left+o,c=e.width-o+(r.right-e.right),d=n.width/2;l<d?d+=d-l:c<d&&(d=c),d<0?d=0:d>n.width&&(d=n.width),d=Math.round(d),this.el_.style.right="-"+d+"px",this.write(content)}},n.write=function(content){Be(this.el_,content)},n.updateTime=function(e,t,time,n){var r=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var content,o=r.player_.duration();if(r.player_.liveTracker&&r.player_.liveTracker.isLive()){var l=r.player_.liveTracker.liveWindow(),c=l-t*l;content=(c<1?"":"-")+Tn(c,l)}else content=Tn(time,o);r.update(e,t,content),n&&n()}))},t}(ni);ni.registerComponent("TimeTooltip",Dn);var Mn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Rt(Nt(_()(r),r.update),Mt),r}S()(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.
2getChild("timeTooltip");if(n){var time=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,time)}},t}(ni);Mn.prototype.options_={children:[]},xe||me||Mn.prototype.options_.children.push("timeTooltip"),ni.registerComponent("PlayProgressBar",Mn);var Nn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Rt(Nt(_()(r),r.update),Mt),r}S()(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,time=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,time,(function(){n.el_.style.left=e.width*t+"px"}))},t}(ni);Nn.prototype.options_={children:["timeTooltip"]},ni.registerComponent("MouseTimeDisplay",Nn);var Rn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).setEventHandlers_(),r}S()(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update_=Nt(this,this.update),this.update=Rt(this.update_,Mt),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 d.a&&"visibilityState"in d.a&&this.on(d.a,"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){"hidden"===d.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,Mt))},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"!==d.a.visibilityState){var r=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,o=n.player_.duration();t&&t.isLive()&&(o=n.player_.liveTracker.liveCurrentTime()),n.percent_!==r&&(n.el_.setAttribute("aria-valuenow",(100*r).toFixed(2)),n.percent_=r),n.currentTime_===e&&n.duration_===o||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[Tn(e,o),Tn(o,o)],"{1} of {2}")),n.currentTime_=e,n.duration_=o),n.bar&&n.bar.update($e(n.el()),n.getProgress())})),r}},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){st(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),st(e)){var n;t||this.player_.scrubbing()||this.player_.scrubbing(!0);var r=this.calculateDistance(e),o=this.player_.liveTracker;if(o&&o.isLive()){if(r>=.99)return void o.seekToLiveEdge();var l=o.seekableStart(),c=o.liveCurrentTime();if((n=l+r*o.liveWindow())>=c&&(n=c),n<=l&&(n=l+.1),n===1/0)return}else(n=r*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?hi(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(v.a.isEventKey(t,"Space")||v.a.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(v.a.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(v.a.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive
2()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(v()(t))){t.preventDefault(),t.stopPropagation();var r=10*(v.a.codes[v()(t)]-v.a.codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*r):this.userSeek_(this.player_.duration()*r)}else v.a.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):v.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 d.a&&"visibilityState"in d.a&&this.off(d.a,"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(On);Rn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},xe||me||Rn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),ni.registerComponent("SeekBar",Rn);var Un=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handleMouseMove=Rt(Nt(_()(r),r.handleMouseMove),Mt),r.throttledHandleMouseSeek=Rt(Nt(_()(r),r.handleMouseSeek),Mt),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.handleMouseDownHandler_=function(e){return r.handleMouseDown(e)},r.enable(),r}S()(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"),r=t.getChild("mouseTimeDisplay");if(n||r){var o=t.el(),l=Je(o),c=Ze(o,e).x;c=An(c,0,1),r&&r.update(l,c),n&&n.update(l,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_}
2,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&&hi(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}(ni);Un.prototype.options_={children:["seekBar"]},ni.registerComponent("ProgressControl",Un);var Bn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],(function(e){return r.handlePictureInPictureChange(e)})),r.on(t,["disablepictureinpicturechanged","loadedmetadata"],(function(e){return r.handlePictureInPictureEnabledChange(e)})),r.on(t,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(function(){"audio"===t.currentType().substring(0,5)||t.audioPosterMode()||t.audioOnlyMode()?(t.isInPictureInPicture()&&t.exitPictureInPicture(),r.hide()):r.show()})),r.disable(),r}S()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){d.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}(mn);Bn.prototype.controlText_="Picture-in-Picture",ni.registerComponent("PictureInPictureToggle",Bn);var jn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"fullscreenchange",(function(e){return r.handleFullscreenChange(e)})),!1===d.a[t.fsApi_.fullscreenEnabled]&&r.disable(),r}S()(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}(mn);jn.prototype.controlText_="Fullscreen",ni.registerComponent("FullscreenToggle",jn);var Fn=function(e){function t(){return e.apply(this,arguments)||this}return S()(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}(ni);ni.registerComponent("VolumeLevel",Fn);var Hn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Rt(Nt(_()(r),r.update),Mt),r}S()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}
2,n.update=function(e,t,n,content){if(!n){var r=$e(this.el_),o=$e(this.player_.el()),l=e.width*t;if(!o||!r)return;var c=e.left-o.left+l,d=e.width-l+(o.right-e.right),h=r.width/2;c<h?h+=h-c:d<h&&(h=d),h<0?h=0:h>r.width&&(h=r.width),this.el_.style.right="-"+h+"px"}this.write(content+"%")},n.write=function(content){Be(this.el_,content)},n.updateVolume=function(e,t,n,r,o){var l=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(function(){l.update(e,t,n,r.toFixed(0)),o&&o()}))},t}(ni);ni.registerComponent("VolumeLevelTooltip",Hn);var qn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).update=Rt(Nt(_()(r),r.update),Mt),r}S()(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 r=this,o=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,o,(function(){n?r.el_.style.bottom=e.height*t+"px":r.el_.style.left=e.width*t+"px"}))},t}(ni);qn.prototype.options_={children:["volumeLevelTooltip"]},ni.registerComponent("MouseVolumeLevelDisplay",qn);var Vn=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on("slideractive",(function(e){return r.updateLastVolume_(e)})),r.on(t,"volumechange",(function(e){return r.updateARIAAttributes(e)})),t.ready((function(){return r.updateARIAAttributes()})),r}S()(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){st(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var n=this.el(),r=$e(n),o=this.vertical(),l=Ze(n,e);l=o?l.y:l.x,l=An(l,0,1),t.update(r,l,o)}st(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}(On);Vn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},xe||me||Vn.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),Vn.prototype.playerEvent="volumechange",ni.registerComponent("VolumeBar",Vn);var Wn=function(e){function t(t,n){var r;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||oe(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),r=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")}))}(_()(r),t),r.throttledHandleMouseMove=Rt(Nt(_()(r),r.handleMouseMove),Mt),r.handleMouseUpHandler_=function(e){return r.handleMouseUp(e)},r.on("mousedown",(function(e){return r.handleMouseDown(e)})),r.on("touchstart",(function(e){return r.handleMouseDown(e)})),r.on("mousemove",(function(e){return r.handleMouseMove(e)})),r.on(r.volumeBar,["focus","slideractive"],(function(){r.volumeBar.addClass("vjs-slider-active"),r.addClass("vjs-slider-active"),r.trigger("slideractive")})),r.on(r.volumeBar,["blur","sliderinactive"],(function(){r.volumeBar.removeClass("vjs-slider-active"),r.removeClass("vjs-slider-active"),r.trigger("sliderinactive")})),r}S()(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}(ni);Wn.prototype.options_={children:["volumeBar"]}
2,ni.registerComponent("VolumeControl",Wn);var zn=function(e){function t(t,n){var r;return r=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")}))}(_()(r),t),r.on(t,["loadstart","volumechange"],(function(e){return r.update(e)})),r}S()(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 r=n<.1?.1:n;this.player_.volume(r),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;xe&&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 i=0;i<4;i++)qe(this.el_,"vjs-vol-"+i);He(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var text=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==text&&this.controlText(text)},t}(mn);zn.prototype.controlText_="Mute",ni.registerComponent("MuteToggle",zn);var Gn=function(e){function t(t,n){var r;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||oe(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(r=e.call(this,t,n)||this).handleKeyPressHandler_=function(e){return r.handleKeyPress(e)},r.on(t,["loadstart"],(function(e){return r.volumePanelState_(e)})),r.on(r.muteToggle,"keyup",(function(e){return r.handleKeyPress(e)})),r.on(r.volumeControl,"keyup",(function(e){return r.handleVolumeControlKeyUp(e)})),r.on("keydown",(function(e){return r.handleKeyPress(e)})),r.on("mouseover",(function(e){return r.handleMouseOver(e)})),r.on("mouseout",(function(e){return r.handleMouseOut(e)})),r.on(r.volumeControl,["slideractive"],r.sliderActive_),r.on(r.volumeControl,["sliderinactive"],r.sliderInactive_),r}S()(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){v.a.isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),It(d.a,"keyup",this.handleKeyPressHandler_)},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),xt(d.a,"keyup",this.handleKeyPressHandler_)},n.handleKeyPress=function(e){v.a.isEventKey(e,"Esc")&&this.handleMouseOut()},t}(ni);Gn.prototype.options_={children:["muteToggle","volumeControl"]},ni.registerComponent("VolumePanel",Gn);var Xn=function(e){function t(t,n){var r;return r=e.call(this,t,n)||this,n&&(r.menuButton_=n.menuButton),r.focusedChild_=-1,r.on("keydown",(function(e){return r.handleKeyDown(e)})),r.boundHandleBlur_=function(e){return r.handleBlur(e)},r.boundHandleTapClick_=function(e){return r.handleTapClick(e)},r}S()(t,e);var n=t.prototype;return n.addEventListenerForItem=function(component){component instanceof ni&&(this.on(component,"blur",this.boundHandleBlur_),this.on(component,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(component){component instanceof ni&&(this.off(component,"blur",this.boundHandleBlur_),this.off(component,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(component){"string"==typeof component&&(component=this.getChild(component)),this.removeEventListenerForItem(component),e.prototype.removeChild.call(this,component)},n.addItem=function(component){var e=this.addChild(component);e&&this.addEventListenerForItem(e)},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=Ue(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_),It(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||d.a.activeElement;if(!this.children().some((function(element){return element.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(component){return component.el()===e.target}))[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){v.a.isEventKey(e,"Left")||v.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(v.a.isEventKey(e,"Right")||v.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}(ni);ni.registerComponent("Menu",Xn);var Kn=function(e){function t(t,n){var r;void 0===n&&(n={}),(r=e.call(this,t,n)||this).menuButton_=new mn(t,n),r.menuButton_.controlText(r.controlText_),r.menuButton_.el_.setAttribute("aria-haspopup","true");var o=mn.prototype.buildCSSClass();r.menuButton_.el_.className=r.buildCSSClass()+" "+o,r.menuButton_.removeClass("vjs-control"),r.addChild(r.menuButton_),r.update(
2),r.enabled_=!0;var l=function(e){return r.handleClick(e)};return r.handleMenuKeyUp_=function(e){return r.handleMenuKeyUp(e)},r.on(r.menuButton_,"tap",l),r.on(r.menuButton_,"click",l),r.on(r.menuButton_,"keydown",(function(e){return r.handleKeyDown(e)})),r.on(r.menuButton_,"mouseenter",(function(){r.addClass("vjs-hover"),r.menu.show(),It(d.a,"keyup",r.handleMenuKeyUp_)})),r.on("mouseleave",(function(e){return r.handleMouseLeave(e)})),r.on("keydown",(function(e){return r.handleSubmenuKeyDown(e)})),r}S()(t,e);var n=t.prototype;return n.update=function(){var menu=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=menu,this.addChild(menu),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 menu=new Xn(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=Ue("li",{className:"vjs-menu-title",textContent:$t(this.options_.title),tabIndex:-1}),t=new ni(this.player_,{el:e});menu.addItem(t)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)menu.addItem(this.items[i]);return menu},n.createItems=function(){},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},n.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+mn.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},n.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},n.controlText=function(text,e){return void 0===e&&(e=this.menuButton_.el()),this.menuButton_.controlText(text,e)},n.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},n.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},n.handleMouseLeave=function(e){this.removeClass("vjs-hover"),xt(d.a,"keyup",this.handleMenuKeyUp_)},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){v.a.isEventKey(e,"Esc")||v.a.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),v.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(v.a.isEventKey(e,"Up")||v.a.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(v.a.isEventKey(e,"Esc")||v.a.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(v.a.isEventKey(e,"Esc")||v.a.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),v.a.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},n.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),xe&&Ne())return;this.menu.focus()}},n.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},n.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},n.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},t}(ni);ni.registerComponent("MenuButton",Kn);var Yn=function(e){function t(t,n){var r,o=n.tracks;if((r=e.call(this,t,n)||this).items.length<=1&&r.hide(),!o)return _()(r);var l=Nt(_()(r),r.update);return o.addEventListener("removetrack",l),o.addEventListener("addtrack",l),o.addEventListener("labelchange",l),r.player_.on("ready",l),r.player_.on("dispose",(function(){o.removeEventListener("removetrack",l),o.removeEventListener("addtrack",l),o.removeEventListener("labelchange",l)})),r}return S()(t,e),t}(Kn);ni.registerComponent("TrackButton",Yn);var Qn=["Tab","Esc","Up","Down","Right","Left"],$n=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).selectable=n.selectable,r.isSelected_=n.selected||!1,r.multiSelectable=n.multiSelectable,r.selected(r.isSelected_),r.selectable?r.multiSelectable?r.el_.setAttribute("role","menuitemcheckbox"):r.el_.setAttribute("role","menuitemradio"):r.el_.setAttribute("role","menuitem"),r}S()(t,e);var n=t.prototype;
2return n.createEl=function(t,n,r){this.nonIconControl=!0;var o=e.prototype.createEl.call(this,"li",ae({className:"vjs-menu-item",tabIndex:-1},n),r);return o.replaceChild(Ue("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),o.querySelector(".vjs-icon-placeholder")),o},n.handleKeyDown=function(t){Qn.some((function(e){return v.a.isEventKey(t,e)}))||e.prototype.handleKeyDown.call(this,t)},n.handleClick=function(e){this.selected(!0)},n.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},t}(un);ni.registerComponent("MenuItem",$n);var Jn=function(e){function t(t,n){var r,track=n.track,o=t.textTracks();n.label=track.label||track.language||"Unknown",n.selected="showing"===track.mode,(r=e.call(this,t,n)||this).track=track,r.kinds=(n.kinds||[n.kind||r.track.kind]).filter(Boolean);var c,h=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(_()(r),t)},f=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleSelectedLanguageChange.apply(_()(r),t)};(t.on(["loadstart","texttrackchange"],h),o.addEventListener("change",h),o.addEventListener("selectedlanguagechange",f),r.on("dispose",(function(){t.off(["loadstart","texttrackchange"],h),o.removeEventListener("change",h),o.removeEventListener("selectedlanguagechange",f)})),void 0===o.onchange)&&r.on(["tap","click"],(function(){if("object"!=typeof l.a.Event)try{c=new l.a.Event("change")}catch(e){}c||(c=d.a.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(c)}));return r.handleTracksChange(),r}S()(t,e);var n=t.prototype;return n.handleClick=function(t){var n=this.track,r=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),r)for(var i=0;i<r.length;i++){var track=r[i];-1!==this.kinds.indexOf(track.kind)&&(track===n?"showing"!==track.mode&&(track.mode="showing"):"disabled"!==track.mode&&(track.mode="disabled"))}},n.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(e){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},t}($n);ni.registerComponent("TextTrackMenuItem",Jn);var Zn=function(e){function t(t,n){return n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,e.call(this,t,n)||this}S()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!0,i=0,r=t.length;i<r;i++){var track=t[i];if(this.options_.kinds.indexOf(track.kind)>-1&&"showing"===track.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<r;i++){var track=t[i];if(["captions","descriptions","subtitles"].indexOf(track.kind)>-1&&"showing"===track.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Jn);ni.registerComponent("OffTextTrackMenuItem",Zn);var er=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return S()(t,e),t.prototype.createItems=function(e,t){var label;void 0===e&&(e=[]),void 0===t&&(t=Jn),this.label_&&(label=this.label_+" off"),e.push(new Zn(this.player_,{kinds:this.kinds_,kind:this.kind_,label:label})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<n.length;i++){var track=n[i];if(this.kinds_.indexOf(track.kind)>-1){var r=new t(this.player_,{track:track,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});r.addClass("vjs-"+track.kind+"-menu-item"),e.push(r)}}return e},t}(Yn);ni.registerComponent("TextTrackButton",er);var ir=function(e){function t(t,n){var r,track=n.track,o=n.cue,l=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=o.text,n.selected=o.startTime<=l&&l<o.endTime,(r=e.call(this,t,n)||this).track=track,r.cue=o,r}return S()(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime)},t}($n);ni.registerComponent("ChaptersTrackMenuItem",ir);var nr=function(e){function t(t,n,r){var o;return(o=e.call(this,t,n,r)||this).selectCurrentItem_=function(){o.items.forEac
2h((function(e){e.selected(o.track_.activeCues[0]===e.cue)}))},o}S()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},n.update=function(t){if(!t||!t.track||"chapters"===t.track.kind){var track=this.findChaptersTrack();track!==this.track_?(this.setTrack(track),e.prototype.update.call(this)):(!this.items||track&&track.cues&&track.cues.length!==this.items.length)&&e.prototype.update.call(this)}},n.setTrack=function(track){if(this.track_!==track){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=track,this.track_){this.track_.mode="hidden";var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}},n.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],i=e.length-1;i>=0;i--){var track=e[i];if(track.kind===this.kind_)return track}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize($t(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 i=0,n=t.length;i<n;i++){var r=t[i],o=new ir(this.player_,{track:this.track_,cue:r});e.push(o)}return e},t}(er);nr.prototype.kind_="chapters",nr.prototype.controlText_="Chapters",ni.registerComponent("ChaptersButton",nr);var rr=function(e){function t(t,n,r){var o;o=e.call(this,t,n,r)||this;var l=t.textTracks(),c=Nt(_()(o),o.handleTracksChange);return l.addEventListener("change",c),o.on("dispose",(function(){l.removeEventListener("change",c)})),o}S()(t,e);var n=t.prototype;return n.handleTracksChange=function(e){for(var t=this.player().textTracks(),n=!1,i=0,r=t.length;i<r;i++){var track=t[i];if(track.kind!==this.kind_&&"showing"===track.mode){n=!0;break}}n?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(er);rr.prototype.kind_="descriptions",rr.prototype.controlText_="Descriptions",ni.registerComponent("DescriptionsButton",rr);var ar=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}S()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(er);ar.prototype.kind_="subtitles",ar.prototype.controlText_="Subtitles",ni.registerComponent("SubtitlesButton",ar);var sr=function(e){function t(t,n){var r;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(r=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),r.controlText(", opens "+n.kind+" settings dialog"),r}return S()(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Jn);ni.registerComponent("CaptionSettingsMenuItem",sr);var or=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}S()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-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 sr(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(er);or.prototype.kind_="captions",or.prototype.controlText_="Captions",ni.registerComponent("CaptionsButton",or);var ur=function(e){function t(){return e.apply(this,arguments)||this}return S()(t,e),t.prototype.createEl=function(t,n,r){var o=e.prototype.createEl.call(this,t,n,r),l=o.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(l.appendChild(Ue("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),l.appendChild(Ue("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),o},t}(Jn);ni.registerComponent("SubsCapsMenuItem",ur);var lr=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(r.player_.language_)>-1&&(r.label_="captions"),r.menuButton_.controlText($t(r.label_)),r}S()(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 sr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,ur)},t}(er);lr.prototype.kinds_=["captions","subtitles"],lr.prototype.controlText_="Subtitles",ni.registerComponent("SubsCapsButton",lr);var cr=function(e){function t(t,n){var r,track=n.track,o=t.audioTracks();n.label=track.label||track.language||"Unknown",n.selected=track.enabled,(r=e.call(this,t,n)||this).track=track,r.addClass("vjs-"+track.kind+"-menu-item");var l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(_()(r),t)};return o.addEventListener("change",l),r.on("dispose",(function(){o.removeEventListener("change",l)})),r}S()(t,e);var n=t.prototype;return n.createEl=function(t,n,r){var o=e.prototype.createEl.call(this,t,n,r),l=o.querySelector(".vjs-menu-item-text");return"main-desc"===this.options_.track.kind&&(l.appendChild(Ue("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),l.appendChild(Ue("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),o},n.handleClick=function(t){if(e.prototype.handleClick.call(this,t),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var n=this.player_.audioTracks(),i=0;i<n.length;i++){var track=n[i];track!==this.track&&(track.enabled=track===this.track)}},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}($n);ni.registerComponent("AudioTrackMenuItem",cr);var dr=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}S()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),i=0;i<t.length;i++){var track=t[i];e.push(new cr(this.player_,{track:track,selectable:!0,multiSelectable:!1}))}return e},t}(Yn);dr.prototype.controlText_="Audio Track",ni.registerComponent("AudioTrackButton",dr);var pr=function(e){function t(t,n){var r,label=n.rate,o=parseFloat(label,10);return n.label=label,n.selected=o===t.playbackRate(),n.selectable=!0,n.multiSelectable=!1,(r=e.call(this,t,n)||this).label=label,r.rate=o,r.on(t,"ratechange",(function(e){return r.update(e)})),r}S()(t,e);var n=t.prototype;return n.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}($n);pr.prototype.contentElType="button",ni.registerComponent("PlaybackRateMenuItem",pr);var fr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).menuButton_.el_.setAttribute("aria-describedby",r.labelElId_),r.updateVisibility(),r.updateLabel(),r.on(t,"loadstart",(function(e){return r.updateVisibility(e)})),r.on(t,"ratechange",(function(e){return r.updateLabel(e)}
2)),r.on(t,"playbackrateschange",(function(e){return r.handlePlaybackRateschange(e)})),r}S()(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Ue("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),t.appendChild(this.labelEl_),t},n.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){for(var e=this.playbackRates(),t=[],i=e.length-1;i>=0;i--)t.push(new pr(this.player(),{rate:e[i]+"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(),r=(n.indexOf(t)+1)%n.length;this.player().playbackRate(n[r])},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}(Kn);fr.prototype.controlText_="Playback Rate",ni.registerComponent("PlaybackRateMenuButton",fr);var mr=function(e){function t(){return e.apply(this,arguments)||this}S()(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(t,n,r){return void 0===t&&(t="div"),void 0===n&&(n={}),void 0===r&&(r={}),n.className||(n.className=this.buildCSSClass()),e.prototype.createEl.call(this,t,n,r)},t}(ni);ni.registerComponent("Spacer",mr);var gr=function(e){function t(){return e.apply(this,arguments)||this}S()(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}(mr);ni.registerComponent("CustomControlSpacer",gr);var vr=function(e){function t(){return e.apply(this,arguments)||this}return S()(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(ni);vr.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in d.a&&vr.prototype.options_.children.splice(vr.prototype.options_.children.length-1,0,"pictureInPictureToggle"),ni.registerComponent("ControlBar",vr);var yr=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).on(t,"error",(function(e){return r.open(e)})),r}S()(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}(gi);yr.prototype.options_=f()({},gi.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),ni.registerComponent("ErrorDisplay",yr);var _r="vjs-text-track-settings",Tr=["#000","Black"],Sr=["#00F","Blue"],Er=["#0FF","Cyan"],kr=["#0F0","Green"],Cr=["#F0F","Magenta"],wr=["#F00","Red"],Ir=["#FFF","White"],xr=["#FF0","Yellow"],Ar=["1","Opaque"],Or=["0.5","Semi-Transparent"],Pr=["0","Transparent"],Lr={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Tr,Ir,wr,kr,Sr,xr,Cr,Er]},backgroundOpacity:{selector:".vjs-bg-opacity >
2 select",id:"captions-background-opacity-%s",label:"Transparency",options:[Ar,Or,Pr]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Ir,Tr,wr,kr,Sr,xr,Cr,Er]},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:[Ar,Or]},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:[Pr,Or,Ar]}};function Dr(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}Lr.windowColor.options=Lr.backgroundColor.options;var Mr=function(e){function t(t,n){var r;return n.temporary=!1,(r=e.call(this,t,n)||this).updateDisplay=r.updateDisplay.bind(_()(r)),r.fill(),r.hasBeenOpened_=r.hasBeenFilled_=!0,r.endDialog=Ue("p",{className:"vjs-control-text",textContent:r.localize("End of dialog window.")}),r.el().appendChild(r.endDialog),r.setDefaults(),void 0===n.persistTextTrackSettings&&(r.options_.persistTextTrackSettings=r.options_.playerOptions.persistTextTrackSettings),r.on(r.$(".vjs-done-button"),"click",(function(){r.saveSettings(),r.close()})),r.on(r.$(".vjs-default-button"),"click",(function(){r.setDefaults(),r.updateDisplay()})),re(Lr,(function(e){r.on(r.$(e.selector),"change",r.updateDisplay)})),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}S()(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 r=this;void 0===t&&(t=""),void 0===n&&(n="label");var o=Lr[e],l=o.id.replace("%s",this.id_),c=[t,l].join(" ").trim();return["<"+n+' id="'+l+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(o.label),"</"+n+">",'<select aria-labelledby="'+c+'">'].concat(o.options.map((function(e){var t=l+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+c+" "+t+'">',r.localize(e[1]),"</option>"].join("")}))).concat("</select>").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return Ue("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return Ue("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return Ue("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].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 object,e,t,n=this;return e=function(e,t,r){var o,l,c=(o=n.$(t.selector),l=t.parser,Dr(o.options[o.options.selectedIndex].value,l));return void 0!==c&&(e[r]=c),e},void 0===(t={})&&(t=0),ne(object=Lr).reduce((function(t,n){return e(t,object[n],n)}),t)},n.setValues=function(e){var t=this;re(Lr,(function(n,r){!function(e,t,n){if(t)for(var i=0;i<e.options.length;i++)if(Dr(e.options[i].value,n)===t){e.selectedIndex=i;break}}(t.$(n.selector),e[r],n.parser)}))},n.setDefaults=function(){var e=this;re(Lr,(function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n}))},n.restoreSettings=function(){var e;try{e=JSON.parse(l.a.localStorage.getItem(_r))}catch(e){ee.warn(e)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?l.a.localStorage.setItem(_r,JSON.stringify(e)):l.a.localStorage.removeItem(_r)}catch(e){ee.warn(e)}}},n.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;
2t?t.focus():n&&n.focus()},t}(gi);ni.registerComponent("TextTrackSettings",Mr);var Nr=function(e){function t(t,n){var r,o=n.ResizeObserver||l.a.ResizeObserver;null===n.ResizeObserver&&(o=!1);var c=Jt({createEl:!o,reportTouchActivity:!1},n);return(r=e.call(this,t,c)||this).ResizeObserver=n.ResizeObserver||l.a.ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(e,t,n,r){var o;void 0===r&&(r=l.a);var c=function(){var l=this,c=arguments,d=function(){o=null,d=null,n||e.apply(l,c)};!o&&n&&e.apply(l,c),r.clearTimeout(o),o=r.setTimeout(d,t)};return c.cancel=function(){r.clearTimeout(o),o=null},c}((function(){r.resizeHandler()}),100,!1,_()(r)),o?(r.resizeObserver_=new r.ResizeObserver(r.debouncedHandler_),r.resizeObserver_.observe(t.el())):(r.loadListener_=function(){if(r.el_&&r.el_.contentWindow){var e=r.debouncedHandler_,t=r.unloadListener_=function(){xt(this,"resize",e),xt(this,"unload",t),t=null};It(r.el_.contentWindow,"unload",t),It(r.el_.contentWindow,"resize",e)}},r.one("load",r.loadListener_)),r}S()(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})},n.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},n.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,e.prototype.dispose.call(this)},t}(ni);ni.registerComponent("ResizeManager",Nr);var Rr={trackingThreshold:20,liveTolerance:15},Ur=function(e){function t(t,n){var r,o=Jt(Rr,n,{createEl:!1});return(r=e.call(this,t,o)||this).handleVisibilityChange_=function(e){return r.handleVisibilityChange(e)},r.trackLiveHandler_=function(){return r.trackLive_()},r.handlePlay_=function(e){return r.handlePlay(e)},r.handleFirstTimeupdate_=function(e){return r.handleFirstTimeupdate(e)},r.handleSeeked_=function(e){return r.handleSeeked(e)},r.seekToLiveEdge_=function(e){return r.seekToLiveEdge(e)},r.reset_(),r.on(r.player_,"durationchange",(function(e){return r.handleDurationchange(e)})),r.on(r.player_,"canplay",(function(){return r.toggleTracking()})),Se&&"hidden"in d.a&&"visibilityState"in d.a&&r.on(d.a,"visibilitychange",r.handleVisibilityChange_),r}S()(t,e);var n=t.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(d.a.hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var t=Number(l.a.performance.now().toFixed(4)),n=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+n;var r=this.liveCurrentTime(),o=this.player_.currentTime(),c=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-o)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(c=!1),c!==this.behindLiveEdge_&&(this.behindLiveEdge_=c,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_,Mt),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=[],i=e?e.length:0;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],i=e?e.length:0;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}
2,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(d.a,"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},t}(ni);ni.registerComponent("LiveTracker",Ur);var Br,jr=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),r=[],o="";if(!n.length)return!1;for(var i=0;i<n.length;i++){var l=n[i].src;l&&-1===r.indexOf(l)&&r.push(l)}return!!r.length&&(1===r.length&&(o=r[0]),e.triggerSourceset(o),!0)},Fr=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var t=d.a.createElement(this.nodeName.toLowerCase());t.innerHTML=e;for(var n=d.a.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return this.innerText="",l.a.Element.prototype.appendChild.call(this,n),this.innerHTML}}),Hr=function(e,t){for(var n={},i=0;i<e.length&&!((n=Object.getOwnPropertyDescriptor(e[i],t))&&n.set&&n.get);i++);return n.enumerable=!0,n.configurable=!0,n},qr=function(e){var t=e.el();if(!t.resetSourceWatch_){var n={},r=function(e){return Hr([e.el(),l.a.HTMLMediaElement.prototype,l.a.Element.prototype,Fr],"innerHTML")}(e),o=function(n){return function(){for(var r=arguments.length,o=new Array(r),l=0;l<r;l++)o[l]=arguments[l];var c=n.apply(t,o);return jr(e),c}};["append","appendChild","insertAdjacentHTML"].forEach((function(e){t[e]&&(n[e]=t[e],t[e]=o(n[e]))})),Object.defineProperty(t,"innerHTML",Jt(r,{set:o(r.set)})),t.resetSourceWatch_=function(){t.resetSourceWatch_=null,Object.keys(n).forEach((function(e){t[e]=n[e]})),Object.defineProperty(t,"innerHTML",r)},e.one("sourceset",t.resetSourceWatch_)}},Vr=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Li(l.a.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return l.a.Element.prototype.setAttribute.call(this,"src",e),e}}),Wr=function(e){if(e.featuresSourceset){var t=e.el();if(!t.resetSourceset_){var n=function(e){return Hr([e.el(),l.a.HTMLMediaElement.prototype,Vr],"src")}(e),r=t.setAttribute,o=t.load;Object.defineProperty(t,"src",Jt(n,{set:function(r){var o=n.set.call(t,r);return e.triggerSourceset(t.src),o}})),t.setAttribute=function(n,o){var l=r.call(t,n,o);return/src/i.test(n)&&e.triggerSourceset(t.src),l},t.load=function(){var n=o.call(t);return jr(e)||(e.triggerSourceset(""),qr(e)),n},t.currentSrc?e.triggerSourceset(t.currentSrc):jr(e)||qr(e),t.resetSourceset_=function(){t.resetSourceset_=null,t.load=o,t.setAttribute=r,Object.defineProperty(t,"src",n),t.resetSourceWatch_&&t.resetSourceWatch_()}}}},zr=function(e,t,n,r){void 0===r&&(r=!0);var o=function(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})},l={configurable:!0,enumerable:!0,get:function(){var e=n();return o(e),e}};return r&&(l.set=o),Object.defineProperty(e,t,l)},Gr=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var source=t.source,o=!1;if(r.featuresVideoFrameCallback=r.featuresVideoFrameCallback&&"VIDEO"===r.el_.tagName,source&&(r.el_.currentSrc!==source.src||t.tag&&3===t.tag.initNetworkState_)?r.setSource(source):r.handleLateInit_(r.el_),t.enableSourceset&&r.setupSourcesetHandling_(),r.isScrubbing_=!1,r.el_.hasChildNodes()){for(var l=r.el_.childNodes,c=l.length,d=[];c--;){var h=l[c];"track"===h.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(h),r.remoteTextTracks().addTrack(h.track),r.textTracks().addTrack(h.track),o||r.el_.hasAttribute("crossorigin")||!Mi(h.src)||(o=!0)):d.push(h))}for(var i=0;i<d.length;i++)r.el_.removeChild(d[i])}return r.proxyNativeTracks_(),r.featuresNativeTextTracks&&o&&ee.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),r.restoreMetadataTracksInIOSNativePlayer_(),(Ce||Ie||ve)&&!0===t.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}S()(t,e);var n=t.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),t.dis
2poseMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){Wr(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var i=0;i<t.length;i++){var track=t[i];"metadata"===track.kind&&e.push({track:track,storedMode:track.mode})}};n(),t.addEventListener("change",n),this.on("dispose",(function(){return t.removeEventListener("change",n)}));var r=function n(){for(var i=0;i<e.length;i++){var r=e[i];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(function(){t.removeEventListener("change",n),t.removeEventListener("change",r),t.addEventListener("change",r)})),this.on("webkitendfullscreen",(function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",r)}))},n.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var r=e.toLowerCase();this[r+"TracksListeners_"]&&Object.keys(this[r+"TracksListeners_"]).forEach((function(e){n.el()[r+"Tracks"].removeEventListener(e,n[r+"TracksListeners_"][e])})),this["featuresNative"+e+"Tracks"]=!t,this[r+"TracksListeners_"]=null,this.proxyNativeTracksForType_(r)}},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var t=this,n=qi[e],r=this.el()[n.getterName],o=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var l={change:function(n){var r={type:"change",target:o,currentTarget:o,srcElement:o};o.trigger(r),"text"===e&&t[Vi.remoteText.getterName]().trigger(r)},addtrack:function(e){o.addTrack(e.track)},removetrack:function(e){o.removeTrack(e.track)}},c=function(){for(var e=[],i=0;i<o.length;i++){for(var t=!1,n=0;n<r.length;n++)if(r[n]===o[i]){t=!0;break}t||e.push(o[i])}for(;e.length;)o.removeTrack(e.shift())};this[n.getterName+"Listeners_"]=l,Object.keys(l).forEach((function(e){var n=l[e];r.addEventListener(e,n),t.on("dispose",(function(t){return r.removeEventListener(e,n)}))})),this.on("loadstart",c),this.on("dispose",(function(e){return t.off("loadstart",c)}))}},n.proxyNativeTracks_=function(){var e=this;qi.names.forEach((function(t){e.proxyNativeTracksForType_(t)}))},n.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),t.disposeMediaElement(e),e=n}else{e=d.a.createElement("video");var r=Jt({},this.options_.tag&&ze(this.options_.tag));Ce&&!0===this.options_.nativeControlsForTouch||delete r.controls,We(e,ae(r,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&Xe(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var o=["loop","muted","playsinline","autoplay"],i=0;i<o.length;i++){var l=o[i],c=this.options_[l];void 0!==c&&(c?Xe(e,l,l):Ke(e,l),e[l]=c)}return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,n=function(){t=!0};this.on("loadstart",n);var r=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready((function(){this.off("loadstart",n),this.off("loadedmetadata",r),t||this.trigger("loadstart")}))}var o=["loadstart"];o.push("loadedmetadata"),e.readyState>=2&&o.push("loadeddata"),e.readyState>=3&&o.push("canplay"),e.readyState>=4&&o.push("canplaythrough"),this.ready((function(){o.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&&Ae?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){ee(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;if(this.el_.duration===1/0&&me&&be&&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=l.a.navigator&&l.a.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var video=this.el_;if(video.paused&&video.networkState<=video.HAVE_METADATA)hi(this.el_.play()),this.setTimeout((function(){video.pause();try{video.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}}),0);else try{video.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,label,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,label,n):e.prototype.addTextTrack.call(this,t,label,n)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=d.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 r=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},n.removeRemoteTextTrack=function(track){if(e.prototype.removeRemoteTextTrack.call(this,track),this.featuresNativeTextTracks)for(var t=this.$$("track"),i=t.length;i--;)track!==t[i]&&track!==t[i].track||this.el().removeChild(t[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),l.a.performance&&"function"==typeof l.a.performance.now?e.creationTime=l.a.performance.now():l.a.performance&&l.a.performance.timing&&"number"==typeof l.a.performance.timing.navigationStart&&(e.creationTime=l.a.Date.now()-l.a.performance.timing.navigationStart),e},t}(zi);zr(Gr,"TEST_VID",(function(){if(De()){var video=d.a.createElement("video"),track=d.a.createElement("track");return track.kind="captions",track.srclang="en",track.label="English",video.appendChild(track),video}})),Gr.isSupported=function(){try{Gr.TEST_VID.volume=.5}catch(e){return!1}return!(!Gr.TEST_VID||!Gr.TEST_VID.canPlayType)},Gr.canPlayType=function(e){return Gr.TEST_VID.canPlayType(e)},Gr.canPlaySource=function(e,t){return Gr.canPlayType(e.type)},Gr.canControlVolume=function(){try{var e=Gr.TEST_VID.volume;Gr.TEST_VID.volume=e/2+.1;var t=e!==Gr.TEST_VID.volume;return t&&xe?(l.a.setTimeout((function(){Gr&&Gr.prototype&&(Gr.prototype.featuresVolumeControl=e!==Gr.TEST_VID.volume)})),!1):t}catch(e){return!1}},Gr.canMuteVolume=function(){try{var e=Gr.TEST_VID.muted;return Gr.TEST_VID.muted=!e,Gr.TEST_VID.muted?Xe(Gr.TEST_VID,"muted","muted"):Ke(Gr.TEST_VID,"muted"),e!==Gr.TEST_VID.muted}catch(e){return!1}},Gr.canControlPlaybackRate=function(){if(me&&be&&Te<58)return!1;try{var e=Gr.TEST_VID.playbackRate;return Gr.TEST_VID.playbackRate=e/2+.1,e!==Gr.TEST_VID.playbackRate}catch(e){return!1}},Gr.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(d.a.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(d.a.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(d.a.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(d.a.createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},Gr.supportsNativeTextTracks=function(){return Ae||xe&&be},Gr.supportsNativeVideoTracks=function(){return!(!Gr.TEST_VID||!Gr.TEST_VID.videoTracks)},Gr.supportsNativeAudioTracks=function(){return!(!Gr.TEST_VID||!Gr.TEST_VID.audioTracks)},Gr.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"]].forEac
2h((function(e){var t=e[0],n=e[1];zr(Gr.prototype,t,(function(){return Gr[n]()}),!0)})),Gr.prototype.featuresVolumeControl=Gr.canControlVolume(),Gr.prototype.movingMediaElementInDOM=!xe,Gr.prototype.featuresFullscreenResize=!0,Gr.prototype.featuresProgressEvents=!0,Gr.prototype.featuresTimeupdateEvents=!0,Gr.prototype.featuresVideoFrameCallback=!(!Gr.TEST_VID||!Gr.TEST_VID.requestVideoFrameCallback),Gr.patchCanPlayType=function(){ge>=4&&!ye&&!be&&(Br=Gr.TEST_VID&&Gr.TEST_VID.constructor.prototype.canPlayType,Gr.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":Br.call(this,e)})},Gr.unpatchCanPlayType=function(){var e=Gr.TEST_VID.constructor.prototype.canPlayType;return Br&&(Gr.TEST_VID.constructor.prototype.canPlayType=Br),e},Gr.patchCanPlayType(),Gr.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){}}()}},Gr.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),i=t.length;i--;)e.removeChild(t[i]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){Gr.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){Gr.prototype["set"+$t(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){Gr.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){Gr.prototype["set"+$t(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){Gr.prototype[e]=function(){return this.el_[e]()}})),zi.withSourceHandlers(Gr),Gr.nativeSourceHandler={},Gr.nativeSourceHandler.canPlayType=function(e){try{return Gr.TEST_VID.canPlayType(e)}catch(e){return""}},Gr.nativeSourceHandler.canHandleSource=function(source,e){if(source.type)return Gr.nativeSourceHandler.canPlayType(source.type);if(source.src){var t=Di(source.src);return Gr.nativeSourceHandler.canPlayType("video/"+t)}return""},Gr.nativeSourceHandler.handleSource=function(source,e,t){e.setSrc(source.src)},Gr.nativeSourceHandler.dispose=function(){},Gr.registerSourceHandler(Gr.nativeSourceHandler),zi.registerTech("Html5",Gr);var Xr=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Kr={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Yr=["tiny","xsmall","small","medium","large","xlarge","huge"],Qr={};Yr.forEach((function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Qr[e]="vjs-layout-"+t}));var $r={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Jr=function(e){function t(n,r,o){var l;if(n.id=n.id||r.id||"vjs_video_"+bt(),(r=ae(t.getTagSettings(n),r)).initChildren=!1,r.createEl=!1,r.evented=!1,r.reportTouchActivity=!1,!r.language)if("function"==typeof n.closest){var c=n.closest("[lang]");c&&c.getAttribute&&(r.language=c.getAttribute("lang"))}else for(var element=n;element&&1===element.nodeType;){if(ze(element).hasOwnProperty("lang")){r.language=element.getAttribute("lang");break}element=element.parentNode}if((l=e.call(this,null,r,o)||this).boundDocumentFullscreenChange_=function(e){return l.documentFullscreenChange_(e)},l.boundFullWindowOnEscKey_=function(e){return l.fullWindowOnEscKey(e)},l.boundUpdateStyleEl_=function(e){return l.updateStyleEl_(e)},l.boundApplyInitTime_=function(e){return l.applyInitTime_(e)},l.boundUpdateCurrentBreakpoint_=function(e){return l.updateCurrentBreakpoint_(e)},l.boundHandleTechClick_=function(e){return l.handleTechClick_(e)},l.boundHandleTechDoubleClick_=function(e){return l.handleTechDoubleClick_(e)},l.boundHandleTechTouchStart_=function(e){return l.handleTechTouchStart_(e)},l.boundHandleTechTouchMove_=function(e){return l.handleTechTouchMove_(e)},l.boundHandleTechTouchEnd_=function(e){return l.handleTechTouchEnd_(e)},l.boundHandleTechTap_=function(e){return l.handleTechTap_(e)},l.isFullscreen_=!1,l.log=te(l.id_),l.fsApi_=Y,l.isPosterFromTech_=!1,l.queuedCallbacks_=[],l.isReady_=!1,l.hasStarted_=!1,l.userActive_=!1,l.debugEnabled_=!1,l.audioOnlyMode_=!1,l.audioPosterMode_=!1,l.audioOnlyCache_={playerHe
2ight:null,hiddenChildren:[]},!l.options_||!l.options_.techOrder||!l.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(l.tag=n,l.tagAttributes=n&&ze(n),l.language(l.options_.language),r.languages){var h={};Object.getOwnPropertyNames(r.languages).forEach((function(e){h[e.toLowerCase()]=r.languages[e]})),l.languages_=h}else l.languages_=t.prototype.options_.languages;l.resetCache_(),l.poster_=r.poster||"",l.controls_=!!r.controls,n.controls=!1,n.removeAttribute("controls"),l.changingSrc_=!1,l.playCallbacks_=[],l.playTerminatedQueue_=[],n.hasAttribute("autoplay")?l.autoplay(!0):l.autoplay(l.options_.autoplay),r.plugins&&Object.keys(r.plugins).forEach((function(e){if("function"!=typeof l[e])throw new Error('plugin "'+e+'" does not exist')})),l.scrubbing_=!1,l.el_=l.createEl(),Xt(_()(l),{eventBusKey:"el_"}),l.fsApi_.requestFullscreen&&(It(d.a,l.fsApi_.fullscreenchange,l.boundDocumentFullscreenChange_),l.on(l.fsApi_.fullscreenchange,l.boundDocumentFullscreenChange_)),l.fluid_&&l.on(["playerreset","resize"],l.boundUpdateStyleEl_);var f=Jt(l.options_);r.plugins&&Object.keys(r.plugins).forEach((function(e){l[e](r.plugins[e])})),r.debug&&l.debug(!0),l.options_.playerOptions=f,l.middleware_=[],l.playbackRates(r.playbackRates),l.initChildren(),l.isAudio("audio"===n.nodeName.toLowerCase()),l.controls()?l.addClass("vjs-controls-enabled"):l.addClass("vjs-controls-disabled"),l.el_.setAttribute("role","region"),l.isAudio()?l.el_.setAttribute("aria-label",l.localize("Audio Player")):l.el_.setAttribute("aria-label",l.localize("Video Player")),l.isAudio()&&l.addClass("vjs-audio"),l.flexNotSupported_()&&l.addClass("vjs-no-flex"),Ce&&l.addClass("vjs-touch-enabled"),xe||l.addClass("vjs-workinghover"),t.players[l.id_]=_()(l);var m=z.split(".")[0];return l.addClass("vjs-v"+m),l.userActive(!0),l.reportUserActivity(),l.one("play",(function(e){return l.listenForUserActivity_(e)})),l.on("stageclick",(function(e){return l.handleStageClick_(e)})),l.on("keydown",(function(e){return l.handleKeyDown(e)})),l.on("languagechange",(function(e){return l.handleLanguagechange(e)})),l.breakpoints(l.options_.breakpoints),l.responsive(l.options_.responsive),l.on("ready",(function(){l.audioPosterMode(l.options_.audioPosterMode),l.audioOnlyMode(l.options_.audioOnlyMode)})),l}S()(t,e);var n=t.prototype;return n.dispose=function(){var n=this;this.trigger("dispose"),this.off("dispose"),xt(d.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),xt(d.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),Xi[this.id()]=null,Wi.names.forEach((function(e){var t=Wi[e],r=n[t.getterName]();r&&r.off&&r.off()})),e.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})},n.createEl=function(){var t,n=this.tag,r=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),o="video-js"===this.tag.tagName.toLowerCase();r?t=this.el_=n.parentNode:o||(t=this.el_=e.prototype.createEl.call(this,"div"));var c=ze(n);if(o){for(t=this.el_=n,n=this.tag=d.a.createElement("video");t.children.length;)n.appendChild(t.firstChild);Fe(t,"video-js")||He(t,"video-js"),t.appendChild(n),r=this.playerElIngest_=t,Object.keys(t).forEach((function(e){try{n[e]=t[e]}catch(e){}}))}if(n.setAttribute("tabindex","-1"),c.tabindex="-1",(Se||be&&ke)&&(n.setAttribute("role","application"),c.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in c&&delete c.width,"height"in c&&delete c.height,Object.getOwnPropertyNames(c).forEach((function(e){o&&"class"===e||t.setAttribute(e,c[e]),o&&n.setAttribute(e,c[e])})),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=t.player=this,this.addClass("vjs-paused"),!0!==l.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=vt("vjs-styles-dimensions");var h=ut(".vjs-styles-defaults"),head=ut("head");head.insertBefore(this.styleEl_,h?h.nextSibling:head.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 f=n.getElementsByTagName("a"),i=0;i<f.length;i++){var m=f.item(i);He(m,"vjs-hidden"),m.setAttribute("hidden","hidden")}return n.initNetworkState_=n.networkState,n.parentNode&&!r&&n.parentNode.insertBefore(t,n),je(n,t),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=t,t},n.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):ee.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},n.width=function(e){return this.dimension("width",e)},n.height=function(e){return this.dimension("height",e)},n.dimension=function(e,t){var n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(t);isNaN(r)?ee.error('Improper value "'+t+'" supplied for for '+e):(this[n]=r,this.updateStyleEl_())},n.fluid=function(e){var t,n,r=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,jt(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){r.on(["playerreset","resize"],r.boundUpdateStyleEl_)},jt(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},n.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},n.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},n.updateStyleEl_=function(){if(!0!==l.a.VIDEOJS_NO_DYNAMIC_STYLE){var e,t,n,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),o=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/o:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*o,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),yt(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*o+"%;\n      }\n    ")}else{var c="number"==typeof this.width_?this.width_:this.options_.width,d="number"==typeof this.height_?this.height_:this.options_.height,h=this.tech_&&this.tech_.el();h&&(c>=0&&(h.width=c),d>=0&&(h.height=d))}},n.loadTech_=function(e,source){var t=this;this.tech_&&this.unloadTech_();var n=$t(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==n&&this.tag&&(zi.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;var o=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(o=!1);var l={source:source,autoplay:o,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};
2Wi.names.forEach((function(e){var n=Wi[e];l[n.getterName]=t[n.privateName]})),ae(l,this.options_[n]),ae(l,this.options_[r]),ae(l,this.options_[e.toLowerCase()]),this.tag&&(l.tag=this.tag),source&&source.src===this.cache_.src&&this.cache_.currentTime>0&&(l.startTime=this.cache_.currentTime);var c=zi.getTech(e);if(!c)throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'");this.tech_=new c(l),this.tech_.ready(Nt(this,this.handleTechReady_),!0),mi(this.textTracksJson_||[],this.tech_),Xr.forEach((function(e){t.on(t.tech_,e,(function(n){return t["handleTech"+$t(e)+"_"](n)}))})),Object.keys(Kr).forEach((function(e){t.on(t.tech_,e,(function(n){0===t.tech_.playbackRate()&&t.tech_.seeking()?t.queuedCallbacks_.push({callback:t["handleTech"+Kr[e]+"_"].bind(t),event:n}):t["handleTech"+Kr[e]+"_"](n)}))})),this.on(this.tech_,"loadstart",(function(e){return t.handleTechLoadStart_(e)})),this.on(this.tech_,"sourceset",(function(e){return t.handleTechSourceset_(e)})),this.on(this.tech_,"waiting",(function(e){return t.handleTechWaiting_(e)})),this.on(this.tech_,"ended",(function(e){return t.handleTechEnded_(e)})),this.on(this.tech_,"seeking",(function(e){return t.handleTechSeeking_(e)})),this.on(this.tech_,"play",(function(e){return t.handleTechPlay_(e)})),this.on(this.tech_,"firstplay",(function(e){return t.handleTechFirstPlay_(e)})),this.on(this.tech_,"pause",(function(e){return t.handleTechPause_(e)})),this.on(this.tech_,"durationchange",(function(e){return t.handleTechDurationChange_(e)})),this.on(this.tech_,"fullscreenchange",(function(e,data){return t.handleTechFullscreenChange_(e,data)})),this.on(this.tech_,"fullscreenerror",(function(e,n){return t.handleTechFullscreenError_(e,n)})),this.on(this.tech_,"enterpictureinpicture",(function(e){return t.handleTechEnterPictureInPicture_(e)})),this.on(this.tech_,"leavepictureinpicture",(function(e){return t.handleTechLeavePictureInPicture_(e)})),this.on(this.tech_,"error",(function(e){return t.handleTechError_(e)})),this.on(this.tech_,"posterchange",(function(e){return t.handleTechPosterChange_(e)})),this.on(this.tech_,"textdata",(function(e){return t.handleTechTextData_(e)})),this.on(this.tech_,"ratechange",(function(e){return t.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"===n&&this.tag||je(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},n.unloadTech_=function(){var e=this;Wi.names.forEach((function(t){var n=Wi[t];e[n.privateName]=e[n.getterName]()})),this.textTracksJson_=fi(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&&ee.warn("Using the tech directly can be dangerous. I hope you know 
2what 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,r=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var r=t.play();if(di(r))return r.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():r():di(n=this.play())&&(n=n.catch(r)),di(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(s){return s.src===t}));if(n.length)return n[0].type;for(var r=e.$$("source"),i=0;i<r.length;i++){var s=r[i];if(s.type&&s.src&&s.src===t)return s.type}return rn(t)}(this,t)),this.cache_.source=Jt({},e,{src:t,type:n});for(var r=this.cache_.sources.filter((function(s){return s.src&&s.src===t})),o=[],l=this.$$("source"),c=[],i=0;i<l.length;i++){var d=ze(l[i]);o.push(d),d.src&&d.src===t&&c.push(d.src)}c.length&&!r.length?this.cache_.sources=o:r.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},n.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},r=this.currentSource().src,o=e.src;r&&!/^blob:/.test(r)&&/^blob:/.test(o)&&(!this.lastSource_||this.lastSource_.tech!==o&&this.lastSource_.player!==r)&&(n=function(){}),n(o),e.src||this.tech_.any(["sourceset","loadstart"],(function(e){if("sourceset"!==e.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},n.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},n.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},n.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&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&&(ee.warn("Passing the `starttime` option to the player will be deprecated 
2in 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()?hi(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(),r=d.a[this.fsApi_.fullscreenElement]===n;!r&&n.matches?r=n.matches(":"+this.fsApi_.fullscreen):!r&&n.msMatchesSelector&&(r=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(r)}},n.handleTechFullscreenChange_=function(e,data){var t=this;data&&(data.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(function(){t.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(data.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 data=null;arguments.length>1&&(data=arguments[1]),this.trigger("textdata",data)},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 Ji)return function(e,t,n,r){return t[n](e.reduce(en(n),r))}(this.middleware_,this.tech_,e,t);if(e in Zi)return Qi(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw ee(e),e}}),!0)},n.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in $i)return function(e,t,n){return e.reduceRight(en(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Zi)return Qi(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw ee("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw ee("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw ee(t),t}}},n.play=function(){var e=this,t=this.options_.Promise||l.a.Promise;return t?new t((function(t){e.play_(t)})):this.play_()},n.play_=function(e){var t=this;void 0===e&&(e=hi),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));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||!Ae&&!xe||this.load());var r=this.techGet_("play");null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},n.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(q){q()}))},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")||si(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=si(0,0)),e},n.bufferedPercent=function(){return oi(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||l.a.Promise;if(t){var n=this;return new t((function(t,r){function o(){n.off("fullscreenerror",c),n.off("fullscreenchange",l)}function l(){o(),t()}function c(e,t){o(),r(t)}n.one("fullscreenchange",l),n.one("fullscreenerror",c);var d=n.requestFullscreenHelper_(e);d&&(d.then(o,o),d.then(t,r))}))}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 r=this.el_[this.fsApi_.requestFullscreen](t);return r&&r.then((function(){return n.isFullscreen(!0)}),(function(){return n.isFullscreen(!1)})),r}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},n.exitFullscreen=function(){var e=this.options_.Promise||l.a.Promise;if(e){var t=this;return new e((function(e,n){function r(){t.off("fullscreenerror",l),t.off("fullscreenchange",o)}function o(){r(),e()}function l(e,t){r(),n(t)}t.one("fullscreenchange",o),t.one("fullscreenerror",l);var c=t.exitFullscreenHelper_();c&&(c.then(r,r),c.then(e,n))}))}return this.exitFullscreenHelper_()},n.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=d.a[this.fsApi_.exitFullscreen]();return t&&hi(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=d.a.documentElement.style.overflow,It(d.a,"keydown",this.boundFullWindowOnEscKey_),d.a.documentElement.style.overflow="hidden",He(d.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},n.fullWindowOnEscKey=function(e){v.a.isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},n.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,xt(d.a,"keydown",this.boundFullWindowOnEscKey_),d.a.documentElement.style.overflow=this.docOrigOverflow,qe(d.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 d.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},n.exitPictureInPicture=function(){if("pictureInPictureEnabled"in d.a)return d.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;
2if("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,r=void 0===n?function(e){return v.a.isEventKey(e,"f")}:n,o=t.muteKey,l=void 0===o?function(e){return v.a.isEventKey(e,"m")}:o,c=t.playPauseKey,h=void 0===c?function(e){return v.a.isEventKey(e,"k")||v.a.isEventKey(e,"Space")}:c;if(r.call(this,e)){e.preventDefault(),e.stopPropagation();var f=ni.getComponent("FullscreenToggle");!1!==d.a[this.fsApi_.fullscreenEnabled]&&f.prototype.handleClick.call(this,e)}else if(l.call(this,e)){e.preventDefault(),e.stopPropagation(),ni.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(h.call(this,e)){e.preventDefault(),e.stopPropagation(),ni.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},n.canPlayType=function(e){for(var t,i=0,n=this.options_.techOrder;i<n.length;i++){var r=n[i],o=zi.getTech(r);if(o||(o=ni.getComponent(r)),o){if(o.isSupported()&&(t=o.canPlayType(e)))return t}else ee.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},n.selectSource=function(e){var t,n=this,r=this.options_.techOrder.map((function(e){return[e,zi.getTech(e)]})).filter((function(e){var t=e[0],n=e[1];return n?n.isSupported():(ee.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),o=function(e,t,n){var r;return e.some((function(e){return t.some((function(t){if(r=n(e,t))return!0}))})),r},l=function(e,source){var t=e[0];if(e[1].canPlaySource(source,n.options_[t.toLowerCase()]))return{source:source,tech:t}};return(this.options_.sourceOrder?o(e,r,(t=l,function(a,b){return t(b,a)})):o(r,e,l))||!1},n.handleSrc_=function(source,e){var t=this;if(void 0===source)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var n=an(source);if(n.length){if(this.changingSrc_=!0,e||(this.cache_.sources=n),this.updateSourceCaches_(n[0]),Yi(this,n[0],(function(r,o){var l,c;if(t.middleware_=o,e||(t.cache_.sources=n),t.updateSourceCaches_(r),t.src_(r))return n.length>1?t.handleSrc_(n.slice(1)):(t.changingSrc_=!1,t.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void t.triggerReady());l=o,c=t.tech_,l.forEach((function(e){return e.setTech&&e.setTech(c)}))})),this.options_.retryOnError&&n.length>1){var r=function(){t.error(null),t.handleSrc_(n.slice(1),!0)},o=function(){t.off("error",r)};this.one("error",r),this.one("playing",o),this.resetRetryOnError_=function(){t.off("error",r),t.off("playing",o)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)},n.src=function(source){return this.handleSrc_(source,!1)},n.src_=function(source){var e,t,n=this,r=this.selectSource([source]);return!r||(e=r.tech,t=this.techName_,$t(e)!==$t(t)?(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready((function(){n.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",source):this.techCall_("src",source.src),this.changingSrc_=!1}),!0),!1))},n.load=function(){this.techCall_("load")},n.reset=function(){var e=this,t=this.options_.Promise||l.a.Promise;this.paused()||!t?this.doReset_():hi(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_(),jt(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 source=this.currentSource(),e=[];return 0!==Object.keys(source).length&&e.push(source),this.cache_.sources||e},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.addTechControl
2sListeners_()):(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(X("beforeerror").forEach((function(n){var r=n(t,e);se(r)&&!Array.isArray(r)||"string"==typeof r||"number"==typeof r||null===r?e=r: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 ui(e),this.addClass("vjs-error"),ee.error("(CODE:"+this.error_.code+" "+ui.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),X("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,r=Nt(this,this.reportUserActivity),o=function(t){r(),this.clearInterval(e)};this.on("mousedown",(function(){r(),this.clearInterval(e),e=this.setInterval(r,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,r())})),this.on("mouseup",o),this.on("mouseleave",o);var l,c=this.getChild("controlBar");!c||xe||me||(c.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),c.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",r),this.on("keyup",r),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(l);var e=this.options_.inactivityTimeout;e<=0||(l=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"),r=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(r),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||l.a.Promise;if(n){if(e){var r=[];return this.isInPictureInPicture()&&r.push(this.exitPictureInPicture()),this.isFullscreen()&&r.push(this.exitFullscreen()),this.audioPosterMode()&&r.push(this.audioPosterMode(!1)),n.all(r).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||l.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,label,t){if(this.tech_)return this.tech_.addTextTrack(e,label,t)},n.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},n.removeRemoteTextTrack=function(e){void 0===e&&(e={});var track=e.track;if(track||(track=e),this.tech_)return this.tech_.removeRemoteTextTrack(track)},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(code){if(void 0===code)return this.language_;this.language_!==String(code).toLowerCase()&&(this.language_=String(code).toLowerCase(),jt(this)&&this.trigger("languagechange"))},n.languages=function(){return Jt(t.prototype.options_.languages,this.languages_)},n.toJSON=function(){var e=Jt(this.options_),t=e.tracks;e.tracks=[];for(var i=0;i<t.length;i++){var track=t[i];(track=Jt(track)).player=void 0,e.tracks[i]=track}return e},n.createModal=function(content,e){var t=this;(e=e||{}).content=content||"";var n=new gi(this,e);return this.addChild(n),n.on("dispose",(function(){t.removeChild(n)})),n.open(),n},n.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),i=0;i<Yr.length;i++){var n=Yr[i];
2if(t<=this.breakpoints_[n]){if(e===n)return;e&&this.removeClass(Qr[e]),this.addClass(Qr[n]),this.breakpoint_=n;break}}},n.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},n.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=ae({},$r,e),this.updateCurrentBreakpoint_()),ae(this.breakpoints_)},n.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},n.currentBreakpoint=function(){return this.breakpoint_},n.currentBreakpointClass=function(){return Qr[this.breakpoint_]||""},n.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=Jt(e);var r=this.cache_.media,o=r.artwork,l=r.poster,c=r.src,d=r.textTracks;!o&&l&&(this.cache_.media.artwork=[{src:l,type:rn(l)}]),c&&this.src(c),l&&this.poster(l),Array.isArray(d)&&d.forEach((function(e){return n.addRemoteTextTrack(e,!1)})),this.ready(t)}},n.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}}))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:rn(t.poster)}]),t}return Jt(this.cache_.media)},t.getTagSettings=function(e){var t={sources:[],tracks:[]},n=ze(e),r=n["data-setup"];if(Fe(e,"vjs-fill")&&(n.fill=!0),Fe(e,"vjs-fluid")&&(n.fluid=!0),null!==r){var o=k()(r||"{}"),l=o[0],data=o[1];l&&ee.error(l),ae(n,data)}if(ae(t,n),e.hasChildNodes())for(var c=e.childNodes,i=0,d=c.length;i<d;i++){var h=c[i],f=h.nodeName.toLowerCase();"source"===f?t.sources.push(ze(h)):"track"===f&&t.tracks.push(ze(h))}return t},n.flexNotSupported_=function(){var e=d.a.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},n.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},n.playbackRates=function(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((function(e){return"number"==typeof e}))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))},t}(ni);Wi.names.forEach((function(e){var t=Wi[e];Jr.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Jr.prototype.crossorigin=Jr.prototype.crossOrigin,Jr.players={};var Zr=l.a.navigator;Jr.prototype.options_={techOrder:zi.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Zr&&(Zr.languages&&Zr.languages[0]||Zr.userLanguage||Zr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){Jr.prototype[e]=function(){return this.techGet_(e)}})),Xr.forEach((function(e){Jr.prototype["handleTech"+$t(e)+"_"]=function(){return this.trigger(e)}})),ni.registerComponent("Player",Jr);var ea="plugin",ta={},ia=function(e){return ta.hasOwnProperty(e)},na=function(e){return ia(e)?ta[e]:void 0},ra=function(e,t){e.activePlugins_=e.activePlugins_||{},e.activePlugins_[t]=!0},aa=function(e,t,n){var r=(n?"before":"")+"pluginsetup";e.trigger(r,t),e.trigger(r+":"+t.name,t)},sa=function(e,t){return t.prototype.name=e,function(){aa(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var l=O()(t,[this].concat(r));return this[e]=function(){return l},aa(this,l.getEventHash()),l}},oa=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),Xt(this),delete this.trigger,Yt(this,this.constructor.defaultState),ra(t,this.name),this.dispose=this.dispose.bind(this),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),At(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(e){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t.activePlugins_[e]=!1,this.player=this.state=null,t[e]=sa(e,ta[e])},e.isBasic=function(t){var p="string"==typeof t?na(t):t;return"function"==typeof p&&!e.prototype.isPrototypeOf(p.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(ia(t))ee.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Jr.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof n+".");return ta[t]=n,t!==ea&&(e.isBasic(n)?Jr.prototype[t]=function(e,t){var n=function(){aa(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return ra(this,e),aa(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}(t,n):Jr.prototype[t]=sa(t,n)),n},e.deregisterPlugin=function(e){if(e===ea)throw new Error("Cannot de-register base plugin.");ia(e)&&(delete ta[e],delete Jr.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(ta)),e.forEach((function(e){var n=na(e);n&&((t=t||{})[e]=n)})),t},e.getPluginVersion=function(e){var t=na(e);return t&&t.VERSION||""},e}();oa.getPlugin=na,oa.BASE_PLUGIN_NAME=ea,oa.registerPlugin(ea,oa),Jr.prototype.usingPlugin=function(e){return!!this.activePlugins_&&!0===this.activePlugins_[e]},Jr.prototype.hasPlugin=function(e){return!!ia(e)};var ua=function(e){return 0===e.indexOf("#")?e.slice(1):e};function la(e,t,n){var r=la.getPlayer(e);if(r)return t&&ee.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&r.ready(n),r;var o="string"==typeof e?ut("#"+ua(e)):e;if(!Me(o))throw new TypeError("The element or ID supplied is not val
2id. (videojs)");o.ownerDocument.defaultView&&o.ownerDocument.body.contains(o)||ee.warn("The element supplied is not included in the DOM"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(o.parentNode&&o.parentNode.hasAttribute("data-vjs-player")?o.parentNode:o).cloneNode(!0)),X("beforesetup").forEach((function(e){var n=e(o,Jt(t));se(n)&&!Array.isArray(n)?t=Jt(t,n):ee.error("please return an object in beforesetup hooks")}));var l=ni.getComponent("Player");return r=new l(o,t,n),X("setup").forEach((function(e){return e(r)})),r}if(la.hooks_=G,la.hooks=X,la.hook=function(e,t){X(e,t)},la.hookOnce=function(e,t){X(e,[].concat(t).map((function(t){return function n(){return K(e,n),t.apply(void 0,arguments)}})))},la.removeHook=K,!0!==l.a.VIDEOJS_NO_DYNAMIC_STYLE&&De()){var style=ut(".vjs-styles-defaults");if(!style){style=vt("vjs-styles-defaults");var head=ut("head");head&&head.insertBefore(style,head.firstChild),yt(style,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: 56.25%\n      }\n    ")}}ft(1,la),la.VERSION=z,la.options=Jr.prototype.options_,la.getPlayers=function(){return Jr.players},la.getPlayer=function(e){var t,n=Jr.players;if("string"==typeof e){var r=ua(e),o=n[r];if(o)return o;t=ut("#"+r)}else t=e;if(Me(t)){var l=t,c=l.player,d=l.playerId;if(c||n[d])return c||n[d]}},la.getAllPlayers=function(){return Object.keys(Jr.players).map((function(e){return Jr.players[e]})).filter(Boolean)},la.players=Jr.players,la.getComponent=ni.getComponent,la.registerComponent=function(e,t){zi.isTech(t)&&ee.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),ni.registerComponent.call(ni,e,t)},la.getTech=zi.getTech,la.registerTech=zi.registerTech,la.use=function(e,t){Gi[e]=Gi[e]||[],Gi[e].push(t)},Object.defineProperty(la,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(la.middleware,"TERMINATOR",{value:Ki,writeable:!1,enumerable:!0}),la.browser=Oe,la.TOUCH_ENABLED=Ce,la.extend=function(e,t){void 0===t&&(t={});var n=function(){e.apply(this,arguments)},r={};for(var o in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),r=t):"function"==typeof t&&(n=t),L()(n,e),e&&(n.super_=e),r)r.hasOwnProperty(o)&&(n.prototype[o]=r[o]);return n},la.mergeOptions=Jt,la.bind=Nt,la.registerPlugin=oa.registerPlugin,la.deregisterPlugin=oa.deregisterPlugin,la.plugin=function(e,t){return ee.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),oa.registerPlugin(e,t)},la.getPlugins=oa.getPlugins,la.getPlugin=oa.getPlugin,la.getPluginVersion=oa.getPluginVersion,la.addLanguage=function(code,data){var e;return code=(""+code).toLowerCase(),la.options.languages=Jt(la.options.languages,((e={})[code]=data,e)),la.options.languages[code]},la.log=ee,la.createLogger=te,la.createTimeRange=la.createTimeRanges=si,la.formatTime=Tn,la.setFormatTime=function(e){bn=e},la.resetFormatTime=function(){bn=_n},la.parseUrl=Pi,la.isCrossOrigin=Mi,la.EventTarget=Ut,la.on=It,la.one=Ot,la.off=xt,la.trigger=At,la.xhr=w.a,la.TextTrack=Bi,la.AudioTrack=ji,la.VideoTrack=Fi,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(e){la[e]=function(){return ee.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),ct[e].apply(null,arguments)}})),la.computedStyle=ue,la.dom=ct,la.url=Ni,la.defineLazyProperty=zr,la.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var ca=D.a,da=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},ha=function(source){return la.log.debug?la.log.debug.bind(la,"VHS:",source+" >"):function(){}},pa=1/30,fa=.1,ma=function(e,t){var i,n=[];if(e&&e.length)for(i=0;i<e.length;i++)t(e.start(i),e.end(i))&&n.push([e.start(i),e.end(i)]);return la.createTimeRanges(n)},ga=function(e,time){return ma(e,(function(e,t){return e-fa<=time&&t+fa>=time}))},va=function(e,time){return ma(e,(function(e){return e-pa>=time}))},ya=function(e){var t=[];if(!e||!e.length)return"";for(var i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},_a=function(e){for(var t=[],i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t}
2,ba=function(a){if(a&&a.length&&a.end)return a.end(a.length-1)},Ta=function(e,t){var time=0;if(!e||!e.length)return time;for(var i=0;i<e.length;i++){var n=e.start(i),r=e.end(i);t>r||(time+=t>n&&t<=r?r-t:r-n)}return time},Sa=la.createTimeRange,Ea=function(e,t){if(!t.preload)return t.duration;var n=0;return(t.parts||[]).forEach((function(p){n+=p.duration})),(t.preloadHints||[]).forEach((function(p){"PART"===p.type&&(n+=e.partTargetDuration)})),n},ka=function(e){return(e.segments||[]).reduce((function(e,t,n){return t.parts?t.parts.forEach((function(r,o){e.push({duration:r.duration,segmentIndex:n,partIndex:o,part:r,segment:t})})):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e}),[])},Ca=function(e){var t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},wa=function(e){var t=e.preloadSegment;if(t){var n=t.parts,r=(t.preloadHints||[]).reduce((function(e,t){return e+("PART"===t.type?1:0)}),0);return r+=n&&n.length?n.length:0}},Ia=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=Ca(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},xa=function(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var r=function(e,t){var n=0,i=t-e.mediaSequence,r=e.segments[i];if(r){if(void 0!==r.start)return{result:r.start,precise:!0};if(void 0!==r.end)return{result:r.end-r.duration,precise:!0}}for(;i--;){if(void 0!==(r=e.segments[i]).end)return{result:n+r.end,precise:!0};if(n+=Ea(e,r),void 0!==r.start)return{result:n+r.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(r.precise)return r.result;var o=function(e,t){for(var n,r=0,i=t-e.mediaSequence;i<e.segments.length;i++){if(void 0!==(n=e.segments[i]).start)return{result:n.start-r,precise:!0};if(r+=Ea(e,n),void 0!==n.end)return{result:n.end-r,precise:!0}}return{result:-1,precise:!1}}(e,t);return o.precise?o.result:r.result+n},Aa=function(e,t,n){if(!e)return 0;if("number"!=typeof n&&(n=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return l.a.Infinity}return xa(e,t,n)},Oa=function(e){var t=e.defaultDuration,n=e.durationList,r=e.startIndex,o=e.endIndex,l=0;if(r>o){var c=[o,r];r=c[0],o=c[1]}if(r<0){for(var i=r;i<Math.min(0,o);i++)l+=t;r=0}for(var d=r;d<o;d++)l+=n[d].duration;return l},Pa=function(e,t,n,r){if(!e||!e.segments)return null;if(e.endList)return Aa(e);if(null===t)return null;t=t||0;var o=xa(e,e.mediaSequence+e.segments.length,t);return n&&(o-=r="number"==typeof r?r:Ia(null,e)),Math.max(0,o)},La=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},Da=function(e){return e.excludeUntil&&e.excludeUntil===1/0},Ma=function(e){var t=La(e);return!e.disabled&&!t},Na=function(e,t){return t.attributes&&t.attributes[e]},Ra=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!!Ma(e)&&(e.attributes.BANDWIDTH||0)<n})).length},Ua=function(a,b){return!(!a&&!b||!a&&b||a&&!b)&&(a===b||(!(!a.id||!b.id||a.id!==b.id)||(!(!a.resolvedUri||!b.resolvedUri||a.resolvedUri!==b.resolvedUri)||!(!a.uri||!b.uri||a.uri!==b.uri))))},Ba=function(e,t){var n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},r=!1;for(var o in n){for(var label in n[o])if(r=t(n[o][label]))break;if(r)break}return!!r},ja=function(e){if(!e||!e.playlists||!e.playlists.length)return Ba(e,(function(e){return e.playlists&&e.playlists.length||e.uri}));for(var t=function(i){var t=e.playlists[i],n=t.attributes&&t.attributes.CODECS;return n&&n.split(",").every((function(e){return Object(N.f)(e)}))||Ba(e,(function(e){return Ua(t,e)}))?"continue":{v:!1}},i=0;i<e.playlists.length;i++){var n=t(i);if("continue"!==n&&"object"==typeof n)return n.v}return!0},Fa={liveEdgeDelay:Ia,duration:Aa,seekable:function(e,t,n){var r=t||0,o=Pa(e,t,!0,n);return null===o?Sa():Sa(r,o)},getMediaInfoForTime:function(e){for(var t=e.playlist,n=e.currentTime,r=e.startingSegmentIndex,o=e.startingPartIndex,l=e.startTime,c=e.experimentalExactManifestTimings,time=n-l,d=ka(t),h=0,i=0;i<d.length;i++){var f=d[i];if(r===f.segmentIndex&&("number"!=typeof o||"number"!=typeof f.partIndex||o===f.partIndex)){h=i;break}}if(time<0){if(h>0)for(var m=h-1;m>=0;m--){var v=d[m];if(time+=v.duration,c){if(time<0)continue}else if(time+pa<=0)continue;return{partIndex:v.partIndex,segmentIndex:v.segmentIndex,startTime:l-Oa({defaultDuration:t.targetDuration,durationList:d,startIndex:h,endIndex:m})}}return{partIndex:d[0]&&d[0].partIndex||null,segmentIndex:d[0]&&d[0].segmentIndex||0,startTime:n}}if(h<0){for(var y=h;y<0;y++)if((time-=t.targetDuration)<0)return{partIndex:d[0]&&d[0].partIndex||null,segmentIndex:d[0]&&d[0].segmentIndex||0,startTime:n};h=0}for(var _=h;_<d.length;_++){var T=d[_];if(time-=T.duration,c){if(time>0)continue}else if(time-pa>=0)continue;return{partIndex:T.partIndex,segmentIndex:T.segmentIndex,startTime:l+Oa({defaultDuration:t.targetDuration,durationList:d,startIndex:h,endIndex:_})}}return{segmentIndex:d[d.length-1].segmentIndex,partIndex:d[d.length-1].partIndex,startTime:n}},isEnabled:Ma,isDisabled:function(e){return e.disabled},isBlacklisted:La,isIncompatible:Da,playlistEnd:Pa,isAes:function(e){for(var i=0;i<e.segments.length;i++)if(e.segments[i].key)return!0;return!1},hasAttribute:Na,estimateSegmentRequestTime:function(e,t,n,r){return void 0===r&&(r=0),Na("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*r)/t:NaN},isLowestEnabledRendition:Ra,isAudioOnly:ja,playlistMatch:Ua,segmentDurationWithParts:Ea},Ha=la.log,qa=function(e,t){return e+"-"+t},Va=function(e,t){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((function(n){if(e.mediaGroups[n])for(var r in e.mediaGroups[n])for(var o in e.mediaGroups[n][r]){var l=e.mediaGroups[n][r][o];t(l,n,r,o)}}))}
2,Wa=function(e){var t=e.playlist,n=e.uri,r=e.id;t.id=r,t.playlistErrors_=0,n&&(t.uri=n),t.attributes=t.attributes||{}},za=function(e,t){e.uri=t;for(var i=0;i<e.playlists.length;i++)if(!e.playlists[i].uri){var n="placeholder-uri-"+i;e.playlists[i].uri=n}var r=ja(e);Va(e,(function(t,n,o,l){var c="placeholder-uri-"+n+"-"+o+"-"+l;if(!t.playlists||!t.playlists.length){if(r&&"AUDIO"===n&&!t.uri)for(var d=0;d<e.playlists.length;d++){var p=e.playlists[d];if(p.attributes&&p.attributes.AUDIO&&p.attributes.AUDIO===o)return}t.playlists=[f()({},t)]}t.playlists.forEach((function(p,i){var t=qa(i,c);p.uri?p.resolvedUri=p.resolvedUri||ca(e.uri,p.uri):(p.uri=0===i?c:t,p.resolvedUri=p.uri),p.id=p.id||t,p.attributes=p.attributes||{},e.playlists[p.id]=p,e.playlists[p.uri]=p}))})),function(e){for(var i=e.playlists.length;i--;){var t=e.playlists[i];Wa({playlist:t,id:qa(i,t.uri)}),t.resolvedUri=ca(e.uri,t.uri),e.playlists[t.id]=t,e.playlists[t.uri]=t,t.attributes.BANDWIDTH||Ha.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){Va(e,(function(t){t.uri&&(t.resolvedUri=ca(e.uri,t.uri))}))}(e)},Ga=la.mergeOptions,Xa=la.EventTarget,Ka=function(a,b){if(!a)return b;var e=Ga(a,b);if(a.preloadHints&&!b.preloadHints&&delete e.preloadHints,a.parts&&!b.parts)delete e.parts;else if(a.parts&&b.parts)for(var i=0;i<b.parts.length;i++)a.parts&&a.parts[i]&&(e.parts[i]=Ga(a.parts[i],b.parts[i]));return!a.skipped&&b.skipped&&(e.skipped=!1),a.preload&&!b.preload&&(e.preload=!1),e},Ya=function(e,t){!e.resolvedUri&&e.uri&&(e.resolvedUri=ca(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ca(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ca(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=ca(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((function(p){p.resolvedUri||(p.resolvedUri=ca(t,p.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((function(p){p.resolvedUri||(p.resolvedUri=ca(t,p.uri))}))},Qa=function(e){var t=e.segments||[],n=e.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints)for(var i=0;i<n.preloadHints.length;i++)if("MAP"===n.preloadHints[i].type)return t;n.duration=e.targetDuration,n.preload=!0,t.push(n)}return t},$a=function(a,b){return a===b||a.segments&&b.segments&&a.segments.length===b.segments.length&&a.endList===b.endList&&a.mediaSequence===b.mediaSequence&&a.preloadSegment===b.preloadSegment},Ja=function(e,t,n){void 0===n&&(n=$a);var r=Ga(e,{}),o=r.playlists[t.id];if(!o)return null;if(n(o,t))return null;t.segments=Qa(t);var l=Ga(o,t);
2if(l.preloadSegment&&!t.preloadSegment&&delete l.preloadSegment,o.segments){if(t.skip){t.segments=t.segments||[];for(var i=0;i<t.skip.skippedSegments;i++)t.segments.unshift({skipped:!0})}l.segments=function(e,t,n){var r=e.slice(),o=t.slice();n=n||0;for(var l,c=[],d=0;d<o.length;d++){var h=r[d+n],f=o[d];h?(l=h.map||l,c.push(Ka(h,f))):(l&&!f.map&&(f.map=l),c.push(f))}return c}(o.segments,t.segments,t.mediaSequence-o.mediaSequence)}l.segments.forEach((function(e){Ya(e,l.resolvedUri)}));for(var c=0;c<r.playlists.length;c++)r.playlists[c].id===t.id&&(r.playlists[c]=l);return r.playlists[t.id]=l,r.playlists[t.uri]=l,Va(e,(function(e,n,r,o){if(e.playlists)for(var c=0;c<e.playlists.length;c++)t.id===e.playlists[c].id&&(e.playlists[c]=l)})),r},Za=function(e,t){var n=e.segments||[],r=n[n.length-1],o=r&&r.parts&&r.parts[r.parts.length-1],l=o&&o.duration||r&&r.duration;return t&&l?1e3*l:500*(e.partTargetDuration||e.targetDuration||10)},es=function(e){function t(t,n,r){var o;if(void 0===r&&(r={}),o=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");o.logger_=ha("PlaylistLoader");var l=r,c=l.withCredentials,d=void 0!==c&&c,h=l.handleManifestRedirects,f=void 0!==h&&h;o.src=t,o.vhs_=n,o.withCredentials=d,o.handleManifestRedirects=f;var m=n.options_;return o.customTagParsers=m&&m.customTagParsers||[],o.customTagMappers=m&&m.customTagMappers||[],o.experimentalLLHLS=m&&m.experimentalLLHLS||!1,la.browser.IE_VERSION&&(o.experimentalLLHLS=!1),o.state="HAVE_NOTHING",o.handleMediaupdatetimeout_=o.handleMediaupdatetimeout_.bind(_()(o)),o.on("mediaupdatetimeout",o.handleMediaupdatetimeout_),o}S()(t,e);var n=t.prototype;return n.handleMediaupdatetimeout_=function(){var e=this;if("HAVE_METADATA"===this.state){var t=this.media(),n=ca(this.master.uri,t.uri);this.experimentalLLHLS&&(n=function(e,t){if(t.endList||!t.serverControl)return e;var n={};if(t.serverControl.canBlockReload){var r=t.preloadSegment,o=t.mediaSequence+t.segments.length;if(r){var c=r.parts||[],d=wa(t)-1;d>-1&&d!==c.length-1&&(n._HLS_part=d),(d>-1||c.length)&&o--}n._HLS_msn=o}if(t.serverControl&&t.serverControl.canSkipUntil&&(n._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){var h=new l.a.URL(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){n.hasOwnProperty(e)&&h.searchParams.set(e,n[e])})),e=h.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 r=t.uri,o=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[o],status:e.status,message:"HLS playlist request error at URL: "+r+".",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,r=e.manifestString,o=e.customTagParsers,l=void 0===o?[]:o,c=e.customTagMappers,d=void 0===c?[]:c,h=e.experimentalLLHLS,f=new M.a;t&&f.on("warn",t),n&&f.on("info",n),l.forEach((function(e){return f.addParser(e)})),d.forEach((function(e){return f.addTagMapper(e)})),f.push(r),f.end();var m=f.manifest;if(h||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){m.hasOwnProperty(e)&&delete m[e]})),m.segments&&m.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!m.targetDuration){var v=10;m.segments&&m.segments.length&&(v=m.segments.reduce((function(e,s){return Math.max(e,s.duration)}),0)),t&&t("manifest has no targetDuration defaulting to "+v),m.targetDuration=v}var y=Ca(m);if(y.length&&!m.partTargetDuration){var _=y.reduce((function(e,p){return Math.max(e,p.duration)}),0);t&&(t("manifest has no partTargetDuration defaulting to "+_),Ha.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.")),m.partTargetDuration=_}return m}({onwarn:function(e){var r=e.message;return t.logger_("m3u8-parser warn for "+n+": "+r)},oninfo:function(e){var r=e.message;return t.logger_("m3u8-parser info for "+n+": "+r)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},n.haveMetadata=function(e){var t=e.playlistString,n=e.playlistOb
2ject,r=e.url,o=e.id;this.request=null,this.state="HAVE_METADATA";var l=n||this.parseManifest_({url:r,manifestString:t});l.lastRequest=Date.now(),Wa({playlist:l,uri:r,id:o});var c=Ja(this.master,l);this.targetDuration=l.partTargetDuration||l.targetDuration,this.pendingMedia_=null,c?(this.master=c,this.media_=this.master.playlists[o]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Za(this.media(),!!c)),this.trigger("loadedplaylist")},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),l.a.clearTimeout(this.mediaUpdateTimeout),l.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(l.a.clearTimeout(this.finalRenditionTimeout),t){var r=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=l.a.setTimeout(this.media.bind(this,e,!1),r)}else{var o=this.state,c=!this.media_||e.id!==this.media_.id,d=this.master.playlists[e.id];if(d&&d.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(c&&(this.trigger("mediachanging"),"HAVE_MASTER"===o?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Za(e,!0)),c){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,r){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=da(n.handleManifestRedirects,e.resolvedUri,r),t)return n.playlistRequestError(n.request,e,o);n.haveMetadata({playlistString:r.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===o?n.trigger("loadedmetadata"):n.trigger("mediachange")}}))}}},n.pause=function(){this.mediaUpdateTimeout&&(l.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&&(l.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var n=this.media();if(e){var r=n?(n.partTargetDuration||n.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=l.a.setTimeout((function(){t.mediaUpdateTimeout=null,t.load()}),r)}else this.started?n&&!n.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},n.updateMediaUpdateTimeout_=function(e){var t=this;this.mediaUpdateTimeout&&(l.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=l.a.setTimeout((function(){t.mediaUpdateTimeout=null,t.trigger("mediaupdatetimeout"),t.updateMediaUpdateTimeout_(e)}),e))},n.start=function(){var e=this;
2if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=l.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=da(e.handleManifestRedirects,e.src,n);var r=e.parseManifest_({manifestString:n.responseText,url:e.src});e.setupInitialPlaylist(r)}}))},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,za(this.master,this.srcUri()),e.playlists.forEach((function(e){e.segments=Qa(e),e.segments.forEach((function(t){Ya(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||l.a.location.href;this.master=function(e,t){var n=qa(0,t),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:l.a.location.href,resolvedUri:l.a.location.href,playlists:[{uri:t,id:n,resolvedUri:t,attributes:{}}]};return r.playlists[n]=r.playlists[0],r.playlists[t]=r.playlists[0],r}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},t}(Xa),ts=la.xhr,is=la.mergeOptions,ns=function(e,t,n,r){var o="arraybuffer"===e.responseType?e.response:e.responseText;!t&&o&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=o.byteLength||o.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&&(o||e.responseText)))),r(t,e)},rs=function(){var e=function e(t,n){t=is({timeout:45e3},t);var r=e.beforeRequest||la.Vhs.xhr.beforeRequest;if(r&&"function"==typeof r){var o=r(t);o&&(t=o)}var l=(!0===la.Vhs.xhr.original?ts:la.Vhs.xhr)(t,(function(e,t){return ns(l,e,t,n)})),c=l.abort;return l.abort=function(){return l.aborted=!0,c.apply(l,arguments)},l.uri=t.uri,l.requestTime=Date.now(),l};return e.original=!0,e},as=function(e){var t,n={};return e.byterange&&(n.Range="bytes="+(t=e.byterange).offset+"-"+("bigint"==typeof t.offset||"bigint"==typeof t.length?l.a.BigInt(t.offset)+l.a.BigInt(t.length)-l.a.BigInt(1):t.offset+t.length-1)),n},ss=function(e,i){return e.start(i)+"-"+e.end(i)},os=function(e,i){var t=e.toString(16);return"00".substring(0,2-t.length)+t+(i%2?" ":"")},us=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},ls=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];Object(U.e)(r)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r})),t},cs=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},ds=function(e){return e.resolvedUri},hs=function(data){for(var e=Array.prototype.slice.call(data),t=16,n="",r=0;r<e.length/t;r++)n+=e.slice(r*t,r*t+t).map(os).join("")+" "+e.slice(r*t,r*t+t).map(us).join("")+"\n";return n},ps=Object.freeze({__proto__:null,createTransferableMessage:ls,initSegmentId:cs,segmentKeyId:ds,hexDump:hs,tagDump:function(e){var t=e.bytes;return hs(t)},textRanges:function(e){var i,t="";for(i=0;i<e.length;i++)t+=ss(e,i)+" ";return t}}),fs=function(e){var t=e.playlist,n=e.time,time=void 0===n?void 0:n,r=e.callback;if(!r)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===time)return r({message:"getProgramTime: playlist and time must be provided"});var o=function(time,e){if(!e||!e.segments||0===e.segments.length)return null;for(var t,n=0,i=0;i<e.segments.length&&!(time<=(n=(t=e.segments[i]).videoTimingInfo?t.videoTimingInfo.transmuxedPresentationEnd:n+t.duration));i++);var r=e.segments[e.segments.length-1];if(r.videoTimingInfo&&r.videoTimingInfo.transmuxedPresentationEnd<time)return null;if(time>n){if(time>n+.25*r.duration)return null;t=r}return{segment:t,estimatedStart:t.videoTimingInfo?t.videoTimingInfo.transmuxedPresentationStart:n-t.duration,type:t.videoTimingInfo?"accurate":"estimate"}}(time,t);if(!o)return r({message:"valid programTime was not found"});if("estimate"===o.type)return r({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:o.estimatedStart});var l={mediaSeconds:time},c=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,r=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*r)}(time,o.segment);return c&&(l.programDateTime=c.toISOString()),r(null,l)},ms=function e(t){var n=t.programTime,r=t.playlist,o=t.retryCount,l=void 0===o?2:o,c=t.seekTo,d=t.pauseAfterSeek,h=void 0===d||d,f=t.tech,m=t.callback;if(!m)throw new Error("seekToProgramTime: callback must be provided");
2if(void 0===n||!r||!c)return m({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!r.endList&&!f.hasStarted_)return m({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 i=0;i<e.segments.length;i++)if(!e.segments[i].dateTimeObject)return!1;return!0}(r))return m({message:"programDateTime tags must be provided in the manifest "+r.resolvedUri});var v=function(e,t){var n;try{n=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;var r=t.segments[0];if(n<r.dateTimeObject)return null;for(var i=0;i<t.segments.length-1&&(r=t.segments[i],!(n<t.segments[i+1].dateTimeObject));i++);var o,l=t.segments[t.segments.length-1],c=l.dateTimeObject,d=l.videoTimingInfo?(o=l.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:l.duration+.25*l.duration;return n>new Date(c.getTime()+1e3*d)?null:(n>c&&(r=l),{segment:r,estimatedStart:r.videoTimingInfo?r.videoTimingInfo.transmuxedPresentationStart:Fa.duration(t,t.mediaSequence+t.segments.indexOf(r)),type:r.videoTimingInfo?"accurate":"estimate"})}(n,r);if(!v)return m({message:n+" was not found in the stream"});var y=v.segment,_=function(e,t){var n,r;try{n=new Date(e),r=new Date(t)}catch(e){}var o=n.getTime();return(r.getTime()-o)/1e3}(y.dateTimeObject,n);if("estimate"===v.type)return 0===l?m({message:n+" is not buffered yet. Try again"}):(c(v.estimatedStart+_),void f.one("seeked",(function(){e({programTime:n,playlist:r,retryCount:l-1,seekTo:c,pauseAfterSeek:h,tech:f,callback:m})})));var T=y.start+_;f.one("seeked",(function(){return m(null,f.currentTime())})),h&&f.pause(),c(T)},gs=function(e,t){if(4===e.readyState)return t()},vs=la.EventTarget,ys=la.mergeOptions,_s=function(a,b){if(!$a(a,b))return!1;if(a.sidx&&b.sidx&&(a.sidx.offset!==b.sidx.offset||a.sidx.length!==b.sidx.length))return!1;if(!a.sidx&&b.sidx||a.sidx&&!b.sidx)return!1;if(a.segments&&!b.segments||!a.segments&&b.segments)return!1;if(!a.segments&&!b.segments)return!0;for(var i=0;i<a.segments.length;i++){var e=a.segments[i],t=b.segments[i];if(e.uri!==t.uri)return!1;if(e.byterange||t.byterange){var n=e.byterange,r=t.byterange;if(n&&!r||!n&&r)return!1;if(n.offset!==r.offset||n.length!==r.length)return!1}}return!0},bs=function(e,t){var a,b,n={};for(var r in e){var o=e[r].sidx;if(o){var l=Object(B.b)(o);if(!t[l])break;var c=t[l].sidxInfo;a=c,b=o,(Boolean(!a.map&&!b.map)||Boolean(a.map&&b.map&&a.map.byterange.offset===b.map.byterange.offset&&a.map.byterange.length===b.map.byterange.length))&&a.uri===b.uri&&a.byterange.offset===b.byterange.offset&&a.byterange.length===b.byterange.length&&(n[l]=t[l])}}return n},Ts=function(e){function t(t,n,r,o){var l;void 0===r&&(r={}),(l=e.call(this)||this).masterPlaylistLoader_=o||_()(l),o||(l.isMaster_=!0);var c=r,d=c.withCredentials,h=void 0!==d&&d,f=c.handleManifestRedirects,m=void 0!==f&&f;if(l.vhs_=n,l.withCredentials=h,l.handleManifestRedirects=m,!t)throw new Error("A non-empty playlist URL or object is required");return l.on("minimumUpdatePeriod",(function(){l.refreshXml_()})),l.on("mediaupdatetimeout",(function(){l.refreshMedia_(l.media().id)})),l.state="HAVE_NOTHING",l.loadedPlaylists_={},l.logger_=ha("DashPlaylistLoader"),l.isMaster_?(l.masterPlaylistLoader_.srcUrl=t,l.masterPlaylistLoader_.sidxMapping_={}):l.childPlaylist_=t,l}S()(t,e);var n=t.prototype;return n.requestErrored_=function(e,t,n){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,n&&(this.state=n),this.trigger("error"),!0):void 0)},n.addSidxSegments_=function(e,t,n){var r=this,o=e.sidx&&Object(B.b)(e.sidx);if(e.sidx&&o&&!this.masterPlaylistLoader_.sidxMapping_[o]){var c=da(this.handleManifestRedirects,e.sidx.resolvedUri),d=function(l,c){if(!r.requestErrored_(l,c,t)){var d,h=r.masterPlaylistLoader_.sidxMapping_;try{d=F()(Object(U.k)(c.response).subarray(8))}catch(e){return void r.requestErrored_(e,c,t)}return h[o]={sidxInfo:e.sidx,sidx:d},Object(B.a)(e,d,e.sidx.resolvedUri),n(!0)}};this.request=function(e,t,n){var r,o=[],l=!1,c=function(e,t,r,o){return t.abort(),l=!0,n(e,t,r,o)},d=function(e,t){if(!l){if(e)return c(e,t,"",o);var n=t.responseText.substring(o&&o.byteLength||0,t.responseText.length);if(o=Object(U.d)(o,Object(U.h)(n,!0)),r=r||Object(H.a)(o),o.length<10||r&&o.length<r+2)return gs(t,(function(){return c(e,t,"",o)}));var d=Object(V.a)(o);return"ts"===d&&o.length<188||!d&&o.length<376?gs(t,(function(){return c(e,t,"",o)})):c(null,t,d,o)}},h={uri:e,beforeSend:function(e){e.overrideMimeType("text/plain;
2 charset=x-user-defined"),e.addEventListener("progress",(function(t){return t.total,t.loaded,ns(e,null,{statusCode:e.status},d)}))}},f=t(h,(function(e,t){return ns(f,e,t,d)}));return f}(c,this.vhs_.xhr,(function(t,n,o,l){if(t)return d(t,n);if(!o||"mp4"!==o)return d({status:n.status,message:"Unsupported "+(o||"unknown")+" container type for sidx segment at URL: "+c,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var h=e.sidx.byterange,f=h.offset,m=h.length;if(l.length>=m+f)return d(t,{response:l.subarray(f,f+m),status:n.status,uri:n.uri});r.request=r.vhs_.xhr({uri:c,responseType:"arraybuffer",headers:as({byterange:e.sidx.byterange})},d)}))}else this.mediaRequest_=l.a.setTimeout((function(){return n(!1)}),0)},n.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},l.a.clearTimeout(this.minimumUpdatePeriodTimeout_),l.a.clearTimeout(this.mediaRequest_),l.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 r=!this.media_||e.id!==this.media_.id;if(r&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(r&&(this.trigger("mediachanging"),this.trigger("mediachange")));r&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,(function(r){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(),l.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(l.a.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},n.load=function(e){var t=this;l.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var n=this.media();if(e){var r=n?n.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=l.a.setTimeout((function(){return t.load()}),r)}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_=l.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,r){if(!t.requestErrored_(n,r)){var o=r.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=r.responseText,r.responseHeaders&&r.responseHeaders.date?t.masterLoaded_=Date.parse(r.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=da(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,r),o?(t.handleMaster_(),void t.syncClientServerClock_((function(){return e(r,o)}))):e(r,o)}"HAVE_NOTHING"===t.state&&(t.started=!1)}))},n.syncClientServerClock_=function(e){var t=this,n=Object(B.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:ca(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},(function(r,o){if(t.request){if(r)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var l;l="HEAD"===n.method?o.responseHeaders&&o.responseHeaders.date?Date.parse(o.responseHeaders.date):t.masterLoaded_:Date.parse(o.responseText),t.masterPlaylistLoader_.clientOffset_=l-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,r,o,l,c,d=this.masterPlaylistLoader_.master,h=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:d},t=e.masterXml,n=e.srcUrl,r=e.clientOffset,o=e.sidxMapping,l=e.previousManifest,c=Object(B.c)(t,{manifestUri:n,clientOffset:r,sidxMapping:o,previousManifest:l}),za(c,n),c);d&&(h=function(e,t,n){for(var r=!0,o=ys(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),i=0;i<t.playlists.length;i++){var l=t.playlists[i];if(l.sidx){var c=Object(B.b)(l.sidx);n&&n[c]&&n[c].sidx&&Object(B.a)(l,n[c].sidx,l.sidx.resolvedUri)}var d=Ja(o,l,_s);d&&(o=d,r=!1)}return Va(t,(function(e,t,n,label){if(e.playlists&&e.playlists.length){var l=e.playlists[0].id,c=Ja(o,e.playlists[0],_s);c&&((o=c).mediaGroups[t][n][label].playlists[0]=o.playlists[l],r=!1)}})),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(r=!1),r?null:o}(d,h,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=h||d;var f=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return f&&f!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=f),(!d||h&&h.minimumUpdatePeriod!==d.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(h)},n.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(l.a.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;
20===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_=l.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 r,o,l;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(r=e.masterPlaylistLoader_.master,o=e.masterPlaylistLoader_.sidxMapping_,l=bs(r.playlists,o),Va(r,(function(e,t,n,r){if(e.playlists&&e.playlists.length){var c=e.playlists;l=ys(l,bs(c,o))}})),l),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,r=!this.media_||this.media_!==n[e];if(r?this.media_=n[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){!function e(){t.media().endList||(t.mediaUpdateTimeout=l.a.setTimeout((function(){t.trigger("mediaupdatetimeout"),e()}),Za(t.media(),Boolean(r))))}()}this.trigger("loadedplaylist")},t}(vs),Ss={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},Es=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},ks=function(code){return function(){var e=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())}}(code),t=Es(new Worker(e));t.objURL=e;var n=t.terminate;return t.on=t.addEventListener,t.off=t.removeEventListener,t.terminate=function(){return URL.revokeObjectURL(e),n.call(this)},t}},Cs=function(code){return"var browserWorkerPolyFill = "+Es.toString()+";\nbrowserWorkerPolyFill(self);\n"+code},ws=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},Is=Cs(ws((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 r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,i,r,o;if(n=e[t])if(2===arguments.length)for(r=n.length,i=0;i<r;++i)n[i].call(this,arguments[1]);else{for(o=[],i=arguments.length,i=1;i<arguments.length;++i)o.push(arguments[i]);for(r=n.length,i=0;i<r;++i)n[i].apply(this,o)}},this.dispose=function(){e={}}}};t.prototype.pipe=function(e){return this.on("data",(function(data){e.push(data)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},t.prototype.push=function(data){this.trigger("data",data)},t.prototype.flush=function(e){this.trigger("done",e)},t.prototype.partialFlush=function(e){this.trigger("partialdone",e)},t.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},t.prototype.reset=function(e){this.trigger("reset",e)};var n,r,o,l,c,d,h,f,m,v,y,_,T,S,E,k,C,w,I,x,A,O,P,L,D,M,N,R,U,B,j,F,H,V,W,z,G,X,K,Y,Q=t,$=Math.pow(2,32),J={getUint64:function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength);return n.getBigUint64?(t=n.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(t):t:n.getUint32(0)*$+n.getUint32(4)},MAX_UINT32:$},Z=J.MAX_UINT32;!function(){var i;if(O={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(i in O)O.hasOwnProperty(i)&&(O[i]=[i.charCo
vendor: 19,346 bytes, line 2
2deAt(0),i.charCodeAt(1),i.charCodeAt(2),i.charCodeAt(3)]);P=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),D=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),L=new Uint8Array([0,0,0,1]),M=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),N=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),R={video:M,audio:N},j=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),B=new Uint8Array([0,0,0,0,0,0,0,0]),F=new Uint8Array([0,0,0,0,0,0,0,0]),H=F,V=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),W=F,U=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),n=function(e){var i,t,n=[],r=0;for(i=1;i<arguments.length;i++)n.push(arguments[i]);for(i=n.length;i--;)r+=n[i].byteLength;for(t=new Uint8Array(r+8),new DataView(t.buffer,t.byteOffset,t.byteLength).setUint32(0,t.byteLength),t.set(e,4),i=0,r=8;i<n.length;i++)t.set(n[i],r),r+=n[i].byteLength;return t},r=function(){return n(O.dinf,n(O.dref,j))},o=function(track){return n(O.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,track.audioobjecttype<<3|track.samplingfrequencyindex>>>1,track.samplingfrequencyindex<<7|track.channelcount<<3,6,1,2]))},E=function(e){return n(O.hdlr,R[e])},S=function(track){var e=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,track.duration>>>24&255,track.duration>>>16&255,track.duration>>>8&255,255&track.duration,85,196,0,0]);return track.samplerate&&(e[12]=track.samplerate>>>24&255,e[13]=track.samplerate>>>16&255,e[14]=track.samplerate>>>8&255,e[15]=255&track.samplerate),n(O.mdhd,e)},T=function(track){return n(O.mdia,S(track),E(track.type),d(track))},c=function(e){return n(O.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},d=function(track){return n(O.minf,"video"===track.type?n(O.vmhd,U):n(O.smhd,B),r(),C(track))},h=function(e,t){for(var r=[],i=t.length;i--;)r[i]=I(t[i]);return n.apply(null,[O.moof,c(e)].concat(r))},f=function(e){for(var i=e.length,t=[];i--;)t[i]=y(e[i]);return n.apply(null,[O.moov,v(4294967295)].concat(t).concat(m(e)))},m=function(e){for(var i=e.length,t=[];i--;)t[i]=x(e[i]);return n.apply(null,[O.mvex].concat(t))},v=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(O.mvhd,t)},k=function(track){var e,i,t=track.samples||[],r=new Uint8Array(4+t.length);for(i=0;i<t.length;i++)e=t[i].flags,r[i+4]=e.dependsOn<<4|e.isDependedOn<<2|e.hasRedundancy;return n(O.sdtp,r)},C=function(track){return n(O.stbl,w(track),n(O.stts,W),n(O.stsc,H),n(O.stsz,V),n(O.stco,F))},w=function(track){return n(O.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===track.type?z(track):G(track))},z=function(track){var i,e,t=track.sps||[],r=track.pps||[],o=[],l=[];for(i=0;i<t.length;i++)o.push((65280&t[i].byteLength)>>>8),o.push(255&t[i].byteLength),o=o.concat(Array.prototype.slice.call(t[i]));for(i=0;i<r.length;i++)l.push((65280&r[i].byteLength)>>>8),l.push(255&r[i].byteLength),l=l.concat(Array.prototype.slice.call(r[i]));if(e=[O.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&track.width)>>8,255&track.width,(65280&track.height)>>8,255&track.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(O.avcC,new Uint8Array([1,track.profileIdc,track.profileCompatibility,track.levelIdc,255].concat([t.length],o,[r.length],l))),n(O.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],track.sarRatio){var c=track.sarRatio[0],d=track.sarRatio[1];e.push(n(O.pasp,new Uint8Array([(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c,(4278190080&d)>>24,(16711680&d)>>16,(65280&d)>>8,255&d])))}return n.apply(null,e)},G=function(track){return n(O.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&track.channelcount)>>8,255&track.channelcount,(65280&track.samplesize)>>8,255&track.samplesize,0,0,0,0,(65280&track.samplerate)>>8,255&track.samplerate,0,0]),o(track))},_=function(track){var e=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&track.id)>>24,(16711680&track.id)>>16,(65280&track.id)>>8,255&track.id,0,0,0,0,(4278190080&track.duration)>>24,(16711680&track.duration)>>16,(65280&track.duration)>>8,255&track.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&track.width)>>8,255&track.width,0,0,(65280&track.height)>>8,255&track.height,0,0]);return n(O.tkhd,e)},I=function(track){var e,t,r,o,l,c;return e=n(O.tfhd,new Uint8Array([0,0,0,58,(4278190080&track.id)>>24,(16711680&track.id)>>16,(65280&track.id)>>8,255&track.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),l=Math.floor(track.baseMediaDecodeTime/Z),c=Math.floor(track.baseMediaDecodeTime%Z),t=n(O.tfdt,new Uint8Array([1,0,0,0,l>>>24&255,l>>>16&255,l>>>8&255,255&l,c>>>24&255,c>>>16&255,c>>>8&255,255&c])),92,"audio"===track.type?(r=A(track,92),n(O.traf,e,t,r)):(o=k(track),r=A(track,o.length+92),n(O.traf,e,t,r,o))},y=function(track){return track.duration=track.duration||4294967295,n(O.trak,_(track),T(track))},x=function(track){var e=new Uint8Array([0,0,0,0,(4278190080&track.id)>>24,(16711680&track.id)>>16,(65280&track.id)>>8,255&track.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==track.type&&(e[e.length-1]=0),n(O.trex,e)},Y=function(e,t){var n=0,r=0,o=0,l=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(r=2),void 0!==e[0].flags&&(o=4),void 0!==e[0].compositionTimeOffset&&(l=8)),[0,0,n|r|o|l,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]},K=function(track,e){var t,r,header,o,l,i;for(e+=20+16*(o=track.samples||[]).length,header=Y(o,e),(r=new Uint8Array(header.length+16*o.length)).set(header),t=header.length,i=0;i<o.length;i++)l=o[i],r[t++]=(4278190080&l.duration)>>>24,r[t++]=(16711680&l.duration)>>>16,r[t++]=(65280&l.duration)>>>8,r[t++]=255&l.duration,r[t++]=(4278190080&l.size)>>>24,r[t++]=(16711680&l.size)>>>16,r[t++]=(65280&l.size)>>>8,r[t++]=255&l.size,r[t++]=l.flags.isLeading<<2|l.flags.dependsOn,r[t++]=l.flags.isDependedOn<<6|l.flags.hasRedundancy<<4|l.flags.paddingValue<<1|l.flags.isNonSyncSample,r[t++]=61440&l.flags.degradationPriority,r[t++]=15&l.flags.degradationPriority,r[t++]=(4278190080&l.compositionTimeOffset)>>>24,r[t++]=(16711680&l.compositionTimeOffset)>>>16,r[t++]=(65280&l.compositionTimeOffset)>>>8,r[t++]=255&l.compositionTimeOffset;return n(O.trun,r)},X=function(track,e){var t,r,header,o,l,i;for(e+=20+8*(o=track.samples||[]).length,header=Y(o,e),(t=new Uint8Array(header.length+8*o.length)).set(header),r=header.length,i=0;i<o.length;i++)l=o[i],t[r++]=(4278190080&l.duration)>>>24,t[r++]=(16711680&l.duration)>>>16,t[r++]=(65280&l.duration)>>>8,t[r++]=255&l.duration,t[r++]=(4278190080&l.size)>>>24,t[r++]=(16711680&l.size)>>>16,t[r++]=(65280&l.size)>>>8,t[r++]=255&l.size;return n(O.trun,t)},A=function(track,e){return"audio"===track.type?X(track,e):K(track,e)};l=function(){return n(O.ftyp,P,L,P,D)};var ee,te,ie,ne,re,ae,se,oe,ue=function(data){return n(O.mdat,data)},le=h,ce=function(e){var t,n=l(),r=f(e);return(t=new Uint8Array(n.byteLength+r.byteLength)).set(n),t.set(r,n.byteLength),t},de=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},he=function(e){var i,t,n=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,n.byteLength=0,i=0;i<e.length;i++)"access_unit_delimiter_rbsp"===(t=e[i]).nalUnitType?(n.length&&(n.duration=t.dts-n.dts,r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n)),(n=[t]).byteLength=t.data.byteLength,n.pts=t.pts,n.dts=t.dts):("slice_layer_without_partitioning_rbsp_idr"===t.nalUnitType&&(n.keyFrame=!0),n.duration=t.dts-n.dts,n.byteLength+=t.data.byteLength,n.push(t));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n),r},pe=function(e){var i,t,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,i=0;i<e.length;i++)(t=e[i]).keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),(n=[t]).nalCount=t.length,n.byteLength=t.byteLength,n.pts=t.pts,n.dts=t.dts,n.duration=t.duration):(n.duration+=t.duration,n.nalCount+=t.length,n.byteLength+=t.byteLength,n.push(t));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r},fe=function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(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},me=function(e,t){var n,i,r,o,l,c=t||0,d=[];for(n=0;n<e.length;n++)for(o=e[n],i=0;i<o.length;i++)l=o[i],c+=(r=de(l,c)).size,d.push(r);return d},ge=function(e){var t,i,n,r,o,l,c=0,d=e.byteLength,h=e.nalCount,data=new Uint8Array(d+4*h),view=new DataView(data.buffer);for(t=0;t<e.length;t++)for(r=e[t],i=0;i<r.length;i++)for(o=r[i],n=0;n<o.length;n++)l=o[n],view.setUint32(c,l.data.byteLength),c+=4,data.set(l.data,c),c+=l.data.byteLength;return data},ve=[33,16,5,32,164,27],ye=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],_e=function(e){for(var a=[];e--;)a.push(0);return a},be=function(){if(!ee){var e={96e3:[ve,[227,64],_e(154),[56]],88200:[ve,[231],_e(170),[56]],64e3:[ve,[248,192],_e(240),[56]],48e3:[ve,[255,192],_e(268),[55,148,128],_e(54),[112]],44100:[ve,[255,192],_e(268),[55,163,128],_e(84),[112]],32e3:[ve,[255,192],_e(268),[55,234],_e(226),[112]],24e3:[ve,[255,192],_e(268),[55,255,128],_e(268),[111,112],_e(126),[224]],16e3:[ve,[255,192],_e(268),[55,255,128],_e(268),[111,255],_e(269),[223,108],_e(195),[1,192]],12e3:[ye,_e(268),[3,127,248],_e(268),[6,255,240],_e(268),[13,255,224],_e(268),[27,253,128],_e(259),[56]],11025:[ye,_e(268),[3,127,248],_e(268),[6,255,240],_e(268),[13,255,224],_e(268),[27,255,192],_e(268),[55,175,128],_e(108),[112]],8e3:[ye,_e(268),[3,121,16],_e(47),[7]]};t=e,ee=Object.keys(t).reduce((function(e,n){return e[n]=new Uint8Array(t[n].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return ee},Te=9e4;ae=function(e,t){return te(re(e,t))},se=function(e,t){return ie(ne(e),t)},oe=function(e,t,n){return ne(n?e:e-t)};var Se=Te,Ee=te=function(e){return e*Te},ke=(ie=function(e,t){return e*t},ne=function(e){return e/Te}),Ce=(re=function(e,t){return e/t},ae),we=se,Ie=oe,xe=function(track,e,t,n){var r,o,l,i,c,d=0,h=0,f=0;if(e.length&&(r=Ce(track.baseMediaDecodeTime,track.samplerate),o=Math.ceil(Se/(track.samplerate/1024)),t&&n&&(d=r-Math.max(t,n),f=(h=Math.floor(d/o))*o),!(h<1||f>Se/2))){for((l=be()[track.samplerate])||(l=e[0].data),i=0;i<h;i++)c=e[0],e.splice(0,0,{data:l,dts:c.dts-o,pts:c.pts-o});return track.baseMediaDecodeTime-=Math.floor(we(f,track.samplerate)),f}},Ae=function(e,track,t){return track.minSegmentDts>=t?e:(track.minSegmentDts=1/0,e.filter((function(e){return e.dts>=t&&(track.minSegmentDts=Math.min(track.minSegmentDts,e.dts),track.minSegmentPts=track.minSegmentDts,!0)})))},Oe=function(e){var i,t,n=[];for(i=0;i<e.length;i++)t=e[i],n.push({size:t.data.byteLength,duration:1024});return n},Pe=function(e){var i,t,n=0,data=new Uint8Array(function(e){var i,t=0;for(i=0;i<e.length;i++)t+=e[i].data.byteLength;return t}(e));for(i=0;i<e.length;i++)t=e[i],data.set(t.data,n),n+=t.data.byteLength;return data},Le=Se,De=function(track){delete track.minSegmentDts,delete track.maxSegmentDts,delete track.minSegmentPts,delete track.maxSegmentPts},Me=function(track,e){var t,n=track.minSegmentDts;return e||(n-=track.timelineStartInfo.dts),t=track.timelineStartInfo.baseMediaDecodeTime,t+=n,t=Math.max(0,t),"audio"===track.type&&(t*=track.samplerate/Le,t=Math.floor(t)),t},Ne=function(track,data){"number"==typeof data.pts&&(void 0===track.timelineStartInfo.pts&&(track.timelineStartInfo.pts=data.pts),void 0===track.minSegmentPts?track.minSegmentPts=data.pts:track.minSegmentPts=Math.min(track.minSegmentPts,data.pts),void 0===track.maxSegmentPts?track.maxSegmentPts=data.pts:track.maxSegmentPts=Math.max(track.maxSegmentPts,data.pts)),"number"==typeof data.dts&&(void 0===track.timelineStartInfo.dts&&(track.timelineStartInfo.dts=data.dts),void 0===track.minSegmentDts?track.minSegmentDts=data.dts:track.minSegmentDts=Math.min(track.minSegmentDts,data.dts),void 0===track.maxSegmentDts?track.maxSegmentDts=data.dts:track.maxSegmentDts=Math.max(track.maxSegmentDts,data.dts))},Re=function(e){for(var i=0,t={payloadType:-1,payloadSize:0},n=0,r=0;i<e.byteLength&&128!==e[i];){for(;255===e[i];)n+=255,i++;for(n+=e[i++];255===e[i];)r+=255,i++;if(r+=e[i++],!t.payload&&4===n){if("GA94"===String.fromCharCode(e[i+3],e[i+4],e[i+5],e[i+6])){t.payloadType=n,t.payloadSize=r,t.payload=e.subarray(i,i+r);break}t.payload=void 0}i+=r,n=0,r=0}return t},Ue=function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Be=function(e,t){var i,n,r,data,o=[];if(!(64&t[0]))return o;for(n=31&t[0],i=0;i<n;i++)data={type:3&t[(r=3*i)+2],pts:e},4&t[r+2]&&(data.ccData=t[r+3]<<8|t[r+4],o.push(data));return o},je=function(data){for(var e,t,n=data.byteLength,r=[],i=1;i<n-2;)0===data[i]&&0===data[i+1]&&3===data[i+2]?(r.push(i+2),i+=2):i++;if(0===r.length)return data;e=n-r.length,t=new Uint8Array(e);var o=0;for(i=0;i<e;o++,i++)o===r[0]&&(o++,r.shift()),t[i]=data[o];return t},Fe=4,He=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!=typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new $e(0,0),new $e(0,1),new $e(1,0),new $e(1,1)],this.parse708captions_&&(this.cc708Stream_=new Ge({captionServices:t.captionServices})),this.reset(),this.ccStreams_.forEach((function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))}),this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};(He.prototype=new Q).push=function(e){var t,n,r;if("sei_rbsp"===e.nalUnitType&&(t=Re(e.escapedRBSP)).payload&&t.payloadType===Fe&&(n=Ue(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));r=Be(e.pts,n),this.captionPackets_=this.captionPackets_.concat(r),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},He.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},He.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach((function(e,t){e.presortIndex=t})),this.captionPackets_.sort((function(a,b){return a.pts===b.pts?a.presortIndex-b.presortIndex:a.pts-b.pts})),this.captionPackets_.forEach((function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)}),this),this.captionPackets_.length=0,this.flushCCStreams(e)):this.flushCCStreams(e)},He.prototype.flush=function(){return this.flushStream("flush")},He.prototype.partialFlush=function(){return this.flushStream("partialFlush")},He.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},He.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},He.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},He.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},He.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},He.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var qe={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Ve=function(b){return 32<=b&&b<=127||160<=b&&b<=255},We=function(e){this.windowNum=e,this.reset()};We.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},We.prototype.getText=function(){return this.rows.join("\n")},We.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},We.prototype.newLine=function(e){for(this.rows.length>=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--},We.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},We.prototype.addText=function(text){this.rows[this.rowIdx]+=text},We.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var ze=function(e,t,n){this.serviceNum=e,this.text="",this.currentWindow=new We(-1),this.windows=[],this.stream=n,"string"==typeof t&&this.createTextDecoder(t)};ze.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new We(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},ze.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},ze.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 Ge=function e(t){t=t||{},e.prototype.init.call(this);var n,r=this,o=t.captionServices||{},l={};
vendor: 17,929 bytes, line 2
2Object.keys(o).forEach((function(e){n=o[e],/^SERVICE/.test(e)&&(l[e]=n.encoding)})),this.serviceEncodings=l,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(r.new708Packet(),r.add708Bytes(e)):(null===r.current708Packet&&r.new708Packet(),r.add708Bytes(e))}};Ge.prototype=new Q,Ge.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Ge.prototype.add708Bytes=function(e){var data=e.ccData,t=data>>>8,n=255&data;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(t),this.current708Packet.data.push(n)},Ge.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,r=null,i=0,b=t[i++];for(e.seq=b>>6,e.sizeCode=63&b;i<t.length;i++)r=31&(b=t[i++]),7===(n=b>>5)&&r>0&&(n=b=t[i++]),this.pushServiceBlock(n,i,r),r>0&&(i+=r-1)},Ge.prototype.pushServiceBlock=function(e,t,n){var b,i=t,r=this.current708Packet.data,o=this.services[e];for(o||(o=this.initService(e,i));i<t+n&&i<r.length;i++)b=r[i],Ve(b)?i=this.handleText(i,o):24===b?i=this.multiByteCharacter(i,o):16===b?i=this.extendedCommands(i,o):128<=b&&b<=135?i=this.setCurrentWindow(i,o):152<=b&&b<=159?i=this.defineWindow(i,o):136===b?i=this.clearWindows(i,o):140===b?i=this.deleteWindows(i,o):137===b?i=this.displayWindows(i,o):138===b?i=this.hideWindows(i,o):139===b?i=this.toggleWindows(i,o):151===b?i=this.setWindowAttributes(i,o):144===b?i=this.setPenAttributes(i,o):145===b?i=this.setPenColor(i,o):146===b?i=this.setPenLocation(i,o):143===b?o=this.reset(i,o):8===b?o.currentWindow.backspace():12===b?o.currentWindow.clearText():13===b?o.currentWindow.pendingNewLine=!0:14===b?o.currentWindow.clearText():141===b&&i++},Ge.prototype.extendedCommands=function(i,e){var b=this.current708Packet.data[++i];return Ve(b)&&(i=this.handleText(i,e,{isExtended:!0})),i},Ge.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Ge.prototype.initService=function(e,i){var t,n,r=this;return(t="SERVICE"+e)in this.serviceEncodings&&(n=this.serviceEncodings[t]),this.services[e]=new ze(e,n,r),this.services[e].init(this.getPts(i),(function(t){r.flushDisplayed(t,r.services[e])})),this.services[e]},Ge.prototype.handleText=function(i,e,t){var n,r,code,o,l=t&&t.isExtended,c=t&&t.isMultiByte,d=this.current708Packet.data,h=l?4096:0,f=d[i],m=d[i+1],v=e.currentWindow;return e.textDecoder_&&!l?(c?(r=[f,m],i++):r=[f],n=e.textDecoder_.decode(new Uint8Array(r))):(o=qe[code=h|f]||code,n=4096&code&&code===o?"":String.fromCharCode(o)),v.pendingNewLine&&!v.isEmpty()&&v.newLine(this.getPts(i)),v.pendingNewLine=!1,v.addText(n),i},Ge.prototype.multiByteCharacter=function(i,e){var t=this.current708Packet.data,n=t[i+1],r=t[i+2];return Ve(n)&&Ve(r)&&(i=this.handleText(++i,e,{isMultiByte:!0})),i},Ge.prototype.setCurrentWindow=function(i,e){var t=7&this.current708Packet.data[i];return e.setCurrentWindow(t),i},Ge.prototype.defineWindow=function(i,e){var t=this.current708Packet.data,b=t[i],n=7&b;e.setCurrentWindow(n);var r=e.currentWindow;return b=t[++i],r.visible=(32&b)>>5,r.rowLock=(16&b)>>4,r.columnLock=(8&b)>>3,r.priority=7&b,b=t[++i],r.relativePositioning=(128&b)>>7,r.anchorVertical=127&b,b=t[++i],r.anchorHorizontal=b,b=t[++i],r.anchorPoint=(240&b)>>4,r.rowCount=15&b,b=t[++i],r.columnCount=63&b,b=t[++i],r.windowStyle=(56&b)>>3,r.penStyle=7&b,r.virtualRowCount=r.rowCount+1,i},Ge.prototype.setWindowAttributes=function(i,e){var t=this.current708Packet.data,b=t[i],n=e.currentWindow.winAttr;return b=t[++i],n.fillOpacity=(192&b)>>6,n.fillRed=(48&b)>>4,n.fillGreen=(12&b)>>2,n.fillBlue=3&b,b=t[++i],n.borderType=(192&b)>>6,n.borderRed=(48&b)>>4,n.borderGreen=(12&b)>>2,n.borderBlue=3&b,b=t[++i],n.borderType+=(128&b)>>5,n.wordWrap=(64&b)>>6,n.printDirection=(48&b)>>4,n.scrollDirection=(12&b)>>2,n.justify=3&b,b=t[++i],n.effectSpeed=(240&b)>>4,n.effectDirection=(12&b)>>2,n.displayEffect=3&b,i},Ge.prototype.flushDisplayed=function(e,t){for(var n=[],r=0;r<8;r++)t.windows[r].visible&&!t.windows[r].isEmpty()&&n.push(t.windows[r].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},Ge.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)},Ge.prototype.displayWindows=function(i,e){var b=this.current708Packet.data[++i],t=this.getPts(i);this.flushDisplayed(t,e);for(var n=0;n<8;n++)b&1<<n&&(e.windows[n].visible=1);return i},Ge.prototype.hideWindows=function(i,e){var b=this.current708Packet.data[++i],t=this.getPts(i);this.flushDisplayed(t,e);for(var n=0;n<8;n++)b&1<<n&&(e.windows[n].visible=0);return i},Ge.prototype.toggleWindows=function(i,e){var b=this.current708Packet.data[++i],t=this.getPts(i);this.flushDisplayed(t,e);for(var n=0;n<8;n++)b&1<<n&&(e.windows[n].visible^=1);return i},Ge.prototype.clearWindows=function(i,e){var b=this.current708Packet.data[++i],t=this.getPts(i);this.flushDisplayed(t,e);for(var n=0;n<8;n++)b&1<<n&&e.windows[n].clearText();return i},Ge.prototype.deleteWindows=function(i,e){var b=this.current708Packet.data[++i],t=this.getPts(i);this.flushDisplayed(t,e);for(var n=0;n<8;n++)b&1<<n&&e.windows[n].reset();return i},Ge.prototype.setPenAttributes=function(i,e){var t=this.current708Packet.data,b=t[i],n=e.currentWindow.penAttr;return b=t[++i],n.textTag=(240&b)>>4,n.offset=(12&b)>>2,n.penSize=3&b,b=t[++i],n.italics=(128&b)>>7,n.underline=(64&b)>>6,n.edgeType=(56&b)>>3,n.fontStyle=7&b,i},Ge.prototype.setPenColor=function(i,e){var t=this.current708Packet.data,b=t[i],n=e.currentWindow.penColor;return b=t[++i],n.fgOpacity=(192&b)>>6,n.fgRed=(48&b)>>4,n.fgGreen=(12&b)>>2,n.fgBlue=3&b,b=t[++i],n.bgOpacity=(192&b)>>6,n.bgRed=(48&b)>>4,n.bgGreen=(12&b)>>2,n.bgBlue=3&b,b=t[++i],n.edgeRed=(48&b)>>4,n.edgeGreen=(12&b)>>2,n.edgeBlue=3&b,i},Ge.prototype.setPenLocation=function(i,e){var t=this.current708Packet.data,b=t[i],n=e.currentWindow.penLoc;return e.currentWindow.pendingNewLine=!0,b=t[++i],n.row=15&b,b=t[++i],n.column=63&b,i},Ge.prototype.reset=function(i,e){var t=this.getPts(i);return this.flushDisplayed(t,e),this.initService(e.serviceNum,i)};var Xe={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},Ke=function(code){return null===code?"":(code=Xe[code]||code,String.fromCharCode(code))},Ye=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Qe=function(){for(var e=[],i=15;i--;)e.push("");return e},$e=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 data,t,n,r,text;if((data=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&data)?this.lastControlCode_=data:data!==this.PADDING_&&(this.lastControlCode_=null),n=data>>>8,r=255&data,data!==this.PADDING_)if(data===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(data===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),t=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=t,this.startPts_=e.pts;else if(data===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(data===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(data===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(data===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(data===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(data===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Qe();else if(data===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Qe();else if(data===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Qe()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(n,r))text=Ke((n=(3&n)<<8)|r),this[this.mode_](e.pts,text),this.column_++;else if(this.isExtCharacter(n,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),text=Ke((n=(3&n)<<8)|r),this[this.mode_](e.pts,text),this.column_++;else if(this.isMidRowCode(n,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(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var o=Ye.indexOf(7968&data);"rollUp"===this.mode_&&(o-this.rollUpRows_+1<0&&(o=this.rollUpRows_-1),this.setRollUp(e.pts,o)),o!==this.row_&&(this.clearFormatting(e.pts),this.row_=o),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&data)&&(this.column_=4*((14&data)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),text=Ke(n),text+=Ke(r),this[this.mode_](e.pts,text),this.column_+=text.length)}else this.lastControlCode_=null}};$e.prototype=new Q,$e.prototype.flushDisplayed=function(e){var content=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,"");content.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:content,stream:this.name_})},$e.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Qe(),this.nonDisplayed_=Qe(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},$e.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_},$e.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},$e.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},$e.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},$e.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},$e.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},$e.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},$e.prototype.isNormalChar=function(e){return e>=32&&e<=127},$e.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Qe(),this.displayed_=Qe()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},$e.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var text=t.reduce((function(text,e){return text+"<"+e+">"}),"");this[this.mode_](e,text)},$e.prototype.clearFormatting=function(e){if(this.formatting_.length){var text=this.formatting_.reverse().reduce((function(text,e){return text+"</"+e+">"}),"");this.formatting_=[],this[this.mode_](e,text)}},$e.prototype.popOn=function(e,text){var t=this.nonDisplayed_[this.row_];t+=text,this.nonDisplayed_[this.row_]=t},$e.prototype.rollUp=function(e,text){var t=this.displayed_[this.row_];t+=text,this.displayed_[this.row_]=t},$e.prototype.shiftRowsUp_=function(){var i;for(i=0;i<this.topRow_;i++)this.displayed_[i]="";for(i=this.row_+1;i<15;i++)this.displayed_[i]="";for(i=this.topRow_;i<this.row_;i++)this.displayed_[i]=this.displayed_[i+1];this.displayed_[this.row_]=""},$e.prototype.paintOn=function(e,text){var t=this.displayed_[this.row_];t+=text,this.displayed_[this.row_]=t};var Je={CaptionStream:He,Cea608Stream:$e,Cea708Stream:Ge},Ze={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},et="shared",tt=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},it=function e(t){var n,r;e.prototype.init.call(this),this.type_=t||et,this.push=function(data){this.type_!==et&&data.type!==this.type_||(void 0===r&&(r=data.dts),data.dts=tt(data.dts,r),data.pts=tt(data.pts,r),n=data.dts,this.trigger("data",data))},this.flush=function(){r=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){r=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};it.prototype=new Q;var nt,at=it,st=tt,ot=function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r},ut=function(e,t,n){return decodeURIComponent(ot(e,t,n))},lt=function(data){return data[0]<<21|data[1]<<14|data[2]<<7|data[3]},ct={TXXX:function(e){var i;if(3===e.data[0]){for(i=1;i<e.data.length;i++)if(0===e.data[i]){e.description=ut(e.data,1,i),e.value=ut(e.data,i+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var i;if(3===e.data[0])for(i=1;i<e.data.length;i++)if(0===e.data[i]){e.description=ut(e.data,1,i),e.url=ut(e.data,i+1,e.data.length);break}},PRIV:function(e){var i,t;for(i=0;i<e.data.length;i++)if(0===e.data[i]){e.owner=(t=e.data,unescape(ot(t,0,i)));break}e.privateData=e.data.subarray(i+1),e.data=e.privateData}};nt=function(e){var i,t={descriptor:e&&e.descriptor},n=0,r=[],o=0;if(nt.prototype.init.call(this),this.dispatchType=Ze.METADATA_STREAM_TYPE.toString(16),t.descriptor)for(i=0;i<t.descriptor.length;i++)this.dispatchType+=("00"+t.descriptor[i].toString(16)).slice(-2);this.push=function(e){var t,l,c,d,i;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(o=0,r.length=0),0===r.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(r.push(e),o+=e.data.byteLength,1===r.length&&(n=lt(e.data.subarray(6,10)),n+=10),!(o<n)){for(t={data:new Uint8Array(n),frames:[],pts:r[0].pts,dts:r[0].dts},i=0;i<n;)t.data.set(r[0].data.subarray(0,n-i),i),i+=r[0].data.byteLength,o-=r[0].data.byteLength,r.shift();l=10,64&t.data[5]&&(l+=4,l+=lt(t.data.subarray(10,14)),n-=lt(t.data.subarray(16,20)));do{if((c=lt(t.data.subarray(l+4,l+8)))<1)return void this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});if((d={id:String.fromCharCode(t.data[l],t.data[l+1],t.data[l+2],t.data[l+3]),data:t.data.subarray(l+10,l+c+10)}).key=d.id,ct[d.id]&&(ct[d.id](d),"com.apple.streaming.transportStreamTimestamp"===d.owner)){var h=d.data,f=(1&h[3])<<30|h[4]<<22|h[5]<<14|h[6]<<6|h[7]>>>2;f*=4,f+=3&h[7],d.timeStamp=f,void 0===t.pts&&void 0===t.dts&&(t.pts=d.timeStamp,t.dts=d.timeStamp),this.trigger("timestamp",d)}t.frames.push(d),l+=10,l+=c}while(l<n);this.trigger("data",t)}}},nt.prototype=new Q;var ht,pt,ft,mt=nt,gt=at,vt=188;(ht=function(){var e=new Uint8Array(vt),t=0;ht.prototype.init.call(this),this.push=function(n){var r,o=0,l=vt;for(t?((r=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),r.set(n,t),t=0):r=n;l<r.byteLength;)71!==r[o]||71!==r[l]?(o++,l++):(this.trigger("data",r.subarray(o,l)),o+=vt,l+=vt);o<r.byteLength&&(e.set(r.subarray(o),0),t=r.byteLength-o)},this.flush=function(){t===vt&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new Q,pt=function(){var e,t,n,r;pt.prototype.init.call(this),r=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,r){var o=0;r.payloadUnitStartIndicator&&(o+=e[o]+1),"pat"===r.type?t(e.subarray(o),r):n(e.subarray(o),r)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],r.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=r.pmtPid},n=function(e,t){var n,o;if(1&e[5]){for(r.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,o=12+((15&e[10])<<8|e[11]);o<n;){var l=e[o],c=(31&e[o+1])<<8|e[o+2];l===Ze.H264_STREAM_TYPE&&null===r.programMapTable.video?r.programMapTable.video=c:l===Ze.ADTS_STREAM_TYPE&&null===r.programMapTable.audio?r.programMapTable.audio=c:l===Ze.METADATA_STREAM_TYPE&&(r.programMapTable["timed-metadata"][c]=l),o+=5+((15&e[o+3])<<8|e[o+4])}t.programMapTable=r.programMapTable}},this.push=function(t){var n={},r=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(r+=t[r]+1),0===n.pid)n.type="pat",e(t.subarray(r),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(r),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());
vendor: 4,761 bytes, line 2
2else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,r,n]):this.processPes_(t,r,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=Ze.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Ze.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}},pt.prototype=new Q,pt.STREAM_TYPES={h264:27,adts:15},ft=function(){var e,t=this,n=!1,video={data:[],size:0},audio={data:[],size:0},r={data:[],size:0},o=function(e,n,r){var o,l,c=new Uint8Array(e.size),d={type:n},i=0,h=0;if(e.data.length&&!(e.size<9)){for(d.trackId=e.data[0].pid,i=0;i<e.data.length;i++)l=e.data[i],c.set(l.data,h),h+=l.data.byteLength;var f,m,v,y;m=d,y=(f=c)[0]<<16|f[1]<<8|f[2],m.data=new Uint8Array,1===y&&(m.packetLength=6+(f[4]<<8|f[5]),m.dataAlignmentIndicator=0!=(4&f[6]),192&(v=f[7])&&(m.pts=(14&f[9])<<27|(255&f[10])<<20|(254&f[11])<<12|(255&f[12])<<5|(254&f[13])>>>3,m.pts*=4,m.pts+=(6&f[13])>>>1,m.dts=m.pts,64&v&&(m.dts=(14&f[14])<<27|(255&f[15])<<20|(254&f[16])<<12|(255&f[17])<<5|(254&f[18])>>>3,m.dts*=4,m.dts+=(6&f[18])>>>1)),m.data=f.subarray(9+f[8])),o="video"===n||d.packetLength<=e.size,(r||o)&&(e.size=0,e.data.length=0),o&&t.trigger("data",d)}};ft.prototype.init.call(this),this.push=function(data){({pat:function(){},pes:function(){var e,t;switch(data.streamType){case Ze.H264_STREAM_TYPE:e=video,t="video";break;case Ze.ADTS_STREAM_TYPE:e=audio,t="audio";break;case Ze.METADATA_STREAM_TYPE:e=r,t="timed-metadata";break;default:return}data.payloadUnitStartIndicator&&o(e,t,!0),e.data.push(data),e.size+=data.data.byteLength},pmt:function(){var r={type:"metadata",tracks:[]};null!==(e=data.programMapTable).video&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),n=!0,t.trigger("data",r)}})[data.type]()},this.reset=function(){video.size=0,video.data.length=0,audio.size=0,audio.data.length=0,this.trigger("reset")},this.flushStreams_=function(){o(video,"video"),o(audio,"audio"),o(r,"timed-metadata")},this.flush=function(){if(!n&&e){var r={type:"metadata",tracks:[]};null!==e.video&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&r.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",r)}n=!1,this.flushStreams_(),this.trigger("done")}},ft.prototype=new Q;var yt={PAT_PID:0,MP2T_PACKET_LENGTH:vt,TransportPacketStream:ht,TransportParseStream:pt,ElementaryStream:ft,TimestampRolloverStream:gt,CaptionStream:Je.CaptionStream,Cea608Stream:Je.Cea608Stream,Cea708Stream:Je.Cea708Stream,MetadataStream:mt};for(var _t in Ze)Ze.hasOwnProperty(_t)&&(yt[_t]=Ze[_t]);var bt,Tt=yt,St=Se,Et=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];bt=function(e){var t,n=0;bt.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(r){var o,l,c,d,h,i=0;if(e||(n=0),"audio"===r.type){var f;for(t&&t.length?(c=t,(t=new Uint8Array(c.byteLength+r.data.byteLength)).set(c),t.set(r.data,c.byteLength)):t=r.data;i+7<t.length;)if(255===t[i]&&240==(246&t[i+1])){if("number"==typeof f&&(this.skipWarn_(f,i),f=null),l=2*(1&~t[i+1]),o=(3&t[i+3])<<11|t[i+4]<<3|(224&t[i+5])>>5,h=(d=1024*(1+(3&t[i+6])))*St/Et[(60&t[i+2])>>>2],t.byteLength-i<o)break;this.trigger("data",{pts:r.pts+n*h,dts:r.dts+n*h,sampleCount:d,audioobjecttype:1+(t[i+2]>>>6&3),channelcount:(1&t[i+2])<<2|(192&t[i+3])>>>6,samplerate:Et[(60&t[i+2])>>>2],samplingfrequencyindex:(60&t[i+2])>>>2,samplesize:16,data:t.subarray(i+7+l,i+o)}),n++,i+=o}else"number"!=typeof f&&(f=i),i++;"number"==typeof f&&(this.skipWarn_(f,i),f=null),t=t.subarray(i)}},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")}},bt.prototype=new Q;var kt,Ct,wt,It=bt,xt=function(e){var t=e.byteLength,n=0,r=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+r},this.loadWord=function(){var o=e.byteLength-t,l=new Uint8Array(4),c=Math.min(4,t);if(0===c)throw new Error("no bytes available");l.set(e.subarray(o,o+c)),n=new DataView(l.buffer).getUint32(0),r=8*c,t-=c},this.skipBits=function(e){var o;r>e?(n<<=e,r-=e):(e-=r,e-=8*(o=Math.floor(e/8)),t-=o,this.loadWord(),n<<=e,r-=e)},this.readBits=function(e){var o=Math.min(r,e),l=n>>>32-o;return(r-=o)>0?n<<=o:t>0&&this.loadWord(),(o=e-o)>0?l<<o|this.readBits(o):l},this.skipLeadingZeros=function(){var e;
vendor: 4,475 bytes, line 2
2for(e=0;e<r;++e)if(0!=(n&2147483648>>>e))return n<<=e,r-=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()};Ct=function(){var i,e,t=0;Ct.prototype.init.call(this),this.push=function(data){var n;e?((n=new Uint8Array(e.byteLength+data.data.byteLength)).set(e),n.set(data.data,e.byteLength),e=n):e=data.data;for(var r=e.byteLength;t<r-3;t++)if(1===e[t+2]){i=t+5;break}for(;i<r;)switch(e[i]){case 0:if(0!==e[i-1]){i+=2;break}if(0!==e[i-2]){i++;break}t+3!==i-2&&this.trigger("data",e.subarray(t+3,i-2));do{i++}while(1!==e[i]&&i<r);t=i-2,i+=3;break;case 1:if(0!==e[i-1]||0!==e[i-2]){i+=3;break}this.trigger("data",e.subarray(t+3,i-2)),t=i-2,i+=3;break;default:i+=3}e=e.subarray(t),i-=t,t=0},this.reset=function(){e=null,t=0,this.trigger("reset")},this.flush=function(){e&&e.byteLength>3&&this.trigger("data",e.subarray(t+3)),e=null,t=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},Ct.prototype=new Q,wt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},kt=function(){var e,t,n,r,o,l,c,d=new Ct;kt.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,r=e.dts,d.push(e))},d.on("data",(function(data){var c={trackId:t,pts:n,dts:r,data:data,nalUnitTypeCode:31&data[0]};switch(c.nalUnitTypeCode){case 5:c.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:c.nalUnitType="sei_rbsp",c.escapedRBSP=o(data.subarray(1));break;case 7:c.nalUnitType="seq_parameter_set_rbsp",c.escapedRBSP=o(data.subarray(1)),c.config=l(c.escapedRBSP);break;case 8:c.nalUnitType="pic_parameter_set_rbsp";break;case 9:c.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",c)})),d.on("done",(function(){e.trigger("done")})),d.on("partialdone",(function(){e.trigger("partialdone")})),d.on("reset",(function(){e.trigger("reset")})),d.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){d.flush()},this.partialFlush=function(){d.partialFlush()},this.reset=function(){d.reset()},this.endTimeline=function(){d.endTimeline()},c=function(e,t){var n,r=8,o=8;for(n=0;n<e;n++)0!==o&&(o=(r+t.readExpGolomb()+256)%256),r=0===o?r:o},o=function(data){for(var e,t,n=data.byteLength,r=[],i=1;i<n-2;)0===data[i]&&0===data[i+1]&&3===data[i+2]?(r.push(i+2),i+=2):i++;if(0===r.length)return data;e=n-r.length,t=new Uint8Array(e);var o=0;for(i=0;i<e;o++,i++)o===r[0]&&(o++,r.shift()),t[i]=data[o];return t},l=function(data){var e,t,n,r,o,l,d,h,f,m,v,i,y=0,_=0,T=0,S=0,E=[1,1];if(t=(e=new xt(data)).readUnsignedByte(),r=e.readUnsignedByte(),n=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),wt[t]&&(3===(o=e.readUnsignedExpGolomb())&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(v=3!==o?8:12,i=0;i<v;i++)e.readBoolean()&&c(i<6?16:64,e);if(e.skipUnsignedExpGolomb(),0===(l=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===l)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),d=e.readUnsignedExpGolomb(),i=0;i<d;i++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),h=e.readUnsignedExpGolomb(),f=e.readUnsignedExpGolomb(),0===(m=e.readBits(1))&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(y=e.readUnsignedExpGolomb(),_=e.readUnsignedExpGolomb(),T=e.readUnsignedExpGolomb(),S=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}E&&(E[0],E[1])}return{profileIdc:t,levelIdc:n,profileCompatibility:r,width:16*(h+1)-2*y-2*_,height:(2-m)*(f+1)*16-2*T-2*S,sarRatio:E}}},kt.prototype=new Q;
vendor: 4,536 bytes, line 2
2var At,Ot={H264Stream:kt,NalByteStream:Ct},Pt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Lt=function(header,e){var t=header[e+6]<<21|header[e+7]<<14|header[e+8]<<7|header[e+9];return t=t>=0?t:0,(16&header[e+5])>>4?t+20:t+10},Dt=function e(data,t){return data.length-t<10||data[t]!=="I".charCodeAt(0)||data[t+1]!=="D".charCodeAt(0)||data[t+2]!=="3".charCodeAt(0)?t:e(data,t+=Lt(data,t))},Mt=function(data){return data[0]<<21|data[1]<<14|data[2]<<7|data[3]},Nt={isLikelyAacData:function(data){var e=Dt(data,0);return data.length>=e+2&&255==(255&data[e])&&240==(240&data[e+1])&&16==(22&data[e+1])},parseId3TagSize:Lt,parseAdtsSize:function(header,e){var t=(224&header[e+5])>>5,n=header[e+4]<<3;return 6144&header[e+3]|n|t},parseType:function(header,e){return header[e]==="I".charCodeAt(0)&&header[e+1]==="D".charCodeAt(0)&&header[e+2]==="3".charCodeAt(0)?"timed-metadata":!0&header[e]&&240==(240&header[e+1])?"audio":null},parseSampleRate:function(e){for(var i=0;i+5<e.length;){if(255===e[i]&&240==(246&e[i+1]))return Pt[(60&e[i+2])>>>2];i++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=Mt(e.subarray(10,14)));do{if((n=Mt(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){var o=unescape(function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r}(r,0,i));if("com.apple.streaming.transportStreamTimestamp"===o){var l=r.subarray(i+1),c=(1&l[3])<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;return c*=4,c+=3&l[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}};(At=function(){var e=new Uint8Array,t=0;At.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var r,o,l,c,d=0,h=0;for(e.length?(c=e.length,(e=new Uint8Array(n.byteLength+c)).set(e.subarray(0,c)),e.set(n,c)):e=n;e.length-h>=3;)if(e[h]!=="I".charCodeAt(0)||e[h+1]!=="D".charCodeAt(0)||e[h+2]!=="3".charCodeAt(0))if(255!=(255&e[h])||240!=(240&e[h+1]))h++;else{if(e.length-h<7)break;if(h+(d=Nt.parseAdtsSize(e,h))>e.length)break;l={type:"audio",data:e.subarray(h,h+d),pts:t,dts:t},this.trigger("data",l),h+=d}else{if(e.length-h<10)break;if(h+(d=Nt.parseId3TagSize(e,h))>e.length)break;o={type:"timed-metadata",data:e.subarray(h,h+d)},this.trigger("data",o),h+=d}r=e.length-h,e=r>0?e.subarray(h):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new Q;var Rt,Ut,Bt,jt,Ft=At,Ht=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],qt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Vt=Ot.H264Stream,Wt=Nt.isLikelyAacData,zt=Se,Gt=function(e,t){t.stream=e,this.trigger("log",t)},Xt=function(e,t){for(var n=Object.keys(t),i=0;i<n.length;i++){var r=n[i];"headOfPipeline"!==r&&t[r].on&&t[r].on("log",Gt.bind(e,r))}},Kt=function(a,b){var i;if(a.length!==b.length)return!1;for(i=0;i<a.length;i++)if(a[i]!==b[i])return!1;return!0},Yt=function(e,t,n,r,o,l){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(r-t),pts:e+(o-n)},prependedContentDuration:l,baseMediaDecodeTime:e}};Ut=function(track,e){var t,n=[],r=0,o=0,l=1/0;t=(e=e||{}).firstSequenceNumber||0,Ut.prototype.init.call(this),this.push=function(data){Ne(track,data),track&&Ht.forEach((function(e){track[e]=data[e]})),n.push(data)},this.setEarliestDts=function(e){r=e},this.setVideoBaseMediaDecodeTime=function(e){l=e},this.setAudioAppendStart=function(e){o=e},this.flush=function(){var c,d,h,f,m,v,y;0!==n.length?(c=Ae(n,track,r),track.baseMediaDecodeTime=Me(track,e.keepOriginalTimestamps),y=xe(track,c,o,l),track.samples=Oe(c),h=ue(Pe(c)),n=[],d=le(t,[track]),f=new Uint8Array(d.byteLength+h.byteLength),t++,f.set(d),f.set(h,d.byteLength),De(track),m=Math.ceil(1024*zt/track.samplerate),c.length&&(v=c.length*m,this.trigger("segmentTimingInfo",Yt(Ce(track.baseMediaDecodeTime,track.samplerate),c[0].dts,c[0].pts,c[0].dts+v,c[0].pts+v,y||0)),this.trigger("timingInfo",{start:c[0].pts,end:c[0].pts+v})),this.trigger("data",{track:track,boxes:f}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){De(track),n=[],this.trigger("reset")}},Ut.prototype=new Q,Rt=function(track,e){var t,n,r,o=[],l=[];t=(e=e||{}).firstSequenceNumber||0,Rt.prototype.init.call(this),delete track.minPTS,this.gopCache_=[],this.push=function(e){Ne(track,e),"seq_parameter_set_rbsp"!==e.nal
vendor: 13,379 bytes, line 2
2UnitType||n||(n=e.config,track.sps=[e.data],qt.forEach((function(e){track[e]=n[e]}),this)),"pic_parameter_set_rbsp"!==e.nalUnitType||r||(r=e.data,track.pps=[e.data]),o.push(e)},this.flush=function(){for(var n,r,c,d,h,f,m,v,y=0;o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0===o.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=he(o),(c=pe(n))[0][0].keyFrame||((r=this.getGopForFusion_(o[0],track))?(y=r.duration,c.unshift(r),c.byteLength+=r.byteLength,c.nalCount+=r.nalCount,c.pts=r.pts,c.dts=r.dts,c.duration+=r.duration):c=fe(c)),l.length){var _;if(!(_=e.alignGopsAtEnd?this.alignGopsAtEnd_(c):this.alignGopsAtStart_(c)))return this.gopCache_.unshift({gop:c.pop(),pps:track.pps,sps:track.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");De(track),c=_}Ne(track,c),track.samples=me(c),h=ue(ge(c)),track.baseMediaDecodeTime=Me(track,e.keepOriginalTimestamps),this.trigger("processedGopsInfo",c.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),m=c[0],v=c[c.length-1],this.trigger("segmentTimingInfo",Yt(track.baseMediaDecodeTime,m.dts,m.pts,v.dts+v.duration,v.pts+v.duration,y)),this.trigger("timingInfo",{start:c[0].pts,end:c[c.length-1].pts+c[c.length-1].duration}),this.gopCache_.unshift({gop:c.pop(),pps:track.pps,sps:track.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),o=[],this.trigger("baseMediaDecodeTime",track.baseMediaDecodeTime),this.trigger("timelineStartInfo",track.timelineStartInfo),d=le(t,[track]),f=new Uint8Array(d.byteLength+h.byteLength),t++,f.set(d),f.set(h,d.byteLength),this.trigger("data",{track:track,boxes:f}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),o=[],this.gopCache_.length=0,l.length=0,this.trigger("reset")},this.resetStream_=function(){De(track),n=void 0,r=void 0},this.getGopForFusion_=function(e){var t,n,r,o,i,l=1/0;for(i=0;i<this.gopCache_.length;i++)r=(o=this.gopCache_[i]).gop,track.pps&&Kt(track.pps[0],o.pps[0])&&track.sps&&Kt(track.sps[0],o.sps[0])&&(r.dts<track.timelineStartInfo.dts||(t=e.dts-r.dts-r.duration)>=-1e4&&t<=45e3&&(!n||l>t)&&(n=o,l=t));return n?n.gop:null},this.alignGopsAtStart_=function(e){var t,n,r,o,c,d,h,f;for(c=e.byteLength,d=e.nalCount,h=e.duration,t=n=0;t<l.length&&n<e.length&&(r=l[t],o=e[n],r.pts!==o.pts);)o.pts>r.pts?t++:(n++,c-=o.byteLength,d-=o.nalCount,h-=o.duration);return 0===n?e:n===e.length?null:((f=e.slice(n)).byteLength=c,f.duration=h,f.nalCount=d,f.pts=f[0].pts,f.dts=f[0].dts,f)},this.alignGopsAtEnd_=function(e){var t,n,r,o,c,d,h;for(t=l.length-1,n=e.length-1,c=null,d=!1;t>=0&&n>=0;){if(r=l[t],o=e[n],r.pts===o.pts){d=!0;break}r.pts>o.pts?t--:(t===l.length-1&&(c=n),n--)}if(!d&&null===c)return null;if(0===(h=d?n:c))return e;var f=e.slice(h),m=f.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 f.byteLength=m.byteLength,f.duration=m.duration,f.nalCount=m.nalCount,f.pts=f[0].pts,f.dts=f[0].dts,f},this.alignGopsWith=function(e){l=e}},Rt.prototype=new Q,jt=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,jt.prototype.init.call(this),this.push=function(output){return output.text?this.pendingCaptions.push(output):output.frames?this.pendingMetadata.push(output):(this.pendingTracks.push(output.track),this.pendingBytes+=output.boxes.byteLength,"video"===output.track.type&&(this.videoTrack=output.track,this.pendingBoxes.push(output.boxes)),void("audio"===output.track.type&&(this.audioTrack=output.track,this.pendingBoxes.unshift(output.boxes))))}},jt.prototype=new Q,jt.prototype.flush=function(e){var caption,t,n,i,r=0,o={captions:[],captionStreams:{},metadata:[],info:{}},l=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(l=this.videoTrack.timelineStartInfo.pts,qt.forEach((function(e){o.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(l=this.audioTrack.timelineStartInfo.pts,Ht.forEach((function(e){o.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?o.type=this.pendingTracks[0].type:o.type="combined",this.emittedTracks+=this.pendingTracks.length,n=ce(this.pendingTracks),o.initSegment=new Uint8Array(n.byteLength),o.initSegment.set(n),o.data=new Uint8Array(this.pendingBytes),i=0;i<this.pendingBoxes.length;i++)o.data.set(this.pendingBoxes[i],r),r+=this.pendingBoxes[i].byteLength;for(i=0;i<this.pendingCaptions.length;i++)(caption=this.pendingCaptions[i]).startTime=Ie(caption.startPts,l,this.keepOriginalTimestamps),caption.endTime=Ie(caption.endPts,l,this.keepOriginalTimestamps),o.captionStreams[caption.stream]=!0,o.captions.push(caption);for(i=0;i<this.pendingMetadata.length;i++)(t=this.pendingMetadata[i]).cueTime=Ie(t.pts,l,this.keepOriginalTimestamps),o.metadata.push(t);for(o.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",o),i=0;i<o.captions.length;i++)caption=o.captions[i],this.trigger("caption",caption);for(i=0;i<o.metadata.length;i++)t=o.metadata[i],this.trigger("id3Frame",t)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},jt.prototype.setRemux=function(e){this.remuxTracks=e},Bt=function(e){var t,n,r=this,o=!0;Bt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var o={};this.transmuxPipeline_=o,o.type="aac",o.metadataStream=new Tt.MetadataStream,o.aacStream=new Ft,o.audioTimestampRolloverStream=new Tt.TimestampRolloverStream("audio"),o.timedMetadataTimestampRolloverStream=new Tt.TimestampRolloverStream("timed-metadata"),o.adtsStream=new It,o.coalesceStream=new jt(e,o.metadataStream),o.headOfPipeline=o.aacStream,o.aacStream.pipe(o.audioTimestampRolloverStream).pipe(o.adtsStream),o.aacStream.pipe(o.timedMetadataTimestampRolloverStream).pipe(o.metadataStream).pipe(o.coalesceStream),o.metadataStream.on("timestamp",(function(e){o.aacStream.setTimestamp(e.timeStamp)})),o.aacStream.on("data",(function(data){"timed-metadata"!==data.type&&"audio"!==data.type||o.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:r.baseMediaDecodeTime},codec:"adts",type:"audio"},o.coalesceStream.numberOfTracks++,o.audioSegmentStream=new Ut(n,e),o.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),o.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),o.adtsStream.pipe(o.audioSegmentStream).pipe(o.coalesceStream),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))})),o.coalesceStream.on("data",this.trigger.bind(this,"data")),o.coalesceStream.on("done",this.trigger.bind(this,"done")),Xt(this,o)},this.setupTsPipeline=function(){var o={};this.transmuxPipeline_=o,o.type="ts",o.metadataStream=new Tt.MetadataStream,o.packetStream=new Tt.TransportPacketStream,o.parseStream=new Tt.TransportParseStream,o.elementaryStream=new Tt.ElementaryStream,o.timestampRolloverStream=new Tt.TimestampRolloverStream,o.adtsStream=new It,o.h264Stream=new Vt,o.captionStream=new Tt.CaptionStream(e),o.coalesceStream=new jt(e,o.metadataStream),o.headOfPipeline=o.packetStream,o.packetStream.pipe(o.parseStream).pipe(o.elementaryStream).pipe(o.timestampRolloverStream),o.timestampRolloverStream.pipe(o.h264Stream),o.timestampRolloverStream.pipe(o.adtsStream),o.timestampRolloverStream.pipe(o.metadataStream).pipe(o.coalesceStream),o.h264Stream.pipe(o.captionStream).pipe(o.coalesceStream),o.elementaryStream.on("data",(function(data){var i;if("metadata"===data.type){for(i=data.tracks.length;i--;)t||"video"!==data.tracks[i].type?n||"audio"!==data.tracks[i].type||((n=data.tracks[i]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime):(t=data.tracks[i]).timelineStartInfo.baseMediaDecodeTime=r.baseMediaDecodeTime;t&&!o.videoSegmentStream&&(o.coalesceStream.numberOfTracks++,o.videoSegmentStream=new Rt(t,e),o.videoSegmentStream.on("log",r.getLogTrigger_("videoSegmentStream")),o.videoSegmentStream.on("timelineStartInfo",(function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,o.audioSegmentStream.setEarliestDts(t.dts-r.baseMediaDecodeTime))})),o.videoSegmentStream.on("processedGopsInfo",r.trigger.bind(r,"gopInfo")),o.videoSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"videoSegmentTimingInfo")),o.videoSegmentStream.on("baseMediaDecodeTime",(function(e){n&&o.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),o.videoSegmentStream.on("timingInfo",r.trigger.bind(r,"videoTimingInfo")),o.h264Stream.pipe(o.videoSegmentStream).pipe(o.coalesceStream)),n&&!o.audioSegmentStream&&(o.coalesceStream.numberOfTracks++,o.audioSegmentStream=new Ut(n,e),o.audioSegmentStream.on("log",r.getLogTrigger_("audioSegmentStream")),o.audioSegmentStream.on("timingInfo",r.trigger.bind(r,"audioTimingInfo")),o.audioSegmentStream.on("segmentTimingInfo",r.trigger.bind(r,"audioSegmentTimingInfo")),o.adtsStream.pipe(o.audioSegmentStream).pipe(o.coalesceStream)),r.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}})),o.coalesceStream.on("data",this.trigger.bind(this,"data")),o.coalesceStream.on("id3Frame",(function(e){e.dispatchType=o.metadataStream.dispatchType,r.trigger("id3Frame",e)})),o.coalesceStream.on("caption",this.trigger.bind(this,"caption")),o.coalesceStream.on("done",this.trigger.bind(this,"done")),Xt(this,o)},this.setBaseMediaDecodeTime=function(r){var o=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=r),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,De(n),o.audioTimestampRolloverStream&&o.audioTimestampRolloverStream.discontinuity()),t&&(o.videoSegmentStream&&(o.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,De(t),o.captionStream.reset()),o.timestampRolloverStream&&o.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(data){if(o){var e=Wt(data);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),o=!1}this.transmuxPipeline_.headOfPipeline.push(data)},this.flush=function(){o=!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()}},Bt.prototype=new Q;var Qt,$t,Jt,Zt={Transmuxer:Bt,VideoSegmentStream:Rt,AudioSegmentStream:Ut,AUDIO_PROPERTIES:Ht,VIDEO_PROPERTIES:qt,generateSegmentTimingInfo:Yt},ei=function(e){return e>>>0},ti=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])},ii=ei,ni=function e(data,path){var i,t,n,r,o,l=[];if(!path.length)return null;for(i=0;i<data.byteLength;)t=ii(data[i]<<24|data[i+1]<<16|data[i+2]<<8|data[i+3]),n=ti(data.subarray(i+4,i+8)),r=t>1?i+t:data.byteLength,n===path[0]&&(1===path.length?l.push(data.subarray(i+8,r)):(o=e(data.subarray(i+8,r),path.slice(1))).length&&(l=l.concat(o))),i=r;return l},ri=ei,ai=J.getUint64,si=function(data){var e={version:data[0],flags:new Uint8Array(data.subarray(1,4))};return 1===e.version?e.baseMediaDecodeTime=ai(data.subarray(4)):e.baseMediaDecodeTime=ri(data[4]<<24|data[5]<<16|data[6]<<8|data[7]),e},oi=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]}},ui=function(data){var e,t={version:data[0],flags:new Uint8Array(data.subarray(1,4)),samples:[]},view=new DataView(data.buffer,data.byteOffset,data.byteLength),n=1&t.flags[2],r=4&t.flags[2],o=1&t.flags[1],l=2&t.flags[1],c=4&t.flags[1],d=8&t.flags[1],h=view.getUint32(4),f=8;for(n&&(t.dataOffset=view.getInt32(f),f+=4),r&&h&&(e={flags:oi(data.subarray(f,f+4))},f+=4,o&&(e.duration=view.getUint32(f),f+=4),l&&(e.size=view.getUint32(f),f+=4),d&&(1===t.version?e.compositionTimeOffset=view.getInt32(f):e.compositionTimeOffset=view.getUint32(f),f+=4),t.s
vendor: 4,214 bytes, line 2
2amples.push(e),h--);h--;)e={},o&&(e.duration=view.getUint32(f),f+=4),l&&(e.size=view.getUint32(f),f+=4),c&&(e.flags=oi(data.subarray(f,f+4)),f+=4),d&&(1===t.version?e.compositionTimeOffset=view.getInt32(f):e.compositionTimeOffset=view.getUint32(f),f+=4),t.samples.push(e);return t},ci=function(data){var i,view=new DataView(data.buffer,data.byteOffset,data.byteLength),e={version:data[0],flags:new Uint8Array(data.subarray(1,4)),trackId:view.getUint32(4)},t=1&e.flags[2],n=2&e.flags[2],r=8&e.flags[2],o=16&e.flags[2],l=32&e.flags[2],c=65536&e.flags[0],d=131072&e.flags[0];return i=8,t&&(i+=4,e.baseDataOffset=view.getUint32(12),i+=4),n&&(e.sampleDescriptionIndex=view.getUint32(i),i+=4),r&&(e.defaultSampleDuration=view.getUint32(i),i+=4),o&&(e.defaultSampleSize=view.getUint32(i),i+=4),l&&(e.defaultSampleFlags=view.getUint32(i)),c&&(e.durationIsEmpty=!0),!t&&d&&(e.baseDataOffsetIsMoof=!0),e},di="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},hi="undefined"!=typeof window?window:void 0!==di?di:"undefined"!=typeof self?self:{},pi=je,fi=Je.CaptionStream,mi=function(e,t){for(var n=e,i=0;i<t.length;i++){var r=t[i];if(n<r.size)return r;n-=r.size}return null},gi=function(e,t){var n=ni(e,["moof","traf"]),r=ni(e,["mdat"]),o={},l=[];return r.forEach((function(e,t){var r=n[t];l.push({mdat:e,traf:r})})),l.forEach((function(e){var n,r,l=e.mdat,c=e.traf,d=ni(c,["tfhd"]),h=ci(d[0]),f=h.trackId,m=ni(c,["tfdt"]),v=m.length>0?si(m[0]).baseMediaDecodeTime:0,y=ni(c,["trun"]);t===f&&y.length>0&&(n=function(e,t,n){var r=t,o=n.defaultSampleDuration||0,l=n.defaultSampleSize||0,c=n.trackId,d=[];return e.forEach((function(e){var t=ui(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=o),void 0===e.size&&(e.size=l),e.trackId=c,e.dts=r,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof r?(e.pts=r+hi.BigInt(e.compositionTimeOffset),r+=hi.BigInt(e.duration)):(e.pts=r+e.compositionTimeOffset,r+=e.duration)})),d=d.concat(t)})),d}(y,v,h),r=function(e,t,n){var r,i,o,l,c=new DataView(e.buffer,e.byteOffset,e.byteLength),d={logs:[],seiNals:[]};for(i=0;i+4<e.length;i+=o)if(o=c.getUint32(i),i+=4,!(o<=0))switch(31&e[i]){case 6:var data=e.subarray(i+1,i+1+o),h=mi(i,t);if(r={nalUnitType:"sei_rbsp",size:o,data:data,escapedRBSP:pi(data),trackId:n},h)r.pts=h.pts,r.dts=h.dts,l=h;else{if(!l){d.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+i+" for trackId "+n+". See mux.js#223."});break}r.pts=l.pts,r.dts=l.dts}d.seiNals.push(r)}return d}(l,n,f),o[f]||(o[f]={seiNals:[],logs:[]}),o[f].seiNals=o[f].seiNals.concat(r.seiNals),o[f].logs=o[f].logs.concat(r.logs))})),o},vi=function(){var e,t,n,r,o,l,c=!1;this.isInitialized=function(){return c},this.init=function(t){e=new fi,c=!0,l=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/r,e.endTime=e.endPts/r,o.captions.push(e),o.captionStreams[e.stream]=!0})),e.on("log",(function(e){o.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length)&&(n!==e[0]||r!==t[n])},this.parse=function(e,l,c){var d;if(!this.isInitialized())return null;if(!l||!c)return null;if(this.isNewInit(l,c))n=l[0],r=c[n];else if(null===n||!r)return t.push(e),null;for(;t.length>0;){var h=t.shift();this.parse(h,l,c)}return d=function(e,t,n){if(null===t)return null;var r=gi(e,t)[t]||{};return{seiNals:r.seiNals,logs:r.logs,timescale:n}}(e,n,r),d&&d.logs&&(o.logs=o.logs.concat(d.logs)),null!==d&&d.seiNals?(this.pushNals(d.seiNals),this.flushStream(),o):o.logs.length?{logs:o.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;l?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){o.captions=[],o.captionStreams={},o.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,r=null,o?this.clearParsedCaptions():o={captions:[],captionStream
vendor: 7,160 bytes, line 2
2s:{},logs:[]},this.resetCaptionStream()},this.reset()},yi=ei,_i=function(e){return("00"+e.toString(16)).slice(-2)},bi=J.getUint64;Qt=function(e,t){var n=ni(t,["moof","traf"]).reduce((function(t,n){var r,o,l=ni(n,["tfhd"])[0],c=yi(l[4]<<24|l[5]<<16|l[6]<<8|l[7]),d=e[c]||9e4,h=ni(n,["tfdt"])[0],f=new DataView(h.buffer,h.byteOffset,h.byteLength);return"bigint"==typeof(r=1===h[0]?bi(h.subarray(4,12)):f.getUint32(4))?o=r/hi.BigInt(d):"number"!=typeof r||isNaN(r)||(o=r/d),o<Number.MAX_SAFE_INTEGER&&(o=Number(o)),o<t&&(t=o),t}),1/0);return"bigint"==typeof n||isFinite(n)?n:0},Jt=function(e){var t=0===e[0]?12:20;return yi(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},$t=function(e){var t=ni(e,["moov","trak"]),n=[];return t.forEach((function(e){var view,t,track={},r=ni(e,["tkhd"])[0];r&&(t=(view=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),track.id=0===t?view.getUint32(12):view.getUint32(20));var o=ni(e,["mdia","hdlr"])[0];if(o){var l=ti(o.subarray(8,12));track.type="vide"===l?"video":"soun"===l?"audio":l}var c=ni(e,["mdia","minf","stbl","stsd"])[0];if(c){var d=c.subarray(8);track.codec=ti(d.subarray(4,8));var h,f=ni(d,[track.codec])[0];f&&(/^[asm]vc[1-9]$/i.test(track.codec)?(h=f.subarray(78),"avcC"===ti(h.subarray(4,8))&&h.length>11?(track.codec+=".",track.codec+=_i(h[9]),track.codec+=_i(h[10]),track.codec+=_i(h[11])):track.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(track.codec)?(h=f.subarray(28),"esds"===ti(h.subarray(4,8))&&h.length>20&&0!==h[19]?(track.codec+="."+_i(h[19]),track.codec+="."+_i(h[20]>>>2&63).replace(/^0/,"")):track.codec="mp4a.40.2"):track.codec=track.codec.toLowerCase())}var m=ni(e,["mdia","mdhd"])[0];m&&(track.timescale=Jt(m)),n.push(track)})),n};var Ti=Qt,Si=$t,Ei=function(e){var t=31&e[1];return t<<=8,t|=e[2]},ki=function(e){return!!(64&e[1])},Ci=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},wi=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}},Ii={parseType:function(e,t){var n=Ei(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=ki(e),n=4+Ci(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=ki(e),r=4+Ci(e);if(n&&(r+=e[r]+1),1&e[r+5]){var o;o=3+((15&e[r+1])<<8|e[r+2])-4;for(var l=12+((15&e[r+10])<<8|e[r+11]);l<o;){var i=r+l;t[(31&e[i+1])<<8|e[i+2]]=e[i],l+=5+((15&e[i+3])<<8|e[i+4])}return t}},parsePayloadUnitStartIndicator:ki,parsePesType:function(e,t){switch(t[Ei(e)]){case Ze.H264_STREAM_TYPE:return"video";case Ze.ADTS_STREAM_TYPE:return"audio";case Ze.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!ki(e))return null;var t=4+Ci(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).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,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.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,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+Ci(e),n=e.subarray(t),r=0,o=0,l=!1;o<n.byteLength-3;o++)if(1===n[o+2]){r=o+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}o+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===wi(31&n[o+3])&&(l=!0);do{r++}while(1!==n[r]&&r<n.length);o=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===wi(31&n[o+3])&&(l=!0),o=r-2,r+=3;break;default:r+=3}return n=n.subarray(o),r-=o,o=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===wi(31&n[o+3])&&(l=!0),l}},xi=st,Ai={};Ai.ts=Ii,Ai.aac=Nt;var Oi=Se,Pi=188,Li=71,Di=function(e,t,n){for(var r,o,l,c,d=0,h=Pi,f=!1;h<=e.byteLength;)if(e[d]!==Li||e[h]!==Li&&h!==e.byteLength)d++,h++;else{if(r=e.subarray(d,h),"pes"===Ai.ts.parseType(r,t.pid))o=Ai.ts.parsePesType(r,t.table),l=Ai.ts.parsePayloadUnitStartIndicator(r),"audio"===o&&l&&(c=Ai.ts.parsePesTime(r))&&(c.type="audio",n.audio.push(c),f=!0);if(f)break;d+=Pi,h+=Pi}for(d=(h=e.byteLength)-Pi,f=!1;d>=0;)if(e[d]!==Li||e[h]!==Li&&h!==e.byteLength)d--,h--;else{if(r=e.subarray(d,h),"pes"===Ai.ts.parseType(r,t.pid))o=Ai.ts.parsePesType(r,t.table),l=Ai.ts.parsePayloadUnitStartIndicator(r),"audio"===o&&l&&(c=Ai.ts.parsePesTime(r))&&(c.type="audio",n.audio.push(c),f=!0);if(f)break;d-=Pi,h-=Pi}},Mi=function(e,t,n){for(var r,o,l,c,d,i,h,f=0,m=Pi,v=!1,y={data:[],size:0};m<e.byteLength;)if(e[f]!==Li||e[m]!==Li)f++,m++;else{if(r=e.subarray(f,m),"pes"===Ai.ts.parseType(r,t.pid))if(o=Ai.ts.parsePesType(r,t.table),l=Ai.ts.parsePayloadUnitStartIndicator(r),"video"===o&&(l&&!v&&(c=Ai.ts.parsePesTime(r))&&(c.type="video",n.video.push(c),v=!0),!n.firstKeyFrame)){if(l&&0!==y.size){for(d=new Uint8Array(y.size),i=0;y.data.length;)h=y.data.shift(),d.set(h,i),i+=h.byteLength;if(Ai.ts.videoPacketContainsKeyFrame(d)){var _=Ai.ts.parsePesTime(d);_?(n.firstKeyFrame=_,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}y.size=0}y.data.push(r),y.size+=r.byteLength}if(v&&n.firstKeyFrame)break;f+=Pi,m+=Pi}for(f=(m=e.byteLength)-Pi,v=!1;f>=0;)if(e[f]!==Li||e[m]!==Li)f--,m--;else{if(r=e.subarray(f,m),"pes"===Ai.ts.parseType(r,t.pid))o=Ai.ts.parsePesType(r,t.table),l=Ai.ts.parsePayloadUnitStartIndicator(r),"video"===o&&l&&(c=Ai.ts.parsePesTime(r))&&(c.type="video",n.video.push(c),v=!0);if(v)break;f-=Pi,m-=Pi}},Ni=function(e){var t={pid:null,table:null},n={};for(var r in function(e,t){for(var n,r=0,o=Pi;o<e.byteLength;)if(e[r]!==Li||e[o]!==Li)r++,o++;else{switch(n=e.subarray(r,o),Ai.ts.parseType(n,t.pid)){case"pat":t.pid=Ai.ts.parsePat(n);break;case"pmt":var table=Ai.ts.parsePmt(n);t.table=t.table||{},Object.keys(table).forEach((function(e){t.table[e]=table[e]}))}r+=Pi,o+=Pi}}(e,t),t.table){if(t.table.hasOwnProperty(r))switch(t.table[r]){case Ze.H264_STREAM_TYPE:n.video=[],Mi(e,t,n),0===n.video.length&&delete n.video;break;case Ze.ADTS_STREAM_TYPE:n.audio=[],Di(e,t,n),0===n.audio.length&&delete n.audio}}return n},Ri=function(e,t){var n;return n=Ai.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,o=null,l=null,c=0,d=0;e.length-d>=3;){switch(Ai.aac.parseType(e,d)){case"timed-metadata":if(e.length-d<10){n=!0;break}if((c=Ai.aac.parseId3TagSize(e,d))>e.length){n=!0;break}null===l&&(t=e.subarray(d,d+c),l=Ai.aac.parseAacTimestamp(t)),d+=c;break;case"audio":if(e.length-d<7){n=!0;break}if((c=Ai.aac.parseAdtsSize(e,d))>e.length){n=!0;break}null===o&&(t=e.subarray(d,d+c),o=Ai.aac.parseSampleRate(t)),r++,d+=c;break;default:d++}if(n)return null}if(null===o||null===l)return null;var h=Oi/o;return{audio:[{type:"audio",dts:l,pts:l},{type:"audio",dts:l+1024*r*h,pts:l+1024*r*h}]}}(e):Ni(e),n&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;
2(void 0===n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=xi(e.dts,n),e.pts=xi(e.pts,n),e.dtsTime=e.dts/Oi,e.ptsTime=e.pts/Oi}))}if(e.video&&e.video.length){var r=t;if((void 0===r||isNaN(r))&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=xi(e.dts,r),e.pts=xi(e.pts,r),e.dtsTime=e.dts/Oi,e.ptsTime=e.pts/Oi})),e.firstKeyFrame){var o=e.firstKeyFrame;o.dts=xi(o.dts,r),o.pts=xi(o.pts,r),o.dtsTime=o.dts/Oi,o.ptsTime=o.pts/Oi}}}(n,t),n):null},Ui=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 Zt.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 r=t.data;t.data=r.buffer,e.postMessage({action:"data",segment:t,byteOffset:r.byteOffset,byteLength:r.byteLength},[t.data])})),t.on("done",(function(data){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){var n={start:{decode:ke(t.start.dts),presentation:ke(t.start.pts)},end:{decode:ke(t.end.dts),presentation:ke(t.end.pts)},baseMediaDecodeTime:ke(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=ke(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})})),t.on("audioSegmentTimingInfo",(function(t){var n={start:{decode:ke(t.start.dts),presentation:ke(t.start.pts)},end:{decode:ke(t.end.dts),presentation:ke(t.end.pts)},baseMediaDecodeTime:ke(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=ke(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(caption){e.postMessage({action:"caption",caption:caption})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:ke(t.start),end:ke(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ke(t.start),end:ke(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}(this.self,this.transmuxer)},t.pushMp4Captions=function(data){this.captionParser||(this.captionParser=new vi,this.captionParser.init());var e=new Uint8Array(data.data,data.byteOffset,data.byteLength),t=this.captionParser.parse(e,data.trackIds,data.timescales);this.self.postMessage({action:"mp4Captions",captions:t&&t.captions||[],logs:t&&t.logs||[],data:e.buffer},[e.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,data=e.data,n=Ti(t,data);this.self.postMessage({action:"probeMp4StartTime",startTime:n,data:data},[data.buffer])},t.probeMp4Tracks=function(e){var data=e.data,t=Si(data);this.self.postMessage({action:"probeMp4Tracks",tracks:t,data:data},[data.buffer])},t.probeTs=function(e){var data=e.data,t=e.baseStartTime,n="number"!=typeof t||isNaN(t)?void 0:t*Se,r=Ri(data,n),o=null;r&&((o={hasVideo:r.video&&2===r.video.length||!1,hasAudio:r.audio&&2===r.audio.length||!1}).hasVideo&&(o.videoStart=r.video[0].ptsTime),o.hasAudio&&(o.audioStart=r.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:o,data:data},[data.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(data){var e=new Uint8Array(data.data,data.byteOffset,data.byteLength);this.transmuxer.push(e)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(data){var e=data.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Ee(e)))},t.setAudioAppendStart=function(data){this.transmuxer.setAudioAppendStart(Math.ceil(Ee(data.appendStart)))},t.setRemux=function(data){this.transmuxer.setRemux(data.remux)},t.flush=function(data){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(data){this.transmuxer.alignGopsWith(data.gopsToAlignWith.slice())},e}();
2self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new Ui(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new Ui(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}))),xs=ks(Is),As=function(e){var t=e.transmuxer,n=e.bytes,r=e.audioAppendStart,o=e.gopsToAlignWith,l=e.remux,c=e.onData,d=e.onTrackInfo,h=e.onAudioTimingInfo,f=e.onVideoTimingInfo,m=e.onVideoSegmentTimingInfo,v=e.onAudioSegmentTimingInfo,y=e.onId3,_=e.onCaptions,T=e.onDone,S=e.onEndedTimeline,E=e.onTransmuxerLog,k=e.isEndOfTimeline,C={buffer:[]},w=k;if(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var r=e.data.segment,o=r.type,l=r.initSegment,c=r.captions,d=r.captionStreams,h=r.metadata,f=r.videoFrameDtsTime,m=r.videoFramePtsTime;t.buffer.push({captions:c,captionStreams:d,metadata:h});var v=e.data.segment.boxes||{data:e.data.segment.data},y={type:o,data:new Uint8Array(v.data,v.data.byteOffset,v.data.byteLength),initSegment:new Uint8Array(l.data,l.byteOffset,l.byteLength)};void 0!==f&&(y.videoFrameDtsTime=f),void 0!==m&&(y.videoFramePtsTime=m),n(y)}(n,C,c),"trackinfo"===n.data.action&&d(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,C),"audioTimingInfo"===n.data.action&&h(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&f(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&m(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&v(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&y([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&_(n.data.caption),"endedtimeline"===n.data.action&&(w=!1,S()),"log"===n.data.action&&E(n.data.log),"transmuxed"===n.data.type&&(w||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:C,callback:T}),Os(t))))},r&&t.postMessage({action:"setAudioAppendStart",appendStart:r}),Array.isArray(o)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:o}),void 0!==l&&t.postMessage({action:"setRemux",remux:l}),n.byteLength){var I=n instanceof ArrayBuffer?n:n.buffer,x=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:I,byteOffset:x,byteLength:n.byteLength},[I])}k&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Os=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():As(e.currentTransmux))},Ps=function(e,t){e.postMessage({action:t}),Os(e)},Ls=function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void Ps(t,e);t.transmuxQueue.push(Ps.bind(null,t,e))},Ds=function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void As(e);e.transmuxer.transmuxQueue.push(e)},Ms=function(e){Ls("reset",e)},Ns=function(e){var t=new xs;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},Rs=function(e){var t=e.transmuxer,n=e.endAction||e.action,r=e.callback,o=f()({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",(function o(l){l.data.action===n&&(t.removeEventListener("message",o),l.data.data&&(l.data.data=new Uint8Array(l.data.data,e.byteOffset||0,e.byteLength||l.data.data.byteLength),e.data&&(e.data=l.data.data)),r(l.data))})),e.data){var l=e.data instanceof ArrayBuffer;o.byteOffset=l?0:e.data.byteOffset,o.byteLength=e.data.byteLength;var c=[l?e.data:e.data.buffer];t.postMessage(o,c)}else t.postMessage(o)},Us=2,Bs=-101,js=-102,Fs=function(e){e.forEach((function(e){e.abort()}))},Hs=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Bs,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:js,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Us,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Us,xhr:t}:null},qs=function(e,t,n){return function(r,o){var l=o.response,c=Hs(r,o);if(c)return n(c,e);if(16!==l.byteLength)return n({status:o.status,message:"Invalid HLS key at URL: "+o.uri,code:Us,xhr:o},e);for(var view=new DataView(l),d=new Uint32Array([view.getUint32(0),view.getUint32(4),view.getUint32(8),view.getUint32(12)]),i=0;i<t.length;i++)t[i].bytes=d;return n(null,e)}},Vs=function(e,t){var n=Object(V.a)(e.map.bytes);if("mp4"!==n){var r=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:"Found unsupported "+(n||"unknown")+" container for initialization segment at URL: "+r,code:Us}
2)}Rs({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:function(n){var r=n.tracks,data=n.data;return e.map.bytes=data,r.forEach((function(track){e.map.tracks=e.map.tracks||{},e.map.tracks[track.type]||(e.map.tracks[track.type]=track,"number"==typeof track.id&&track.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[track.id]=track.timescale))})),t(null)}})},Ws=function(e){var t=e.segment,n=e.finishProcessingFn,r=e.responseType;return function(e,o){var l=Hs(e,o);if(l)return n(l,t);var c="arraybuffer"!==r&&o.responseText?function(e){for(var view=new Uint8Array(new ArrayBuffer(e.length)),i=0;i<e.length;i++)view[i]=e.charCodeAt(i);return view.buffer}(o.responseText.substring(t.lastReachedChar||0)):o.response;return t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(o),t.key?t.encryptedBytes=new Uint8Array(c):t.bytes=new Uint8Array(c),n(null,t)}},zs=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,o=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,h=e.captionsFn,f=e.isEndOfTimeline,m=e.endedTimelineFn,v=e.dataFn,y=e.doneFn,_=e.onTransmuxerLog,T=t.map&&t.map.tracks||{},S=Boolean(T.audio&&T.video),E=o.bind(null,t,"audio","start"),k=o.bind(null,t,"audio","end"),C=o.bind(null,t,"video","start"),w=o.bind(null,t,"video","end");Rs({action:"probeTs",transmuxer:t.transmuxer,data:n,baseStartTime:t.baseStartTime,callback:function(data){t.bytes=n=data.data;var e=data.result;e&&(r(t,{hasAudio:e.hasAudio,hasVideo:e.hasVideo,isMuxed:S}),r=null,e.hasAudio&&!S&&E(e.audioStart),e.hasVideo&&C(e.videoStart),E=null,C=null),Ds({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:S,onData:function(e){e.type="combined"===e.type?"video":e.type,v(t,e)},onTrackInfo:function(e){r&&(S&&(e.isMuxed=!0),r(t,e))},onAudioTimingInfo:function(e){E&&void 0!==e.start&&(E(e.start),E=null),k&&void 0!==e.end&&k(e.end)},onVideoTimingInfo:function(e){C&&void 0!==e.start&&(C(e.start),C=null),w&&void 0!==e.end&&w(e.end)},onVideoSegmentTimingInfo:function(e){l(e)},onAudioSegmentTimingInfo:function(e){c(e)},onId3:function(e,n){d(t,e,n)},onCaptions:function(e){h(t,[e])},isEndOfTimeline:f,onEndedTimeline:function(){m()},onTransmuxerLog:_,onDone:function(e){y&&(e.type="combined"===e.type?"video":e.type,y(null,t,e))}})}})},Gs=function(e){var t=e.segment,n=e.bytes,r=e.trackInfoFn,o=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,h=e.captionsFn,f=e.isEndOfTimeline,m=e.endedTimelineFn,v=e.dataFn,y=e.doneFn,_=e.onTransmuxerLog,T=new Uint8Array(n);if(Object(V.b)(T)){t.isFmp4=!0;var S=t.map.tracks,E={isFmp4:!0,hasVideo:!!S.video,hasAudio:!!S.audio};S.audio&&S.audio.codec&&"enca"!==S.audio.codec&&(E.audioCodec=S.audio.codec),S.video&&S.video.codec&&"encv"!==S.video.codec&&(E.videoCodec=S.video.codec),S.video&&S.audio&&(E.isMuxed=!0),r(t,E);var k=function(e){v(t,{data:T,type:E.hasAudio&&!E.isMuxed?"audio":"video"}),e&&e.length&&h(t,e),y(null,t,{})};Rs({action:"probeMp4StartTime",timescales:t.map.timescales,data:T,transmuxer:t.transmuxer,callback:function(e){var data=e.data,r=e.startTime;n=data.buffer,t.bytes=T=data,E.hasAudio&&!E.isMuxed&&o(t,"audio","start",r),E.hasVideo&&o(t,"video","start",r),S.video&&data.byteLength&&t.transmuxer?Rs({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:T,timescales:t.map.timescales,trackIds:[S.video.id],callback:function(e){n=e.data.buffer,t.bytes=T=e.data,e.logs.forEach((function(e){_(la.mergeOptions(e,{stream:"mp4CaptionParser"}))})),k(e.captions)}}):k()}})}else if(t.transmuxer){if(void 0===t.container&&(t.container=Object(V.a)(T)),"ts"!==t.container&&"aac"!==t.container)return r(t,{hasAudio:!1,hasVideo:!1}),void y(null,t,{});zs({segment:t,bytes:n,trackInfoFn:r,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:f,endedTimelineFn:m,dataFn:v,doneFn:y,onTransmuxerLog:_})}else y(null,t,{})},Xs=function(e,t){var n,r=e.id,o=e.key,l=e.encryptedBytes,c=e.decryptionWorker;c.addEventListener("message",(function e(n){if(n.data.source===r){c.removeEventListener("message",e);var o=n.data.decrypted;t(new Uint8Array(o.bytes,o.byteOffset,o.byteLength))}})),n=o.bytes.slice?o.bytes.slice():new Uint32Array(Array.prototype.slice.call(o.bytes)),c.postMessage(ls({source:r,encrypted:l,key:n,iv:o.iv}),[l.buffer,n.buffer])},Ks=function(e){var t=e.activeXhrs,n=e.decryptionWorker,r=e.trackInfoFn,o=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,h=e.captionsFn,f=e.isEndOfTimeline,m=e.endedTimelineFn,v=e.dataFn,y=e.doneFn,_=e.onTransmuxerLog,T=0,S=!1;return function(e,E){if(!S){if(e)return S=!0,Fs(t),y(e,E);if((T+=1)===t.length){var k=function(){if(E.encryptedBytes)return function(e){var t=e.decryptionWorker,n=e.segment,r=e.trackInfoFn,o=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,h=e.captionsFn,f=e.isEndOfTimeline,m=e.endedTimelineFn,v=e.dataFn,y=e.doneFn,_=e.onTransmuxerLog;Xs({id:n.requestId,key:n.key,encryptedBytes:n.encryptedBytes,decryptionWorker:t}
2,(function(e){n.bytes=e,Gs({segment:n,bytes:n.bytes,trackInfoFn:r,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:f,endedTimelineFn:m,dataFn:v,doneFn:y,onTransmuxerLog:_})}))}({decryptionWorker:n,segment:E,trackInfoFn:r,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:f,endedTimelineFn:m,dataFn:v,doneFn:y,onTransmuxerLog:_});Gs({segment:E,bytes:E.bytes,trackInfoFn:r,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:f,endedTimelineFn:m,dataFn:v,doneFn:y,onTransmuxerLog:_})};if(E.endOfAllRequests=Date.now(),E.map&&E.map.encryptedBytes&&!E.map.bytes)return Xs({decryptionWorker:n,id:E.requestId+"-init",encryptedBytes:E.map.encryptedBytes,key:E.map.key},(function(e){E.map.bytes=e,Vs(E,(function(e){if(e)return Fs(t),y(e,E);k()}))}));k()}}}},Ys=function(e){var t=e.segment,n=e.progressFn;return e.trackInfoFn,e.timingInfoFn,e.videoSegmentTimingInfoFn,e.audioSegmentTimingInfoFn,e.id3Fn,e.captionsFn,e.isEndOfTimeline,e.endedTimelineFn,e.dataFn,function(e){if(!e.target.aborted)return t.stats=la.mergeOptions(t.stats,function(e){var t=e.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return n.bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n}(e)),!t.stats.firstBytesReceivedAt&&t.stats.bytesReceived&&(t.stats.firstBytesReceivedAt=Date.now()),n(e,t)}},Qs=function(e){var t=e.xhr,n=e.xhrOptions,r=e.decryptionWorker,o=e.segment,l=e.abortFn,c=e.progressFn,d=e.trackInfoFn,h=e.timingInfoFn,f=e.videoSegmentTimingInfoFn,m=e.audioSegmentTimingInfoFn,v=e.id3Fn,y=e.captionsFn,_=e.isEndOfTimeline,T=e.endedTimelineFn,S=e.dataFn,E=e.doneFn,k=e.onTransmuxerLog,C=[],w=Ks({activeXhrs:C,decryptionWorker:r,trackInfoFn:d,timingInfoFn:h,videoSegmentTimingInfoFn:f,audioSegmentTimingInfoFn:m,id3Fn:v,captionsFn:y,isEndOfTimeline:_,endedTimelineFn:T,dataFn:S,doneFn:E,onTransmuxerLog:k});if(o.key&&!o.key.bytes){var I=[o.key];o.map&&!o.map.bytes&&o.map.key&&o.map.key.resolvedUri===o.key.resolvedUri&&I.push(o.map.key);var x=t(la.mergeOptions(n,{uri:o.key.resolvedUri,responseType:"arraybuffer"}),qs(o,I,w));C.push(x)}if(o.map&&!o.map.bytes){if(o.map.key&&(!o.key||o.key.resolvedUri!==o.map.key.resolvedUri)){var A=t(la.mergeOptions(n,{uri:o.map.key.resolvedUri,responseType:"arraybuffer"}),qs(o,[o.map.key],w));C.push(A)}var O=la.mergeOptions(n,{uri:o.map.resolvedUri,responseType:"arraybuffer",headers:as(o.map)}),P=function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,r){var o=Hs(e,r);if(o)return n(o,t);var l=new Uint8Array(r.response);if(t.map.key)return t.map.encryptedBytes=l,n(null,t);t.map.bytes=l,Vs(t,(function(e){if(e)return e.xhr=r,e.status=r.status,n(e,t);n(null,t)}))}}({segment:o,finishProcessingFn:w}),L=t(O,P);C.push(L)}var D=la.mergeOptions(n,{uri:o.part&&o.part.resolvedUri||o.resolvedUri,responseType:"arraybuffer",headers:as(o)}),M=t(D,Ws({segment:o,finishProcessingFn:w,responseType:D.responseType}));M.addEventListener("progress",Ys({segment:o,progressFn:c,trackInfoFn:d,timingInfoFn:h,videoSegmentTimingInfoFn:f,audioSegmentTimingInfoFn:m,id3Fn:v,captionsFn:y,isEndOfTimeline:_,endedTimelineFn:T,dataFn:S})),C.push(M);var N={};
2return C.forEach((function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,n=e.abortFn;return function(e){e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}}({loadendState:N,abortFn:l}))})),function(){return Fs(C)}},$s=ha("CodecUtils"),Js=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},Zs=function(e){var t={};return e.forEach((function(e){var n=e.mediaType,r=e.type,details=e.details;t[n]=t[n]||[],t[n].push(Object(N.i)(""+r+details))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return $s("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},eo=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},to=function(e,t){var n=t.attributes||{},r=Zs(function(e){var t=e.attributes||{};if(t.CODECS)return Object(N.h)(t.CODECS)}(t)||[]);if(Js(e,t)&&!r.audio&&!function(e,t){if(!Js(e,t))return!0;var n=t.attributes||{},r=e.mediaGroups.AUDIO[n.AUDIO];for(var o in r)if(!r[o].uri&&!r[o].playlists)return!0;return!1}(e,t)){var o=Zs(Object(N.d)(e,n.AUDIO)||[]);o.audio&&(r.audio=o.audio)}return r},io=ha("PlaylistSelector"),no=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||""})}},ro=function(e,t){if(!e)return"";var n=l.a.getComputedStyle(e);return n?n[t]:""},ao=function(e,t){var n=e.slice();e.sort((function(e,r){var o=t(e,r);return 0===o?n.indexOf(e)-n.indexOf(r):o}))},so=function(e,t){var n,r;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||l.a.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),n-(r=r||l.a.Number.MAX_VALUE)},oo=function(e,t,n,r,o,c){if(e){var d={bandwidth:t,width:n,height:r,limitRenditionByPlayerDimensions:o},h=e.playlists;Fa.isAudioOnly(e)&&(h=c.getAudioTrackPlaylists_(),d.audioOnly=!0);var f=h.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||l.a.Number.MAX_VALUE,width:t,height:n,playlist:e}}));ao(f,(function(e,t){return e.bandwidth-t.bandwidth}));var m=(f=f.filter((function(e){return!Fa.isIncompatible(e.playlist)}))).filter((function(e){return Fa.isEnabled(e.playlist)}));m.length||(m=f.filter((function(e){return!Fa.isDisabled(e.playlist)})));var v=m.filter((function(e){return e.bandwidth*Ss.BANDWIDTH_VARIANCE<t})),y=v[v.length-1],_=v.filter((function(e){return e.bandwidth===y.bandwidth}))[0];if(!1===o){var T=_||m[0]||f[0];if(T&&T.playlist){var S="sortedPlaylistReps";return _&&(S="bandwidthBestRep"),m[0]&&(S="enabledPlaylistReps"),io("choosing "+no(T)+" using "+S+" with options",d),T.playlist}return io("could not choose a playlist with options",d),null}var E=v.filter((function(e){return e.width&&e.height}));ao(E,(function(e,t){return e.width-t.width}));var k=E.filter((function(e){return e.width===n&&e.height===r}));y=k[k.length-1];var C,w,I,x,A=k.filter((function(e){return e.bandwidth===y.bandwidth}))[0];if(A||(w=(C=E.filter((function(e){return e.width>n||e.height>r}))).filter((function(e){return e.width===C[0].width&&e.height===C[0].height})),y=w[w.length-1],I=w.filter((function(e){return e.bandwidth===y.bandwidth}))[0]),c.experimentalLeastPixelDiffSelector){var O=E.map((function(e){return e.pixelDiff=Math.abs(e.width-n)+Math.abs(e.height-r),e}));ao(O,(function(e,t){return e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff})),x=O[0]}var P=x||I||A||_||m[0]||f[0];if(P&&P.playlist){var L="sortedPlaylistReps";return x?L="leastPixelDiffRep":I?L="resolutionPlusOneRep":A?L="resolutionBestRep":_?L="bandwidthBestRep":m[0]&&(L="enabledPlaylistReps"),io("choosing "+no(P)+" using "+L+" with options",d),P.playlist}return io("could not choose a playlist with options",d),null}},uo=function(){var e=this.useDevicePixelRatio&&l.a.devicePixelRatio||1;return oo(this.playlists.master,this.systemBandwidth,parseInt(ro(this.tech_.el(),"width"),10)*e,parseInt(ro(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},lo=function(e){var t=e.inbandTextTracks,n=e.metadataArray,r=e.timestampOffset,o=e.videoDuration;
2if(n){var c=l.a.WebKitDataCue||l.a.VTTCue,d=t.metadataTrack_;if(d&&(n.forEach((function(e){var time=e.cueTime+r;!("number"!=typeof time||l.a.isNaN(time)||time<0)&&time<1/0&&e.frames.forEach((function(e){var t=new c(time,time,e.value||e.url||e.data||"");t.frame=e,t.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return la.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return la.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return la.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(t),d.addCue(t)}))})),d.cues&&d.cues.length)){for(var h=d.cues,f=[],i=0;i<h.length;i++)h[i]&&f.push(h[i]);var m=f.reduce((function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e}),{}),v=Object.keys(m).sort((function(a,b){return Number(a)-Number(b)}));v.forEach((function(e,t){var n=m[e],r=Number(v[t+1])||o;n.forEach((function(e){e.endTime=r}))}))}}},co=function(e,t,track){var i,n;if(track&&track.cues)for(i=track.cues.length;i--;)(n=track.cues[i]).startTime>=e&&n.endTime<=t&&track.removeCue(n)},ho=function(e){return"number"==typeof e&&isFinite(e)},po=1/60,fo=function(e){var t=e.startOfSegment,n=e.duration,r=e.segment,o=e.part,l=e.playlist,c=l.mediaSequence,d=l.id,h=l.segments,f=void 0===h?[]:h,m=e.mediaIndex,v=e.partIndex,y=e.timeline,_=f.length-1,T="mediaIndex/partIndex increment";e.getMediaInfoForTime?T="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(T="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(T+=" with independent "+e.independent);var S="number"==typeof v,E=e.segment.uri?"segment":"pre-segment",k=S?wa({preloadSegment:r})-1:0;return E+" ["+(c+m)+"/"+(c+_)+"]"+(S?" part ["+v+"/"+k+"]":"")+" segment start/end ["+r.start+" => "+r.end+"]"+(S?" part start/end ["+o.start+" => "+o.end+"]":"")+" startOfSegment ["+t+"] duration ["+n+"] timeline ["+y+"] selected by ["+T+"] playlist ["+d+"]"},mo=function(e){return e+"TimingInfo"},go=function(e){var t=e.timelineChangeController,n=e.currentTimeline,r=e.segmentTimeline,o=e.loaderType,l=e.audioDisabled;if(n===r)return!1;if("audio"===o){var c=t.lastTimelineChange({type:"main"});return!c||c.to!==r}if("main"===o&&l){var d=t.pendingTimelineChange({type:"audio"});return!d||d.to!==r}return!1},vo=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+pa},yo=function(e,t){if("hls"!==t)return null;var n,r,o=(n={audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo},r=0,["video","audio"].forEach((function(e){var t=n[e+"TimingInfo"];if(t){var o,c=t.start,d=t.end;"bigint"==typeof c||"bigint"==typeof d?o=l.a.BigInt(d)-l.a.BigInt(c):"number"==typeof c&&"number"==typeof d&&(o=d-c),void 0!==o&&o>r&&(r=o)}})),"bigint"==typeof r&&r<Number.MAX_SAFE_INTEGER&&(r=Number(r)),r);if(!o)return null;var c=e.playlist.targetDuration,d=vo({segmentDuration:o,maxDuration:2*c}),h=vo({segmentDuration:o,maxDuration:c}),f="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+o+" when the reported duration is "+e.duration+" and the target duration is "+c+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return d||h?{severity:d?"warn":"info",message:f}:null},_o=function(e){function t(t,n){var r;if(r=e.call(this)||this,!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return r.bandwidth=t.bandwidth,r.throughput={rate:0,count:0},r.roundTrip=NaN,r.resetStats_(),r.mediaIndex=null,r.partIndex=null,r.hasPlayed_=t.hasPlayed,r.currentTime_=t.currentTime,r.seekable_=t.seekable,r.seeking_=t.seeking,r.duration_=t.duration,r.mediaSource_=t.mediaSource,r.vhs_=t.vhs,r.loaderType_=t.loaderType,r.currentMediaInfo_=void 0,r.startingMediaInfo_=void 0,r.segmentMetadataTrack_=t.segmentMetadataTrack,r.goalBufferLength_=t.goalBufferLength,r.sourceType_=t.sourceType,r.sourceUpdater_=t.sourceUpdater,r.inbandTextTracks_=t.inbandTextTracks,r.state_="INIT",r.timelineChangeController_=t.timelineChangeController,r.shouldSaveSegmentTimingInfo_=!0,r.parse708captions_=t.parse708captions,r.useDtsForTimestampOffset_=t.useDtsForTimestampOffset,r.captionServices_=t.captionServices,r.experimentalExactManifestTimings=t.experimentalExactManifestTimings,r.checkBufferTimeout_=null,r.error_=void 0,r.currentTimeline_=-1,r.pendingSegment_=null,r.xhrOptions_=null,r.pendingSegments_=[],r.audioDisabled_=!1,r.isPendingTimestampOffset_=!1,r.gopBuffer_=[],r.timeMapping_=0,r.safeAppend_=la.browser.IE_VERSION>=11,r.appendInitSegment_={audio:!0,video:!0},r.playlistOfLastInitSegment_={audio:null,video:null},r.callQueue_=[],r.loadQueue_=[],r.metadataQueue_={id3:[],caption:[]},r.waitingOnRemove_=!1,r.quotaExceededErrorRetryTimeout_=null,r.activeInitSegmentId_=null,r.initSegments_={},r.cacheEncryptionKeys_=t.cacheEncryptionKeys,r.keyCache_={},r.decrypter_=t.decrypter,r.syncController_=t.syncController,r.syncPoint_={segmentIndex:0,time:0},r.transmuxer_=r.createTransmuxer_(),r.triggerSyncInfoUpdate_=function(){return r.trigger("syncinfoupdate")},r.syncController_.on("syncinfoupdate",r.triggerSyncInfoUpdate_),r.mediaSource_.addEventListener("sourceopen",(function(){r.isEndOfStream_
2()||(r.ended_=!1)})),r.fetchAtBuffer_=!1,r.logger_=ha("SegmentLoader["+r.loaderType_+"]"),Object.defineProperty(_()(r),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),r.sourceUpdater_.on("ready",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"main"===r.loaderType_&&r.timelineChangeController_.on("pendingtimelinechange",(function(){r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),"audio"===r.loaderType_&&r.timelineChangeController_.on("timelinechange",(function(){r.hasEnoughInfoToLoad_()&&r.processLoadQueue_(),r.hasEnoughInfoToAppend_()&&r.processCallQueue_()})),r}S()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return Ns({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_&&l.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,l.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_&&Ms(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return la.createTimeRanges();if("main"===this.loaderType_){var t=e.hasAudio,n=e.hasVideo,r=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!r)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(map,e){if(void 0===e&&(e=!1),!map)return null;var t=cs(map),n=this.initSegments_[t];return e&&!n&&map.bytes&&(this.initSegments_[t]=n={resolvedUri:map.resolvedUri,byterange:map.byterange,bytes:map.bytes,tracks:map.tracks,timescales:map.timescales}),n||map},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=ds(e),r=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!r&&e.bytes&&(this.keyCache_[n]=r={resolvedUri:e.resolvedUri,bytes:e.bytes});var o={resolvedUri:(r||e).resolvedUri};return r&&(o.bytes=r.bytes),o},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_,r=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 o=null;if(n&&(n.id?o=n.id:n.uri&&(o=n.uri)),this.logger_("playlist update ["+o+" => "+(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 l=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift ["+l+"]"),null!==this.mediaIndex)if(this.mediaIndex-=l,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var c=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!c.parts||!c.parts.length||!c.parts[this.partIndex])){var d=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=d}}r&&(r.mediaIndex-=l,r.mediaIndex<0?(r.mediaIndex=null,r.partIndex=null):(r.mediaIndex>=0&&(r.segment=e.segments[r.mediaIndex]),r.partIndex>=0&&r.segment.parts&&(r.part=r.segment.parts[r.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(l.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,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_&&Ms(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,r){if(void 0===n&&(n=function(){}),void 0===r&&(r=!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 o=1,l=function(){0===--o&&n()};for(var track in!r&&this.audioDisabled_||(o++,this.sourceUpdater_.removeAudio(e,t,l)),(r||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,n,r){for(var o=Math.ceil((t-r)*W.ONE_SECOND_IN_TS),l=Math.ceil((n-r)*W.ONE_SECOND_IN_TS),c=e.slice(),i=e.length;i--&&!(e[i].pts<=l););if(-1===i)return c;for(var d=i+1;d--&&!(e[d].pts<=o););return d=Math.max(d,0),c.splice(d,i-d+1),c}(this.gopBuffer_,e,t,this.timeMapping_),o++,this.sourceUpdater_.removeVideo(e,t,l)),this.inbandTextTracks_)co(e,t,this.inbandTextTracks_[track]);co(e,t,this.segmentMetadataTrack_),l()}else this.logger_("skipping remove because no source updater or starting media info")},n.monitorBuffer_=function(){this.checkBufferTimeout_&&l.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=l.a.setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&l.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=l.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 r="number"==typeof e&&t.segments[e],o=e+1===t.segments.length,l=!r||!r.parts||n+1===r.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&o&&l},n.chooseNextRequest_=function(){var e=this.buffered_(),t=ba(e)||0,n=Ta(e,this.currentTime_()),r=!this.hasPlayed_()&&n>=1,o=n>=this.goalBufferLength_(),l=this.playlist_.segments;if(!l.length||r||o)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var c={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(c.isSyncRequest)c.mediaIndex=function(e,t,n){t=t||[];for(var r=[],time=0,i=0;i<t.length;i++){var o=t[i];if(e===o.timeline&&(r.push(i),(time+=o.duration)>n))return i}return 0===r.length?0:r[r.length-1]}(this.currentTimeline_,l,t);else if(null!==this.mediaIndex){var d=l[this.mediaIndex],h="number"==typeof this.partIndex?this.partIndex:-1;c.startOfSegment=d.end?d.end:t,d.parts&&d.parts[h+1]?(c.mediaIndex=this.mediaIndex,c.partIndex=h+1):c.mediaIndex=this.mediaIndex+1}else{var f=Fa.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}),m=f.segmentIndex,v=f.startTime,y=f.partIndex;c.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),c.mediaIndex=m,c.startOfSegment=v,c.partIndex=y}var _=l[c.mediaIndex],T=_&&"number"==typeof c.partIndex&&_.parts&&_.parts[c.partIndex];if(!_||"number"==typeof c.partIndex&&!T)return null;if("number"!=typeof c.partIndex&&_.parts&&(c.partIndex=0,T=_.parts[0]),!n&&T&&!T.independent)if(0===c.partIndex){var S=l[c.mediaIndex-1],E=S.parts&&S.parts.length&&S.parts[S.parts.length-1];E&&E.independent&&(c.mediaIndex-=1,c.partIndex=S.parts.length-1,c.independent="previous segment")}else _.parts[c.partIndex-1].independent&&(c.partIndex-=1,c.independent="previous part");var k=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return c.mediaIndex>=l.length-1&&k&&!this.seeking_()?null:this.generateSegmentInfo_(c)},n.generateSegmentInfo_=function(e){var t=e.independent,n=e.playlist,r=e.mediaIndex,o=e.startOfSegment,l=e.isSyncRequest,c=e.partIndex,d=e.forceTimestampOffset,h=e.getMediaInfoForTime,f=n.segments[r],m="number"==typeof c&&f.parts[c],v={requestId:"segment-loader-"+Math.random(),uri:m&&m.resolvedUri||f.resolvedUri,mediaIndex:r,partIndex:m?c:null,isSyncRequest:l,startOfSegment:o,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:f.timeline,duration:m&&m.duration||f.duration,segment:f,part:m,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:h,independent:t},y=void 0!==d?d:this.isPendingTimestampOffset_;v.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:f.timeline,currentTimeline:this.currentTimeline_,startOfSegment:o,buffered:this.buffered_(),overrideCheck:y});
2var _=ba(this.sourceUpdater_.audioBuffered());return"number"==typeof _&&(v.audioAppendStart=_-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(v.gopsToAlignWith=function(e,t,n){if(null==t||!e.length)return[];var i,r=Math.ceil((t-n+3)*W.ONE_SECOND_IN_TS);for(i=0;i<e.length&&!(e[i].pts>r);i++);return e.slice(i)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),v},n.timestampOffsetForSegment_=function(e){return n=(t=e).segmentTimeline,r=t.currentTimeline,o=t.startOfSegment,l=t.buffered,t.overrideCheck||n!==r?n<r?o:l.length?l.end(l.length-1):o:null;var t,n,r,o,l},n.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),n=e.bandwidth,r=this.pendingSegment_.duration,o=Fa.estimateSegmentRequestTime(r,n,this.playlist_,e.bytesReceived),l=function(e,t,n){return void 0===n&&(n=1),((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(o<=l)){var c=function(e){var t=e.master,n=e.currentTime,r=e.bandwidth,o=e.duration,l=e.segmentDuration,c=e.timeUntilRebuffer,d=e.currentTimeline,h=e.syncController,f=t.playlists.filter((function(e){return!Fa.isIncompatible(e)})),m=f.filter(Fa.isEnabled);m.length||(m=f.filter((function(e){return!Fa.isDisabled(e)})));var v=m.filter(Fa.hasAttribute.bind(null,"BANDWIDTH")).map((function(e){var t=h.getSyncPoint(e,o,d,n)?1:2;return{playlist:e,rebufferingImpact:Fa.estimateSegmentRequestTime(l,r,e)*t-c}})),y=v.filter((function(e){return e.rebufferingImpact<=0}));return ao(y,(function(a,b){return so(b.playlist,a.playlist)})),y.length?y[0]:(ao(v,(function(a,b){return a.rebufferingImpact-b.rebufferingImpact})),v[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:r,timeUntilRebuffer:l,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(c){var d=o-l-c.rebufferingImpact,h=.5;l<=pa&&(h=1),!c.playlist||c.playlist.uri===this.playlist_.uri||d<h||(this.bandwidth=c.playlist.attributes.BANDWIDTH*Ss.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},n.handleAbort_=function(e){this.logger_("Aborting "+fo(e)),this.mediaRequestsAborted+=1},n.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},n.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(a,b){if(!a&&!b||!a&&b||a&&!b)return!1;if(a===b)return!0;var e=Object.keys(a).sort(),t=Object.keys(b).sort();if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++){var n=e[i];if(n!==t[i])return!1;if(a[n]!==b[n])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(e,t,n,time){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var r=this.pendingSegment_,o=mo(t);r[o]=r[o]||{},r[o][n]=time,this.logger_("timinginfo: "+t+" - "+n+" - "+time),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(e,t){var n=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),o={};t.forEach((function(caption){o[caption.stream]=o[caption.stream]||{startTime:1/0,captions:[],endTime:0};var e=o[caption.stream];e.startTime=Math.min(e.startTime,caption.startTime+r),e.endTime=Math.max(e.endTime,caption.endTime+r),e.captions.push(caption)})),Object.keys(o).forEach((function(e){var t=o[e],c=t.startTime,d=t.endTime,h=t.captions,f=n.inbandTextTracks_;n.logger_("adding cues from "+c+" -> "+d+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var r=n;/^cc708_/.test(n)&&(r="SERVICE"+n.split("_")[1]);var track=t.textTracks().getTrackById(r);if(track)e[n]=track;else{var label=n,o=n,l=!1,c=(t.options_.vhs&&t.options_.vhs.captionServices||{})[r];c&&(label=c.label,o=c.language,l=c.default),e[n]=t.addRemoteTextTrack({kind:"captions",id:r,default:l,label:label,language:o},!1).track}}}(f,n.vhs_.tech_,e),co(c,d,f[e]),function(e){var t=e.inbandTextTracks,n=e.captionArray,r=e.timestampOffset;
2if(n){var o=l.a.WebKitDataCue||l.a.VTTCue;n.forEach((function(caption){var track=caption.stream;t[track].addCue(new o(caption.startTime+r,caption.endTime+r,caption.text))}))}}({captionArray:h,inbandTextTracks:f,timestampOffset:r})})),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 r=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_),lo({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:r,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_()||!go({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.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,r=t.hasVideo,o=t.isMuxed;return!(r&&!e.videoTimingInfo)&&(!(n&&!this.audioDisabled_&&!o&&!e.audioTimingInfo)&&!go({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[mo(t.type)].start;else{var r,o=this.getCurrentMediaInfo_(),l="main"===this.loaderType_&&o&&o.hasVideo;l&&(r=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:l,firstVideoFrameTimeForData:r,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 c=this.chooseNextRequest_();if(c.mediaIndex!==n.mediaIndex||c.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,map=e.map,r=e.playlist;if(map){var o=cs(map);if(this.activeInitSegmentId_===o)return null;n=this.initSegmentForMap(map,!0).bytes,this.activeInitSegmentId_=o}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,r=e.segmentInfo,o=e.type,c=e.bytes,d=this.sourceUpdater_.audio
2Buffered(),h=this.sourceUpdater_.videoBuffered();d.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+_a(d).join(", ")),h.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+_a(h).join(", "));var f=d.length?d.start(0):0,m=d.length?d.end(d.length-1):0,v=h.length?h.start(0):0,y=h.length?h.end(h.length-1):0;if(m-f<=1&&y-v<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+c.byteLength+", audio buffer: "+_a(d).join(", ")+", video buffer: "+_a(h).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:r,type:o,bytes:c}));var _=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+_),this.remove(0,_,(function(){n.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=l.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,r=e.type,o=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(r+" append of "+o.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:r,bytes:o}))},n.appendToSourceBuffer_=function(e){var t,n,r,o=e.segmentInfo,l=e.type,c=e.initSegment,data=e.data,d=e.bytes;if(!d){var h=[data],f=data.byteLength;c&&(h.unshift(c),f+=c.byteLength),r=0,(t={bytes:f,segments:h}).bytes&&(n=new Uint8Array(t.bytes),t.segments.forEach((function(e){n.set(e,r),r+=e.byteLength}))),d=n}this.sourceUpdater_.appendBuffer({segmentInfo:o,type:l,bytes:d},this.handleAppendError_.bind(this,{segmentInfo:o,type:l,bytes:d}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var r=this.pendingSegment_.segment,o=e+"TimingInfo";r[o]||(r[o]={}),r[o].transmuxerPrependedSeconds=n.prependedContentDuration||0,r[o].transmuxedPresentationStart=n.start.presentation,r[o].transmuxedDecodeStart=n.start.decode,r[o].transmuxedPresentationEnd=n.end.presentation,r[o].transmuxedDecodeEnd=n.end.decode,r[o].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var n=t.type,data=t.data;if(data&&data.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:data})}},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=f()({},e,{forceTimestampOffset:!0});f()(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),r=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),o=null!==this.mediaIndex,l=e.timeline!==this.currentTimeline_&&e.timeline>0,c=r||o&&l;this.logger_("Requesting "+fo(e)),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Qs({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_.b
2ind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:c,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 r=n.message,o=n.level,l=n.stream;t.logger_(fo(e)+" logged from transmuxer stream "+l+" as a "+o+": "+r)}})},n.trimBackBuffer_=function(e){var t=function(e,t,n){var r=t-Ss.BACK_BUFFER_LENGTH;e.length&&(r=Math.max(r,e.start(0)));var o=t-n;return Math.min(o,r)}(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,r={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},o=e.playlist.segments[e.mediaIndex-1];if(o&&o.timeline===t.timeline&&(o.videoTimingInfo?r.baseStartTime=o.videoTimingInfo.transmuxedDecodeEnd:o.audioTimingInfo&&(r.baseStartTime=o.audioTimingInfo.transmuxedDecodeEnd)),t.key){var l=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=l}return t.map&&(r.map=this.initSegmentForMap(t.map)),r},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<po?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record 0.016666666666666666"):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},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===js)return;return this.pause(),e.code===Bs?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var r=this.pendingSegment_;this.saveBandwidthRelatedStats_(r.duration,t.stats),r.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var r=t[0].pts,i=0;i<e.length&&!(e[i].pts>=r);i++);return e.slice(0,i).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(r)}},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,r=e.mediaIndex,o=e.firstVideoFrameTimeForData,l=e.currentVideoTimestampOffset,c=e.useVideoTimingInfo,d=e.videoTimingInfo,h=e.audioTimingInfo;if(void 0!==t)return t;if(!c)return h.start;var f=n.segments[r-1];return 0!==r&&f&&void 0!==f.start&&f.end===o+l?d.start:o},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,r=t.hasVideo,o=t.isMuxed,l="main"===this.loaderType_&&r,c=!this.audioDisabled_&&n&&!o;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);l&&e.waitingOnAppends++,c&&e.waitingOnAppends++,l&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),c&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||
2(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,r=e.timingInfo;return this.useDtsForTimestampOffset_?t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:n&&"number"==typeof n.transmuxedDecodeStart?n.transmuxedDecodeStart:r.start:r.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=yo(e,this.sourceType_);if(t&&("warn"===t.severity?la.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 "+fo(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,r=e.part,o=n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration,l=r&&r.end&&this.currentTime_()-r.end>3*e.playlist.partTargetDuration;if(o||l)return this.logger_("bad "+(o?"segment":"part")+" "+fo(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 "+fo(e))},n.recordThroughput_=function(e){if(e.duration<po)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record 0.016666666666666666");else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,r=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(r-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,r=t.end;if(ho(n)&&ho(r)){co(n,r,this.segmentMetadataTrack_);
2var o=l.a.WebKitDataCue||l.a.VTTCue,c={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:r},d=new o(n,r,JSON.stringify(c));d.value=c,this.segmentMetadataTrack_.addCue(d)}}},t}(la.EventTarget);function bo(){}var To,So=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},Eo=["video","audio"],ko=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},Co=function e(t,n){if(0!==n.queue.length){var r=0,o=n.queue[r];if("mediaSource"!==o.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!ko(t,n)){if(o.type!==t){if(r=function(e,t){for(var i=0;i<t.length;i++){var n=t[i];if("mediaSource"===n.type)return null;if(n.type===e)return i}return null}(t,n.queue),null===r)return;o=n.queue[r]}return n.queue.splice(r,1),n.queuePending[t]=o,o.action(t,n),o.doneFn?void 0:(n.queuePending[t]=null,void e(t,n))}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),o.action(n),o.doneFn&&o.doneFn(),e("audio",n),e("video",n))}},wo=function(e,t){var n=t[e+"Buffer"],r=So(e);n&&(n.removeEventListener("updateend",t["on"+r+"UpdateEnd_"]),n.removeEventListener("error",t["on"+r+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},Io=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},xo=function(e,t,n){return function(r,o){var l=o[r+"Buffer"];if(Io(o.mediaSource,l)){o.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+r+"Buffer");try{l.appendBuffer(e)}catch(e){o.logger_("Error with code "+e.code+" "+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+r+"Buffer"),o.queuePending[r]=null,n(e)}}}},Ao=function(e,t){return function(n,r){var o=r[n+"Buffer"];if(Io(r.mediaSource,o)){r.logger_("Removing "+e+" to "+t+" from "+n+"Buffer");try{o.remove(e,t)}catch(o){r.logger_("Remove "+e+" to "+t+" from "+n+"Buffer failed")}}}},Oo=function(e){return function(t,n){var r=n[t+"Buffer"];Io(n.mediaSource,r)&&(n.logger_("Setting "+t+"timestampOffset to "+e),r.timestampOffset=e)}},Po=function(e){return function(t,n){e()}},Lo=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){la.log.warn("Failed to call media source endOfStream",e)}}}},Do=function(e){return function(t){t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(e){la.log.warn("Failed to set media source duration",e)}}},Mo=function(){return function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(Io(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(t){la.log.warn("Failed to abort on "+e+"Buffer",t)}}}}},No=function(e,t){return function(n){var r=So(e),o=Object(N.e)(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var l=n.mediaSource.addSourceBuffer(o);l.addEventListener("updateend",n["on"+r+"UpdateEnd_"]),l.addEventListener("error",n["on"+r+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=l}},Ro=function(e){return function(t){var n=t[e+"Buffer"];if(wo(e,t),Io(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(t){la.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},Uo=function(e){return function(t,n){var r=n[t+"Buffer"],o=Object(N.e)(e);Io(n.mediaSource,r)&&n.codecs[t]!==e&&(n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e),r.changeType(o),n.codecs[t]=e)}},Bo=function(e){var t=e.type,n=e.sourceUpdater,r=e.action,o=e.doneFn,l=e.name;n.queue.push({type:t,action:r,doneFn:o,name:l}),Co(t,n)},jo=function(e,t){return function(n){if(t.queuePending[e]){var r=t.queuePending[e].doneFn;t.queuePending[e]=null,r&&r(t[e+"Error_"])}Co(e,t)}},Fo=function(e){function t(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return Co("mediaSource",_()(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=ha("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null}
2,n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=jo("video",_()(n)),n.onAudioUpdateEnd_=jo("audio",_()(n)),n.onVideoError_=function(e){n.videoError_=e},n.onAudioError_=function(e){n.audioError_=e},n.createdSourceBuffers_=!1,n.initializedEme_=!1,n.triggeredReady_=!1,n}S()(t,e);var n=t.prototype;return n.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},n.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},n.hasInitializedAnyEme=function(){return this.initializedEme_},n.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},n.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(e,t){Bo({type:"mediaSource",sourceUpdater:this,action:No(e,t),name:"addSourceBuffer"})},n.abort=function(e){Bo({type:e,sourceUpdater:this,action:Mo(e),name:"abort"})},n.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?Bo({type:"mediaSource",sourceUpdater:this,action:Ro(e),name:"removeSourceBuffer"}):la.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!la.browser.IE_VERSION&&!la.browser.IS_FIREFOX&&l.a.MediaSource&&l.a.MediaSource.prototype&&"function"==typeof l.a.MediaSource.prototype.removeSourceBuffer},t.canChangeType=function(){return l.a.SourceBuffer&&l.a.SourceBuffer.prototype&&"function"==typeof l.a.SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(e,t){this.canChangeType()?Bo({type:e,sourceUpdater:this,action:Uo(t),name:"changeType"}):la.log.error("changeType is not supported!")},n.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((function(n){var r=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,r);t.canChangeType()&&t.changeType(n,r)}))},n.appendBuffer=function(e,t){var n=this,r=e.segmentInfo,o=e.type,l=e.bytes;if(this.processedAppend_=!0,"audio"===o&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+l.length+" until video append");if(Bo({type:o,sourceUpdater:this,action:xo(l,r||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===o){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var c=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+c.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,c.forEach((function(e){n.appendBuffer.apply(n,e)}))}},n.audioBuffered=function(){return Io(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:la.createTimeRange()},n.videoBuffered=function(){return Io(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:la.createTimeRange()},n.buffered=function(){var video=Io(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,audio=Io(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return audio&&!video?this.audioBuffered():video&&!audio?this.videoBuffered():function(e,t){var n=null,r=null,o=0,l=[],c=[];if(!(e&&e.length&&t&&t.length))return la.createTimeRange();for(var d=e.length;d--;)l.push({time:e.start(d),type:"start"}),l.push({time:e.end(d),type:"end"});for(d=t.length;d--;)l.push({time:t.start(d),type:"start"}),l.push({time:t.end(d),type:"end"});for(l.sort((function(a,b){return a.time-b.time})),d=0;d<l.length;d++)"start"===l[d].type?2==++o&&(n=l[d].time):"end"===l[d].type&&1==--o&&(r=l[d].time),null!==n&&null!==r&&(c.push([n,r]),n=null,r=null);return la.createTimeRanges(c)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){void 0===t&&(t=bo),Bo({type:"mediaSource",sourceUpdater:this,action:Do(e),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=bo),"string"!=typeof e&&(e=void 0),Bo({type:"mediaSource",sourceUpdater:this,action:Lo(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,n){void 0===n&&(n=bo),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Bo({type:"audio",sourceUpdater:this,action:Ao(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=bo),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Bo({type:"video",sourceUpdater:this,action:Ao(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!(!ko("audio",this)&&!ko("video",this))},n.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Bo({type:"audio",sourceUpdater:this,action:Oo(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(Bo({type:"video",sourceUpdater:this,action:Oo(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&Bo({type:"audio",sourceUpdater:this,action:Po(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&Bo({type:"video",sourceUpdater:this,action:Po(e),name:"callback"})},n.dispose=function(){var e=this;
2this.trigger("dispose"),Eo.forEach((function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"]((function(){return wo(t,e)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},t}(la.EventTarget),Ho=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},qo=new Uint8Array("\n\n".split("").map((function(e){return e.charCodeAt(0)}))),Vo=function(e){function t(t,n){var r;return void 0===n&&(n={}),(r=e.call(this,t,n)||this).mediaSource_=null,r.subtitlesTrack_=null,r.loaderType_="subtitle",r.featuresNativeTextTracks_=t.featuresNativeTextTracks,r.shouldSaveSegmentTimingInfo_=!1,r}S()(t,e);var n=t.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return la.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return la.createTimeRanges([[t,n]])},n.initSegmentForMap=function(map,e){if(void 0===e&&(e=!1),!map)return null;var t=cs(map),n=this.initSegments_[t];if(e&&!n&&map.bytes){var r=qo.byteLength+map.bytes.byteLength,o=new Uint8Array(r);o.set(map.bytes),o.set(qo,map.bytes.byteLength),this.initSegments_[t]=n={resolvedUri:map.resolvedUri,byterange:map.byterange,bytes:o}}return n||map},n.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},n.remove=function(e,t){co(e,t,this.subtitlesTrack_)},n.fillBuffer_=function(){var e=this,t=this.chooseNextRequest_();if(t){if(null===this.syncController_.timestampOffsetForTimeline(t.timeline)){return this.syncController_.one("timestampoffset",(function(){e.state="READY",e.paused()||e.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(t)}},n.timestampOffsetForSegment_=function(){return null},n.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},n.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=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 r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Bs&&this.handleTimeout_(),e.code===js?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var o=this.pendingSegment_;this.saveBandwidthRelatedStats_(o.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");var c=o.segment;if(c.map&&(c.map.bytes=t.map.bytes),o.bytes=t.bytes,"function"!=typeof l.a.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var d,h=function(){r.subtitlesTrack_.tech_.off("vttjsloaded",d),r.stopForError({message:"Error loading vtt.js"})};return d=function(){r.subtitlesTrack_.tech_.off("vttjserror",h),r.segmentRequestFinished_(e,t,n)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",d),void this.subtitlesTrack_.tech_.one("vttjserror",h)}c.requested=!0;try{this.parseVTTCues_(o)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(o,this.syncController_.timelines[o.timeline],this.playlist_),o.cues.length?o.timingInfo={start:o.cues[0].startTime,end:o.cues[o.cues.length-1].endTime}:o.timingInfo={start:o.startOfSegment,end:o.startOfSegment+o.duration},o.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");o.byteLength=o.bytes.byteLength,this.mediaSecondsLoaded+=c.duration,o.cues.forEac
2h((function(e){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new l.a.VTTCue(e.startTime,e.endTime,e.text):e)})),function(track){var e=track.cues;if(e)for(var i=0;i<e.length;i++){for(var t=[],n=0,r=0;r<e.length;r++)e[i].startTime===e[r].startTime&&e[i].endTime===e[r].endTime&&e[i].text===e[r].text&&++n>1&&t.push(e[r]);t.length&&t.forEach((function(e){return track.removeCue(e)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(e){var t,n=!1;"function"==typeof l.a.TextDecoder?t=new l.a.TextDecoder("utf8"):(t=l.a.WebVTT.StringDecoder(),n=!0);var r=new l.a.WebVTT.Parser(l.a,l.a.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(map){e.timestampmap=map},r.onparsingerror=function(e){la.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var o=e.segment.map.bytes;n&&(o=Ho(o)),r.parse(o)}var c=e.bytes;n&&(c=Ho(c)),r.parse(c),r.flush()},n.updateTimeMapping_=function(e,t,n){var r=e.segment;if(t)if(e.cues.length){var o=e.timestampmap,l=o.MPEGTS/W.ONE_SECOND_IN_TS-o.LOCAL+t.mapping;if(e.cues.forEach((function(e){e.startTime+=l,e.endTime+=l})),!n.syncInfo){var c=e.cues[0].startTime,d=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(c,d-r.duration)}}}else r.empty=!0},t}(_o),Wo=function(track,e){for(var t=track.cues,i=0;i<t.length;i++){var n=t[i];if(e>=n.adStartTime&&e<=n.adEndTime)return n}return null},zo=[{name:"VOD",run:function(e,t,n,r,o){if(n!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"ProgramDateTime",run:function(e,t,n,r,o){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var l=null,c=null,d=ka(t);o=o||0;for(var i=0;i<d.length;i++){var h=d[t.endList||0===o?i:d.length-(i+1)],f=h.segment,m=e.timelineToDatetimeMappings[f.timeline];if(m&&f.dateTimeObject){var v=f.dateTimeObject.getTime()/1e3+m;if(f.parts&&"number"==typeof h.partIndex)for(var y=0;y<h.partIndex;y++)v+=f.parts[y].duration;var _=Math.abs(o-v);if(null!==c&&(0===_||c<_))break;c=_,l={time:v,segmentIndex:h.segmentIndex,partIndex:h.partIndex}}}return l}},{name:"Segment",run:function(e,t,n,r,o){var l=null,c=null;o=o||0;for(var d=ka(t),i=0;i<d.length;i++){var h=d[t.endList||0===o?i:d.length-(i+1)],f=h.segment,m=h.part&&h.part.start||f&&f.start;if(f.timeline===r&&void 0!==m){var v=Math.abs(o-m);if(null!==c&&c<v)break;(!l||null===c||c>=v)&&(c=v,l={time:m,segmentIndex:h.segmentIndex,partIndex:h.partIndex})}}return l}},{name:"Discontinuity",run:function(e,t,n,r,o){var l=null;if(o=o||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var c=null,i=0;i<t.discontinuityStarts.length;i++){var d=t.discontinuityStarts[i],h=t.discontinuitySequence+i+1,f=e.discontinuities[h];if(f){var m=Math.abs(o-f.time);if(null!==c&&c<m)break;(!l||null===c||c>=m)&&(c=m,l={time:f.time,segmentIndex:d,partIndex:null})}}return l}},{name:"Playlist",run:function(e,t,n,r,o){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],Go=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=ha("SyncController"),n}S()(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,r){var o=this.runStrategies_(e,t,n,r);return o.length?this.selectSyncPoint_(o,{key:"time",value:r}):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 r=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return r.segmentIndex>0&&(r.time*=-1),Math.abs(r.time+Oa({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:r.segmentIndex,endIndex:0}))},n.runStrategies_=function(e,t,n,r){for(var o=[],i=0;i<zo.length;i++){var l=zo[i],c=l.run(this,e,t,n,r);c&&(c.strategy=l.name,o.push({strategy:l.name,syncPoint:c}))}return o},n.selectSyncPoint_=function(e,t){for(var n=e[0].syncPoint,r=Math.abs(e[0].syncPoint[t.key]-t.value),o=e[0].strategy,i=1;i<e.length;i++){var l=Math.abs(e[i].syncPoint[t.key]-t.value);l<r&&(r=l,n=e[i].syncPoint,o=e[i].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+o+"]: [time:"+n.time+", segmentIndex:"+n.segmentIndex+("number"==typeof n.partIndex?",partIndex:"+n.partIndex:"")+"]"),n},n.saveExpiredSegmentInfo=function(e,t){var n=t.mediaSequence-e.mediaSequence;if(n>86400)la.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}
2,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,r=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),o=t.segment;r&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:o.start}));var l=o.dateTimeObject;o.discontinuity&&n&&l&&(this.timelineToDatetimeMappings[o.timeline]=-l.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 r,o,l=e.segment,c=e.part,d=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)d={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=d,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+d.time+"] [mapping: "+d.mapping+"]")),r=e.startOfSegment,o=t.end+d.mapping;else{if(!d)return!1;r=t.start+d.mapping,o=t.end+d.mapping}return c&&(c.start=r,c.end=o),(!l.start||r<l.start)&&(l.start=r),l.end=o,!0},n.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var i=0;i<t.discontinuityStarts.length;i++){var r=t.discontinuityStarts[i],o=t.discontinuitySequence+i+1,l=r-e.mediaIndex,c=Math.abs(l);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>c){var time=void 0;time=l<0?n.start-Oa({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:r}):n.end+Oa({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:r}),this.discontinuities[o]={time:time,accuracy:c}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(la.EventTarget),Xo=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}S()(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,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:r},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,r=e.to;return"number"==typeof n&&"number"==typeof r&&(this.lastTimelineChanges_[t]={type:t,from:n,to:r},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(la.EventTarget),Ko=Cs(ws((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(path,base){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==base&&n.path)}},n.exports),n.exports}var r=n((function(e){function t(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0})),o=n((function(e){function t(n,p){return e.exports=t=Object.setPrototypeOf||function(e,p){return e.__proto__=p,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,p)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),l=n((function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),c=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<n;++i)t[i].call(this,arguments[1]);
2else for(var r=Array.prototype.slice.call(arguments,1),o=t.length,l=0;l<o;++l)t[l].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(data){e.push(data)}))},e}();var d,h=null,f=function(){function e(e){var i,t,n;h||(h=function(){var i,e,t,n,r,s,o,l,c=[[[],[],[],[],[]],[[],[],[],[],[]]],d=c[0],h=c[1],f=d[4],m=h[4],v=[],th=[];for(i=0;i<256;i++)th[(v[i]=i<<1^283*(i>>7))^i]=i;for(e=t=0;!f[e];e^=n||1,t=th[t]||1)for(s=(s=t^t<<1^t<<2^t<<3^t<<4)>>8^255&s^99,f[e]=s,m[s]=e,l=16843009*v[r=v[n=v[e]]]^65537*r^257*n^16843008*e,o=257*v[s]^16843008*s,i=0;i<4;i++)d[i][e]=o=o<<24^o>>>8,h[i][s]=l=l<<24^l>>>8;for(i=0;i<5;i++)d[i]=d[i].slice(0),h[i]=h[i].slice(0);return c}()),this._tables=[[h[0][0].slice(),h[0][1].slice(),h[0][2].slice(),h[0][3].slice(),h[0][4].slice()],[h[1][0].slice(),h[1][1].slice(),h[1][2].slice(),h[1][3].slice(),h[1][4].slice()]];var r=this._tables[0][4],o=this._tables[1],l=e.length,c=1;if(4!==l&&6!==l&&8!==l)throw new Error("Invalid aes key size");var d=e.slice(0),f=[];for(this._key=[d,f],i=l;i<4*l+28;i++)n=d[i-1],(i%l==0||8===l&&i%l==4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],i%l==0&&(n=n<<8^n>>>24^c<<24,c=c<<1^283*(c>>7))),d[i]=d[i-l]^n;for(t=0;i;t++,i--)n=d[3&t?i:i-4],f[t]=i<=4||t<4?n:o[0][r[n>>>24]]^o[1][r[n>>16&255]]^o[2][r[n>>8&255]]^o[3][r[255&n]]}return e.prototype.decrypt=function(e,t,n,r,o,l){var c,d,h,i,f=this._key[1],a=e^f[0],b=r^f[1],m=n^f[2],v=t^f[3],y=f.length/4-2,_=4,table=this._tables[1],T=table[0],S=table[1],E=table[2],k=table[3],C=table[4];for(i=0;i<y;i++)c=T[a>>>24]^S[b>>16&255]^E[m>>8&255]^k[255&v]^f[_],d=T[b>>>24]^S[m>>16&255]^E[v>>8&255]^k[255&a]^f[_+1],h=T[m>>>24]^S[v>>16&255]^E[a>>8&255]^k[255&b]^f[_+2],v=T[v>>>24]^S[a>>16&255]^E[b>>8&255]^k[255&m]^f[_+3],_+=4,a=c,b=d,m=h;for(i=0;i<4;i++)o[(3&-i)+l]=C[a>>>24]<<24^C[b>>16&255]<<16^C[m>>8&255]<<8^C[255&v]^f[_++],c=a,a=b,b=m,m=v,v=c},e}(),m=function(e){function t(){var t;return(t=e.call(this,c)||this).jobs=[],t.delay=1,t.timeout_=null,t}l(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}(c),v=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},y=function(){function e(t,n,r,o){var l=e.STEP,c=new Int32Array(t.buffer),d=new Uint8Array(t.byteLength),i=0;for(this.asyncStream_=new m,this.asyncStream_.push(this.decryptChunk_(c.subarray(i,i+l),n,r,d)),i=l;i<c.length;i+=l)r=new Uint32Array([v(c[i-4]),v(c[i-3]),v(c[i-2]),v(c[i-1])]),this.asyncStream_.push(this.decryptChunk_(c.subarray(i,i+l),n,r,d));this.asyncStream_.push((function(){var e;o(null,(e=d).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,n,r){return function(){var o=function(e,t,n){var r,o,l,c,d,h,m,y,_,T=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),S=new f(Array.prototype.slice.call(t)),E=new Uint8Array(e.byteLength),k=new Int32Array(E.buffer);for(r=n[0],o=n[1],l=n[2],c=n[3],_=0;_<T.length;_+=4)d=v(T[_]),h=v(T[_+1]),m=v(T[_+2]),y=v(T[_+3]),S.decrypt(d,h,m,y,k,_),k[_]=v(k[_]^r),k[_+1]=v(k[_+1]^o),k[_+2]=v(k[_+2]^l),k[_+3]=v(k[_+3]^c),r=d,o=h,l=m,c=y;return E}(e,t,n);r.set(o,e.byteOffset)}},r(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();d="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};var _=d.BigInt||Number;_("0x1"),_("0x100"),_("0x10000"),_("0x1000000"),_("0x100000000"),_("0x10000000000"),_("0x1000000000000"),_("0x100000000000000"),_("0x10000000000000000");var T=function(e){var t={};return Object.keys(e).forEach((function(n){var r,o=e[n];r=o,("function"===ArrayBuffer.isView?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer)?t[n]={bytes:o.buffer,byteOffset:o.byteOffset,byteLength:o.byteLength}:t[n]=o})),t};self.onmessage=function(e){var data=e.data,t=new Uint8Array(data.encrypted.bytes,data.encrypted.byteOffset,data.encrypted.byteLength),n=new Uint32Array(data.key.bytes,data.key.byteOffset,data.key.byteLength/4),r=new Uint32Array(data.iv.bytes,data.iv.byteOffset,data.iv.byteLength/4);new y(t,n,r,(function(e,t){self.postMessage(T({source:data.source,decrypted:t}),[t.buffer])}))}}))),Yo=ks(Ko),Qo=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},$o=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Jo=function(e,t){t.activePlaylistLoader=e,e.load()},Zo={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],o=t.blacklistCurrentPlaylist;$o(n,r);var l=r.activeTrack(),c=r.activeGroup(),d=(c.filter((function(e){return e.default}))[0]||c[0]).id,h=r.tracks[d];if(l!==h){for(var f in la.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[f].enabled=r.tracks[f]===h;r.onTrackChanged()}else o({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];la.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),$o(n,r);var track=r.activeTrack();track&&(track.mode="disabled"),r.onTrackChanged()}}},eu={AUDIO:function(e,t,n){if(t){var r=n.tech,o=n.requestOptions,l=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();l.playlist(e,o),(!r.paused()||e.endList&&"none"!==r.preload())&&l.load()})),t.on("loadedplaylist",(function(){l.playlist(t.media(),o),r.paused()||l.load()})),t.on("error",Zo[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,o=n.requestOptions,l=n.segmentLoaders[e],c=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();l.playlist(e,o),l.track(c.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&l.load()})),t.on("loadedplaylist",(function(){l.playlist(t.media(),o),r.paused()||l.load()})),t.on("error",Zo[e](e,n))}},tu={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,o=t.segmentLoaders[e],l=t.requestOptions,c=t.master.mediaGroups,d=t.mediaTypes[e],h=d.groups,f=d.tracks,m=d.logger_,v=t.masterPlaylistLoader,y=ja(v.master);for(var _ in c[e]&&0!==Object.keys(c[e]).length||(c[e]={main:{default:{default:!0}}},y&&(c[e].main.default.playlists=v.master.playlists)),c[e])for(var T in h[_]||(h[_]=[]),c[e][_]){var S=c[e][_][T],E=void 0;if(y?(m("AUDIO group '"+_+"' label '"+T+"' is a master playlist"),S.isMasterPlaylist=!0,E=null):E="vhs-json"===r&&S.playlists?new es(S.playlists[0],n,l):S.resolvedUri?new es(S.resolvedUri,n,l):S.playlists&&"dash"===r?new Ts(S.playlists[0],n,l,v):null,S=la.mergeOptions({id:T,playlistLoader:E},S),eu[e](e,S.playlistLoader,t),h[_].push(S),void 0===f[T]){var track=new la.AudioTrack({id:T,kind:Qo(S),enabled:!1,language:S.language,default:S.default,label:T});f[T]=track}}o.on("error",Zo[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,o=t.sourceType,l=t.segmentLoaders[e],c=t.requestOptions,d=t.master.mediaGroups,h=t.mediaTypes[e],f=h.groups,m=h.tracks,v=t.masterPlaylistLoader;for(var y in d[e])for(var _ in f[y]||(f[y]=[]),d[e][y])if(!d[e][y][_].forced){var T=d[e][y][_],S=void 0;if("hls"===o)S=new es(T.resolvedUri,r,c);else if("dash"===o){if(!T.playlists.filter((function(p){return p.excludeUntil!==1/0})).length)return;S=new Ts(T.playlists[0],r,c,v)}else"vhs-json"===o&&(S=new es(T.playlists?T.playlists[0]:T.resolvedUri,r,c));if(T=la.mergeOptions({id:_,playlistLoader:S},T),eu[e](e,T.playlistLoader,t),f[y].push(T),void 0===m[_]){var track=n.addRemoteTextTrack({id:_,kind:"subtitles",default:T.default&&T.autoselect,language:T.language,label:_},!1).track;m[_]=track}}l.on("error",Zo[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,o=t.mediaTypes[e],l=o.groups,c=o.tracks;
2for(var d in r[e])for(var h in l[d]||(l[d]=[]),r[e][d]){var f=r[e][d][h];if(/^(?:CC|SERVICE)/.test(f.instreamId)){var m=n.options_.vhs&&n.options_.vhs.captionServices||{},v={label:h,language:f.language,instreamId:f.instreamId,default:f.default&&f.autoselect};if(m[v.instreamId]&&(v=la.mergeOptions(v,m[v.instreamId])),void 0===v.default&&delete v.default,l[d].push(la.mergeOptions({id:h},f)),void 0===c[h]){var track=n.addRemoteTextTrack({id:v.instreamId,kind:"captions",default:v.default,language:v.language,label:v.label},!1).track;c[h]=track}}}}},iu=function e(t,n){for(var i=0;i<t.length;i++){if(Ua(n,t[i]))return!0;if(t[i].playlists&&e(t[i].playlists,n))return!0}return!1},nu={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode||"hidden"===n[r].mode)return n[r];return null}}},ru=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){tu[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,o=e.vhs,l=e.segmentLoaders,c=l.AUDIO,d=l.main;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(track){var n=t.masterPlaylistLoader,r=t.mediaTypes[e].groups,o=n.media();if(!o)return null;var l=null;o.attributes[e]&&(l=r[o.attributes[e]]);var c=Object.keys(r);if(!l)if("AUDIO"===e&&c.length>1&&ja(t.master))for(var i=0;i<c.length;i++){var d=r[c[i]];if(iu(d,o)){l=d;break}}else r.main?l=r.main:1===c.length&&(l=r[c[0]]);return void 0===track?l:null!==track&&l&&l.filter((function(e){return e.id===track.id}))[0]||null}}(n,e),t[n].activeTrack=nu[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],o=n.main,l=t.mediaTypes[e],c=l.activeTrack(),d=l.getActiveGroup(),h=l.activePlaylistLoader,f=l.lastGroup_;d&&f&&d.id===f.id||(l.lastGroup_=d,l.lastTrack_=c,$o(r,l),d&&!d.isMasterPlaylist&&(d.playlistLoader?(r.resyncLoader(),Jo(d.playlistLoader,l)):h&&o.resetEverything()))}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];t.mediaTypes[e].lastGroup_=null,n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.masterPlaylistLoader,r=t.segmentLoaders,o=r[e],l=r.main,c=t.mediaTypes[e],d=c.activeTrack(),h=c.getActiveGroup(),f=c.activePlaylistLoader,m=c.lastTrack_;if((!m||!d||m.id!==d.id)&&(c.lastGroup_=h,c.lastTrack_=d,$o(o,c),h)){if(h.isMasterPlaylist){if(!d||!m||d.id===m.id)return;var v=t.vhs.masterPlaylistController_,y=v.selectPlaylist();if(v.media()===y)return;return c.logger_("track change. Switching master audio from "+m.id+" to "+d.id),n.pause(),l.resetEverything(),void v.fastQualityChange_(y)}if("AUDIO"===e){if(!h.playlistLoader)return l.setAudio(!0),void l.resetEverything();o.setAudio(!0),l.setAudio(!1)}f!==h.playlistLoader?(o.track&&o.track(d),o.resetEverything(),Jo(h.playlistLoader,c)):Jo(h.playlistLoader,c)}}}(n,e),t[n].getActiveGroup=function(e,t){var n=t.mediaTypes;return function(){var t=n[e].activeTrack();return t?n[e].activeGroup(t):null}}(n,e)}));var h=t.AUDIO.activeGroup();if(h){var f=(h.filter((function(e){return e.default}))[0]||h[0]).id;t.AUDIO.tracks[f].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(d.setAudio(!1),c.setAudio(!0)):d.setAudio(!0)}n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),n.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var m=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var v in r.audioTracks().addEventListener("change",m),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),o.on("dispose",(function(){r.audioTracks().removeEventListener("change",m),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[v])},au=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],su=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},ou=function(e){function t(t){var n;n=e.call(this)||this;var r=t.src,o=t.handleManifestRedirects,c=t.withCredentials,d=t.tech,h=t.bandwidth,f=t.externVhs,m=t.useCueTags,v=t.blacklistDuration,y=t.enableLowInitialPlaylist,T=t.sourceType,S=t.cacheEncryptionKeys,E=t.experimentalBufferBasedABR,k=t.experimentalLeastPixelDiffSelector,C=t.captionServices;if(!r)throw new Error("A non-empty playlist URL or JSON manifest string is required");var w,I=t.maxPlaylistRetries;null==I&&(I=1/0),To=f,n.experimentalBufferBasedABR=Boolean(E),n.experimentalLeastPixelDiffSelector=Boolean(k),n.withCredentials=c,n.tech_=d,n.vhs_=d.vhs,n.sourceType_=T,n.useCueTags_=m,n.blacklistDuration=v,n.maxPlaylistRetries=I,n.enableLowInitialPlaylist=y,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:c,handleManifestRedirects:o,maxPlaylistRetries:I,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=(w={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(e){w[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:bo,activeTrack:bo,getActiveGroup:bo,onGroupChanged:bo,onTrackChanged:bo,lastTrack_:null,logger_:ha("MediaGroups["+e+"]")}})),w),n.mediaSource=new l.a.MediaSource,n.handleDurationChange_=n.handleDurationChange_.bind(_()(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind(_()(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind(_()(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=la.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new Go(t),n.segmentMetadataTrack_=d.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new Yo,n.sourceUpdater_=new Fo(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new Xo;var x={vhs:n.vhs_,parse708captions:t.parse708captions,useDtsForTimestampOffset:t.useDtsForTimestampOffset,captionServices:C,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.duration()},hasPlayed:function(){return n.hasPlayed_},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:h,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_,cacheEncryptionKeys:S,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_,experimentalExactManifestTimings:t.experimentalExactManifestTimings};n.masterPlaylistLoader_="dash"===n.sourceType_?new Ts(r,n.vhs_,n.requestOptions_):new es(r,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new _o(la.mergeOptions(x,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new _o(la.mergeOptions(x,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new Vo(la.mergeOptions(x,{loaderType:"vtt",featuresNativeTextTracks:n.tech_.featuresNativeTextTracks}),t),n.setupSegmentLoaderListeners_(),n.experimentalBufferBasedABR&&(n.masterPlaylistLoader_.one("loadedplaylist",(function(){return n.startABRTimer_()})),n.tech_.on("pause",(function(){return n.stopABRTimer_()})),n.tech_.on("play",(function(){return n.startABRTimer_()}))),au.forEach((function(e){n[e+"_"]=su.bind(_()(n),e)})),n.logger_=ha("MPC"),n.triggeredFmp4Usage=!1,"none"===n.tech_.preload()?(n.loadOnPlay_=function(){n.loadOnPlay_=null,n.masterPlaylistLoader_.load()},n.tech_.one("play",n.loadOnPlay_)):n.masterPlaylistLoader_.load(),n.timeToLoadedData__=-1,n.mainAppendsToLoadedData__=-1,n.audioAppendsToLoadedData__=-1;var A="none"===n.tech_.preload()?"play":"loadstart";return n.tech_.one(A,(function(){var e=Date.now();n.tech_.one("loadeddata",(function(){n.timeToLoadedData__=Date.now()-e,n.mainAppendsToLoadedData__=n.mainSegmentLoader_.mediaAppends,n.audioAppendsToLoadedData__=n.audioSegmentLoader_.mediaAppends}))}
2)),n}S()(t,e);var n=t.prototype;return n.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},n.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},n.appendsToLoadedData_=function(){var main=this.mainAppendsToLoadedData_(),audio=this.audioAppendsToLoadedData_();return-1===main||-1===audio?-1:main+audio},n.timeToLoadedData_=function(){return this.timeToLoadedData__},n.checkABR_=function(){var e=this.selectPlaylist();e&&this.shouldSwitchToMedia_(e)&&this.switchMedia_(e,"abr")},n.switchMedia_=function(e,t,n){var r=this.media(),o=r&&(r.id||r.uri),l=e.id||e.uri;o&&o!==l&&(this.logger_("switch media "+o+" -> "+l+" 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_=l.a.setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(l.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 track,n=e.mediaGroups.AUDIO,r=Object.keys(n);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)track=this.mediaTypes_.AUDIO.activeTrack();else{var o=n.main||r.length&&n[r[0]];for(var label in o)if(o[label].default){track={label:label};break}}if(!track)return t;var l=[];for(var c in n)if(n[c][track.label]){var d=n[c][track.label];if(d.playlists&&d.playlists.length)l.push.apply(l,d.playlists);else if(d.uri)l.push(d);else if(e.playlists.length)for(var i=0;i<e.playlists.length;i++){var h=e.playlists[i];h.attributes&&h.attributes.AUDIO&&h.attributes.AUDIO===c&&l.push(h)}}return l.length?l:t},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Ra(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),ru({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var t=e.masterPlaylistLoader_.media();if(!t){var n;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),!n||!e.shouldSwitchToMedia_(n))return;if(e.initialMedia_=n,e.switchMedia_(e.initialMedia_,"initial"),!("vhs-json"===e.sourceType_&&e.initialMedia_.segments))return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Ra(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();"playlist-unchanged"!==t.lastExcludeReason_&&(e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck")))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},r=!0,o=Object.keys(n.AUDIO);for(var l in n.AUDIO)for(var label in n.AUDIO[l]){n.AUDIO[l][label].uri||(r=!1)}r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),To.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),o.length&&Object.keys(n.AUDIO[o[0]]).length>1&&(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_.pen
2dingMedia_,n=this.tech_.currentTime(),r=this.bufferLowWaterLine(),o=this.bufferHighWaterLine();return function(e){var t=e.currentPlaylist,n=e.buffered,r=e.currentTime,o=e.nextPlaylist,l=e.bufferLowWaterLine,c=e.bufferHighWaterLine,d=e.duration,h=e.experimentalBufferBasedABR,f=e.log;if(!o)return la.log.warn("We received no playlist to switch to. Please check your stream."),!1;var m="allowing switch "+(t&&t.id||"null")+" -> "+o.id;if(!t)return f(m+" as current playlist is not set"),!0;if(o.id===t.id)return!1;var v=Boolean(ga(n,r).length);if(!t.endList)return v||"number"!=typeof t.partTargetDuration?(f(m+" as current playlist is live"),!0):(f("not "+m+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var y=Ta(n,r),_=h?Ss.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Ss.MAX_BUFFER_LOW_WATER_LINE;if(d<_)return f(m+" as duration < max low water line ("+d+" < "+_+")"),!0;var T=o.attributes.BANDWIDTH,S=t.attributes.BANDWIDTH;if(T<S&&(!h||y<c)){var E=m+" as next bandwidth < current bandwidth ("+T+" < "+S+")";return h&&(E+=" and forwardBuffer < bufferHighWaterLine ("+y+" < "+c+")"),f(E),!0}if((!h||T>S)&&y>=l){var k=m+" as forwardBuffer >= bufferLowWaterLine ("+y+" >= "+l+")";return h&&(k+=" and next bandwidth > current bandwidth ("+T+" > "+S+")"),f(k),!0}return f("not "+m+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:n,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:r,bufferHighWaterLine:o,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist();e.shouldSwitchToMedia_(t)&&e.switchMedia_(t,"bandwidthupdate"),e.tech_.trigger("bandwidthupdate")})),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(){la.browser.IE_VERSION||la.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()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(la.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(n.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(n.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")}
2,n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=To.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),o=this.tech_.buffered();if(!o.length)return n-r<=fa;var l=o.end(o.length-1);return l-r<=fa&&n-l<=fa},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var n=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!n)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));n.playlistErrors_++;var r,o=this.masterPlaylistLoader_.master.playlists,l=o.filter(Ma),c=1===l.length&&l[0]===n;if(1===o.length&&t!==1/0)return la.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(c);if(c){var d=!1;o.forEach((function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(d=!0,delete e.excludeUntil)}})),d&&(la.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}r=n.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*t,n.excludeUntil=r,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 h=this.selectPlaylist();if(!h)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var f=e.internal?this.logger_:la.log.warn,m=e.message?" "+e.message:"";f((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+m+" Switching to playlist "+h.id+"."),h.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),h.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var v=h.targetDuration/2*1e3||5e3,y="number"==typeof h.lastRequest&&Date.now()-h.lastRequest<=v;return this.switchMedia_(h,"exclude",c||y)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(filter,e){var t=this,n=[],r="all"===filter;(r||"main"===filter)&&n.push(this.masterPlaylistLoader_);var o=[];(r||"audio"===filter)&&o.push("AUDIO"),(r||"subtitle"===filter)&&(o.push("CLOSED-CAPTIONS"),o.push("SUBTITLES")),o.forEach((function(e){var r=t.mediaTypes_[e]&&t.mediaTypes_[e].activePlaylistLoader;r&&n.push(r)})),["main","audio","subtitle"].forEach((function(e){var r=t[e+"SegmentLoader_"];!r||filter!==e&&"all"!==filter||n.push(r)})),n.forEach((function(t){return e.forEach((function(e){"function"==typeof t[e]&&t[e]()}))}))},n.setCurrentTime=function(e){var t=ga(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:To.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 r=this.masterPlaylistLoader_.master,o=To.Playlist.seekable(t,n,To.Playlist.liveEdgeDelay(r,t));if(0!==o.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=To.Playlist.seekable(t,n,To.Playlist.liveEdgeDelay(r,t))).length)return}var l,c;this.seekable_&&this.seekable_.length&&(l=this.seekable_.end(0),c=this.seekable_.start(0)),e?e.start(0)>o.end(0)||o.start(0)>e.end(0)?this.seekable_=o:this.seekable_=la.createTimeRanges([[e.start(0)>o.start(0)?e.start(0):o.start(0),e.end(0)<o.end(0)?e.end(0):o.end(0)]]):this.seekable_=o,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===l&&this.seekable_.start(0)===c||(this.logger_("seekable updated ["+ya(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var n=this.tech_.buffered(),r=To.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},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 r in n)n[r].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_()||{}};t.video=t.main;var n=to(this.master(),this.media()),r={},o=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(r.video=n.video||t.main.videoCodec||N.b),t.main.isMuxed&&(r.video+=","+(n.audio||t.main.audioCodec||N.a)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||o)&&(r.audio=n.audio||t.main.audioCodec||t.audio.audioCodec||N.a,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),r.audio||r.video){var l,c={};if(["video","audio"].forEach((function(e){if(r.hasOwnProperty(e)&&(o=t[e].isFmp4,d=r[e],!(o?Object(N.c)(d):Object(N.g)(d)))){var n=t[e].isFmp4?"browser":"muxer";c[n]=c[n]||[],c[n].push(r[e]),"audio"===e&&(l=n)}var o,d})),o&&l&&this.media().attributes.AUDIO){var d=this.media().attributes.AUDIO;
2this.master().playlists.forEach((function(t){(t.attributes&&t.attributes.AUDIO)===d&&t!==e.media()&&(t.excludeUntil=1/0)})),this.logger_("excluding audio group "+d+" as "+l+' does not support codec(s): "'+r.audio+'"')}if(!Object.keys(c).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var h=[];if(["video","audio"].forEach((function(t){var n=(Object(N.h)(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,o=(Object(N.h)(r[t]||"")[0]||{}).type;n&&o&&n.toLowerCase()!==o.toLowerCase()&&h.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+r[t]+'"')})),h.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+h.join(", ")+".",blacklistDuration:1/0,internal:!0})}return r}var f=Object.keys(c).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+c[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:f,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),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(r){var o=t[r];if(-1===n.indexOf(o.id)){n.push(o.id);var l=to(e.master,o),c=[];!l.audio||Object(N.g)(l.audio)||Object(N.c)(l.audio)||c.push("audio codec "+l.audio),!l.video||Object(N.g)(l.video)||Object(N.c)(l.video)||c.push("video codec "+l.video),l.text&&"stpp.ttml.im1t"===l.text&&c.push("text codec "+l.text),c.length&&(o.excludeUntil=1/0,e.logger_("excluding "+o.id+" for unsupported: "+c.join(", ")))}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=[],r=this.master().playlists,o=Zs(Object(N.h)(e)),l=eo(o),c=o.video&&Object(N.h)(o.video)[0]||null,d=o.audio&&Object(N.h)(o.audio)[0]||null;Object.keys(r).forEach((function(e){var o=r[e];if(-1===n.indexOf(o.id)&&o.excludeUntil!==1/0){n.push(o.id);var h=[],f=to(t.masterPlaylistLoader_.master,o),m=eo(f);if(f.audio||f.video){if(m!==l&&h.push('codec count "'+m+'" !== "'+l+'"'),!t.sourceUpdater_.canChangeType()){var v=f.video&&Object(N.h)(f.video)[0]||null,y=f.audio&&Object(N.h)(f.audio)[0]||null;v&&c&&v.type.toLowerCase()!==c.type.toLowerCase()&&h.push('video codec "'+v.type+'" !== "'+c.type+'"'),y&&d&&y.type.toLowerCase()!==d.type.toLowerCase()&&h.push('audio codec "'+y.type+'" !== "'+d.type+'"')}h.length&&(o.excludeUntil=1/0,t.logger_("blacklisting "+o.id+": "+h.join(" && ")))}}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,track,t){if(void 0===t&&(t=0),e.segments)for(var n,r=t,i=0;i<e.segments.length;i++){var o=e.segments[i];if(n||(n=Wo(track,r+o.duration/2)),n){if("cueIn"in o){n.endTime=r,n.adEndTime=r,r+=o.duration,n=null;continue}if(r<n.endTime){r+=o.duration;continue}n.endTime+=o.duration}else if("cueOut"in o&&((n=new l.a.VTTCue(r,r+o.duration,o.cueOut)).adStartTime=r,n.adEndTime=r+parseFloat(o.cueOut),track.addCue(n)),"cueOutCont"in o){var c=o.cueOutCont.split("/").map(parseFloat),d=c[0],h=c[1];(n=new l.a.VTTCue(r,r+o.duration,"")).adStartTime=r-d,n.adEndTime=n.adStartTime+h,track.addCue(n)}r+=o.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Ss.GOAL_BUFFER_LENGTH,n=Ss.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,Ss.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Ss.BUFFER_LOW_WATER_LINE,n=Ss.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,Ss.MAX_BUFFER_LOW_WATER_LINE),o=Math.max(t,Ss.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?o:r)},n.bufferHighWaterLine=function(){return Ss.BUFFER_HIGH_WATER_LINE},t}(la.EventTarget),uu=function(e,t,n){var r,o,l,c=e.masterPlaylistController_,d=c[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(c);if(t.attributes){var h=t.attributes.RESOLUTION;this.width=h&&h.width,this.height=h&&h.height,this.bandwidth=t.attributes.BANDWIDTH}this.codecs=to(c.master(),t),this.playlist=t,this.id=n,this.enabled=(r=e.playlists,o=t.id,l=d,function(e){var t=r.master.playlists[o],n=Da(t),c=Ma(t);return void 0===e?c:(e?delete t.disabled:t.disabled=!0,e===c||n||(l(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},lu=["seeking","seeked","pause","playing","error"],cu=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=ha("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},r=function(){return t.monitorCurrentTime_()},o=function(){return t.techWaiting_()},c=function(){return t.cancelTimer_()},d=this.masterPlaylistController_,h=["main","subtitle","audio"],f={};h.forEach((function(e){f[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},d[e+"SegmentLoader_"].on("appendsdone",f[e].updateend),d[e+"SegmentLoader_"].on("playlistupdate",f[e].reset),t.tech_.on(["seeked","seeking"],f[e].reset)}));var m=function(e){["main","audio"].forEach((function(n){d[n+"SegmentLoader_"][e]("appended",t.seekingAppendCheck_)}))};this.seekingAppendCheck_=function(){t.fixesBadSeeks_()&&(t.consecutiveUpdates=0,t.lastRecordedTime=t.tech_.currentTime(),m("off"))},this.clearSeekingAppendCheck_=function(){return m("off")},this.watchForBadSeeking_=function(){t.clearSeekingAppendCheck_(),m("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",o),this.tech_.on(lu,c),this.tech_.on("canplay",r),this.tech_.one("play",n),this.dispose=function(){t.clearSeekingAppendCheck_(),t.logger_("dispose"),t.tech_.off("waiting",o),t.tech_.off(lu,c),t.tech_.off("canplay",r),t.tech_.off("play",n),t.tech_.off("seeking",t.watchForBadSeeking_),t.tech_.off("seeked",t.clearSeekingAppendCheck_),h.forEach((function(e){d[e+"SegmentLoader_"].off("appendsdone",f[e].updateend),d[e+"SegmentLoader_"].off("playlistupdate",f[e].reset),t.tech_.off(["seeked","seeking"],f[e].reset)})),t.checkCurrentTimeTimeout_&&l.a.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&l.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=l.a.setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&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_"],r=n.buffered_(),o=function(a,b){if(a===b)return!1;if(!a&&b||!b&&a)return!0;
2if(a.length!==b.length)return!0;for(var i=0;i<a.length;i++)if(a.start(i)!==b.start(i)||a.end(i)!==b.end(i))return!0;return!1}(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,o?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:_a(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+fa>=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 r=t.start(0);e=r+(r===t.end(0)?0:fa)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+ya(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;for(var o=this.masterPlaylistController_.sourceUpdater_,l=this.tech_.buffered(),c=o.audioBuffer?o.audioBuffered():null,d=o.videoBuffer?o.videoBuffered():null,h=this.media(),f=h.partTargetDuration?h.partTargetDuration:2*(h.targetDuration-pa),m=[c,d],i=0;i<m.length;i++){if(m[i])if(Ta(m[i],n)<f)return!1}var v=va(l,n);return 0!==v.length&&(e=v.start(0)+fa,this.logger_("Buffered region starts ("+v.start(0)+")  just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=ga(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+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 r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,o=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.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 l=va(o,t);if(l.length>0){var c=l.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+c+", seeking to "+l.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*c,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var o=e.end(e.length-1)+fa;return!n.endList&&r&&(o=e.end(e.length-1)+3*n.targetDuration),t>o},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,r=e.currentTime;if(t){var o;if(t.length&&n.length){var l=ga(t,r-3),c=ga(t,r),d=ga(n,r);d.length&&!c.length&&l.length&&(o={start:l.end(0),end:d.end(0)})}else{va(t,r).length||(o=this.gapFromVideoUnderflow_(t,r))}return!!o&&(this.logger_("Encountered a gap in video from "+o.start+" to "+o.end+". Seeking to current time "+r),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=va(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+pa),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}
2,t.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return la.createTimeRanges();for(var t=[],i=1;i<e.length;i++){var n=e.end(i-1),r=e.start(i);t.push([n,r])}return la.createTimeRanges(t)}(e),i=0;i<n.length;i++){var r=n.start(i),o=n.end(i);if(t-r<4&&t-r>2)return{start:r,end:o}}return null},e}(),du={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},hu=function e(t,n){var r=0,o=0,l=la.mergeOptions(du,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var c=function(){o&&t.currentTime(o)},d=function(e){null!=e&&(o=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",c),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},h=function(){return Date.now()-r<1e3*l.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):l.getSource&&"function"==typeof l.getSource?(r=Date.now(),l.getSource.call(t,d)):void la.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},f=function e(){t.off("loadedmetadata",c),t.off("error",h),t.off("dispose",e)};t.on("error",h),t.on("dispose",f),t.reloadSourceOnError=function(n){f(),e(t,n)}},pu="2.14.3",fu={PlaylistLoader:es,Playlist:Fa,utils:ps,STANDARD_PLAYLIST_SELECTOR:uo,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(Fa.isEnabled);return ao(t,(function(a,b){return so(a,b)})),t.filter((function(t){return!!to(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:uo,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 r=this.useDevicePixelRatio&&l.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),oo(this.playlists.master,t,parseInt(ro(this.tech_.el(),"width"),10)*r,parseInt(ro(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:so,comparePlaylistResolution:function(e,t){var n,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||l.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||l.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:rs()};Object.keys(Ss).forEach((function(e){Object.defineProperty(fu,e,{get:function(){return la.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),Ss[e]},set:function(t){la.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?la.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):Ss[e]=t}})}));var mu="videojs-vhs",gu=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.id){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};fu.canPlaySource=function(){return la.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var vu=function(e){var t=e.player,n=e.sourceKeySystems,r=e.audioMedia,o=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var l=function(e,t){return e.reduce((function(e,n){if(!n.contentProtection)return e;var r=t.reduce((function(e,t){var r=n.contentProtection[t];return r&&r.pssh&&(e[t]={pssh:r.pssh}),e}),{});return Object.keys(r).length&&e.push(r),e}),[])}(r?o.concat([r]):o,Object.keys(n)),c=[],d=[];return l.forEach((function(e){d.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),c.push(new Promise((function(n,r){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?r(e):n()}))})))})),Promise.race([Promise.all(c),Promise.race(d)])},yu=function(e){var t=e.player,n=function(e,t,n){if(!e)return e;var r={};t&&t.attributes&&t.attributes.CODECS&&(r=Zs(Object(N.h)(t.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(r.audio=n.attributes.CODECS);var o=Object(N.e)(r.video),l=Object(N.e)(r.audio),c={};for(var d in e)c[d]={}
2,l&&(c[d].audioContentType=l),o&&(c[d].videoContentType=o),t.contentProtection&&t.contentProtection[d]&&t.contentProtection[d].pssh&&(c[d].pssh=t.contentProtection[d].pssh),"string"==typeof e[d]&&(c[d].url=e[d]);return la.mergeOptions(e,c)}(e.sourceKeySystems,e.media,e.audioMedia);return!!n&&(t.currentSource().keySystems=n,!(n&&!t.eme)||(la.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},_u=function(){if(!l.a.localStorage)return null;var e=l.a.localStorage.getItem(mu);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};fu.supportsNativeHls=function(){if(!d.a||!d.a.createElement)return!1;var video=d.a.createElement("video");if(!la.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(e){return/maybe|probably/i.test(video.canPlayType(e))}))}(),fu.supportsNativeDash=!!(d.a&&d.a.createElement&&la.getTech("Html5").isSupported())&&/maybe|probably/i.test(d.a.createElement("video").canPlayType("application/dash+xml")),fu.supportsTypeNatively=function(e){return"hls"===e?fu.supportsNativeHls:"dash"===e&&fu.supportsNativeDash},fu.isSupported=function(){return la.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var bu=function(e){function t(source,t,n){var r;if(r=e.call(this,t,la.mergeOptions(n.hls,n.vhs))||this,n.hls&&Object.keys(n.hls).length&&la.log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),"number"==typeof n.initialBandwidth&&(r.options_.bandwidth=n.initialBandwidth),r.logger_=ha("VhsHandler"),t.options_&&t.options_.playerId){var o=la(t.options_.playerId);o.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return la.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),t.trigger({type:"usage",name:"hls-player-access"}),_()(r)},configurable:!0}),o.hasOwnProperty("vhs")||Object.defineProperty(o,"vhs",{get:function(){return la.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),t.trigger({type:"usage",name:"vhs-player-access"}),_()(r)},configurable:!0}),o.hasOwnProperty("dash")||Object.defineProperty(o,"dash",{get:function(){return la.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),_()(r)},configurable:!0}),r.player_=o}if(r.tech_=t,r.source_=source,r.stats={},r.ignoreNextSeekingEvent_=!1,r.setOptions_(),r.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(r.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return r.on(d.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=d.a.fullscreenElement||d.a.webkitFullscreenElement||d.a.mozFullScreenElement||d.a.msFullscreenElement;t&&t.contains(r.tech_.el())?r.masterPlaylistController_.fastQualityChange_():r.masterPlaylistController_.checkABR_()})),r.on(r.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),r.on(r.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),r.on(r.tech_,"play",r.play),r}S()(t,e);var n=t.prototype;return n.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=_u();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Ss.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Ss.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach((function(option){void 0!==e.source_[option]&&(e.options_[option]=e.source_[option])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var n=this;if(e){var r;this.setOptions_(),this.options_.src=0===(r=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(r.substring(r.indexOf(",")+1)):r,this.options_.tech=this.tech_,this.options_.externVhs=fu,this.options_.sourceType=Object(R.a)(t),this.options_.seekTo=function(time){n.tech_.setCurrentTime(time)},this.options_.smoothQualityChange&&la.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new ou(this.options_);var o=la.mergeOptions({liveRangeSafeTimeDelta:fa},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new cu(o),this.masterPlaylistController_.on("error",(function(){var e=la.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var c=this.options_.experimentalBufferBasedABR?fu.movingAverageBandwidthSelector(.55):fu.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):c.bind(this),this.masterPlaylistController_.selectInitialPlaylist=fu.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){var e=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,t=l.a.navigator.connection||l.a.navigator.mozConnection||l.a.navigator.webkitConnection,n=1e7;if(this.options_.useNetworkInformationApi&&t){var r=1e3*t.downlink*1e3;e=r>=n&&e>=n?Math.max(e,r):r}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(){la.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 _a(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 _a(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(!l.a.localStorage)return!1;var t=_u();t=t?la.mergeOptions(t,e):e;try{l.a.localStorage.setItem(mu,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=ja(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter((function(e){return!Da(e)})).map((function(t,i){return new uu(e,t,t.id)}
2)):[]}})),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_=l.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"),vu({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=yu({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 r,o=[];
2if(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,o.push(e))})),o.length)(r=la.log).warn.apply(r,['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(o)),e.masterPlaylistController_.fastQualityChange_()}}})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==la.browser.IE_VERSION&&n?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=la.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)})),gu(t,n.playlists)})),this.playlists.on("mediachange",(function(){gu(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":pu,"mux.js":"6.0.1","mpd-parser":"0.21.1","m3u8-parser":"4.7.1","aes-decrypter":"3.1.3"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return Fo.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_&&l.a.URL.revokeObjectURL&&(l.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),e.prototype.dispose.call(this)},n.convertToProgramTime=function(time,e){return fs({playlist:this.masterPlaylistController_.media(),time:time,callback:e})},n.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),ms({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(la.getComponent("Component")),Tu={name:"videojs-http-streaming",VERSION:pu,canHandleSource:function(e,t){void 0===t&&(t={});var n=la.mergeOptions(la.options,t);return Tu.canPlayType(e.type,n)},handleSource:function(source,e,t){void 0===t&&(t={});var n=la.mergeOptions(la.options,t);return e.vhs=new bu(source,e,n),la.hasOwnProperty("hls")||Object.defineProperty(e,"hls",{get:function(){return la.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),e.vhs},configurable:!0}),e.vhs.xhr=rs(),e.vhs.src(source.src,source.type),e.vhs},canPlayType:function(e,t){void 0===t&&(t={});var n=la.mergeOptions(la.options,t),r=n.vhs,o=(r=void 0===r?{}:r).overrideNative,l=void 0===o?!la.browser.IS_ANY_SAFARI:o,c=n.hls,d=(c=void 0===c?{}:c).overrideNative,h=void 0!==d&&d,f=Object(R.a)(e);return f&&(!fu.supportsTypeNatively(f)||h||l)?"maybe":""}};(Object(N.c)("avc1.4d400d,mp4a.40.2")&&la.getTech("Html5").registerSourceHandler(Tu,0),la.VhsHandler=bu,Object.defineProperty(la,"HlsHandler",{get:function(){return la.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),bu},configurable:!0}),la.VhsSourceHandler=Tu,Object.defineProperty(la,"HlsSourceHandler",{get:function(){return la.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Tu},configurable:!0}),la.Vhs=fu,Object.defineProperty(la,"Hls",{get:function(){return la.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),fu},configurable:!0}),la.use||(la.registerComponent("Hls",fu),la.registerComponent("
2Vhs",fu)),la.options.vhs=la.options.vhs||{},la.options.hls=la.options.hls||{},la.getPlugin&&la.getPlugin("reloadSourceOnError"))||(la.registerPlugin||la.plugin)("reloadSourceOnError",(function(e){hu(this,e)}));t.a=la}).call(this,n(99))},963:function(e,t,n){"use strict";n.d(t,"g",(function(){return o})),n.d(t,"e",(function(){return l})),n.d(t,"k",(function(){return c})),n.d(t,"j",(function(){return d})),n.d(t,"i",(function(){return h})),n.d(t,"b",(function(){return v})),n.d(t,"f",(function(){return y})),n.d(t,"c",(function(){return _})),n.d(t,"h",(function(){return T})),n.d(t,"d",(function(){return S})),n.d(t,"a",(function(){return E}));var a,b,r=n(952),o=function(b,e,t){return void 0===t&&(t=" "),(function(e,t){for(var n="";t--;)n+=e;return n}(t,e)+b.toString()).slice(-e)},l=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},c=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||l(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))},d=function(e){e=c(e);for(var t="",i=0;i<e.length;i++)t+=o(e[i].toString(16),2,"0");return t},h=function(e){e=c(e);for(var t="",i=0;i<e.length;i++)t+=o(e[i].toString(2),8,"0");return t},f=n.n(r).a.BigInt||Number,m=[f("0x1"),f("0x100"),f("0x10000"),f("0x1000000"),f("0x100000000"),f("0x10000000000"),f("0x1000000000000"),f("0x100000000000000"),f("0x10000000000000000")],v=(a=new Uint16Array([65484]),255===(b=new Uint8Array(a.buffer,a.byteOffset,a.byteLength))[0]||b[0],function(e,t){var n=void 0===t?{}:t,r=n.signed,o=void 0!==r&&r,l=n.le,d=void 0!==l&&l;e=c(e);var h=d?"reduce":"reduceRight",v=(e[h]?e[h]:Array.prototype[h]).call(e,(function(t,n,i){var r=d?i:Math.abs(i+1-e.length);return t+f(n)*m[r]}),f(0));if(o){var y=m[e.length]/f(2)-f(1);(v=f(v))>y&&(v-=y,v-=y,v-=f(2))}return Number(v)}),y=function(e,t){var n=(void 0===t?{}:t).le,r=void 0!==n&&n;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0),e=f(e);for(var o,l=(o=e,Math.ceil(function(e){return e.toString(2).length}(o)/8)),c=new Uint8Array(new ArrayBuffer(l)),i=0;i<l;i++){var d=r?i:Math.abs(i+1-c.length);c[d]=Number(e/m[i]&f(255)),e<0&&(c[d]=Math.abs(~c[d]),c[d]-=0===i?1:2)}return c},_=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,c(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},T=function(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var view=new Uint8Array(e.length),i=0;i<e.length;i++)view[i]=e.charCodeAt(i);return view},S=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t=t.filter((function(b){return b&&(b.byteLength||b.length)&&"string"!=typeof b})),t.length<=1)return c(t[0]);var r=t.reduce((function(e,t,i){return e+(t.byteLength||t.length)}),0),o=new Uint8Array(r),l=0;return t.forEach((function(e){e=c(e),o.set(e,l),l+=e.byteLength})),o},E=function(a,b,e){var t=void 0===e?{}:e,n=t.offset,r=void 0===n?0:n,o=t.mask,mask=void 0===o?[]:o;a=c(a);var l=(b=c(b)).every?b.every:Array.prototype.every;return b.length&&a.length-r>=b.length&&l.call(b,(function(e,i){return e===(mask[i]?mask[i]&a[r+i]:a[r+i])}))}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.