PageSourceSearch

https://www.safeway.com/ocvp/video-player/abs-video-player-sdk.min.js

js safeway.com collected 2026-09-24 08:38:24 UTC 821,902 bytes, 1 lines download raw bytes

1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ABSVideoWrapper=t():e.ABSVideoWrapper=t()}(this,()=>(()=>{var e={495(e,t,n){"use strict";var i=n(840);e.exports=function(e,t){return void 0===t&&(t=!1),function(n,r,a){if(n)e(n);else if(r.statusCode>=400&&r.statusCode<=599){var s=a;if(t)if(i.TextDecoder){var o=function(e){void 0===e&&(e="");return e.toLowerCase().split(";").reduce(function(e,t){var n=t.split("="),i=n[0],r=n[1];return"charset"===i.trim()?r.trim():e},"utf-8")}(r.headers&&r.headers["content-type"]);try{s=new TextDecoder(o).decode(a)}catch(e){}}else s=String.fromCharCode.apply(null,new Uint8Array(a));e({cause:s})}else e(null,a)}}},36(e,t,n){"use strict";var i=n(840),r=n(634),a=n(56);o.httpHandler=n(495);function s(e,t,n){var i=e;return a(t)?(n=t,"string"==typeof e&&(i={uri:e})):i=r({},t,{uri:e}),i.callback=n,i}function o(e,t,n){return u(t=s(e,t,n))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,i,r){t||(t=!0,e.callback(n,i,r))};function i(){var e=void 0;if(e=l.response?l.response:l.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}(l),g)try{e=JSON.parse(e)}catch(e){}return e}function r(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,v)}function a(){if(!u){var t;clearTimeout(c),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var r=v,a=null;return 0!==t?(r={body:i(),statusCode:t,method:h,headers:{},url:d,rawRequest:l},l.getAllResponseHeaders&&(r.headers=function(e){var t={};return e?(e.trim().split("\n").forEach(function(e){var n=e.indexOf(":"),i=e.slice(0,n).trim().toLowerCase(),r=e.slice(n+1).trim();void 0===t[i]?t[i]=r:Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]}),t):t}(l.getAllResponseHeaders()))):a=new Error("Internal XMLHttpRequest Error"),n(a,r,r.body)}}var s,u,l=e.xhr||null;l||(l=e.cors||e.useXDR?new o.XDomainRequest:new o.XMLHttpRequest);var c,d=l.url=e.uri||e.url,h=l.method=e.method||"GET",p=e.body||e.data,f=l.headers=e.headers||{},m=!!e.sync,g=!1,v={body:void 0,headers:{},statusCode:0,method:h,url:d,rawRequest:l};if("json"in e&&!1!==e.json&&(g=!0,f.accept||f.Accept||(f.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(f["content-type"]||f["Content-Type"]||(f["Content-Type"]="application/json"),p=JSON.stringify(!0===e.json?p:e.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(a,0)},l.onload=a,l.onerror=r,l.onprogress=function(){},l.onabort=function(){u=!0},l.ontimeout=r,l.open(h,d,!m,e.username,e.password),m||(l.withCredentials=!!e.withCredentials),!m&&e.timeout>0&&(c=setTimeout(function(){if(!u){u=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}}
vendor: 5,867 bytes, line 1
1,e.timeout)),l.setRequestHeader)for(s in f)f.hasOwnProperty(s)&&l.setRequestHeader(s,f[s]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(l.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(l),l.send(p||null),l}e.exports=o,e.exports.default=o,o.XMLHttpRequest=i.XMLHttpRequest||function(){},o.XDomainRequest="withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:i.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){o["delete"===e?"del":e]=function(t,n,i){return(n=s(t,n,i)).method=e.toUpperCase(),u(n)}})},582(e,t){"use strict";function n(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var i=n({HTML:"text/html",isHTML:function(e){return e===i.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),r=n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===r.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.find=function(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"==typeof n.find)return n.find.call(e,t);for(var i=0;i<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=n,t.MIME_TYPE=i,t.NAMESPACE=r},752(e,t,n){var i=n(582),r=n(722),a=n(559),s=n(466),o=r.DOMImplementation,u=i.NAMESPACE,l=s.ParseError,c=s.XMLReader;function d(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function h(e){this.options=e||{locator:{}}}function p(){this.cdata=!1}function f(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function v(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}h.prototype.parseFromString=function(e,t){var n=this.options,i=new c,r=n.domBuilder||new p,s=n.errorHandler,o=n.locator,l=n.xmlns||{},h=/\/x?html?$/.test(t),f=h?a.HTML_ENTITIES:a.XML_ENTITIES;o&&r.setDocumentLocator(o),i.errorHandler=function(e,t,n){if(!e){if(t instanceof p)return t;e=t}var i={},r=e instanceof Function;function a(t){var a=e[t];!a&&r&&(a=2==e.length?function(n){e(t,n)}:e),i[t]=a&&function(e){a("[xmldom "+t+"]\t"+e+m(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),i}(s,r,o),i.domBuilder=n.domBuilder||r,h&&(l[""]=u.HTML),l.xml=l.xml||u.XML;var g=n.normalizeLineEndings||d;return e&&"string"==typeof e?i.parse(g(e),l,f):i.errorHandler.error("invalid doc source"),r.doc},p.prototype={startDocument:function(){this.doc=(new o).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,i){var r=this.doc,a=r.createElementNS(e,n||t),s=i.length;v(this,a),this.currentElement=a,this.locator&&f(this.locator,a);for(var o=0;o<s;o++){e=i.getURI(o);var u=i.getValue(o),l=(n=i.getQName(o),r.createAttributeNS(e,n));this.locator&&f(i.getLocator(o),l),l.value=l.nodeValue=u,a.setAttributeNode(l)}},endElement:function(e,t,n){var i=this.currentElement;i.tagName;this.currentElement=i.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&f(this.locator,n),v(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=g.apply(this,arguments)){if(this.cdata)var i=this.doc.createCDATASection(e);else i=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(e)&&this.doc.appendChild(i),this.locator&&f(this.locator,i)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=g.apply(this,arguments);var i=this.doc.createComment(e);this.locator&&f(this.locator,i),v(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var i=this.doc.implementation;if(i&&i.createDocumentType){var r=i.createDocumentType(e,t,n);this.locator&&f(this.locator,r),v(this,r),this.doc.doctype=r}},warning:function(e){console.warn("[xmldom warning]\t"+e,m(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,m(this.locator))},fatalError:function(e){throw new l(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){p.prototype[e]=function(){return null}}),t.DOMParser=h},722(e,t,n){var i=n(582),r=i.find,a=i.NAMESPACE;function s(e){return""!==e}function o(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function u(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(s):[]}(e);return Object.keys(t.reduce(o,{}))}function l(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function c(e,t){var n=e.prototype;if(!(n instanceof t)){function i(){}i.prototype=t.prototype,l(n,i=new i),e.prototype=n=i}n.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),n.constructor=e)}var d={},h=d.ELEMENT_NODE=1,p=d.ATTRIBUTE_NODE=2,f=d.TEXT_NODE=3,m=d.CDATA_SECTION_NODE=4,g=d.ENTITY_REFERENCE_NODE=5,v=d.ENTITY_NODE=6,y=d.PROCESSING_INSTRUCTION_NODE=7,_=d.COMMENT_NODE=8,b=
vendor: 10,269 bytes, line 1
1d.DOCUMENT_NODE=9,T=d.DOCUMENT_TYPE_NODE=10,w=d.DOCUMENT_FRAGMENT_NODE=11,S=d.NOTATION_NODE=12,k={},E={},C=(k.INDEX_SIZE_ERR=(E[1]="Index size error",1),k.DOMSTRING_SIZE_ERR=(E[2]="DOMString size error",2),k.HIERARCHY_REQUEST_ERR=(E[3]="Hierarchy request error",3)),A=(k.WRONG_DOCUMENT_ERR=(E[4]="Wrong document",4),k.INVALID_CHARACTER_ERR=(E[5]="Invalid character",5)),P=(k.NO_DATA_ALLOWED_ERR=(E[6]="No data allowed",6),k.NO_MODIFICATION_ALLOWED_ERR=(E[7]="No modification allowed",7),k.NOT_FOUND_ERR=(E[8]="Not found",8)),x=(k.NOT_SUPPORTED_ERR=(E[9]="Not supported",9),k.INUSE_ATTRIBUTE_ERR=(E[10]="Attribute in use",10));k.INVALID_STATE_ERR=(E[11]="Invalid state",11),k.SYNTAX_ERR=(E[12]="Syntax error",12),k.INVALID_MODIFICATION_ERR=(E[13]="Invalid modification",13),k.NAMESPACE_ERR=(E[14]="Invalid namespace",14),k.INVALID_ACCESS_ERR=(E[15]="Invalid access",15);function I(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,E[e]),this.message=E[e],Error.captureStackTrace&&Error.captureStackTrace(this,I);return n.code=e,t&&(this.message=this.message+": "+t),n}function O(){}function L(e,t){this._node=e,this._refresh=t,D(this)}function D(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var n=e._refresh(e._node);if(Te(e,"length",n.length),!e.$$length||n.length<e.$$length)for(var i=n.length;i in e;i++)Object.prototype.hasOwnProperty.call(e,i)&&delete e[i];l(n,e),e._inc=t}}function M(){}function R(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function N(e,t,n,i){if(i?t[R(t,i)]=n:t[t.length++]=n,e){n.ownerElement=e;var r=e.ownerDocument;r&&(i&&H(r,e,i),function(e,t,n){e&&e._inc++;var i=n.namespaceURI;i===a.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(r,e,n))}}function U(e,t,n){var i=R(t,n);if(!(i>=0))throw new I(P,new Error(e.tagName+"@"+n));for(var r=t.length-1;i<r;)t[i]=t[++i];if(t.length=r,e){var a=e.ownerDocument;a&&(H(a,e,n),n.ownerElement=null)}}function B(){}function j(){}function F(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function q(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(q(e,t))return!0}while(e=e.nextSibling)}function V(){this.ownerDocument=this}function H(e,t,n,i){e&&e._inc++,n.namespaceURI===a.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function W(e,t,n){if(e&&e._inc){e._inc++;var i=t.childNodes;if(n)i[i.length++]=n;else{for(var r=t.firstChild,a=0;r;)i[a++]=r,r=r.nextSibling;i.length=a,delete i[i.length]}}}function G(e,t){var n=t.previousSibling,i=t.nextSibling;return n?n.nextSibling=i:e.firstChild=i,i?i.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,W(e.ownerDocument,e),t}function $(e){return e&&e.nodeType===j.DOCUMENT_TYPE_NODE}function z(e){return e&&e.nodeType===j.ELEMENT_NODE}function K(e){return e&&e.nodeType===j.TEXT_NODE}function X(e,t){var n=e.childNodes||[];if(r(n,z)||$(t))return!1;var i=r(n,$);return!(t&&i&&n.indexOf(i)>n.indexOf(t))}function Y(e,t){var n=e.childNodes||[];if(r(n,function(e){return z(e)&&e!==t}))return!1;var i=r(n,$);return!(t&&i&&n.indexOf(i)>n.indexOf(t))}function Q(e,t,n){if(!function(e){return e&&(e.nodeType===j.DOCUMENT_NODE||e.nodeType===j.DOCUMENT_FRAGMENT_NODE||e.nodeType===j.ELEMENT_NODE)}(e))throw new I(C,"Unexpected parent node type "+e.nodeType);if(n&&n.parentNode!==e)throw new I(P,"child not in parent");if(!function(e){return e&&(z(e)||K(e)||$(e)||e.nodeType===j.DOCUMENT_FRAGMENT_NODE||e.nodeType===j.COMMENT_NODE||e.nodeType===j.PROCESSING_INSTRUCTION_NODE)}(t)||$(t)&&e.nodeType!==j.DOCUMENT_NODE)throw new I(C,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function J(e,t,n){var i=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===j.DOCUMENT_FRAGMENT_NODE){var s=a.filter(z);if(s.length>1||r(a,K))throw new I(C,"More than one element or text in fragment");if(1===s.length&&!X(e,n))throw new I(C,"Element in fragment can not be inserted before doctype")}if(z(t)&&!X(e,n))throw new I(C,"Only one element can be added and only after doctype");if($(t)){if(r(i,$))throw new I(C,"Only one doctype is allowed");var o=r(i,z);if(n&&i.indexOf(o)<i.indexOf(n))throw new I(C,"Doctype can only be inserted before an element");if(!n&&o)throw new I(C,"Doctype can not be appended since element is present")}}function Z(e,t,n){var i=e.childNodes||[],a=t.childNodes||[];if(t.nodeType===j.DOCUMENT_FRAGMENT_NODE){var s=a.filter(z);if(s.length>1||r(a,K))throw new I(C,"More than one element or text in fragment");if(1===s.length&&!Y(e,n))throw new I(C,"Element in fragment can not be inserted before doctype")}if(z(t)&&!Y(e,n))throw new I(C,"Only one element can be added and only after doctype");if($(t)){if(r(i,function(e){return $(e)&&e!==n}))throw new I(C,"Only one doctype is allowed");var o=r(i,z);if(n&&i.indexOf(o)<i.indexOf(n))throw new I(C,"Doctype can only be inserted before an element")}}function ee(e,t,n,i){Q(e,t,n),e.nodeType===j.DOCUMENT_NODE&&(i||J)(e,t,n);var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===w){var a=t.firstChild;if(null==a)return t;var s=t.lastChild}else a=s=t;var o=n?n.previousSibling:e.lastChild;a.previousSibling=o,s.nextSibling=n,o?o.nextSibling=a:e.firstChild=a,null==n?e.lastChild=s:n.previousSibling=s;do{a.parentNode=e,te(a,e.ownerDocument||e)}while(a!==s&&(a=a.nextSibling));return W(e.ownerDocument||e,e),t.nodeType==w&&(t.firstChild=t.lastChild=null),t}function te(e,t){if(e.ownerDocument!==t){if(e.ownerDocument=t,e.nodeType===h&&e.attributes)for(var n=0;n<e.attributes.length;n++){var i=e.attributes.item(n);i&&(i.ownerDocument=t)}for(var r=e.firstChild;r;)te(r,t),r=r.nextSibling}}function ne(){this._nsMap={}}function ie(){}function re(){}function ae(){}function se(){}function oe(){}function ue(){}function le(){}function ce(){}function de(){}function he(){}function pe(){}function fe(){}function me(e,t){var n=[],i=9==this.nodeType&&this.documentElement||this,r=i.prefix,a=i.namespaceURI;if(a&&null==r&&null==(r=i.lookupPrefix(a)))var s=[{namespace:a,prefix:null}];return ye(this,n,e,t,s),n.join("")}function ge(e,t,n){var i=e.prefix||"",r=e.namespaceURI;if(!r)return!1;if("xml"===i&&r===a.XML||r===a.XMLNS)return!1;for(var s=n.length;s--;){var o=n[s];if(o.prefix===i)return o.namespace!==r}return!0}function ve(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,F),'"')}function ye(e,t,n,i,r){if(r||(r=[]),i){if(!(e=i(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case h:var s=e.attributes,o=s.length,u=e.firstChild,l=e.tagName,c=l;if(!(n=a.isHTML(e.namespaceURI)||n)&&!e.prefix&&e.namespaceURI){for(var d,v=0;v<s.length;v++)if("xmlns"===s.item(v).name){d=s.item(v).value;break}if(!d)for(var S=r.length-1;S>=0;S--){if(""===(k=r[S]).prefix&&k.namespace===e.namespaceURI){d=k.namespace;break}}if(d!==e.namespaceURI)for(S=r.length-1;S>=0;S--){var k;if((k=r[S]).namespace===e.namespaceURI){k.prefix&&(c=k.prefix+":"+l);break}}}t.push("<",c);for(var E=0;E<o;E++){"xmlns"==(C=s.item(E)).prefix?r.push({prefix:C.localName,namespace:C.value}):"xmlns"==C.nodeName&&r.push({prefix:"",namespace:C.value})}for(E=0;E<o;E++){var C,A,P;if(ge(C=s.item(E),0,r))ve(t,(A=C.prefix||"")?"xmlns:"+A:"xmlns",P=C.namespaceURI),r.push({prefix:A,namespace:P});ye(C,t,n,i,r)}if(l===c&&ge(e,0,r))ve(t,(A=e.prefix||"")?"xmlns:"+A:"xmlns",P=e.namespaceURI),r.push({prefix:A,namespace:P});if(u||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(">"),n&&/^script$/i.test(l))for(;u;)u.data?t.push(u.data):ye(u,t,n,i,r.slice()),u=u.nextSibling;else for(;u;)ye(u,t,n,i,r.slice()),u=u.nextSibling;t.push("</",c,">")}else t.push("/>");return;case b:case w:for(u=e.firstChild;u;)ye(u,t,n,i,r.slice()),u=u.nextSibling;return;case p:return ve(t,e.name,e.value);case f:return t.push(e.data.replace(/[<&>]/g,F));case m:return t.push("<![CDATA[",e.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>");case _:return t.push("\x3c!--",e.data,"--\x3e");case T:var x=e.publicId,I=e.systemId;if(t.push("<!DOCTYPE ",e.name),x)t.push(" PUBLIC ",x),I&&"."!=I&&t.push(" ",I),t.push(">");else if(I&&"."!=I)t.push(" SYSTEM ",I,">");else{var O=e.internalSubset;O&&t.push(" [",O,"]"),t.push(">")}return;case y:return t.push("<?",e.target," ",e.data,"?>");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function _e(e,t,n){var i;switch(t.nodeType){case h:(i=t.cloneNode(!1)).ownerDocument=e;case w:break;case p:n=!0}if(i||(i=t.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,n)for(var r=t.firstChild;r;)i.appendChild(_e(e,r,n)),r=r.nextSibling;return i}function be(e,t,n){var i=new t.constructor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var a=t[r];"object"!=typeof a&&a!=i[r]&&(i[r]=a)}switch(t.childNodes&&(i.childNodes=new O),i.ownerDocument=e,i.nodeType){case h:var s=t.attributes,o=i.attributes=new M,u=s.length;o._ownerElement=i;for(var l=0;l<u;l++)i.setAttributeNode(be(e,s.item(l),!0));break;case p:n=!0}if(n)for(var c=t.firstChild;c;)i.appendChild(be(e,c,n)),c=c.nextSibling;return i}function Te(e,t,n){e[t]=n}I.prototype=Error.prototype,l(k,I),O.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var n=[],i=0;i<this.length;i++)ye(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)}},L.prototype.item=function(e){return D(this),this[e]||null},c(L,O),M.prototype={length:0,item:O.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new I(x);var n=this.getNamedItem(e.nodeName);return N(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new I(x);return t=this.getNamedItemNS(e.namespaceURI,e.localName),N(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return U(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return U(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var i=this[n];if(i.localName==t&&i.namespaceURI==e)return i}return null}},B.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var i=new V;
vendor: 4,456 bytes, line 1
1if(i.implementation=this,i.childNodes=new O,i.doctype=n||null,n&&i.appendChild(n),t){var r=i.createElementNS(e,t);i.appendChild(r)}return i},createDocumentType:function(e,t,n){var i=new ue;return i.name=e,i.nodeName=e,i.publicId=t||"",i.systemId=n||"",i}},j.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 ee(this,e,t)},replaceChild:function(e,t){ee(this,e,t,Z),t&&this.removeChild(t)},removeChild:function(e){return G(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return be(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==f&&e.nodeType==f?(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 n=t._nsMap;if(n)for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&n[i]===e)return i;t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&Object.prototype.hasOwnProperty.call(n,e))return n[e];t=t.nodeType==p?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},l(d,j),l(d,j.prototype),V.prototype={nodeName:"#document",nodeType:b,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==w){for(var n=e.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,t),n=i}return e}return ee(this,e,t),te(e,this),null===this.documentElement&&e.nodeType===h&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),G(this,e)},replaceChild:function(e,t){ee(this,e,t,Z),te(e,this),t&&this.removeChild(t),z(e)&&(this.documentElement=e)},importNode:function(e,t){return _e(this,e,t)},getElementById:function(e){var t=null;return q(this.documentElement,function(n){if(n.nodeType==h&&n.getAttribute("id")==e)return t=n,!0}),t},getElementsByClassName:function(e){var t=u(e);return new L(this,function(n){var i=[];return t.length>0&&q(n.documentElement,function(r){if(r!==n&&r.nodeType===h){var a=r.getAttribute("class");if(a){var s=e===a;if(!s){var o=u(a);s=t.every((l=o,function(e){return l&&-1!==l.indexOf(e)}))}s&&i.push(r)}}var l}),i})},createElement:function(e){var t=new ne;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new O,(t.attributes=new M)._ownerElement=t,t},createDocumentFragment:function(){var e=new he;return e.ownerDocument=this,e.childNodes=new O,e},createTextNode:function(e){var t=new ae;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new se;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){if(-1!==e.indexOf("]]>"))throw new I(A,'data contains "]]>"');var t=new oe;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new pe;return n.ownerDocument=this,n.tagName=n.nodeName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new ie;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new de;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new ne,i=t.split(":"),r=n.attributes=new M;return n.childNodes=new O,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,r._ownerElement=n,n},createAttributeNS:function(e,t){var n=new ie,i=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,n}},c(V,j),ne.prototype={nodeType:h,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)}
1,appendChild:function(e){return e.nodeType===w?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,W(e.ownerDocument,e,t),te(t,e.ownerDocument||e),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new L(this,function(t){var n=[];return q(t,function(i){i===t||i.nodeType!=h||"*"!==e&&i.tagName!=e||n.push(i)}),n})},getElementsByTagNameNS:function(e,t){return new L(this,function(n){var i=[];return q(n,function(r){r===n||r.nodeType!==h||"*"!==e&&r.namespaceURI!==e||"*"!==t&&r.localName!=t||i.push(r)}),i})}},V.prototype.getElementsByTagName=ne.prototype.getElementsByTagName,V.prototype.getElementsByTagNameNS=ne.prototype.getElementsByTagNameNS,c(ne,j),ie.prototype.nodeType=p,c(ie,j),re.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(E[C])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},c(re,j),ae.prototype={nodeName:"#text",nodeType:f,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},c(ae,re),se.prototype={nodeName:"#comment",nodeType:_},c(se,re),oe.prototype={nodeName:"#cdata-section",nodeType:m},c(oe,re),ue.prototype.nodeType=T,c(ue,j),le.prototype.nodeType=S,c(le,j),ce.prototype.nodeType=v,c(ce,j),de.prototype.nodeType=g,c(de,j),he.prototype.nodeName="#document-fragment",he.prototype.nodeType=w,c(he,j),pe.prototype.nodeType=y,c(pe,j),fe.prototype.serializeToString=function(e,t,n){return me.call(e,t,n)},j.prototype.toString=me;try{if(Object.defineProperty){function we(e){switch(e.nodeType){case h:case w:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(we(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(L.prototype,"length",{get:function(){return D(this),this.$$length}}),Object.defineProperty(j.prototype,"textContent",{get:function(){return we(this)},set:function(e){switch(this.nodeType){case h:case w:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Te=function(e,t,n){e["$$"+t]=n}}}catch(Se){}t.DocumentType=ue,t.DOMException=I,t.DOMImplementation=B,t.Element=ne,t.Node=j,t.NodeList=O,t.XMLSerializer=fe},559(e,t,n){"use strict";var i=n(582).freeze;t.XML_ENTITIES=i({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=i
vendor: 28,764 bytes, line 1
1({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES},978(e,t,
vendor: 1,401 bytes, line 1
1n){var i=n(722);i.DOMImplementation,i.XMLSerializer,t.DOMParser=n(752).DOMParser},466(e,t,n){var i=n(582).NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,a=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),s=new RegExp("^"+r.source+a.source+"*(?::"+r.source+a.source+"*)?$");function o(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function u(){}function l(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function c(e,t,n,r,a,s){function o(e,t,i){n.attributeNames.hasOwnProperty(e)&&s.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),i)}for(var u,l=++t,c=0;;){var d=e.charAt(l);switch(d){case"=":if(1===c)u=e.slice(t,l),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(s.warning('attribute value must after "="'),u=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error("attribute value no end '"+d+"' match");o(u,h=e.slice(t,l),t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');o(u,h=e.slice(t,l),t),s.warning('attribute "'+u+'" missed start quot('+d+")!!"),t=l+1,c=5}break;case"/":switch(c){case 0:n.setTagName(e.slice(t,l));
1case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:break;case 2:n.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),0==c&&n.setTagName(e.slice(t,l)),l;case">":switch(c){case 0:n.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:"/"===(h=e.slice(t,l)).slice(-1)&&(n.closed=!0,h=h.slice(0,-1));case 2:2===c&&(h=u),4==c?(s.warning('attribute "'+h+'" missed quot(")!'),o(u,h,t)):(i.isHTML(r[""])&&h.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),o(h,h,t));break;case 3:throw new Error("attribute value missed!!")}return l;case"€":d=" ";default:if(d<=" ")switch(c){case 0:n.setTagName(e.slice(t,l)),c=6;break;case 1:u=e.slice(t,l),c=2;break;case 4:var h=e.slice(t,l);s.warning('attribute "'+h+'" missed quot(")!!'),o(u,h,t);case 5:c=6}else switch(c){case 2:n.tagName;i.isHTML(r[""])&&u.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),o(u,u,t),t=l,c=1;break;case 5:s.warning('attribute space is required"'+u+'"!!');case 6:c=1,t=l;break;case 3:c=4,t=l;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function d(e,t,n){for(var r=e.tagName,a=null,s=e.length;s--;){var o=e[s],u=o.qName,l=o.value;if((p=u.indexOf(":"))>0)var c=o.prefix=u.slice(0,p),d=u.slice(p+1),h="xmlns"===c&&d;else d=u,c=null,h="xmlns"===u&&"";o.localName=d,!1!==h&&(null==a&&(a={},f(n,n={})),n[h]=a[h]=l,o.uri=i.XMLNS,t.startPrefixMapping(h,l))}for(s=e.length;s--;){(c=(o=e[s]).prefix)&&("xml"===c&&(o.uri=i.XML),"xmlns"!==c&&(o.uri=n[c||""]))}var p;(p=r.indexOf(":"))>0?(c=e.prefix=r.slice(0,p),d=e.localName=r.slice(p+1)):(c=null,d=e.localName=r);var m=e.uri=n[c||""];if(t.startElement(m,d,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(m,d,r),a)for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&t.endPrefixMapping(c)}function h(e,t,n,i,r){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("</"+n+">",t),s=e.substring(t+1,a);if(/[&<]/.test(s))return/^script$/i.test(n)?(r.characters(s,0,s.length),a):(s=s.replace(/&#?\w+;/g,i),r.characters(s,0,s.length),a)}return t+1}function p(e,t,n,i){var r=i[n];return null==r&&((r=e.lastIndexOf("</"+n+">"))<t&&(r=e.lastIndexOf("</"+n)),i[n]=r),r<t}function f(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}function m(e,t,n,i){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(r=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,r-t-4),r+3):(i.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var r=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,r-t-9),n.endCDATA(),r+3}var a=function(e,t){var n,i=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=t,r.exec(e);for(;n=r.exec(e);)if(i.push(n),n[1])return i}(e,t),s=a.length;if(s>1&&/!doctype/i.test(a[0][0])){var o=a[1][0],u=!1,l=!1;s>3&&(/^public$/i.test(a[2][0])?(u=a[3][0],l=s>4&&a[4][0]):/^system$/i.test(a[2][0])&&(l=a[3][0]));var c=a[s-1];return n.startDTD(o,u,l),n.endDTD(),c.index+c[0].length}return-1}function g(e,t,n){var i=e.indexOf("?>",t);if(i){var r=e.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)$/);if(r){r[0].length;return n.processingInstruction(r[1],r[2]),i+2}return-1}return-1}function v(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,u.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,n,r,a){function s(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function u(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?s(parseInt(t.substr(1).replace("x","0x"))):(a.error("entity not found:"+e),e)}function f(t){if(t>E){var n=e.substring(E,t).replace(/&#?\w+;/g,u);w&&y(E),r.characters(n,0,t-E),E=t}}function y(t,n){for(;t>=b&&(n=T.exec(e));)_=n.index,b=_+n[0].length,w.lineNumber++;w.columnNumber=t-_+1}var _=0,b=0,T=/.*(?:\r\n?|\n)|.*$/g,w=r.locator,S=[{currentNSMap:t}],k={},E=0;for(;;){try{var C=e.indexOf("<",E);if(C<0){if(!e.substr(E).match(/^\s*$/)){var A=r.doc,P=A.createTextNode(e.substr(E));A.appendChild(P),r.currentElement=P}return}switch(C>E&&f(C),e.charAt(C+1)){case"/":var x=e.indexOf(">",C+3),I=e.substring(C+2,x).replace(/[ \t\n\r]+$/g,""),O=S.pop();x<0?(I=e.substring(C+2).replace(/[\s<].*/,""),a.error("end tag name: "+I+" is not complete:"+O.tagName),x=C+1+I.length):I.match(/\s</)&&(I=I.replace(/[\s<].*/,""),a.error("end tag name: "+I+" maybe not complete"),x=C+1+I.length);var L=O.localNSMap,D=O.tagName==I;if(D||O.tagName&&O.tagName.toLowerCase()==I.toLowerCase()){if(r.endElement(O.uri,O.localName,I),L)for(var M in L)Object.prototype.hasOwnProperty.call(L,M)&&r.endPrefixMapping(M);D||a.fatalError("end tag name: "+I+" is not match the current start tagName:"+O.tagName)}else S.push(O);x++;break;case"?":w&&y(C),x=g(e,C,r);break;case"!":w&&y(C),x=m(e,C,r,a);break;default:w&&y(C);var R=new v,N=S[S.length-1].currentNSMap,U=(x=c(e,C,R,N,u,a),R.length);if(!R.closed&&p(e,x,R.tagName,k)&&(R.closed=!0,n.nbsp||a.warning("unclosed xml attribute")),w&&U){for(var B=l(w,{}),j=0;j<U;j++){var F=R[j];y(F.offset),F.locator=l(w,{})}r.locator=B,d(R,r,N)&&S.push(R),r.locator=w}else d(R,r,N)&&S.push(R);i.isHTML(R.uri)&&!R.closed?x=h(e,x,R.tagName,u,r):x++}}catch(e){if(e instanceof o)throw e;a.error("element parse error: "+e),x=-1}x>E?E=x:f(Math.max(C,E)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},v.prototype={setTagName:function(e){if(!s.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!s.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=u,t.ParseError=o},526(e,t){"use strict";t.byteLength=function(e){var t=o(e),n=t[0],i=t[1];return 3*(n+i)/4-i},t.toByteArray=function(e){var t,n,a=o(e),s=a[0],u=a[1],l=new r(function(e,t,n){return 3*(t+n)/4-n}(0,s,u)),c=0,d=u>0?s-4:s;for(n=0;n<d;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===u&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[c++]=255&t);1===u&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,i=e.length,r=i%3,a=[],s=16383,o=0,u=i-r;o<u;o+=s)a.push(l(e,o,o+s>u?u:o+s));1===r?(t=e[i-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===r&&(t=(e[i-2]<<8)+e[i-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return a.join("")};for(var n=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/",s=0;s<64;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var i,r=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),r.push(u(i));return r.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},287(e,t,n){"use strict";const i=n(526),r=n(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=u,t.IS=50;const s=2147483647;function o(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let i=o(n);const r=i.write(e,t);r!==n&&(i=i.slice(0,r));return i}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return u.from(i,t,n);const r=function(e){if(u.isBuffer(e)){const t=0|f(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?o(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return c(e),o(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),n=o(t);for(let i=0;i<t;i+=1)n[i]=255&e[i];return n}function p(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let i;return i=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(i,u.prototype),i}function f(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;let r=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return i?-1:$(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return x(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function v(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function y(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}
vendor: 5,368 bytes, line 1
1if("string"==typeof t&&(t=u.from(t,i)),u.isBuffer(t))return 0===t.length?-1:_(e,t,n,i,r);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,i,r){let a,s=1,o=e.length,u=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;s=2,o/=2,u/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(r){let i=-1;for(a=n;a<o;a++)if(l(e,a)===l(t,-1===i?0:a-i)){if(-1===i&&(i=a),a-i+1===u)return i*s}else-1!==i&&(a-=a-i),i=-1}else for(n+u>o&&(n=o-u),a=n;a>=0;a--){let n=!0;for(let i=0;i<u;i++)if(l(e,a+i)!==l(t,i)){n=!1;break}if(n)return a}return-1}function b(e,t,n,i){n=Number(n)||0;const r=e.length-n;i?(i=Number(i))>r&&(i=r):i=r;const a=t.length;let s;for(i>a/2&&(i=a/2),s=0;s<i;++s){const i=parseInt(t.substr(2*s,2),16);if(Y(i))return s;e[n+s]=i}return s}function T(e,t,n,i){return K($(t,e.length-n),e,n,i)}function w(e,t,n,i){return K(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,i)}function S(e,t,n,i){return K(z(t),e,n,i)}function k(e,t,n,i){return K(function(e,t){let n,i,r;const a=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),i=n>>8,r=n%256,a.push(r),a.push(i);return a}(t,e.length-n),e,n,i)}function E(e,t,n){return 0===t&&n===e.length?i.fromByteArray(e):i.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);const i=[];let r=t;for(;r<n;){const t=e[r];let a=null,s=t>239?4:t>223?3:t>191?2:1;if(r+s<=n){let n,i,o,u;switch(s){case 1:t<128&&(a=t);break;case 2:n=e[r+1],128==(192&n)&&(u=(31&t)<<6|63&n,u>127&&(a=u));break;case 3:n=e[r+1],i=e[r+2],128==(192&n)&&128==(192&i)&&(u=(15&t)<<12|(63&n)<<6|63&i,u>2047&&(u<55296||u>57343)&&(a=u));break;case 4:n=e[r+1],i=e[r+2],o=e[r+3],128==(192&n)&&128==(192&i)&&128==(192&o)&&(u=(15&t)<<18|(63&n)<<12|(63&i)<<6|63&o,u>65535&&u<1114112&&(a=u))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),r+=s}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=A));return n}(i)}u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,n){return function(e,t,n){return c(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},u.allocUnsafe=function(e){return d(e)},u.allocUnsafeSlow=function(e){return d(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(X(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),X(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,i=t.length;for(let r=0,a=Math.min(n,i);r<a;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return n<i?-1:i<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const i=u.allocUnsafe(t);let r=0;for(n=0;n<e.length;++n){let t=e[n];if(X(t,Uint8Array))r+t.length>i.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(i,r)):Uint8Array.prototype.set.call(i,t,r);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(i,r)}r+=t.length}return i},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?C(this,0,e):g.apply(this,arguments)}
vendor: 11,944 bytes, line 1
1,u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const n=t.IS;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},a&&(u.prototype[a]=u.prototype.inspect),u.prototype.compare=function(e,t,n,i,r){if(X(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(this===e)return 0;let a=(r>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0);const o=Math.min(a,s),l=this.slice(i,r),c=e.slice(t,n);for(let e=0;e<o;++e)if(l[e]!==c[e]){a=l[e],s=c[e];break}return a<s?-1:s<a?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},u.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}const r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let a=!1;for(;;)switch(i){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return T(this,e,t,n);case"ascii":case"latin1":case"binary":return w(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function P(e,t,n){let i="";n=Math.min(e.length,n);for(let r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function x(e,t,n){let i="";n=Math.min(e.length,n);for(let r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function I(e,t,n){const i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);let r="";for(let i=t;i<n;++i)r+=Q[e[i]];return r}function O(e,t,n){const i=e.slice(t,n);let r="";for(let e=0;e<i.length-1;e+=2)r+=String.fromCharCode(i[e]+256*i[e+1]);return r}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,i,r,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function M(e,t,n,i,r){V(t,i,r,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function R(e,t,n,i,r){V(t,i,r,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function N(e,t,n,i,r,a){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,i,a){return t=+t,n>>>=0,a||N(e,0,n,4),r.write(e,t,n,i,23,4),n+4}function B(e,t,n,i,a){return t=+t,n>>>=0,a||N(e,0,n,8),r.write(e,t,n,i,52,8),n+8}u.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const i=this.subarray(e,t);return Object.setPrototypeOf(i,u.prototype),i},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let i=this[e],r=1,a=0;for(;++a<t&&(r*=256);)i+=this[e+a]*r;return i},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let i=this[e+--t],r=1;for(;t>0&&(r*=256);)i+=this[e+--t]*r;return i},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=J(function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const i=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,r=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(i)+(BigInt(r)<<BigInt(32))}),u.prototype.readBigUInt64BE=J(function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const i=t*2**24+65536*this[++e]+256*this[++e]+this[++e],r=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(i)<<BigInt(32))+BigInt(r)}),u.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let i=this[e],r=1,a=0;for(;++a<t&&(r*=256);)i+=this[e+a]*r;return r*=128,i>=r&&(i-=Math.pow(2,8*t)),i},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let i=t,r=1,a=this[e+--i];for(;i>0&&(r*=256);)a+=this[e+--i]*r;return r*=128,a>=r&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=J(function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const i=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),u.prototype.readBigInt64BE=J(function(e){H(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const i=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),r.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),r.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),r.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),r.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t>>>=0,n>>>=0,!i){D(this,e,t,n,Math.pow(2,8*n)-1,0)}let r=1,a=0;for(this[t]=255&e;++a<n&&(r*=256);)this[t+a]=e/r&255;return t+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t>>>=0,n>>>=0,!i){D(this,e,t,n,Math.pow(2,8*n)-1,0)}let r=n-1,a=1;for(this[t+r]=255&e;--r>=0&&(a*=256);)this[t+r]=e/a&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=J(function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=J(function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}let r=0,a=1,s=0;for(this[t]=255&e;++r<n&&(a*=256);)e<0&&0===s&&0!==this[t+r-1]&&(s=1),this[t+r]=(e/a|0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t>>>=0,!i){const i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}let r=n-1,a=1,s=0;for(this[t+r]=255&e;--r>=0&&(a*=256);)e<0&&0===s&&0!==this[t+r+1]&&(s=1),this[t+r]=(e/a|0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=J(function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=J(function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,i){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);const r=i-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),t),r},u.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){const t=e.charCodeAt(0);("utf8"===i&&t<128||"latin1"===i)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let r;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(r=t;r<n;++r)this[r]=e;
1else{const a=u.isBuffer(e)?e:u.from(e,i),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(r=0;r<n-t;++r)this[r+t]=a[r%s]}return this};const j={};function F(e,t,n){j[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",n=e.length;const i="-"===e[0]?1:0;for(;n>=i+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function V(e,t,n,i,r,a){if(e>n||e<t){const i="bigint"==typeof t?"n":"";let r;throw r=a>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(a+1)}${i}`:`>= -(2${i} ** ${8*(a+1)-1}${i}) and < 2 ** ${8*(a+1)-1}${i}`:`>= ${t}${i} and <= ${n}${i}`,new j.ERR_OUT_OF_RANGE("value",r,e)}!function(e,t,n){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||W(t,e.length-(n+1))}(i,r,a)}function H(e,t){if("number"!=typeof e)throw new j.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,n){if(Math.floor(e)!==e)throw H(e,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),F("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),F("ERR_OUT_OF_RANGE",function(e,t,n){let i=`The value of "${e}" is out of range.`,r=n;return Number.isInteger(n)&&Math.abs(n)>2**32?r=q(String(n)):"bigint"==typeof n&&(r=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(r=q(r)),r+="n"),i+=` It must be ${t}. Received ${r}`,i},RangeError);const G=/[^+/0-9A-Za-z-_]/g;function $(e,t){let n;t=t||1/0;const i=e.length;let r=null;const a=[];for(let s=0;s<i;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&a.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,i){let r;for(r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const i=16*n;for(let r=0;r<16;++r)t[i+r]=e[n]+e[r]}return t}();function J(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},697(e,t,n){var i,r=void 0!==n.g?n.g:"undefined"!=typeof window?window:{},a=n(542);"undefined"!=typeof document?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"])||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=a),e.exports=i},840(e,t,n){var i;i="undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},e.exports=i},251(e,t){t.read=function(e,t,n,i,r){var a,s,o=8*r-i-1,u=(1<<o)-1,l=u>>1,c=-7,d=n?r-1:0,h=n?-1:1,p=e[t+d];for(d+=h,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=256*a+e[t+d],d+=h,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=i;c>0;s=256*s+e[t+d],d+=h,c-=8);if(0===a)a=1-l;else{if(a===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,i),a-=l}return(p?-1:1)*s*Math.pow(2,a-i)},t.write=function(e,t,n,i,r,a){var s,o,u,l=8*a-r-1,c=(1<<l)-1,d=c>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:a-1,f=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+d>=1?h/u:h*Math.pow(2,1-d))*u>=2&&(s++,u/=2),s+d>=c?(o=0,s=c):s+d>=1?(o=(t*u-1)*Math.pow(2,r),s+=d):(o=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;e[n+p]=255&o,p+=f,o/=256,r-=8);for(s=s<<r|o,l+=r;l>0;e[n+p]=255&s,p+=f,s/=256,l-=8);e[n+p-f]|=128*m}},56(e){e.exports=function(e){if(!e)return!1;var n=t.call(e);return"[object Function]"===n||"function"==typeof e&&"[object RegExp]"!==n||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var t=Object.prototype.toString},545(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 s[e];var n,a=String(e);return(n=i[a.toLowerCase()])?n:(n=r[a.toLowerCase()])||(1===a.length?a.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var a;if(a=i[t.toLowerCase()])return a===n;if(a=r[t.toLowerCase()])return a===n}else if("number"==typeof t)return t===n;return!1}};
1var i=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(a=97;a<123;a++)i[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)i[a-48]=a;for(a=1;a<13;a++)i["f"+a]=a+111;for(a=0;a<10;a++)i["numpad "+a]=a+96;var s=t.names=t.title={};for(a in i)s[i[a]]=a;for(var o in r)i[o]=r[o]},962(e,t,n){var i=n(626).getUint64;e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},r=12;0===n.version?(n.earliestPresentationTime=t.getUint32(r),n.firstOffset=t.getUint32(r+4),r+=8):(n.earliestPresentationTime=i(e.subarray(r)),n.firstOffset=i(e.subarray(r+8)),r+=16),r+=2;var a=t.getUint16(r);for(r+=2;a>0;r+=12,a--)n.references.push({referenceType:(128&e[r])>>>7,referencedSize:2147483647&t.getUint32(r),subsegmentDuration:t.getUint32(r+4),startsWithSap:!!(128&e[r+8]),sapType:(112&e[r+8])>>>4,sapDeltaTime:268435455&t.getUint32(r+8)});return n}},622(e){var t,n,i,r,a,s,o,u=9e4;t=function(e){return e*u},n=function(e,t){return e*t},i=function(e){return e/u},r=function(e,t){return e/t},a=function(e,n){return t(r(e,n))},s=function(e,t){return n(i(e),t)},o=function(e,t,n){return i(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:u,secondsToVideoTs:t,secondsToAudioTs:n,videoTsToSeconds:i,audioTsToSeconds:r,audioTsToVideoTs:a,videoTsToAudioTs:s,metadataTsToSeconds:o}},626(e){var t=Math.pow(2,32);e.exports={getUint64:function(e){var n,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(n=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?Number(n):n:i.getUint32(0)*t+i.getUint32(4)},MAX_UINT32:t}},865(e){e.exports=function(e,t){var n,i=null;try{n=JSON.parse(e,t)}catch(e){i=e}return[i,n]}},842(e){var t,n,i,r,a;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,r=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var r=a.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=a.normalizePath(r.path),a.buildURLFromParts(r)}var s=a.parseURL(t);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return i.alwaysNormalize?(s.path=a.normalizePath(s.path),a.buildURLFromParts(s)):t;var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var u=n.exec(o.path);o.netLoc=u[1],o.path=u[2]}o.netLoc&&!o.path&&(o.path="/");var l={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(l.netLoc=o.netLoc,"/"!==s.path[0]))if(s.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+s.path;l.path=a.normalizePath(d)}else l.path=o.path,s.params||(l.params=o.params,s.query||(l.query=o.query));return null===l.path&&(l.path=i.alwaysNormalize?a.normalizePath(s.path):s.path),a.buildURLFromParts(l)},parseURL:function(e){var n=t.exec(e);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(r,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=a},784(e,t,n){var i=n(840),r=e.exports={WebVTT:n(311),VTTCue:n(184),VTTRegion:n(891)};i.vttjs=r,i.WebVTT=r.WebVTT;var a=r.VTTCue,s=r.VTTRegion,o=i.VTTCue,u=i.VTTRegion;r.shim=function(){i.VTTCue=a,i.VTTRegion=s},r.restore=function(){i.VTTCue=o,i.VTTRegion=u},i.VTTCue||r.shim()},311(e,t,n){var i=n(697),r=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();
vendor: 5,403 bytes, line 1
1function a(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function s(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/1e3}var n=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function o(){this.values=r(null)}function u(e,t,n,i){var r=i?e.split(i):[e];for(var a in r)if("string"==typeof r[a]){var s=r[a].split(n);if(2===s.length)t(s[0].trim(),s[1].trim())}}function l(e,t,n){var i=e;function r(){var t=s(e);if(null===t)throw new a(a.Errors.BadTimeStamp,"Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=r(),l(),"--\x3e"!==e.substr(0,3))throw new a(a.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),l(),t.endTime=r(),l(),function(e,t){var i=new o;u(e,function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];i.integer(e,s),i.percent(e,s)&&i.set("snapToLines",!1),i.alt(e,s,["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),i.percent(e,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start","center","end"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start","center","end","left","right"])}},/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");try{t.line=i.get("line","auto")}catch(e){}t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100);try{t.align=i.get("align","center")}catch(e){t.align=i.get("align","middle")}try{t.position=i.get("position","auto")}catch(e){t.position=i.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=i.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}a.prototype=r(Error.prototype),a.prototype.constructor=a,a.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var i=0;i<n.length;++i)if(t===n[i]){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 c=i.createElement&&i.createElement("textarea"),d={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},h={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},p={v:"title",lang:"lang"},f={rt:"ruby"};function m(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function i(e){return c.innerHTML=e,e=c.textContent,c.textContent="",e}function r(e,t){return!f[t.localName]||f[t.localName]===e.localName}function a(t,n){var i=d[t];if(!i)return null;var r=e.document.createElement(i),a=p[t];return a&&n&&(r[a]=n.trim()),r}for(var o,u=e.document.createElement("div"),l=u,m=[];null!==(o=n());)if("<"!==o[0])l.appendChild(e.document.createTextNode(i(o)));else{if("/"===o[1]){m.length&&m[m.length-1]===o.substr(2).replace(">","")&&(m.pop(),l=l.parentNode);continue}var g,v=s(o.substr(1,o.length-2));if(v){g=e.document.createProcessingInstruction("timestamp",v),l.appendChild(g);continue}var y=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(g=a(y[1],y[3])))continue;if(!r(l,g))continue;if(y[2]){var _=y[2].split(".");_.forEach(function(e){var t=/^bg_/.test(e),n=t?e.slice(3):e;if(h.hasOwnProperty(n)){var i=t?"background-color":"color",r=h[n];g.style[i]=r}}),g.className=_.join(" ")}m.push(y[1]),l.appendChild(g),l=g}return u}var g=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551
vendor: 6,112 bytes, line 1
1],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(e){for(var t=0;t<g.length;t++){var n=g[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function y(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function i(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function r(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?r(e):t.childNodes?(i(e,t),r(e)):void 0}for(i(t,e);n=r(t);)for(var a=0;a<n.length;a++)if(v(n.charCodeAt(a)))return"rtl";return"ltr"}function _(){}function b(e,t,n){_.call(this),this.cue=t,this.cueDiv=m(e,t.text);var i={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(i,this.cueDiv),this.div=e.document.createElement("div"),i={direction:y(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(i),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":case"line-left":r=t.position;break;case"center":r=t.position-t.size/2;break;case"end":case"line-right":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),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 T(e){var t,n,i,r;if(e.div){n=e.div.offsetHeight,i=e.div.offsetWidth,r=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||n,this.bottom=e.bottom||r+(e.height||n),this.width=e.width||i,this.lineHeight=void 0!==t?t:e.lineHeight}function w(e,t,n,i){var r=new T(t),a=t.cue,s=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 t=e.track,n=t.textTrackList,i=0,r=0;r<n.length&&n[r]!==t;r++)"showing"===n[r].mode&&i++;return-1*++i}(a),o=[];if(a.snapToLines){var u;switch(a.vertical){case"":o=["+y","-y"],u="height";break;case"rl":o=["+x","-x"],u="width";break;case"lr":o=["-x","+x"],u="width"}var l=r.lineHeight,c=l*Math.round(s),d=n[u]+l,h=o[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),s<0&&(c+=""===a.vertical?n.height:n.width,o=o.reverse()),r.move(h,c)}else{var p=r.lineHeight/n.height*100;switch(a.lineAlign){case"center":s-=p/2;break;case"end":s-=p}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(s,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(s,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(s,"%")})}o=["+y","-x","+x","-y"],r=new T(t)}var f=function(e,t){for(var r,a=new T(e),s=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(n,t[o])||e.within(n)&&e.overlapsAny(i);)e.move(t[o]);if(e.within(n))return e;var u=e.intersectPercentage(n);s>u&&(r=new T(e),s=u),e=new T(a)}return r||a}(r,o);t.move(f.toCSSCompatValues(n))}function S(){}_.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},_.prototype.formatStyle=function(e,t){return 0===e?0:e+t},b.prototype=r(_.prototype),b.prototype.constructor=b,T.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},T.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},T.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},T.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},T.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,i=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||i,height:e.height||t,bottom:e.bottom||i+(e.height||t),width:e.width||n}},S.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},S.convertCueToDOMTree=function(e,t){return e&&t?m(e,t):null};S.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",
vendor: 3,975 bytes, line 1
1i.style.margin="1.5%",n.appendChild(i),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var r=[],a=T.getSimpleBoxPosition(i),s={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var n,o,u=0;u<t.length;u++)o=t[u],n=new b(e,o,s),i.appendChild(n.div),w(0,n,a,r),o.displayState=n.div,r.push(T.getSimpleBoxPosition(n))}()}else for(var o=0;o<t.length;o++)i.appendChild(t[o].displayState)},S.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=[]},S.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof a))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var i=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),i}function i(e){e.match(/X-TIMESTAMP-MAP/)?u(e,function(e,n){if("X-TIMESTAMP-MAP"===e)!function(e){var n=new o;u(e,function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",s(t))}},/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)},/=/):u(e,function(e,n){if("Region"===e)!function(e){var n=new o;if(u(e,function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var i=t.split(",");if(2!==i.length)break;var r=new o;if(r.percent("x",i[0]),r.percent("y",i[1]),!r.has("x")||!r.has("y"))break;n.set(e+"X",r.get("x")),n.set(e+"Y",r.get("y"));break;case"scroll":n.alt(e,t,["up"])}},/=/,/\s/),n.has("id")){var i=new(t.vttjs.VTTRegion||t.window.VTTRegion);i.width=n.get("width",100),i.lines=n.get("lines",3),i.regionAnchorX=n.get("regionanchorX",0),i.regionAnchorY=n.get("regionanchorY",100),i.viewportAnchorX=n.get("viewportanchorX",0),i.viewportAnchorY=n.get("viewportanchorY",100),i.scroll=n.get("scroll",""),t.onregion&&t.onregion(i),t.regionList.push({id:n.get("id"),region:i})}}(n)},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var c=(r=n()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new a(a.Errors.BadSignature);t.state="HEADER"}for(var d=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(d?d=!1:r=n(),t.state){case"HEADER":/:/.test(r)?i(r):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch(e){t.cue.align="middle"}if(t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":try{l(r,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var h=-1!==r.indexOf("--\x3e");if(!r||h&&(d=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=r.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":r||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.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 a(a.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=S},184(e){var t={"":1,lr:1,rl:1},n={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function i(e){return"string"==typeof e&&(!!n[e.toLowerCase()]&&e.toLowerCase())}function r(e,n,r){this.hasBeenReset=!1;var a="",s=!1,o=e,u=n,l=r,c=null,d="",h=!0,p="auto",f="start",m="auto",g="auto",v=100,y="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return a}
vendor: 2,702 bytes, line 1
1,set:function(e){a=""+e}},pauseOnExit:{enumerable:!0,get:function(){return s},set:function(e){s=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return l},set:function(e){l=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return d},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===n)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");d=n,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=i(e);t?(f=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=i(e);t?(g=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(e){var t=i(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");y=t,this.hasBeenReset=!0}}}),this.displayState=void 0}r.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=r},891(e){var t={"":!0,up:!0};function n(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,i=3,r=0,a=100,s=0,o=100,u="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!n(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");i=e}},regionAnchorY:{enumerable:!0,get:function(){return a}
1,set:function(e){if(!n(e))throw new Error("RegionAnchorX must be between 0 and 100.");a=e}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(e){if(!n(e))throw new Error("RegionAnchorY must be between 0 and 100.");r=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!n(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!n(e))throw new Error("ViewportAnchorX must be between 0 and 100.");s=e}},scroll:{enumerable:!0,get:function(){return u},set:function(e){var n=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);!1===n?console.warn("Scroll: an invalid or illegal string was specified."):u=n}}})}},542(){},634(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i={};return(()=>{"use strict";n.d(i,{default:()=>Rm});var e=n(840),t=n.n(e),r=n(697),a=n.n(r);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},s.apply(null,arguments)}var o=n(545),u=n.n(o);function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function d(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c(e,t)}var h=n(865),p=n.n(h),f=n(36),m=n.n(f),g=n(784),v=n.n(g);function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function _(e,t,n){if(y())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var r=new(e.bind.apply(e,i));return n&&c(r,n.prototype),r}var b=n(842),T=n.n(b),w="http://example.com";const S=function(e,n){if(/^[a-z]+:/i.test(n))return n;/^data:/.test(e)&&(e=t().location&&t().location.href||"");var i="function"==typeof t().URL,r=/^\/\//.test(e),a=!t().location&&!/\/\//i.test(e);if(i?e=new(t().URL)(e,t().location||w):/\/\//i.test(e)||(e=T().buildAbsoluteURL(t().location&&t().location.href||"",e)),i){var s=new URL(n,e);return a?s.href.slice(18):r?s.href.slice(s.protocol.length):s.href}return T().buildAbsoluteURL(e,n)};var k=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),a=t.length,s=0;s<a;++s)t[s].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",function(t){e.push(t)})},e}(),E=n(287).hp;function C(e){for(var n=function(e){return t().atob?t().atob(e):E.from(e,"base64").toString("binary")}(e),i=new Uint8Array(n.length),r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return i}var A,P=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return d(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(k),x=String.fromCharCode(9),I=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},O=function(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),i={},r=n.length;r--;)""!==n[r]&&((t=/([^=]*)=(.*)/.exec(n[r]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),i[t[0]]=t[1]);return i},L=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}d(t,e);var n=t.prototype;return n.push=function(e){var t,n,i=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce(function(t,n){var i=n(e);return i===e?t:t.concat([i])}
1,[e]).forEach(function(e){for(var r=0;r<i.customParsers.length;r++)if(i.customParsers[r].call(i,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace("\r",""),t=/^#EXTM3U/.exec(e))i.trigger("data",{type:"tag",tagType:"m3u"});else{if(t=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(e))return n={type:"tag",tagType:"inf"},t[1]&&(n.duration=parseFloat(t[1])),t[2]&&(n.title=t[2]),void i.trigger("data",n);if(t=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"targetduration"},t[1]&&(n.duration=parseInt(t[1],10)),void i.trigger("data",n);if(t=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return n={type:"tag",tagType:"version"},t[1]&&(n.version=parseInt(t[1],10)),void i.trigger("data",n);if(t=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"media-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void i.trigger("data",n);if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(e))return n={type:"tag",tagType:"discontinuity-sequence"},t[1]&&(n.number=parseInt(t[1],10)),void i.trigger("data",n);if(t=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return n={type:"tag",tagType:"playlist-type"},t[1]&&(n.playlistType=t[1]),void i.trigger("data",n);if(t=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(e))return n=s(I(t[1]),{type:"tag",tagType:"byterange"}),void i.trigger("data",n);if(t=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return n={type:"tag",tagType:"allow-cache"},t[1]&&(n.allowed=!/NO/.test(t[1])),void i.trigger("data",n);if(t=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"map"},t[1]){var a=O(t[1]);a.URI&&(n.uri=a.URI),a.BYTERANGE&&(n.byterange=I(a.BYTERANGE))}i.trigger("data",n)}else if(t=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e)){if(n={type:"tag",tagType:"stream-inf"},t[1]){if(n.attributes=O(t[1]),n.attributes.RESOLUTION){var o=n.attributes.RESOLUTION.split("x"),u={};o[0]&&(u.width=parseInt(o[0],10)),o[1]&&(u.height=parseInt(o[1],10)),n.attributes.RESOLUTION=u}n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))}i.trigger("data",n)}else{if(t=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return n={type:"tag",tagType:"media"},t[1]&&(n.attributes=O(t[1])),void i.trigger("data",n);if(t=/^#EXT-X-ENDLIST/.exec(e))i.trigger("data",{type:"tag",tagType:"endlist"});else if(t=/^#EXT-X-DISCONTINUITY/.exec(e))i.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(t=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return n={type:"tag",tagType:"program-date-time"},t[1]&&(n.dateTimeString=t[1],n.dateTimeObject=new Date(t[1])),void i.trigger("data",n);if(t=/^#EXT-X-KEY:?(.*)$/.exec(e))return n={type:"tag",tagType:"key"},t[1]&&(n.attributes=O(t[1]),n.attributes.IV&&("0x"===n.attributes.IV.substring(0,2).toLowerCase()&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),void i.trigger("data",n);if(t=/^#EXT-X-START:?(.*)$/.exec(e))return n={type:"tag",tagType:"start"},t[1]&&(n.attributes=O(t[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),void i.trigger("data",n);if(t=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out-cont"},t[1]?n.data=t[1]:n.data="",void i.trigger("data",n);if(t=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-out"},t[1]?n.data=t[1]:n.data="",void i.trigger("data",n);if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return n={type:"tag",tagType:"cue-in"},t[1]?n.data=t[1]:n.data="",void i.trigger("data",n);if((t=/^#EXT-X-SKIP:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"skip"}).attributes=O(t[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(x)),void i.trigger("data",n);
1if((t=/^#EXT-X-PART:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part"}).attributes=O(t[1]),["DURATION"].forEach(function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))}),["INDEPENDENT","GAP"].forEach(function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))}),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=I(n.attributes.BYTERANGE)),void i.trigger("data",n);if((t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"server-control"}).attributes=O(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=/YES/.test(n.attributes[e]))}),void i.trigger("data",n);if((t=/^#EXT-X-PART-INF:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"part-inf"}).attributes=O(t[1]),["PART-TARGET"].forEach(function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseFloat(n.attributes[e]))}),void i.trigger("data",n);if((t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"preload-hint"}).attributes=O(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(e){if(n.attributes.hasOwnProperty(e)){n.attributes[e]=parseInt(n.attributes[e],10);var t="BYTERANGE-LENGTH"===e?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[t]=n.attributes[e],delete n.attributes[e]}}),void i.trigger("data",n);if((t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(e))&&t[1])return(n={type:"tag",tagType:"rendition-report"}).attributes=O(t[1]),["LAST-MSN","LAST-PART"].forEach(function(e){n.attributes.hasOwnProperty(e)&&(n.attributes[e]=parseInt(n.attributes[e],10))}),void i.trigger("data",n);i.trigger("data",{type:"tag",data:e.slice(4)})}}}else i.trigger("data",{type:"comment",text:e.slice(1)})}):this.trigger("data",{type:"uri",uri:e}))},n.addParser=function(e){var t=this,n=e.expression,i=e.customType,r=e.dataParser,a=e.segment;"function"!=typeof r&&(r=function(e){return e}),this.customParsers.push(function(e){if(n.exec(e))return t.trigger("data",{type:"custom",data:r(e),customType:i,segment:a}),!0})},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push(function(e){return t.test(e)?n(e):e})},t}(k),D=function(e){var t={};return Object.keys(e).forEach(function(n){var i;t[i=n,i.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})]=e[n]}),t},M=function(e){var t=e.serverControl,n=e.targetDuration,i=e.partTargetDuration;if(t){var r="#EXT-X-SERVER-CONTROL",a="holdBack",s="partHoldBack",o=n&&3*n,u=i&&2*i;n&&!t.hasOwnProperty(a)&&(t[a]=o,this.trigger("info",{message:r+" defaulting HOLD-BACK to targetDuration * 3 ("+o+")."})),o&&t[a]<o&&(this.trigger("warn",{message:r+" clamping HOLD-BACK ("+t[a]+") to targetDuration * 3 ("+o+")"}),t[a]=o),i&&!t.hasOwnProperty(s)&&(t[s]=3*i,this.trigger("info",{message:r+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+t[s]+")."})),i&&t[s]<u&&(this.trigger("warn",{message:r+" clamping PART-HOLD-BACK ("+t[s]+") to partTargetDuration * 2 ("+u+")."}),t[s]=u)}},R=function(e){function t(){var t;(t=e.call(this)||this).lineStream=new P,t.parseStream=new L,t.lineStream.pipe(t.parseStream);var n,i,r=l(t),a=[],o={},u=!1,c=function(){},d={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},h=0;t.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var p=0,f=0;return t.on("end",function(){o.uri||!o.parts&&!o.preloadHints||(!o.map&&n&&(o.map=n),!o.key&&i&&(o.key=i),o.timeline||"number"!=typeof h||(o.timeline=h),t.manifest.preloadSegment=o)}),t.parseStream.on("data",function(e){var t,l;({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&&(o.byterange=t,t.length=e.length,"offset"in e||(e.offset=p)),"offset"in e&&(o.byterange=t,t.offset=e.offset),p=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&&(o.duration=e.duration),0===e.duration&&(o.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=a},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:C(e.attributes.URI.split(",")[1])})):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),i={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},void 0!==e.attributes.IV&&(i.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else i=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,h=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={}
1,e.uri&&(n.uri=e.uri),e.byterange&&(n.byterange=e.byterange),i&&(n.key=i)},"stream-inf":function(){this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||d,e.attributes?(o.attributes||(o.attributes={}),s(o.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||d,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"]],(l={default:/yes/i.test(e.attributes.DEFAULT)}).default?l.autoselect=!0:l.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(l.language=e.attributes.LANGUAGE),e.attributes.URI&&(l.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(l.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(l.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(l.forced=/yes/i.test(e.attributes.FORCED)),t[e.attributes.NAME]=l}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){h+=1,o.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),o.dateTimeString=e.dateTimeString,o.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,M.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(){o.cueOut=e.data},"cue-out-cont":function(){o.cueOutCont=e.data},"cue-in":function(){o.cueIn=e.data},skip:function(){this.manifest.skip=D(e.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",e.attributes,["SKIPPED-SEGMENTS"])},part:function(){var t=this;u=!0;var n=this.manifest.segments.length,i=D(e.attributes);o.parts=o.parts||[],o.parts.push(i),i.byterange&&(i.byterange.hasOwnProperty("offset")||(i.byterange.offset=f),f=i.byterange.offset+i.byterange.length);var r=o.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+r+" for segment #"+n,e.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(e,n){e.hasOwnProperty("lastPart")||t.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+n+" lacks required attribute(s): LAST-PART"})})},"server-control":function(){var t=this.manifest.serverControl=D(e.attributes);t.hasOwnProperty("canBlockReload")||(t.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),M.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=D(e.attributes),i=n.type&&"PART"===n.type;o.preloadHints=o.preloadHints||[],o.preloadHints.push(n),n.byterange&&(n.byterange.hasOwnProperty("offset")||(n.byterange.offset=i?f:0,i&&(f=n.byterange.offset+n.byterange.length)));var r=o.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+r+" for segment #"+t,e.attributes,["TYPE","URI"]),n.type)for(var a=0;a<o.preloadHints.length-1;a++){var s=o.preloadHints[a];s.type&&(s.type===n.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+r+" for segment #"+t+" has the same TYPE "+n.type+" as preload hint #"+a}))}},"rendition-report":function(){var t=D(e.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(t);var n=this.manifest.renditionReports.length-1,i=["LAST-MSN","URI"];u&&i.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+n,e.attributes,i)},"part-inf":function(){this.manifest.partInf=D(e.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",e.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),M.call(this,this.manifest)}}[e.tagType]||c).call(r)}
1,uri:function(){o.uri=e.uri,a.push(o),this.manifest.targetDuration&&!("duration"in o)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),o.duration=this.manifest.targetDuration),i&&(o.key=i),o.timeline=h,n&&(o.map=n),f=0,o={}},comment:function(){},custom:function(){e.segment?(o.custom=o.custom||{},o.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}})[e.type].call(r)}),t}d(t,e);var n=t.prototype;return n.warnOnMissingAttributes_=function(e,t,n){var i=[];n.forEach(function(e){t.hasOwnProperty(e)||i.push(e)}),i.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+i.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}(k),N={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^/},U=["video","audio","text"],B=["Video","Audio","Text"],j=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;e=e.trim(),U.forEach(function(i){var r=N[i].exec(e.toLowerCase());if(r&&!(r.length<=1)){t=i;var a=e.substring(0,r[1].length),s=e.replace(a,"");n.push({type:a,details:s,mediaType:i})}}),t||n.push({type:e,details:"",mediaType:"unknown"})}),n},q=function(e){return void 0===e&&(e=""),N.audio.test(e.trim().toLowerCase())},V=function(e){if(e&&"string"==typeof e){var t,n=e.toLowerCase().split(",").map(function(e){return j(e.trim())}),i="video";1===n.length&&q(n[0])?i="audio":1===n.length&&(void 0===(t=n[0])&&(t=""),N.text.test(t.trim().toLowerCase()))&&(i="application");var r="mp4";return n.every(function(e){return N.mp4.test(e)})?r="mp4":n.every(function(e){return N.webm.test(e)})?r="webm":n.every(function(e){return N.ogg.test(e)})&&(r="ogg"),i+"/"+r+';codecs="'+e+'"'}},H=function(e){return void 0===e&&(e=""),t().MediaSource&&t().MediaSource.isTypeSupported&&t().MediaSource.isTypeSupported(V(e))||!1},W=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every(function(e){e=e.trim();for(var t=0;t<B.length;t++){if(N["muxer"+B[t]].test(e))return!0}return!1})},G="mp4a.40.2",$=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,z=/^application\/dash\+xml/i,K=function(e){return $.test(e)?"hls":z.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null},X=function(e){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},Y=function(e){return e instanceof Uint8Array?e:(Array.isArray(e)||X(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))},Q=t().BigInt||Number,J=[Q("0x1"),Q("0x100"),Q("0x10000"),Q("0x1000000"),Q("0x100000000"),Q("0x10000000000"),Q("0x1000000000000"),Q("0x100000000000000"),Q("0x10000000000000000")],Z=(function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);255===t[0]||t[0]}(),function(e,t){var n=void 0===t?{}:t,i=n.signed,r=void 0!==i&&i,a=n.le,s=void 0!==a&&a;e=Y(e);var o=s?"reduce":"reduceRight",u=(e[o]?e[o]:Array.prototype[o]).call(e,function(t,n,i){var r=s?i:Math.abs(i+1-e.length);return t+Q(n)*J[r]},Q(0));if(r){var l=J[e.length]/Q(2)-Q(1);(u=Q(u))>l&&(u-=l,u-=l,u-=Q(2))}return Number(u)}),ee=function(e,t){var n=(void 0===t?{}:t).le,i=void 0!==n&&n;("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0);for(var r=function(e){return Math.ceil(function(e){return e.toString(2).length}(e)/8)}(e=Q(e)),a=new Uint8Array(new ArrayBuffer(r)),s=0;s<r;s++){var o=i?s:Math.abs(s+1-a.length);a[o]=Number(e/J[s]&Q(255)),e<0&&(a[o]=Math.abs(~a[o]),a[o]-=0===s?1:2)}return a},te=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 n=new Uint8Array(e.length),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return n},ne=function(e,t,n){var i=void 0===n?{}:n,r=i.offset,a=void 0===r?0:r,s=i.mask,o=void 0===s?[]:s;e=Y(e);var u=(t=Y(t)).every?t.every:Array.prototype.every;return t.length&&e.length-a>=t.length&&u.call(t,function(t,n){return t===(o[n]?o[n]&e[a+n]:e[a+n])})},ie=n(978),re=function(e){return!!e&&"object"==typeof e},ae=function e(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return n.reduce(function(t,n){return"object"!=typeof n||Object.keys(n).forEac
1h(function(i){Array.isArray(t[i])&&Array.isArray(n[i])?t[i]=t[i].concat(n[i]):re(t[i])&&re(n[i])?t[i]=e(t[i],n[i]):t[i]=n[i]}),t},{})},se=function(e){return Object.keys(e).map(function(t){return e[t]})},oe=function(e){return e.reduce(function(e,t){return e.concat(t)},[])},ue=function(e){if(!e.length)return[];for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},le=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1},ce="INVALID_NUMBER_OF_PERIOD",de="DASH_EMPTY_MANIFEST",he="DASH_INVALID_XML",pe="NO_BASE_URL",fe="SEGMENT_TIME_UNSPECIFIED",me="UNSUPPORTED_UTC_TIMING_SCHEME",ge=function(e){var n=e.baseUrl,i=void 0===n?"":n,r=e.source,a=void 0===r?"":r,s=e.range,o=void 0===s?"":s,u=e.indexRange,l=void 0===u?"":u,c={uri:a,resolvedUri:S(i||"",a)};if(o||l){var d,h=(o||l).split("-"),p=t().BigInt?t().BigInt(h[0]):parseInt(h[0],10),f=t().BigInt?t().BigInt(h[1]):parseInt(h[1],10);p<Number.MAX_SAFE_INTEGER&&"bigint"==typeof p&&(p=Number(p)),f<Number.MAX_SAFE_INTEGER&&"bigint"==typeof f&&(f=Number(f)),"bigint"==typeof(d="bigint"==typeof f||"bigint"==typeof p?t().BigInt(f)-t().BigInt(p)+t().BigInt(1):f-p+1)&&d<Number.MAX_SAFE_INTEGER&&(d=Number(d)),c.byterange={length:d,offset:p}}return c},ve=function(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e},ye={static:function(e){var t=e.duration,n=e.timescale,i=void 0===n?1:n,r=e.sourceDuration,a=e.periodDuration,s=ve(e.endNumber),o=t/i;return"number"==typeof s?{start:0,end:s}:"number"==typeof a?{start:0,end:a/o}:{start:0,end:r/o}},dynamic:function(e){var t=e.NOW,n=e.clientOffset,i=e.availabilityStartTime,r=e.timescale,a=void 0===r?1:r,s=e.duration,o=e.periodStart,u=void 0===o?0:o,l=e.minimumUpdatePeriod,c=void 0===l?0:l,d=e.timeShiftBufferDepth,h=void 0===d?1/0:d,p=ve(e.endNumber),f=(t+n)/1e3,m=i+u,g=f+c-m,v=Math.ceil(g*a/s),y=Math.floor((f-m-h)*a
1/s),_=Math.floor((f-m)*a/s);return{start:Math.max(0,y),end:"number"==typeof p?p:Math.min(v,_)}}},_e=function(e){var t=e.type,n=e.duration,i=e.timescale,r=void 0===i?1:i,a=e.periodDuration,s=e.sourceDuration,o=ye[t](e),u=function(e,t){for(var n=[],i=e;i<t;i++)n.push(i);return n}(o.start,o.end).map(function(e){return function(t){var n=e.duration,i=e.timescale,r=void 0===i?1:i,a=e.periodStart,s=e.startNumber;return{number:(void 0===s?1:s)+t,duration:n/r,timeline:a,time:t*n}}}(e));if("static"===t){var l=u.length-1,c="number"==typeof a?a:s;u[l].duration=c-n/r*l}return u},be=function(e){var t=e.baseUrl,n=e.initialization,i=void 0===n?{}:n,r=e.sourceDuration,a=e.indexRange,s=void 0===a?"":a,o=e.periodStart,u=e.presentationTime,l=e.number,c=void 0===l?0:l,d=e.duration;if(!t)throw new Error(pe);var h=ge({baseUrl:t,source:i.sourceURL,range:i.range}),p=ge({baseUrl:t,source:t,indexRange:s});if(p.map=h,d){var f=_e(e);f.length&&(p.duration=f[0].duration,p.timeline=f[0].timeline)}else r&&(p.duration=r,p.timeline=o);return p.presentationTime=u||o,p.number=c,[p]},Te=function(e,n,i){var r,a=e.sidx.map?e.sidx.map:null,s=e.sidx.duration,o=e.timeline||0,u=e.sidx.byterange,l=u.offset+u.length,c=n.timescale,d=n.references.filter(function(e){return 1!==e.referenceType}),h=[],p=e.endList?"static":"dynamic",f=e.sidx.timeline,m=f,g=e.mediaSequence||0;r="bigint"==typeof n.firstOffset?t().BigInt(l)+n.firstOffset:l+n.firstOffset;for(var v=0;v<d.length;v++){var y=n.references[v],_=y.referencedSize,b=y.subsegmentDuration,T=void 0;T="bigint"==typeof r?r+t().BigInt(_)-t().BigInt(1):r+_-1;var w=be({baseUrl:i,timescale:c,timeline:o,periodStart:f,presentationTime:m,number:g,duration:b,sourceDuration:s,indexRange:r+"-"+T,type:p})[0];a&&(w.map=a),h.push(w),r+="bigint"==typeof r?t().BigInt(_):_,m+=b/c,g++}return e.segments=h,e},we=["AUDIO","SUBTITLES"],Se=1/60,ke=function(e){return(t=e,n=function(e){return e.timeline},se(t.reduce(function(e,t){return t.forEach(function(t){e[n(t)]=t}),e},{}))).sort(function(e,t){return e.timeline>t.timeline?1:-1});var t,n},Ee=function(e){var t,n,i=[];return t=e,n=function(e,t,n,r){i=i.concat(e.playlists||[])},we.forEach(function(e){for(var i in t.mediaGroups[e])for(var r in t.mediaGroups[e][i]){var a=t.mediaGroups[e][i][r];n(a,e,i,r)}}),i},Ce=function(e){var t=e.playlist,n=e.mediaSequence;t.mediaSequence=n,t.segments.forEach(function(e,n){e.number=t.mediaSequence+n})},Ae=function(e){var t=e.oldManifest,n=e.newManifest,i=t.playlists.concat(Ee(t)),r=n.playlists.concat(Ee(n));return n.timelineStarts=ke([t.timelineStarts,n.timelineStarts]),function(e){var t=e.oldPlaylists,n=e.newPlaylists,i=e.timelineStarts;n.forEach(function(e){e.discontinuitySequence=le(i,function(t){return t.timeline===e.timeline});var n=function(e,t){for(var n=0;n<e.length;n++)if(e[n].attributes.NAME===t)return e[n];return null}(t,e.attributes.NAME);if(n&&!e.sidx){var r=e.segments[0],a=le(n.segments,function(e){return Math.abs(e.presentationTime-r.presentationTime)<Se});if(-1===a)return Ce({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[a].discontinuity&&!r.discontinuity&&(r.discontinuity=!0,e.discontinuityStarts.unshift(0),e.discontinuitySequence--),Ce({playlist:e,mediaSequence:n.segments[a].number})}})}({oldPlaylists:i,newPlaylists:r,timelineStarts:n.timelineStarts}),n},Pe=function(e){return e&&e.uri+"-"+(n=e.byterange,i="bigint"==typeof n.offset||"bigint"==typeof n.length?t().BigInt(n.offset)+t().BigInt(n.length)-t().BigInt(1):n.offset+n.length-1,n.offset+"-"+i);var n,i},xe=function(e){return se(e.reduce(function(e,t){var n=t.attributes.id+(t.attributes.lang||"");if(e[n]){var i;if(t.segments)t.segments[0]&&(t.segments[0].discontinuity=!0),(i=e[n].segments).push.apply(i,t.segments);t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)}else e[n]=t,e[n].attributes.timelineStarts=[];return e[n].attributes.timelineStarts.push({start:t.attributes.periodStart,timeline:t.attributes.periodStart}),e},{})).map(function(e){return e.discontinuityStarts=function(e,t){return e.reduce(function(e,n,i){return n[t]&&e.push(i),e},[])}(e.segments||[],"discontinuity"),e})},Ie=function(e,t){var n=Pe(e.sidx),i=n&&t[n]&&t[n].sidx;return i&&Te(e,i,e.sidx.resolvedUri),e},Oe=function(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(var n in e)e[n]=Ie(e[n],t);return e},Le=function(e){var t,n=e.attributes,i=e.segments,r=e.sidx,a=e.discontinuityStarts,s={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:a,timelineStarts:n.timelineStarts,segments:i};return n.frameRate&&(s.attributes["FRAME-RATE"]=n.frameRate),n.contentProtection&&(s.contentProtection=n.contentProtection),r&&(s.sidx=r),s},De=function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType},Me=function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType},Re=function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType},Ne=function(e){return e?Object.keys(e).reduce(function(t,n){var i=e[n];return t.concat(i.playlists)},[]):[]},Ue=function(e){var t,n=e.dashPlaylists,i=e.locations,r=e.sidxMapping,a=void 0===r?{}:r,s=e.previousManifest;if(!n.length)return{};var o=n[0].attributes,u=o.sourceDuration,l=o.type,c=o.suggestedPresentationDelay,d=o.minimumUpdatePeriod,h=xe(n.filter(De)).map(Le),p=xe(n.filter(Me)),f=xe(n.filter(Re)),m=n.map(function(e){return e.attributes.captionServices}
1).filter(Boolean),g={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(t={AUDIO:{},VIDEO:{}},t["CLOSED-CAPTIONS"]={},t.SUBTITLES={},t),uri:"",duration:u,playlists:Oe(h,a)};d>=0&&(g.minimumUpdatePeriod=1e3*d),i&&(g.locations=i),"dynamic"===l&&(g.suggestedPresentationDelay=c);var v,y,_=0===g.playlists.length,b=p.length?function(e,t,n){var i;void 0===t&&(t={}),void 0===n&&(n=!1);var r=e.reduce(function(e,r){var a=r.attributes.role&&r.attributes.role.value||"",s=r.attributes.lang||"",o=r.attributes.label||"main";if(s&&!r.attributes.label){var u=a?" ("+a+")":"";o=""+r.attributes.lang+u}e[o]||(e[o]={language:s,autoselect:!0,default:"main"===a,playlists:[],uri:""});var l=Ie(function(e,t){var n,i=e.attributes,r=e.segments,a=e.sidx,s=e.mediaSequence,o=e.discontinuitySequence,u=e.discontinuityStarts,l={attributes:(n={NAME:i.id,BANDWIDTH:i.bandwidth,CODECS:i.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===i.type,timeline:i.periodStart,resolvedUri:"",targetDuration:i.duration,discontinuitySequence:o,discontinuityStarts:u,timelineStarts:i.timelineStarts,mediaSequence:s,segments:r};return i.contentProtection&&(l.contentProtection=i.contentProtection),a&&(l.sidx=a),t&&(l.attributes.AUDIO="audio",l.attributes.SUBTITLES="subs"),l}(r,n),t);return e[o].playlists.push(l),void 0===i&&"main"===a&&((i=r).default=!0),e},{});return i||(r[Object.keys(r)[0]].default=!0),r}(p,a,_):null,T=f.length?function(e,t){return void 0===t&&(t={}),e.reduce(function(e,n){var i=n.attributes.lang||"text";return e[i]||(e[i]={language:i,default:!1,autoselect:!1,playlists:[],uri:""}),e[i].playlists.push(Ie(function(e){var t,n=e.attributes,i=e.segments,r=e.mediaSequence,a=e.discontinuityStarts,s=e.discontinuitySequence;void 0===i&&(i=[{uri:n.baseUrl,timeline:n.periodStart,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var o=((t={NAME:n.id,BANDWIDTH:n.bandwidth})["PROGRAM-ID"]=1,t);return n.codecs&&(o.CODECS=n.codecs),{attributes:o,uri:"",endList:"static"===n.type,timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,timelineStarts:n.timelineStarts,discontinuityStarts:a,discontinuitySequence:s,mediaSequence:r,segments:i}}(n),t)),e},{})}(f,a):null,w=h.concat(Ne(b),Ne(T)),S=w.map(function(e){return e.timelineStarts});return g.timelineStarts=ke(S),v=w,y=g.timelineStarts,v.forEach(function(e){e.mediaSequence=0,e.discontinuitySequence=le(y,function(t){return t.timeline===e.timeline}),e.segments&&e.segments.forEach(function(e,t){e.number=t})}),b&&(g.mediaGroups.AUDIO.audio=b),T&&(g.mediaGroups.SUBTITLES.subs=T),m.length&&(g.mediaGroups["CLOSED-CAPTIONS"].cc=m.reduce(function(e,t){return t?(t.forEach(function(t){var n=t.channel,i=t.language;e[i]={autoselect:!1,default:!1,instreamId:n,language:i},t.hasOwnProperty("aspectRatio")&&(e[i].aspectRatio=t.aspectRatio),t.hasOwnProperty("easyReader")&&(e[i].easyReader=t.easyReader),t.hasOwnProperty("3D")&&(e[i]["3D"]=t["3D"])}),e):e},{})),s?Ae({oldManifest:s,newManifest:g}):g},Be=function(e,t,n){var i=e.NOW,r=e.clientOffset,a=e.availabilityStartTime,s=e.timescale,o=void 0===s?1:s,u=e.periodStart,l=void 0===u?0:u,c=e.minimumUpdatePeriod,d=(i+r)/1e3+(void 0===c?0:c)-(a+l);return Math.ceil((d*o-t)/n)},je=function(e,t){for(var n=e.type,i=e.minimumUpdatePeriod,r=void 0===i?0:i,a=e.media,s=void 0===a?"":a,o=e.sourceDuration,u=e.timescale,l=void 0===u?1:u,c=e.startNumber,d=void 0===c?1:c,h=e.periodStart,p=[],f=-1,m=0;m<t.length;m++){var g=t[m],v=g.d,y=g.r||0,_=g.t||0;f<0&&(f=_),_&&_>f&&(f=_);var b=void 0;if(y<0){var T=m+1;b=T===t.length?"dynamic"===n&&r>0&&s.indexOf("$Number$")>0?Be(e,f,v):(o*l-f)/v:(t[T].t-f)/v}else b=y+1;for(var w=d+p.length+b,S=d+p.length;S<w;)p.push({number:S,duration:v/l,time:f,timeline:h}),f+=v,S++}return p},Fe=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,qe=function(e,t){return e.replace(Fe,function(e){return function(t,n,i,r){if("$$"===t)return"$";if(void 0===e[n])return t;var a=""+e[n];return"RepresentationID"===n?a:(r=i?parseInt(r,10):1,a.length>=r?a:""+new Array(r-a.length+1).join("0")+a)}}(t))},Ve=function(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},i=e.initialization,r=void 0===i?{sourceURL:"",range:""}:i,a=ge({baseUrl:e.baseUrl,source:qe(r.sourceURL,n),range:r.range}),s=function(e,t){return e.duration||t?e.duration?_e(e):je(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]}(e,t);return s.map(function(t){n.Number=t.number,n.Time=t.time;var i=qe(e.media||"",n),r=e.timescale||1,s=e.presentationTimeOffset||0,o=e.periodStart+(t.time-s)/r;return{uri:i,timeline:t.timeline,duration:t.duration,resolvedUri:S(e.baseUrl||"",i),map:a,number:t.number,presentationTime:o}})},He=function(e,t){var n=e.duration,i=e.segmentUrls,r=void 0===i?[]:i,a=e.periodStart;if(!n&&!t||n&&t)throw new Error(fe);var s,o=r.map(function(t){return function(e,t){var n=e.baseUrl,i=e.initialization,r=void 0===i?{}:i,a=ge({baseUrl:n,source:r.sourceURL,range:r.range}),s=ge({baseUrl:n,source:t.media,range:t.mediaRange});return s.map=a,s}(e,t)});return n&&(s=_e(e)),t&&(s=je(e,t)),s.map(function(t,n){if(o[n]){var i=o[n],r=e.timescale||1,s=e.presentationTimeOffset||0;return i.timeline=t.timeline,i.duration=t.duration,i.number=t.number,i.presentationTime=a+(t.time-s)/r,i}}).filter(function(e){return e})},We=function(e){var t,n,i=e.attributes,r=e.segmentInfo;r.template?(n=Ve,t=ae(i,r.template)):r.base?(n=be,t=ae(i,r.base)):r.list&&(n=He,t
1=ae(i,r.list));var a={attributes:i};if(!n)return a;var s=n(t,r.segmentTimeline);if(t.duration){var o=t,u=o.duration,l=o.timescale,c=void 0===l?1:l;t.duration=u/c}else s.length?t.duration=s.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0):t.duration=0;return a.attributes=t,a.segments=s,r.base&&t.indexRange&&(a.sidx=s[0],a.segments=[]),a},Ge=function(e,t){return ue(e.childNodes).filter(function(e){return e.tagName===t})},$e=function(e){return e.textContent.trim()},ze=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!t)return 0;var n=t.slice(1),i=n[0],r=n[1],a=n[2],s=n[3],o=n[4],u=n[5];return 31536e3*parseFloat(i||0)+2592e3*parseFloat(r||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(o||0)+parseFloat(u||0)},Ke={mediaPresentationDuration:function(e){return ze(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 ze(e)},suggestedPresentationDelay:function(e){return ze(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return ze(e)},start:function(e){return ze(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},frameRate:function(e){return function(e){return parseFloat(e.split("/").reduce(function(e,t){return e/t}))}(e)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?ze(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}},Xe=function(e){return e&&e.attributes?ue(e.attributes).reduce(function(e,t){var n=Ke[t.name]||Ke.DEFAULT;return e[t.name]=n(t.value),e},{}):{}},Ye={"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"},Qe=function(e,t){return t.length?oe(e.map(function(e){return t.map(function(t){return S(e,$e(t))})})):e},Je=function(e){var t=Ge(e,"SegmentTemplate")[0],n=Ge(e,"SegmentList")[0],i=n&&Ge(n,"SegmentURL").map(function(e){return ae({tag:"SegmentURL"},Xe(e))}),r=Ge(e,"SegmentBase")[0],a=n||t,s=a&&Ge(a,"SegmentTimeline")[0],o=n||r||t,u=o&&Ge(o,"Initialization")[0],l=t&&Xe(t);l&&u?l.initialization=u&&Xe(u):l&&l.initialization&&(l.initialization={sourceURL:l.initialization});var c={template:l,segmentTimeline:s&&Ge(s,"S").map(function(e){return Xe(e)}),list:n&&ae(Xe(n),{segmentUrls:i,initialization:Xe(u)}),base:r&&ae(Xe(r),{initialization:Xe(u)})};return Object.keys(c).forEach(function(e){c[e]||delete c[e]}),c},Ze=function(e,t,n){return function(i){var r,a=Xe(i),s=Qe(t,Ge(i,"BaseURL")),o=Ge(i,"Role")[0],u={role:Xe(o)},l=ae(e,a,u),c=Ge(i,"Accessibility")[0],d="urn:scte:dash:cc:cea-608:2015"===(r=Xe(c)).schemeIdUri?("string"!=typeof r.value?[]:r.value.split(";")).map(function(e){var t,n;if(n=e,/^CC\d=/.test(e)){var i=e.split("=");t=i[0],n=i[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:n}}):"urn:scte:dash:cc:cea-708:2015"===r.schemeIdUri?("string"!=typeof r.value?[]:r.value.split(";")).map(function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var n=e.split("="),i=n[0],r=n[1],a=void 0===r?"":r;t.channel=i,t.language=e,a.split(",").forEach(function(e){var n=e.split(":"),i=n[0],r=n[1];"lang"===i?t.language=r:"er"===i?t.easyReader=Number(r):"war"===i?t.aspectRatio=Number(r):"3D"===i&&(t["3D"]=Number(r))})}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t}):void 0;d&&(l=ae(l,{captionServices:d}));var h=Ge(i,"Label")[0];if(h&&h.childNodes.length){var p=h.childNodes[0].nodeValue.trim();l=ae(l,{label:p})}var f=Ge(i,"ContentProtection").reduce(function(e,t){var n=Xe(t);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());var i=Ye[n.schemeIdUri];if(i){e[i]={attributes:n};
1var r=Ge(t,"cenc:pssh")[0];if(r){var a=$e(r);e[i].pssh=a&&C(a)}}return e},{});Object.keys(f).length&&(l=ae(l,{contentProtection:f}));var m=Je(i),g=Ge(i,"Representation"),v=ae(n,m);return oe(g.map(function(e,t,n){return function(i){var r=Ge(i,"BaseURL"),a=Qe(t,r),s=ae(e,Xe(i)),o=Je(i);return a.map(function(e){return{segmentInfo:ae(n,o),attributes:ae(s,{baseUrl:e})}})}}(l,s,v)))}},et=function(e,t){return function(n,i){var r=Qe(t,Ge(n.node,"BaseURL")),a=ae(e,{periodStart:n.attributes.start});"number"==typeof n.attributes.duration&&(a.periodDuration=n.attributes.duration);var s=Ge(n.node,"AdaptationSet"),o=Je(n.node);return oe(s.map(Ze(a,r,o)))}},tt=function(e){if(""===e)throw new Error(de);var t,n,i=new ie.DOMParser;try{n=(t=i.parseFromString(e,"application/xml"))&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(he);return n},nt=function(e,t){void 0===t&&(t={});var n=function(e,t){void 0===t&&(t={});var n=t,i=n.manifestUri,r=void 0===i?"":i,a=n.NOW,s=void 0===a?Date.now():a,o=n.clientOffset,u=void 0===o?0:o,l=Ge(e,"Period");if(!l.length)throw new Error(ce);var c=Ge(e,"Location"),d=Xe(e),h=Qe([r],Ge(e,"BaseURL"));d.type=d.type||"static",d.sourceDuration=d.mediaPresentationDuration||0,d.NOW=s,d.clientOffset=u,c.length&&(d.locations=c.map($e));var p=[];return l.forEach(function(e,t){var n=Xe(e),i=p[t-1];n.start=function(e){var t=e.attributes,n=e.priorPeriodAttributes,i=e.mpdType;return"number"==typeof t.start?t.start:n&&"number"==typeof n.start&&"number"==typeof n.duration?n.start+n.duration:n||"static"!==i?null:0}({attributes:n,priorPeriodAttributes:i?i.attributes:null,mpdType:d.type}),p.push({node:e,attributes:n})}),{locations:d.locations,representationInfo:oe(p.map(et(d,h)))}}(tt(e),t),i=n.representationInfo.map(We);return Ue({dashPlaylists:i,locations:n.locations,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest})},it=function(e){return function(e){var t=Ge(e,"UTCTiming")[0];if(!t)return null;var n=Xe(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(me)}return n}(tt(e))},rt=n(962),at=n.n(rt),st=Y([73,68,51]),ot=function e(t,n){return void 0===n&&(n=0),(t=Y(t)).length-n<10||!ne(t,st,{offset:n})?n:(n+=function(e,t){void 0===t&&(t=0);var n=(e=Y(e))[t+5],i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&n)>>4?i+20:i+10}(t,n),e(t,n))},ut=(new Uint8Array([79,112,117,115,72,101,97,100]),function(e){return"string"==typeof e?te(e):e}),lt=function(e){e=Y(e);for(var t=[],n=0;e.length>n;){var i=e[n],r=0,a=0,s=e[++a];for(a++;128&s;)r=(127&s)<<7,s=e[a],a++;r+=127&s;for(var o=0;o<A.length;o++){var u=A[o],l=u.id,c=u.parser;if(i===l){t.push(c(e.subarray(a,a+r)));break}}n+=r+a}return t};A=[{id:3,parser:function(e){var t={tag:3,id:e[0]<<8|e[1],flags:e[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(128&t.flags&&(t.dependsOnEsId=e[t.size]<<8|e[t.size+1],t.size+=2),64&t.flags){var n=e[t.size];t.url=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,Y(e));try{return decodeURIComponent(escape(t))}catch(e){}return t}(e.subarray(t.size+1,t.size+1+n)),t.size+=n}return 32&t.flags&&(t.ocrEsId=e[t.size]<<8|e[t.size+1],t.size+=2),t.descriptors=lt(e.subarray(t.size))||[],t}},{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:lt(e.subarray(13))}}},{id:5,parser:function(e){return{tag:5,bytes:e}}},{id:6,parser:function(e){return{tag:6,bytes:e}}}];var ct=function e(t,n,i){void 0===i&&(i=!1),n=function(e){return Array.isArray(e)?e.map(function(e){return ut(e)}):[ut(e)]}(n),t=Y(t);var r=[];if(!n.length)return r;for(var a=0;a<t.length;){var s=(t[a]<<24|t[a+1]<<16|t[a+2]<<8|t[a+3])>>>0,o=t.subarray(a+4,a+8);if(0===s)break;var u=a+s;if(u>t.length){if(i)break;u=t.length}var l=t.subarray(a+8,u);ne(o,n[0])&&(1===n.length?r.push(l):r.push.apply(r,e(l,n.slice(1),i))),a=u}return r},dt={EBML:Y([26,69,223,163]),DocType:Y([66,130]),Segment:Y([24,83,128,103]),SegmentInfo:Y([21,73,169,102]),Tracks:Y([22,84,174,107]),Track:Y([174]),TrackNumber:Y([215]),DefaultDuration:Y([35,227,131]),TrackEntry:Y([174]),TrackType:Y([131]),FlagDefault:Y([136]),CodecID:Y([134]),CodecPr
1ivate:Y([99,162]),VideoTrack:Y([224]),AudioTrack:Y([225]),Cluster:Y([31,67,182,117]),Timestamp:Y([231]),TimestampScale:Y([42,215,177]),BlockGroup:Y([160]),BlockDuration:Y([155]),Block:Y([161]),SimpleBlock:Y([163])},ht=[128,64,32,16,8,4,2,1],pt=function(e,t,n,i){void 0===n&&(n=!0),void 0===i&&(i=!1);var r=function(e){for(var t=1,n=0;n<ht.length&&!(e&ht[n]);n++)t++;return t}(e[t]),a=e.subarray(t,t+r);return n&&((a=Array.prototype.slice.call(e,t,t+r))[0]^=ht[r-1]),{length:r,value:Z(a,{signed:i}),bytes:a}},ft=function e(t){return"string"==typeof t?t.match(/.{1,2}/g).map(function(t){return e(t)}):"number"==typeof t?ee(t):t},mt=function e(t,n,i){if(i>=n.length)return n.length;var r=pt(n,i,!1);if(ne(t.bytes,r.bytes))return i;var a=pt(n,i+r.length);return e(t,n,i+a.length+a.value+r.length)},gt=function e(t,n){n=function(e){return Array.isArray(e)?e.map(function(e){return ft(e)}):[ft(e)]}(n),t=Y(t);var i=[];if(!n.length)return i;for(var r=0;r<t.length;){var a=pt(t,r,!1),s=pt(t,r+a.length),o=r+a.length+s.length;127===s.value&&(s.value=mt(a,t,o),s.value!==t.length&&(s.value-=o));var u=o+s.value>t.length?t.length:o+s.value,l=t.subarray(o,u);ne(n[0],a.bytes)&&(1===n.length?i.push(l):i=i.concat(e(l,n.slice(1)))),r+=a.length+s.length+l.length}return i},vt=Y([0,0,0,1]),yt=Y([0,0,1]),_t=Y([0,0,3]),bt=function(e){for(var t=[],n=1;n<e.length-2;)ne(e.subarray(n,n+3),_t)&&(t.push(n+2),n++),n++;if(0===t.length)return e;var i=e.length-t.length,r=new Uint8Array(i),a=0;for(n=0;n<i;a++,n++)a===t[0]&&(a++,t.shift()),r[n]=e[a];return r},Tt=function(e,t,n,i){void 0===i&&(i=1/0),e=Y(e),n=[].concat(n);for(var r,a=0,s=0;a<e.length&&(s<i||r);){var o=void 0;if(ne(e.subarray(a),vt)?o=4:ne(e.subarray(a),yt)&&(o=3),o){if(s++,r)return bt(e.subarray(r,a));var u=void 0;"h264"===t?u=31&e[a+o]:"h265"===t&&(u=e[a+o]>>1&63),-1!==n.indexOf(u)&&(r=a+o),a+=o+("h264"===t?1:2)}else a++}return e.subarray(0,0)},wt={webm:Y([119,101,98,109]),matroska:Y([109,97,116,114,111,115,107,97]),flac:Y([102,76,97,67]),ogg:Y([79,103,103,83]),ac3:Y([11,119]),riff:Y([82,73,70,70]),avi:Y([65,86,73]),wav:Y([87,65,86,69]),"3gp":Y([102,116,121,112,51,103]),mp4:Y([102,116,121,112]),fmp4:Y([115,116,121,112]),mov:Y([102,116,121,112,113,116]),moov:Y([109,111,111,118]),moof:Y([109,111,111,102])},St={aac:function(e){var t=ot(e);return ne(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=ot(e);return ne(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=gt(e,[dt.EBML,dt.DocType])[0];return ne(t,wt.webm)},mkv:function(e){var t=gt(e,[dt.EBML,dt.DocType])[0];return ne(t,wt.matroska)},mp4:function(e){return!St["3gp"](e)&&!St.mov(e)&&(!(!ne(e,wt.mp4,{offset:4})&&!ne(e,wt.fmp4,{offset:4}))||(!(!ne(e,wt.moof,{offset:4})&&!ne(e,wt.moov,{offset:4}))||void 0))},mov:function(e){return ne(e,wt.mov,{offset:4})},"3gp":function(e){return ne(e,wt["3gp"],{offset:4})},ac3:function(e){var t=ot(e);return ne(e,wt.ac3,{offset:t})},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=ot(e);return ne(e,wt.flac,{offset:t})},ogg:function(e){return ne(e,wt.ogg)},avi:function(e){return ne(e,wt.riff)&&ne(e,wt.avi,{offset:8})},wav:function(e){return ne(e,wt.riff)&&ne(e,wt.wav,{offset:8})},h264:function(e){return function(e,t,n){return Tt(e,"h264",t,n)}(e,7,3).length},h265:function(e){return function(e,t,n){return Tt(e,"h265",t,n)}(e,[32,33],3).length}},kt=Object.keys(St).filter(function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e}).concat(["ts","h264","h265"]);kt.forEach(function(e){var t=St[e];St[e]=function(e){return t(Y(e))}});var Et=St,Ct=function(e){e=Y(e);for(var t=0;t<kt.length;t++){var n=kt[t];if(Et[n](e))return n}return""},At=n(622);function Pt(e){return Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pt(e)}function xt(e){var t="function"==typeof Map?new Map:void 0;return xt=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return _(e,arguments,Pt(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)},xt(e)}for(var It,Ot="7.21.7",Lt={},Dt=function(e,t){return Lt[e]=Lt[e]||[],t&&(Lt[e]=Lt[e].concat(t)),Lt[e]},Mt=function(e,t){var n=Dt(e).indexOf(t);return!(n<=-1)&&(Lt[e]=Lt[e].slice(),Lt[e].splice(n,1),!0)},Rt={prefixed:!0},Nt=[["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"]],Ut=Nt[0],Bt=0;Bt<Nt.length;Bt++)if(Nt[Bt][1]in a()){It=Nt[Bt];break}if(It){for(var jt=0;jt<It.length;jt++)Rt[Ut[jt]]=It[jt];Rt.prefixed=It[0]!==Ut[0]}var Ft=[];var qt=function e(n){var i,r="info",a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i("log",r,t)};return i=function(e,n){return function(i,r,a){var s=n.levels[r],o=new RegExp("^("+s+")$");if("log"!==i&&a.unshift(i.toUpperCase()+":"),a.unshift(e+":"),Ft){Ft.push([].concat(a));var u=Ft.length-1e3;Ft.splice(0,u>0?u:0)}
1if(t().console){var l=t().console[i];l||"debug"!==i||(l=t().console.info||t().console.log),l&&s&&o.test(i)&&l[Array.isArray(a)?"apply":"call"](t().console,a)}}}(n,a),a.createLogger=function(t){return e(n+": "+t)},a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},a.level=function(e){if("string"==typeof e){if(!a.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},(a.history=function(){return Ft?[].concat(Ft):[]}).filter=function(e){return(Ft||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})},a.history.clear=function(){Ft&&(Ft.length=0)},a.history.disable=function(){null!==Ft&&(Ft.length=0,Ft=null)},a.history.enable=function(){null===Ft&&(Ft=[])},a.error=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i("error",r,t)},a.warn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i("warn",r,t)},a.debug=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i("debug",r,t)},a}("VIDEOJS"),Vt=qt.createLogger,Ht=Object.prototype.toString,Wt=function(e){return zt(e)?Object.keys(e):[]};function Gt(e,t){Wt(e).forEach(function(n){return t(e[n],n)})}function $t(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Object.assign?s.apply(void 0,[e].concat(n)):(n.forEach(function(t){t&&Gt(t,function(t,n){e[n]=t})}),e)}function zt(e){return!!e&&"object"==typeof e}function Kt(e){return zt(e)&&"[object Object]"===Ht.call(e)&&e.constructor===Object}function Xt(e,n){if(!e||!n)return"";if("function"==typeof t().getComputedStyle){var i;try{i=t().getComputedStyle(e)}catch(e){return""}return i?i.getPropertyValue(n)||i[n]:""}return""}var Yt,Qt=t().navigator&&t().navigator.userAgent||"",Jt=/AppleWebKit\/([\d.]+)/i.exec(Qt),Zt=Jt?parseFloat(Jt.pop()):null,en=/iPod/i.test(Qt),tn=(Yt=Qt.match(/OS (\d+)_/i))&&Yt[1]?Yt[1]:null,nn=/Android/i.test(Qt),rn=function(){var e=Qt.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}(),an=nn&&rn<5&&Zt<537,sn=/Firefox/i.test(Qt),on=/Edg/i.test(Qt),un=!on&&(/Chrome/i.test(Qt)||/CriOS/i.test(Qt)),ln=function(){var e=Qt.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),cn=function(){var e=/MSIE\s(\d+)\.\d/.exec(Qt),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(Qt)&&/rv:11.0/.test(Qt)&&(t=11),t}(),dn=/Safari/i.test(Qt)&&!un&&!nn&&!on,hn=/Windows/i.test(Qt),pn=Boolean(Tn()&&("ontouchstart"in t()||t().navigator.maxTouchPoints||t().DocumentTouch&&t().document instanceof t().DocumentTouch)),fn=/iPad/i.test(Qt)||dn&&pn&&!/iPhone/i.test(Qt),mn=/iPhone/i.test(Qt)&&!fn,gn=mn||fn||en,vn=(dn||gn)&&!un,yn=Object.freeze({__proto__:null,IS_IPOD:e
1n,IOS_VERSION:tn,IS_ANDROID:nn,ANDROID_VERSION:rn,IS_NATIVE_ANDROID:an,IS_FIREFOX:sn,IS_EDGE:on,IS_CHROME:un,CHROME_VERSION:ln,IE_VERSION:cn,IS_SAFARI:dn,IS_WINDOWS:hn,TOUCH_ENABLED:pn,IS_IPAD:fn,IS_IPHONE:mn,IS_IOS:gn,IS_ANY_SAFARI:vn});function _n(e){return"string"==typeof e&&Boolean(e.trim())}function bn(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Tn(){return a()===t().document}function wn(e){return zt(e)&&1===e.nodeType}function Sn(){try{return t().parent!==t().self}catch(e){return!0}}function kn(e){return function(t,n){if(!_n(t))return a()[e](null);_n(n)&&(n=a().querySelector(n));var i=wn(n)?n:a();return i[e]&&i[e](t)}}function En(e,t,n,i){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var r=a().createElement(e);return Object.getOwnPropertyNames(t).forEach(function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(qt.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?Cn(r,n):r[e]===n&&"tabIndex"!==e||(r[e]=n)}),Object.getOwnPropertyNames(n).forEach(function(e){r.setAttribute(e,n[e])}),i&&Gn(r,i),r}function Cn(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function An(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Pn(e,t){return bn(t),e.classList?e.classList.contains(t):(n=t,new RegExp("(^|\\s)"+n+"($|\\s)")).test(e.className);var n}function xn(e,t){return e.classList?e.classList.add(t):Pn(e,t)||(e.className=(e.className+" "+t).trim()),e}function In(e,t){return e?(e.classList?e.classList.remove(t):(bn(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e):(qt.warn("removeClass was called with an element that doesn't exist"),null)}function On(e,t,n){var i=Pn(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!i),n!==i)return n?xn(e,t):In(e,t),e}function Ln(e,t){Object.getOwnPropertyNames(t).forEach(function(n){var i=t[n];null==i||!1===i?e.removeAttribute(n):e.setAttribute(n,!0===i?"":i)})}function Dn(e){var t={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&e.attributes.length>0)for(var i=e.attributes,r=i.length-1;r>=0;r--){var a=i[r].name,s=i[r].value;"boolean"!=typeof e[a]&&-1===n.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function Mn(e,t){return e.getAttribute(t)}function Rn(e,t,n){e.setAttribute(t,n)}function Nn(e,t){e.removeAttribute(t)}function Un(){a().body.focus(),a().onselectstart=function(){return!1}}function Bn(){a().onselectstart=function(){return!0}}function jn(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(function(e){void 0!==t[e]&&(n[e]=t[e])}),n.height||(n.height=parseFloat(Xt(e,"height"))),n.width||(n.width=parseFloat(Xt(e,"width"))),n}}function Fn(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var t=e.offsetWidth,n=e.offsetHeight,i=0,r=0;e.offsetParent&&e!==a()[Rt.fullscreenElement];)i+=e.offsetLeft,r+=e.offsetTop,e=e.offsetParent;return{left:i,top:r,width:t,height:n}}function qn(e,t){var n={x:0,y:0};if(gn)for(var i=e;i&&"html"!==i.nodeName.toLowerCase();){var r=Xt(i,"transform");
1if(/^matrix/.test(r)){var a=r.slice(7,-1).split(/,\s/).map(Number);n.x+=a[4],n.y+=a[5]}else if(/^matrix3d/.test(r)){var s=r.slice(9,-1).split(/,\s/).map(Number);n.x+=s[12],n.y+=s[13]}i=i.parentNode}var o={},u=Fn(t.target),l=Fn(e),c=l.width,d=l.height,h=t.offsetY-(l.top-u.top),p=t.offsetX-(l.left-u.left);return t.changedTouches&&(p=t.changedTouches[0].pageX-l.left,h=t.changedTouches[0].pageY+l.top,gn&&(p-=n.x,h-=n.y)),o.y=1-Math.max(0,Math.min(1,h/d)),o.x=Math.max(0,Math.min(1,p/c)),o}function Vn(e){return zt(e)&&3===e.nodeType}function Hn(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Wn(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),wn(e)||Vn(e)?e:"string"==typeof e&&/\S/.test(e)?a().createTextNode(e):void 0}).filter(function(e){return e})}function Gn(e,t){return Wn(t).forEach(function(t){return e.appendChild(t)}),e}function $n(e,t){return Gn(Hn(e),t)}function zn(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 Kn,Xn=kn("querySelector"),Yn=kn("querySelectorAll"),Qn=Object.freeze({__proto__:null,isReal:Tn,isEl:wn,isInFrame:Sn,createEl:En,textContent:Cn,prependTo:An,hasClass:Pn,addClass:xn,removeClass:In,toggleClass:On,setAttributes:Ln,getAttributes:Dn,getAttribute:Mn,setAttribute:Rn,removeAttribute:Nn,blockTextSelection:Un,unblockTextSelection:Bn,getBoundingClientRect:jn,findPosition:Fn,getPointerPosition:qn,isTextNode:Vn,emptyEl:Hn,normalizeContent:Wn,appendContent:Gn,insertContent:$n,isSingleLeftClick:zn,$:Xn,$$:Yn}),Jn=!1,Zn=function(){if(!1!==Kn.options.autoSetup){var e=Array.prototype.slice.call(a().getElementsByTagName("video")),t=Array.prototype.slice.call(a().getElementsByTagName("audio")),n=Array.prototype.slice.call(a().getElementsByTagName("video-js")),i=e.concat(t,n);if(i&&i.length>0)for(var r=0,s=i.length;r<s;r++){var o=i[r];if(!o||!o.getAttribute){ei(1);break}void 0===o.player&&null!==o.getAttribute("data-setup")&&Kn(o)}else Jn||ei(1)}};function ei(e,n){Tn()&&(n&&(Kn=n),t().setTimeout(Zn,e))}function ti(){Jn=!0,t().removeEventListener("load",ti)}Tn()&&("complete"===a().readyState?ti():t().addEventListener("load",ti));var ni,ii=function(e){var t=a().createElement("style");return t.className=e,t},ri=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},ai=3;function si(){return ai++}t().WeakMap||(ni=function(){function e(){this.vdata="vdata"+Math.floor(t().performance&&t().performance.now()||Date.now()),this.data={}}var n=e.prototype;return n.set=function(e,t){var n=e[this.vdata]||si();return e[this.vdata]||(e[this.vdata]=n),this.data[n]=t,this},n.get=function(e){var t=e[this.vdata];if(t)return this.data[t];qt("We have no data for this element",e)},n.has=function(e){return e[this.vdata]in this.data},n.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},e}());var oi,ui=t().WeakMap?new WeakMap:new ni;function li(e,t){if(ui.has(e)){var n=ui.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&ui.delete(e)}}function ci(e,t,n,i){n.forEach(function(n){e(t,n,i)})}function di(e){if(e.fixed_)return e;function n(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){var r=e||t().event;for(var s in e={},r)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&"path"!==s&&("returnValue"===s&&r.preventDefault||(e[s]=r[s]));if(e.target||(e.target=e.srcElement||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=n},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),e.isImmediatePropagationStopped=n,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){var o=a().documentElement,u=a().body;e.pageX=e.clientX+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0),e.pageY=e.clientY+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.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 hi=["touchstart","touchmove"];function pi(e,n,i){if(Array.isArray(n))return ci(pi,e,n,i);ui.has(e)||ui.set(e,{});var r=ui.get(e);if(r.handlers||(r.handlers={}),r.handlers[n]||(r.handlers[n]=[]),i.guid||(i.guid=si()),r.handlers[n].push(i),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,n){if(!r.disabled){t=di(t);var i=r.handlers[t.type];if(i)for(var a=i.slice(0),s=0,o=a.length;s<o&&!t.isImmediatePropagationStopped();s++)try{a[s].call(e,t,n)}catch(e){qt.error(e)}}}),1===r.handlers[n].length)if(e.addEventListener){var a=!1;(function(){if("boolean"!=typeof oi){oi=!1;try{var e=Object.defineProperty({},"passive",{get:function(){oi=!0}});t().addEventListener("test",null,e),t().removeEventListener("test",null,e)}catch(e){}}return oi})()&&hi.indexOf(n)>-1&&(a={passive:!0}),e.addEventListener(n,r.dispatcher,a)}else e.attachEvent&&e.attachEvent("on"+n,r.dispatcher)}function fi(e,t,n){if(ui.has(e)){var i=ui.get(e);if(i.handlers){if(Array.isArray(t))return ci(fi,e,t,n);var r=function(e,t){i.handlers[t]=[],li(e,t)};if(void 0!==t){var a=i.handlers[t];if(a)if(n){if(n.guid)for(var s=0;s<a.length;s++)a[s].guid===n.guid&&a.splice(s--,1);li(e,t)}else r(e,t)}else for(var o in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},o)&&r(e,o)}}}
1function mi(e,t,n){var i=ui.has(e)?ui.get(e):{},r=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=di(t),i.dispatcher&&i.dispatcher.call(e,t,n),r&&!t.isPropagationStopped()&&!0===t.bubbles)mi.call(null,r,t,n);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){ui.has(t.target)||ui.set(t.target,{});var a=ui.get(t.target);t.target[t.type]&&(a.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function gi(e,t,n){if(Array.isArray(t))return ci(gi,e,t,n);var i=function i(){fi(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||si(),pi(e,t,i)}function vi(e,t,n){var i=function i(){fi(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||si(),pi(e,t,i)}var yi,_i=Object.freeze({__proto__:null,fixEvent:di,on:pi,off:fi,trigger:mi,one:gi,any:vi}),bi=30,Ti=function(e,t,n){t.guid||(t.guid=si());var i=t.bind(e);return i.guid=n?n+"_"+t.guid:t.guid,i},wi=function(e,n){var i=t().performance.now();return function(){var r=t().performance.now();r-i>=n&&(e.apply(void 0,arguments),i=r)}},Si=function(){};Si.prototype.allowedEvents_={},Si.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},pi(this,e,t),this.addEventListener=n},Si.prototype.addEventListener=Si.prototype.on,Si.prototype.off=function(e,t){fi(this,e,t)},Si.prototype.removeEventListener=Si.prototype.off,Si.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},gi(this,e,t),this.addEventListener=n},Si.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},vi(this,e,t),this.addEventListener=n},Si.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=di(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),mi(this,e)},Si.prototype.dispatchEvent=Si.prototype.trigger,Si.prototype.queueTrigger=function(e){var n=this;yi||(yi=new Map);var i=e.type||e,r=yi.get(this);r||(r=new Map,yi.set(this,r));var a=r.get(i);r.delete(i),t().clearTimeout(a);var s=t().setTimeout(function(){r.delete(i),0===r.size&&(r=null,yi.delete(n)),n.trigger(e)},0);r.set(i,s)};var ki=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},Ei=function(e){return e instanceof Si||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof e[t]})},Ci=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},Ai=function(e,t,n){if(!e||!e.nodeName&&!Ei(e))throw new Error("Invalid target for "+ki(t)+"#"+n+"; must be a DOM node or evented object.")},Pi=function(e,t,n){if(!Ci(e))throw new Error("Invalid event type for "+ki(t)+"#"+n+"; must be a non-empty string or array.")},xi=function(e,t,n){if("function"!=typeof e)throw new Error("Invalid listener for "+ki(t)+"#"+n+"; must be a function.")},Ii=function(e,t,n){var i,r,a,s=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return s?(i=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],a=t[1]):(i=t[0],r=t[1],a=t[2]),Ai(i,e,n),Pi(r,e,n),xi(a,e,n),{isTargetingSelf:s,target:i,type:r,listener:a=Ti(e,a)}},Oi=function(e,t,n,i){Ai(e,e,t),e.nodeName?_i[t](e,n,i):e[t](n,i)},Li={on:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=Ii(this,n,"on"),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(Oi(s,"on",o,u),!a){var l=function(){return e.off(s,o,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,Oi(this,"on","dispose",l),Oi(s,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=Ii(this,n,"one"),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(a)Oi(s,"one",o,u);else{var l=function t(){e.off(s,o,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];u.apply(null,i)};l.guid=u.guid,Oi(s,"one",o,l)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=Ii(this,n,"any"),a=r.isTargetingSelf,s=r.target,o=r.type,u=r.listener;if(a)Oi(s,"any",o,u);else{var l=function t(){e.off(s,o,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];u.apply(null,i)};l.guid=u.guid,Oi(s,"any",o,l)}},off:function(e,t,n){if(!e||Ci(e))fi(this.eventBusEl_,e,t);else{var i=e,r=t;Ai(i,this,"off"),Pi(r,this,"off"),xi(n,this,"off"),n=Ti(this,n),this.off("dispose",n),i.nodeName?(fi(i,r,n),fi(i,"dispose",n)):Ei(i)&&(i.off(r,n),i.off("dispose",n))}},trigger:function(e,t){Ai(this.eventBusEl_,this,"trigger");var n=e&&"string"!=typeof e?e.type:e;if(!Ci(n)){var i="Invalid event type for "+ki(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(i);(this.log||qt).error(i)}return mi(this.eventBusEl_,e,t)}};function Di(e,n){void 0===n&&(n={});var i=n.eventBusKey;if(i){if(!e[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');e.eventBusEl_=e[i]}else e.eventBusEl_=En("span",{className:"vjs-event-bus"});return $t(e,Li),e.eventedCallbacks&&e.eventedCallbacks.forEach(function(e){e()}),e.on("dispose",function(){e.off(),[e,e.el_,e.eventBusEl_].forEach(function(e){e&&ui.has(e)&&ui.delete(e)}),t().setTimeout(function(){e.eventBusEl_=null},0)}),e}var Mi={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),Gt(e,function(e,i){n.state[i]!==e&&((t=t||{})[i]={from:n.state[i],to:e}),n.state[i]=e}),t&&Ei(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Ri(e,t){return $t(e,Mi),e.state=$t({},e.state,t),"function"==typeof e.handleStateChanged&&Ei(e)&&e.on("statechanged",e.handleStateChanged),e}var Ni=function(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toLowerCase()})},Ui=function(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})};function Bi(){for(var e={},t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];
1return n.forEach(function(t){t&&Gt(t,function(t,n){Kt(t)?(Kt(e[n])||(e[n]={}),e[n]=Bi(e[n],t)):e[n]=t})}),e}var ji=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}(),Fi=t().Map?t().Map:ji,qi=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}(),Vi=t().Set?t().Set:qi,Hi=function(){function e(e,t,n){var i=this;if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=Bi({},this.options_),t=this.options_=Bi(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var r=e&&e.id&&e.id()||"no_player";this.id_=r+"_component_"+si()}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 i.addClass(e)}),!1!==t.evented&&(Di(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Ri(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Vi,this.setIntervalIds_=new Vi,this.rafIds_=new Vi,this.namedRafs_=new Fi,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var n=e.prototype;return n.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 t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}},n.isDisposed=function(){return Boolean(this.isDisposed_)},n.player=function(){return this.player_},n.options=function(e){return e?(this.options_=Bi(this.options_,e),this.options_):this.options_},n.el=function(){return this.el_},n.createEl=function(e,t,n){return En(e,t,n)},n.localize=function(e,t,n){void 0===n&&(n=e);var i=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[i],s=i&&i.split("-")[0],o=r&&r[s],u=n;return a&&a[e]?u=a[e]:o&&o[e]&&(u=o[e]),t&&(u=u.replace(/\{(\d+)\}/g,function(e,n){var i=t[n-1],r=i;return void 0===i&&(r=e),r})),u},n.handleLanguagechange=function(){},n.contentEl=function(){return this.contentEl_||this.el_},n.id=function(){return this.id_},n.name=function(){return this.name_},n.children=function(){return this.children_},n.getChildById=function(e){return this.childIndex_[e]},n.getChild=function(e){if(e)return this.childNameIndex_[e]},n.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 i=this,r=0;r<t.length;r++)if(!(i=i.getChild(t[r]))||!i.getChild)return;return i},n.addChild=function(t,n,i){var r,a;if(void 0===n&&(n={}),void 0===i&&(i=this.children_.length),"string"==typeof t){a=Ui(t);var s=n.componentClass||a;n.name=a;var o=e.getComponent(s);if(!o)throw new Error("Component "+s+" does not exist");if("function"!=typeof o)return null;r=new o(this.player_||this,n)}else r=t;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(i,0,r),r.parentComponent_=this,"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(a=a||r.name&&Ui(r.name()))&&(this.childNameIndex_[a]=r,this.childNameIndex_[Ni(a)]=r),"function"==typeof r.el&&r.el()){var u=null;this.children_[i+1]&&(this.children_[i+1].el_?u=this.children_[i+1].el_:wn(this.children_[i+1])&&(u=this.children_[i+1])),this.contentEl().insertBefore(r.el(),u)}return r},n.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Ui(e.name())]=null,this.childNameIndex_[Ni(e.name())]=null;var i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},n.initChildren=function(){var t=this,n=this.options_.children;if(n){var i,r=this.options_,a=e.getComponent("Tech");(i=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter(function(e){return!i.some(function(t){return"string"==typeof t?e===t:e===t.name})})).map(function(e){var i,r;return"string"==typeof e?r=n[i=e]||t.options_[i]||{}:(i=e.name,r=e),{name:i,opts:r}}).filter(function(t){var n=e.getComponent(t.opts.componentClass||Ui(t.name));return n&&!a.isTech(n)}
1).forEach(function(e){var n=e.name,i=e.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=t.options_.playerOptions;var a=t.addChild(n,i);a&&(t[n]=a)}})}},n.buildCSSClass=function(){return""},n.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))},n.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)},n.$=function(e,t){return Xn(e,t||this.contentEl())},n.$$=function(e,t){return Yn(e,t||this.contentEl())},n.hasClass=function(e){return Pn(this.el_,e)},n.addClass=function(e){xn(this.el_,e)},n.removeClass=function(e){In(this.el_,e)},n.toggleClass=function(e,t){On(this.el_,e,t)},n.show=function(){this.removeClass("vjs-hidden")},n.hide=function(){this.addClass("vjs-hidden")},n.lockShowing=function(){this.addClass("vjs-lock-showing")},n.unlockShowing=function(){this.removeClass("vjs-lock-showing")},n.getAttribute=function(e){return Mn(this.el_,e)},n.setAttribute=function(e,t){Rn(this.el_,e,t)},n.removeAttribute=function(e){Nn(this.el_,e)},n.width=function(e,t){return this.dimension("width",e,t)},n.height=function(e,t){return this.dimension("height",e,t)},n.dimensions=function(e,t){this.width(e,!0),this.height(t)},n.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var i=this.el_.style[e],r=i.indexOf("px");return-1!==r?parseInt(i.slice(0,r),10):parseInt(this.el_["offset"+Ui(e)],10)},n.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=Xt(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+Ui(e);t=this.el_[n]}return t},n.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},n.currentWidth=function(){return this.currentDimension("width")},n.currentHeight=function(){return this.currentDimension("height")},n.focus=function(){this.el_.focus()},n.blur=function(){this.el_.blur()},n.handleKeyDown=function(e){this.player_&&(u().isEventKey(e,"Tab")||e.stopPropagation(),this.player_.handleKeyDown(e))},n.handleKeyPress=function(e){this.handleKeyDown(e)},n.emitTapEvents=function(){var e,n=0,i=null;this.on("touchstart",function(r){1===r.touches.length&&(i={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},n=t().performance.now(),e=!0)}),this.on("touchmove",function(t){if(t.touches.length>1)e=!1;else if(i){var n=t.touches[0].pageX-i.pageX,r=t.touches[0].pageY-i.pageY;Math.sqrt(n*n+r*r)>10&&(e=!1)}});var r=function(){e=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",function(r){(i=null,!0===e)&&(t().performance.now()-n<200&&(r.preventDefault(),this.trigger("tap")))})},n.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=Ti(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)}},n.setTimeout=function(e,n){var i,r=this;return e=Ti(this,e),this.clearTimersOnDispose_(),i=t().setTimeout(function(){r.setTimeoutIds_.has(i)&&r.setTimeoutIds_.delete(i),e()},n),this.setTimeoutIds_.add(i),i},n.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),t().clearTimeout(e)),e},n.setInterval=function(e,n){e=Ti(this,e),this.clearTimersOnDispose_();var i=t().setInterval(e,n);return this.setIntervalIds_.add(i),i},n.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),t().clearInterval(e)),e},n.requestAnimationFrame=function(e){var n,i=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=Ti(this,e),n=t().requestAnimationFrame(function(){i.rafIds_.has(n)&&i.rafIds_.delete(n),e()}),this.rafIds_.add(n),n):this.setTimeout(e,1e3/60)},n.requestNamedAnimationFrame=function(e,t){var n=this;if(!this.namedRafs_.has(e)){this.clearTimersOnDispose_(),t=Ti(this,t);var i=this.requestAnimationFrame(function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)});return this.namedRafs_.set(e,i),e}},n.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},n.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),t().cancelAnimationFrame(e)),e):this.clearTimeout(e)},n.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEac
1h(function(t){var n=t[0],i=t[1];e[n].forEach(function(t,n){return e[i](n)})}),e.clearingTimersOnDispose_=!1}))},e.registerComponent=function(t,n){if("string"!=typeof t||!t)throw new Error('Illegal component name, "'+t+'"; must be a non-empty string.');var i,r=e.getComponent("Tech"),a=r&&r.isTech(n),s=e===n||e.prototype.isPrototypeOf(n.prototype);if(a||!s)throw i=a?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+t+'"; '+i+".");t=Ui(t),e.components_||(e.components_={});var o=e.getComponent("Player");if("Player"===t&&o&&o.players){var u=o.players,l=Object.keys(u);if(u&&l.length>0&&l.map(function(e){return u[e]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return e.components_[t]=n,e.components_[Ni(t)]=n,n},e.getComponent=function(t){if(t&&e.components_)return e.components_[t]},e}();function Wi(e,t,n,i){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,i,n.length-1),n[i][t]}function Gi(e){var n;return n=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:Wi.bind(null,"start",0,e),end:Wi.bind(null,"end",1,e)},t().Symbol&&t().Symbol.iterator&&(n[t().Symbol.iterator]=function(){return(e||[]).values()}),n}function $i(e,t){return Array.isArray(e)?Gi(e):void 0===e||void 0===t?Gi():Gi([[e,t]])}function zi(e,t){var n,i,r=0;if(!t)return 0;e&&e.length||(e=$i(0,0));for(var a=0;a<e.length;a++)n=e.start(a),(i=e.end(a))>t&&(i=t),r+=i-n;return r/t}function Ki(e){if(e instanceof Ki)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:zt(e)&&("number"==typeof e.code&&(this.code=e.code),$t(this,e)),this.message||(this.message=Ki.defaultMessages[this.code]||"")}Hi.prototype.supportsRaf_="function"==typeof t().requestAnimationFrame&&"function"==typeof t().cancelAnimationFrame,Hi.registerComponent("Component",Hi),Ki.prototype.code=0,Ki.prototype.message="",Ki.prototype.status=null,Ki.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Ki.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 Xi=0;Xi<Ki.errorTypes.length;Xi++)Ki[Ki.errorTypes[Xi]]=Xi,Ki.prototype[Ki.errorTypes[Xi]]=Xi;function Yi(e){return null!=e&&"function"==typeof e.then}function Qi(e){Yi(e)&&e.then(null,function(e){})}var Ji=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(t,n,i){return e[n]&&(t[n]=e[n]),t},{cues:e.cues&&Array.prototype.map.call(e.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})},Zi=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=Ji(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===n.indexOf(e)}).map(Ji))},er=function(e,t){return e.forEach(function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(function(e){return n.addCue(e)})}),t.textTracks()},tr="vjs-modal-dialog",nr=function(e){function n(t,n){var i;return(i=e.call(this,t,n)||this).handleKeyDown_=function(e){return i.handleKeyDown(e)},i.close_=function(e){return i.close(e)},i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=En("div",{className:tr+"-content"},{role:"document"}),i.descEl_=En("p",{className:tr+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),Cn(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}d(n,e);var i=n.prototype;return i.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"})},i.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},i.buildCSSClass=function(){return tr+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},i.label=function(){return this.localize(this.options_.label||"Modal Window")},i.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},i.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
1n&&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}},i.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},i.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()}},i.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var i=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=i,this.on(n,"close",this.close_)}!t&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_},i.fill=function(){this.fillWith(this.content())},i.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,i=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),$n(t,e),this.trigger("modalfill"),i?n.insertBefore(t,i):n.appendChild(t);var r=this.getChild("closeButton");r&&n.appendChild(r.el_)},i.empty=function(){this.trigger("beforemodalempty"),Hn(this.contentEl()),this.trigger("modalempty")},i.content=function(e){return void 0!==e&&(this.content_=e),this.content_},i.conditionalFocus_=function(){var e=a().activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},i.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},i.handleKeyDown=function(e){if(e.stopPropagation(),u().isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(u().isEventKey(e,"Tab")){for(var t,n=this.focusableEls_(),i=this.el_.querySelector(":focus"),r=0;r<n.length;r++)if(i===n[r]){t=r;break}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())}},i.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,function(e){return(e instanceof t().HTMLAnchorElement||e instanceof t().HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof t().HTMLInputElement||e instanceof t().HTMLSelectElement||e instanceof t().HTMLTextAreaElement||e instanceof t().HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof t().HTMLIFrameElement||e instanceof t().HTMLObjectElement||e instanceof t().HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")})},n}(Hi);nr.prototype.options_={pauseOnOpen:!0,temporary:!0},Hi.registerComponent("ModalDialog",nr);var ir=function(e){function t(t){var n;void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(l(n),"length",{get:function(){return this.tracks_.length}});for(var i=0;i<t.length;i++)n.addTrack(t[i]);return n}d(t,e);var n=t.prototype;return n.addTrack=function(e){var t=this,n=this.tracks_.length;""+n in this||Object.defineProperty(this,n,{get:function(){return this.tracks_[n]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},Ei(e)&&e.addEventListener("labelchange",e.labelchange_)},n.removeTrack=function(e){for(var t,n=0,i=this.length;n<i;n++)if(this[n]===e){(t=this[n]).off&&t.off(),this.tracks_.splice(n,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},n.getTrackById=function(e){for(var t=null,n=0,i=this.length;n<i;n++){var r=this[n];if(r.id===e){t=r;break}}return t},t}(Si);for(var rr in ir.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},ir.prototype.allowedEvents_)ir.prototype["on"+rr]=null;var ar=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)},sr=function(e){function t(t){var n;void 0===t&&(t=[]);for(var i=t.length-1;i>=0;i--)if(t[i].enabled){ar(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,n}d(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&ar(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,ar(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(ir),or=function(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)},ur=function(e){function t(t){var n;void 0===t&&(t=[]);for(var i=t.length-1;i>=0;i--)if(t[i].selected){or(t,t[i]);break}return(n=e.call(this,t)||this).changing_=!1,Object.defineProperty(l(n),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),n}d(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&or(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,or(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(ir),lr=function(e){function t(){return e.apply(this,arguments)||this}d(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(t.kind)&&t.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}(ir),cr=function(){function e(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}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]}}
1),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},t.getTrackElementByTrack_=function(e){for(var t,n=0,i=this.trackElements_.length;n<i;n++)if(e===this.trackElements_[n].track){t=this.trackElements_[n];break}return t},t.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},e}(),dr=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,n=0,i=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<i)for(n=t;n<i;n++)r.call(this,n)},t.getCueById=function(e){for(var t=null,n=0,i=this.length;n<i;n++){var r=this[n];if(r.id===e){t=r;break}}return t},e}(),hr={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},pr={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},fr={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},mr={disabled:"disabled",hidden:"hidden",showing:"showing"},gr=function(e){function t(t){var n;void 0===t&&(t={}),n=e.call(this)||this;var i={id:t.id||"vjs_track_"+si(),kind:t.kind||"",language:t.language||""},r=t.label||"",a=function(e){Object.defineProperty(l(n),e,{get:function(){return i[e]},set:function(){}})};for(var s in i)a(s);return Object.defineProperty(l(n),"label",{get:function(){return r},set:function(e){e!==r&&(r=e,this.trigger("labelchange"))}}),n}return d(t,e),t}(Si),vr=function(e){var n=["protocol","hostname","port","pathname","search","hash","host"],i=a().createElement("a");i.href=e;for(var r={},s=0;s<n.length;s++)r[n[s]]=i[n[s]];return"http:"===r.protocol&&(r.host=r.host.replace(/:80$/,"")),"https:"===r.protocol&&(r.host=r.host.replace(/:443$/,"")),r.protocol||(r.protocol=t().location.protocol),r.host||(r.host=t().location.host),r},yr=function(e){if(!e.match(/^https?:\/\//)){var t=a().createElement("a");t.href=e,e=t.href}return e},_r=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},br=function(e,n){void 0===n&&(n=t().location);var i=vr(e);return(":"===i.protocol?n.protocol:i.protocol)+i.host!==n.protocol+n.host},Tr=Object.freeze({__proto__:null,parseUrl:vr,getAbsoluteURL:yr,getFileExtension:_r,isCrossOrigin:br}),wr=function(e,n){var i=new(t().WebVTT.Parser)(t(),t().vttjs,t().WebVTT.StringDecoder()),r=[];i.oncue=function(e){n.addCue(e)},i.onparsingerror=function(e){r.push(e)},i.onflush=function(){n.trigger({type:"loadeddata",target:n})},i.parse(e),r.length>0&&(t().console&&t().console.groupCollapsed&&t().console.groupCollapsed("Text Track parsing errors for "+n.src),r.forEach(function(e){return qt.error(e)}),t().console&&t().console.groupEnd&&t().console.groupEnd()),i.flush()},Sr=function(e,n){var i={uri:e},r=br(e);r&&(i.cors=r);var a="use-credentials"===n.tech_.crossOrigin();a&&(i.withCredentials=a),m()(i,Ti(this,function(e,i,r){if(e)return qt.error(e,i);n.loaded_=!0,"function"!=typeof t().WebVTT?n.tech_&&n.tech_.any(["vttjsloaded","vttjserror"],function(e){if("vttjserror"!==e.type)return wr(r,n);qt.error("vttjs failed to load, stopping trying to process "+n.src)}):wr(r,n)}))},kr=function(e){function n(t){var n;if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var i=Bi(t,{kind:fr[t.kind]||"subtitles",language:t.language||t.srclang||""}),r=mr[i.mode]||"disabled",a=i.default;"metadata"!==i.kind&&"chapters"!==i.kind||(r="hidden"),(n=e.call(this,i)||this).tech_=i.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var s=new dr(n.cues_),o=new dr(n.activeCues_),u=!1;n.timeupdateHandler=Ti(l(n),function(e){void 0===e&&(e={}),this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,u&&(this.trigger("cuechange"),u=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))});return n.tech_.one("dispose",function(){n.stopTracking()}),"disabled"!==r&&n.startTracking(),Object.defineProperties(l(n),{default:{get:function(){return a}
1,set:function(){}},mode:{get:function(){return r},set:function(e){mr[e]&&r!==e&&(r=e,this.preload_||"disabled"===r||0!==this.cues.length||Sr(this.src,this),this.stopTracking(),"disabled"!==r&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?s:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var e=this.tech_.currentTime(),t=[],n=0,i=this.cues.length;n<i;n++){var r=this.cues[n];(r.startTime<=e&&r.endTime>=e||r.startTime===r.endTime&&r.startTime<=e&&r.startTime+.5>=e)&&t.push(r)}if(u=!1,t.length!==this.activeCues_.length)u=!0;else for(var a=0;a<t.length;a++)-1===this.activeCues_.indexOf(t[a])&&(u=!0);return this.activeCues_=t,o.setCues_(this.activeCues_),o},set:function(){}}}),i.src?(n.src=i.src,n.preload_||(n.loaded_=!0),(n.preload_||"subtitles"!==i.kind&&"captions"!==i.kind)&&Sr(n.src,l(n))):n.loaded_=!0,n}d(n,e);var i=n.prototype;return i.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)},i.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)},i.addCue=function(e){var n=e;if(!("getCueAsHTML"in n)){for(var i in n=new(t().vttjs.VTTCue)(e.startTime,e.endTime,e.text),e)i in n||(n[i]=e[i]);n.id=e.id,n.originalCue_=e}for(var r=this.tech_.textTracks(),a=0;a<r.length;a++)r[a]!==this&&r[a].removeCue(n);this.cues_.push(n),this.cues.setCues_(this.cues_)},i.removeCue=function(e){for(var t=this.cues_.length;t--;){var n=this.cues_[t];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},n}(gr);kr.prototype.allowedEvents_={cuechange:"cuechange"};var Er=function(e){function t(t){var n;void 0===t&&(t={});var i=Bi(t,{kind:pr[t.kind]||""});n=e.call(this,i)||this;var r=!1;return Object.defineProperty(l(n),"enabled",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("enabledchange"))}}),i.enabled&&(n.enabled=i.enabled),n.loaded_=!0,n}return d(t,e),t}(gr),Cr=function(e){function t(t){var n;void 0===t&&(t={});var i=Bi(t,{kind:hr[t.kind]||""});n=e.call(this,i)||this;var r=!1;return Object.defineProperty(l(n),"selected",{get:function(){return r},set:function(e){"boolean"==typeof e&&e!==r&&(r=e,this.trigger("selectedchange"))}}),i.selected&&(n.selected=i.selected),n}return d(t,e),t}(gr),Ar=function(e){function t(t){var n,i;void 0===t&&(t={}),n=e.call(this)||this;var r=new kr(t);return n.kind=r.kind,n.src=r.src,n.srclang=r.language,n.label=r.label,n.default=r.default,Object.defineProperties(l(n),{readyState:{get:function(){return i}},track:{get:function(){return r}}}),i=0,r.addEventListener("loadeddata",function(){i=2,n.trigger({type:"load",target:l(n)})}),n}return d(t,e),t}(Si);Ar.prototype.allowedEvents_={load:"load"},Ar.NONE=0,Ar.LOADING=1,Ar.LOADED=2,Ar.ERROR=3;var Pr={audio:{ListClass:sr,TrackClass:Er,capitalName:"Audio"},video:{ListClass:ur,TrackClass:Cr,capitalName:"Video"},text:{ListClass:lr,TrackClass:kr,capitalName:"Text"}};Object.keys(Pr).forEach(function(e){Pr[e].getterName=e+"Tracks",Pr[e].privateName=e+"Tracks_"});var xr={remoteText:{ListClass:lr,TrackClass:kr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:cr,TrackClass:Ar,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Ir=s({},Pr,xr);xr.names=Object.keys(xr),Pr.names=Object.keys(Pr),Ir.names=[].concat(xr.names).concat(Pr.names);var Or=function(e){function n(t,n){var i;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(i=e.call(this,null,t,n)||this).onDurationChange_=function(e){return i.onDurationChange(e)},i.trackProgress_=function(e){return i.trackProgress(e)},i.trackCurrentTime_=function(e){return i.trackCurrentTime(e)},i.stopTrackingCurrentTime_=function(e){return i.stopTrackingCurrentTime(e)},i.disposeSourceHandler_=function(e){return i.disposeSourceHandler(e)},i.queuedHanders_=new Set,i.hasStarted_=!1,i.on("playing",function(){this.hasStarted_=!0}),i.on("loadstart",function(){this.hasStarted_=!1}
vendor: 2,652 bytes, line 1
1),Ir.names.forEach(function(e){var n=Ir[e];t&&t[n.getterName]&&(i[n.privateName]=t[n.getterName])}),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(e){!1===t["native"+e+"Tracks"]&&(i["featuresNative"+e+"Tracks"]=!1)}),!1===t.nativeCaptions||!1===t.nativeTextTracks?i.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.preloadTextTracks=!1!==t.preloadTextTracks,i.autoRemoteTextTracks_=new Ir.text.ListClass,i.initTrackListeners(),t.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}d(n,e);var i=n.prototype;return i.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"})},i.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},i.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},i.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ti(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)},i.onDurationChange=function(e){this.duration_=this.duration()},i.buffered=function(){return $i(0,0)},i.bufferedPercent=function(){return zi(this.buffered(),this.duration_)},i.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},i.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},i.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},i.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},i.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.dispose=function(){this.clearTracks(Pr.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},i.clearTracks=function(e){var t=this;
1(e=[].concat(e)).forEach(function(e){for(var n=t[e+"Tracks"]()||[],i=n.length;i--;){var r=n[i];"text"===e&&t.removeRemoteTextTrack(r),n.removeTrack(r)}})},i.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var n=e[t];this.removeRemoteTextTrack(n)}},i.reset=function(){},i.crossOrigin=function(){},i.setCrossOrigin=function(){},i.error=function(e){return void 0!==e&&(this.error_=new Ki(e),this.trigger("error")),this.error_},i.played=function(){return this.hasStarted_?$i(0,0):$i()},i.play=function(){},i.setScrubbing=function(){},i.scrubbing=function(){},i.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.initTrackListeners=function(){var e=this;Pr.names.forEach(function(t){var n=Pr[t],i=function(){e.trigger(t+"trackchange")},r=e[n.getterName]();r.addEventListener("removetrack",i),r.addEventListener("addtrack",i),e.on("dispose",function(){r.removeEventListener("removetrack",i),r.removeEventListener("addtrack",i)})})},i.addWebVttScript_=function(){var e=this;if(!t().WebVTT)if(a().body.contains(this.el())){if(!this.options_["vtt.js"]&&Kt(v())&&Object.keys(v()).length>0)return void this.trigger("vttjsloaded");var n=a().createElement("script");n.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",n.onload=function(){e.trigger("vttjsloaded")},n.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){n.onload=null,n.onerror=null}),t().WebVTT=!0,this.el().parentNode.appendChild(n)}else this.ready(this.addWebVttScript_)},i.emulateTextTracks=function(){var e=this,t=this.textTracks(),n=this.remoteTextTracks(),i=function(e){return t.addTrack(e.track)},r=function(e){return t.removeTrack(e.track)};n.on("addtrack",i),n.on("removetrack",r),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e<t.length;e++){var n=t[e];n.removeEventListener("cuechange",a),"showing"===n.mode&&n.addEventListener("cuechange",a)}};s(),t.addEventListener("change",s),t.addEventListener("addtrack",s),t.addEventListener("removetrack",s),this.on("dispose",function(){n.off("addtrack",i),n.off("removetrack",r),t.removeEventListener("change",s),t.removeEventListener("addtrack",s),t.removeEventListener("removetrack",s);for(var e=0;e<t.length;e++){t[e].removeEventListener("cuechange",a)}})},i.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,i,r){void 0===r&&(r={});var a=e.textTracks();r.kind=t,n&&(r.label=n),i&&(r.language=i),r.tech=e;var s=new Ir.text.TrackClass(r);return a.addTrack(s),s}(this,e,t,n)},i.createRemoteTextTrack=function(e){var t=Bi(e,{tech:this});return new xr.remoteTextEl.TrackClass(t)},i.addRemoteTextTrack=function(e,t){var n=this;void 0===e&&(e={});var i=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(qt.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_(i),this.remoteTextTracks().addTrack(i.track),!0!==t&&this.ready(function(){return n.autoRemoteTextTracks_.addTrack(i.track)}),i},i.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},i.getVideoPlaybackQuality=function(){return{}},i.requestPictureInPicture=function(){var e=this.options_.Promise||t().Promise;if(e)return e.reject()},i.disablePictureInPicture=function(){return!0},i.setDisablePictureInPicture=function(){},i.requestVideoFrameCallback=function(e){var t=this,n=si();return!this.isReady_||this.paused()?(this.queuedHanders_.add(n),this.one("playing",function(){t.queuedHanders_.has(n)&&(t.queuedH
1anders_.delete(n),e())})):this.requestNamedAnimationFrame(n,e),n},i.cancelVideoFrameCallback=function(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)},i.setPoster=function(){},i.playsinline=function(){},i.setPlaysinline=function(){},i.overrideNativeAudioTracks=function(){},i.overrideNativeVideoTracks=function(){},i.canPlayType=function(){return""},n.canPlayType=function(){return""},n.canPlaySource=function(e,t){return n.canPlayType(e.type)},n.isTech=function(e){return e.prototype instanceof n||e instanceof n||e===n},n.registerTech=function(e,t){if(n.techs_||(n.techs_={}),!n.isTech(t))throw new Error("Tech "+e+" must be a Tech");if(!n.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!n.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Ui(e),n.techs_[e]=t,n.techs_[Ni(e)]=t,"Tech"!==e&&n.defaultTechOrder_.push(e),t},n.getTech=function(e){if(e)return n.techs_&&n.techs_[e]?n.techs_[e]:(e=Ui(e),t()&&t().videojs&&t().videojs[e]?(qt.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),t().videojs[e]):void 0)},n}(Hi);Ir.names.forEach(function(e){var t=Ir[e];Or.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),Or.prototype.featuresVolumeControl=!0,Or.prototype.featuresMuteControl=!0,Or.prototype.featuresFullscreenResize=!1,Or.prototype.featuresPlaybackRate=!1,Or.prototype.featuresProgressEvents=!1,Or.prototype.featuresSourceset=!1,Or.prototype.featuresTimeupdateEvents=!1,Or.prototype.featuresNativeTextTracks=!1,Or.prototype.featuresVideoFrameCallback=!1,Or.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var i=e.sourceHandlers;
vendor: 7,567 bytes, line 1
1i||(i=e.sourceHandlers=[]),void 0===n&&(n=i.length),i.splice(n,0,t)},e.canPlayType=function(t){for(var n,i=e.sourceHandlers||[],r=0;r<i.length;r++)if(n=i[r].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,n){for(var i=e.sourceHandlers||[],r=0;r<i.length;r++)if(i[r].canHandleSource(t,n))return i[r];return null},e.canPlaySource=function(t,n){var i=e.selectSourceHandler(t,n);return i?i.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(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:qt.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,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)}},Hi.registerComponent("Tech",Or),Or.registerTech("Tech",Or),Or.defaultTechOrder_=[];var Lr={},Dr={},Mr={};function Rr(e,t,n){e.setTimeout(function(){return qr(t,Lr[t.type],n,e)},1)}function Nr(e,t,n,i){void 0===i&&(i=null);var r="call"+Ui(n),a=e.reduce(Fr(r),i),s=a===Mr,o=s?null:t[n](a);return function(e,t,n,i){for(var r=e.length-1;r>=0;r--){var a=e[r];a[t]&&a[t](i,n)}}(e,n,o,s),o}var Ur={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Br={setCurrentTime:1,setMuted:1,setVolume:1},jr={play:1,pause:1};function Fr(e){return function(t,n){return t===Mr?Mr:n[e]?n[e](t):t}}function qr(e,t,n,i,r,a){void 0===e&&(e={}),void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===a&&(a=!1);var s=t,o=s[0],u=s.slice(1);if("string"==typeof o)qr(e,Lr[o],n,i,r,a);else if(o){var l=function(e,t){var n=Dr[e.id()],i=null;if(null==n)return i=t(e),Dr[e.id()]=[[t,i]],i;for(var r=0;r<n.length;r++){var a=n[r],s=a[0],o=a[1];s===t&&(i=o)}return null===i&&(i=t(e),n.push([t,i])),i}(i,o);if(!l.setSource)return r.push(l),qr(e,u,n,i,r,a);l.setSource($t({},e),function(t,s){if(t)return qr(e,u,n,i,r,a);r.push(l),qr(s,e.type===s.type?u:Lr[s.type],n,i,r,a)})}else u.length?qr(e,u,n,i,r,a):a?n(e,r):qr(e,Lr["*"],n,i,r,!0)}var Vr={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Hr=function(e){void 0===e&&(e="");var t=_r(e);return Vr[t.toLowerCase()]||""},Wr=function e(t){if(Array.isArray(t)){var n=[];t.forEach(function(t){t=e(t),Array.isArray(t)?n=n.concat(t):zt(t)&&n.push(t)}),t=n}else t="string"==typeof t&&t.trim()?[Gr({src:t})]:zt(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Gr(t)]:[];return t};function Gr(e){if(!e.type){var t=Hr(e.src);t&&(e.type=t)}return e}var $r=function(e){function t(t,n,i){var r,a=Bi({createEl:!1},n);if(r=e.call(this,t,a,i)||this,n.playerOptions.sources&&0!==n.playerOptions.sources.length)t.src(n.playerOptions.sources);else for(var s=0,o=n.playerOptions.techOrder;s<o.length;s++){var u=Ui(o[s]),l=Or.getTech(u);if(u||(l=Hi.getComponent(u)),l&&l.isSupported()){t.loadTech_(u);break}}return r}return d(t,e),t}(Hi);Hi.registerComponent("MediaLoader",$r);var zr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).options_.controlText&&i.controlText(i.options_.controlText),i.handleMouseOver_=function(e){return i.handleMouseOver(e)},i.handleMouseOut_=function(e){return i.handleMouseOut(e)},i.handleClick_=function(e){return i.handleClick(e)},i.handleKeyDown_=function(e){return i.handleKeyDown(e)},i.emitTapEvents(),i.enable(),i}d(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=$t({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&qt.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=$t({role:"button"},n),this.tabIndex_=t.tabIndex;var i=En(e,t,n);return i.appendChild(En("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(i),i},n.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},n.createControlTextEl=function(e){return this.controlTextEl_=En("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},n.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,Cn(this.controlTextEl_,n),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",n)},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){u().isEventKey(t,"Space")||u().isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(Hi);Hi.registerComponent("ClickableComponent",zr);var Kr=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update(),i.update_=function(e){return i.update(e)},t.on("posterchange",i.update_),i}d(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 En("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)||(cn||on)&&t||this.player_.tech(!0).focus(),this.player_.paused()?Qi(this.player_.play()):this.player_.pause()}},t}(zr);Hi.registerComponent("PosterImage",Kr);var Xr="#222",Yr={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',
1script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Qr(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 Jr(e,t,n){try{e.style[t]=n}catch(e){return}}var Zr=function(e){function n(n,i,r){var a;a=e.call(this,n,i,r)||this;var s=function(e){return a.updateDisplay(e)};return n.on("loadstart",function(e){return a.toggleDisplay(e)}),n.on("texttrackchange",s),n.on("loadedmetadata",function(e){return a.preselectTrack(e)}),n.ready(Ti(l(a),function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",s),n.on("playerresize",s),t().addEventListener("orientationchange",s),n.on("dispose",function(){return t().removeEventListener("orientationchange",s)});for(var e=this.options_.playerOptions.tracks||[],i=0;i<e.length;i++)this.player_.addRemoteTextTrack(e[i],!0);this.preselectTrack()}})),a}d(n,e);var i=n.prototype;return i.preselectTrack=function(){for(var e,t,n,i={captions:1,subtitles:1},r=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,s=0;s<r.length;s++){var o=r[s];a&&a.enabled&&a.language&&a.language===o.language&&o.kind in i?o.kind===a.kind?n=o:n||(n=o):a&&!a.enabled?(n=null,e=null,t=null):o.default&&("descriptions"!==o.kind||e?o.kind in i&&!t&&(t=o):e=o)}n?n.mode="showing":t?t.mode="showing":e&&(e.mode="showing")},i.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},i.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},i.clearDisplay=function(){"function"==typeof t().WebVTT&&t().WebVTT.processCues(t(),[],this.el_)},i.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var n=[],i=0;i<e.length;++i){var r=e[i];"showing"===r.mode&&n.push(r)}this.updateForTrack(n)}else{for(var a=null,s=null,o=e.length;o--;){var u=e[o];"showing"===u.mode&&("descriptions"===u.kind?a=u:s=u)}s?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):a&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a))}},i.updateDisplayState=function(e){for(var n=this.player_.textTrackSettings.getValues(),i=e.activeCues,r=i.length;r--;){var a=i[r];if(a){var s=a.displayState;if(n.color&&(s.firstChild.style.color=n.color),n.textOpacity&&Jr(s.firstChild,"color",Qr(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(s.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&Jr(s.firstChild,"backgroundColor",Qr(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?Jr(s,"backgroundColor",Qr(n.windowColor,n.windowOpacity)):s.style.backgroundColor=n.windowColor),n.edgeStyle&&("dropshadow"===n.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+Xr:"raised"===n.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+Xr:"depressed"===n.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+Xr:"uniform"===n.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+Xr)),n.fontPercent&&1!==n.fontPercent){var o=t().parseFloat(s.style.fontSize);s.style.fontSize=o*n.fontPercent+"px",s.style.height="auto",s.style.top="auto"}n.fontFamily&&"default"!==n.fontFamily&&("small-caps"===n.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=Yr[n.fontFamily])}}},i.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof t().WebVTT&&!e.every(function(e){return!e.activeCues})){for(var n=[],i=0;i<e.length;++i)for(var r=e[i],a=0;a<r.activeCues.length;++a)n.push(r.activeCues[a]);t().WebVTT.processCues(t(),n,this.el_);for(var s=0;s<e.length;++s){for(var o=e[s],u=0;u<o.activeCues.length;++u){var l=o.activeCues[u].displayState;xn(l,"vjs-text-track-cue"),xn(l,"vjs-text-track-cue-"+(o.language?o.language:s)),o.language&&Rn(l,"lang",o.language)}this.player_.textTrackSettings&&this.updateDisplayState(o)}}},n}(Hi);Hi.registerComponent("TextTrackDisplay",Zr);var ea=function(e){function t(){return e.apply(this,arguments)||this}return d(t,e),t.prototype.createEl=function(){var t=this.player_.isAudio(),n=this.localize(t?"Audio Player":"
1Video Player"),i=En("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[n])}),r=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(i),r},t}(Hi);Hi.registerComponent("LoadingSpinner",ea);var ta=function(e){function t(){return e.apply(this,arguments)||this}d(t,e);var n=t.prototype;return n.createEl=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var i=En("button",t=$t({className:this.buildCSSClass()},t),n=$t({type:"button"},n));return i.appendChild(En("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(i),i},n.addChild=function(e,t){void 0===t&&(t={});var n=this.constructor.name;return qt.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Hi.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){u().isEventKey(t,"Space")||u().isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},t}(zr);Hi.registerComponent("Button",ta);var na=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).mouseused_=!1,i.on("mousedown",function(e){return i.handleMouseDown(e)}),i}d(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 Qi(t),void(!this.player_.tech(!0)||(cn||on)&&n||this.player_.tech(!0).focus())}var i=this.player_.getChild("controlBar"),r=i&&i.getChild("playToggle");if(r){var a=function(){return r.focus()};Yi(t)?t.then(a,function(){}):this.setTimeout(a,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}(ta);na.prototype.controlText_="Play Video",Hi.registerComponent("BigPlayButton",na);var ia=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).controlText(n&&n.controlText||i.localize("Close")),i}d(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){u().isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(ta);Hi.registerComponent("CloseButton",ia);var ra=function(e){function t(t,n){var i;return void 0===n&&(n={}),i=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,i.on(t,"play",function(e){return i.handlePlay(e)}),i.on(t,"pause",function(e){return i.handlePause(e)}),n.replay&&i.on(t,"ended",function(e){return i.handleEnded(e)}),i}d(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()?Qi(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}(ta);ra.prototype.controlText_="Play",Hi.registerComponent("PlayToggle",ra);var aa=function(e,t){e=e<0?0:e;var n=Math.floor(e%60),i=Math.floor(e/60%60),r=Math.floor(e/3600),a=Math.floor(t/60%60),s=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(r=i=n="-"),(r=r>0||s>0?r+":":"")+(i=((r||a>=10)&&i<10?"0"+i:i)+":")+(n=n<10?"0"+n:n)},sa=aa;function oa(e,t){return void 0===t&&(t=e),sa(e,t)}var ua=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,["timeupdate","ended"],function(e){return i.updateContent(e)}),i.updateTextNode_(),i}d(t,e);var n=t.prototype;return n.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control"}),i=En("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return n.appendChild(i),this.contentEl_=En("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},n.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},n.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=oa(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,qt.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=a().createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}}))},n.updateContent=function(e){},t}(Hi);ua.prototype.labelText_="Time",ua.prototype.controlText_="Time",Hi.registerComponent("TimeDisplay",ua);var la=function(e){function t(){return e.apply(this,arguments)||this}d(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(e){var t;t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},t}(ua);la.prototype.labelText_="Current Time",la.prototype.controlText_="Current Time",Hi.registerComponent("CurrentTimeDisplay",la);var ca=function(e){function t(t,n){var i,r=function(e){return i.updateContent(e)};return(i=e.call(this,t,n)||this).on(t,"durationchange",r),i.on(t,"loadstart",r),i.on(t,"loadedmetadata",r),i}d(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}(ua);ca.prototype.labelText_="Duration",ca.prototype.controlText_="Duration",Hi.registerComponent("DurationDisplay",ca);var da=function(e){function t(){return e.apply(this,arguments)||this}return d(t,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),n=e.prototype.createEl.call(this,"div"),i=e.prototype.createEl.call(this,"span",{textContent:"/"});return n.appendChild(i),t.appendChild(n),t},t}(Hi);Hi.registerComponent("TimeDivider",da);var ha=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"durationchange",function(e){return i.updateContent(e)}),i}d(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(En("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(e){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(ua);ha.prototype.labelText_="Remaining Time",ha.prototype.controlText_="Remaining Time",Hi.registerComponent("RemainingTimeDisplay",ha);var pa=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).updateShowing(),i.on(i.player(),"durationchange",function(e){return i.updateShowing(e)}),i}d(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_=En("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(En("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(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}(Hi);Hi.registerComponent("LiveDisplay",pa);var fa=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).updateLiveEdgeStatus(),i.player_.liveTracker&&(i.updateLiveEdgeStatusHandler_=function(e){return i.updateLiveEdgeStatus(e)},i.on(i.player_.liveTracker,"liveedgechange",i.updateLiveEdgeStatusHandler_)),i}d(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_=En("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}(ta);fa.prototype.controlText_="Seek to live, currently playing live",Hi.registerComponent("SeekToLive",fa);var ma=function(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))},ga=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handleMouseDown_=function(e){return i.handleMouseDown(e)},i.handleMouseUp_=function(e){return i.handleMouseUp(e)},i.handleKeyDown_=function(e){return i.handleKeyDown(e)},i.handleClick_=function(e){return i.handleClick(e)},i.handleMouseMove_=function(e){return i.handleMouseMove(e)},i.update_=function(e){return i.update(e)},i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}d(t,e);var n=t.prototype;return n.enabled=function(){return this.enabled_},n.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},n.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},n.createEl=function(t,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),n.className=n.className+" vjs-slider",n=$t({tabIndex:0},n),i=$t({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),e.prototype.createEl.call(this,t,n,i)},n.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||un||e.preventDefault(),Un(),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;Bn(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},n.update=function(){var e=this;if(this.el_&&this.bar){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",function(){var n=e.vertical()?"height":"width";e.bar.el().style[n]=(100*t).toFixed(2)+"%"})),t}},n.getProgress=function(){return Number(ma(this.getPercent(),0,1).toFixed(4))},n.calculateDistance=function(e){var t=qn(this.el_,e);return this.vertical()?t.y:t.x},n.handleKeyDown=function(t){u().isEventKey(t,"Left")||u().isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):u().isEventKey(t,"Right")||u().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}(Hi);Hi.registerComponent("Slider",ga);
1var va=function(e,t){return ma(e/t*100,0,100).toFixed(2)+"%"},ya=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).partEls_=[],i.on(t,"progress",function(e){return i.update(e)}),i}d(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),n=En("span",{className:"vjs-control-text"}),i=En("span",{textContent:this.localize("Loaded")}),r=a().createTextNode(": ");return this.percentageEl_=En("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),t.appendChild(n),n.appendChild(i),n.appendChild(r),n.appendChild(this.percentageEl_),t},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var e=t.player_.liveTracker,n=t.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():t.player_.duration(),r=t.player_.bufferedEnd(),a=t.partEls_,s=va(r,i);t.percent_!==s&&(t.el_.style.width=s,Cn(t.percentageEl_,s),t.percent_=s);for(var o=0;o<n.length;o++){var u=n.start(o),l=n.end(o),c=a[o];c||(c=t.el_.appendChild(En()),a[o]=c),c.dataset.start===u&&c.dataset.end===l||(c.dataset.start=u,c.dataset.end=l,c.style.left=va(u,r),c.style.width=va(l-u,r))}for(var d=a.length;d>n.length;d--)t.el_.removeChild(a[d-1]);a.length=n.length})},t}(Hi);Hi.registerComponent("LoadProgressBar",ya);var _a=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=wi(Ti(l(i),i.update),bi),i}d(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n){var i=Fn(this.el_),r=jn(this.player_.el()),a=e.width*t;if(r&&i){var s=e.left-r.left+a,o=e.width-a+(r.right-e.right),u=i.width/2;s<u?u+=u-s:o<u&&(u=o),u<0?u=0:u>i.width&&(u=i.width),u=Math.round(u),this.el_.style.right="-"+u+"px",this.write(n)}},n.write=function(e){Cn(this.el_,e)},n.updateTime=function(e,t,n,i){var r=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var a,s=r.player_.duration();if(r.player_.liveTracker&&r.player_.liveTracker.isLive()){var o=r.player_.liveTracker.liveWindow(),u=o-t*o;a=(u<1?"":"-")+oa(u,o)}else a=oa(n,s);r.update(e,t,a),i&&i()})},t}(Hi);Hi.registerComponent("TimeTooltip",_a);var ba=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=wi(Ti(l(i),i.update),bi),i}d(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var n=this.getChild("timeTooltip");if(n){var i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,i)}},t}(Hi);ba.prototype.options_={children:[]},gn||nn||ba.prototype.options_.children.push("timeTooltip"),Hi.registerComponent("PlayProgressBar",ba);var Ta=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=wi(Ti(l(i),i.update),bi),i}d(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,function(){n.el_.style.left=e.width*t+"px"})},t}(Hi);Ta.prototype.options_={children:["timeTooltip"]},Hi.registerComponent("MouseTimeDisplay",Ta);var wa=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).setEventHandlers_(),i}d(t,e);var n=t.prototype;return n.setEventHandlers_=function(){var e=this;this.update_=Ti(this,this.update),this.update=wi(this.update_,bi),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 a()&&"visibilityState"in a()&&this.on(a(),"visibilitychange",this.toggleVisibility_)},n.toggleVisibility_=function(e){"hidden"===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,bi))},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"!==a().visibilityState){var i=e.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var e=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),t=n.player_.liveTracker,r=n.player_.duration();
1t&&t.isLive()&&(r=n.player_.liveTracker.liveCurrentTime()),n.percent_!==i&&(n.el_.setAttribute("aria-valuenow",(100*i).toFixed(2)),n.percent_=i),n.currentTime_===e&&n.duration_===r||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[oa(e,r),oa(r,r)],"{1} of {2}")),n.currentTime_=e,n.duration_=r),n.bar&&n.bar.update(jn(n.el()),n.getProgress())}),i}},n.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},n.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},n.getPercent=function(){var e,t=this.getCurrentTime_(),n=this.player_.liveTracker;return n&&n.isLive()?(e=(t-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(e=1)):e=t/this.player_.duration(),e},n.handleMouseDown=function(t){zn(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),zn(e)){var n;t||this.player_.scrubbing()||this.player_.scrubbing(!0);var i=this.calculateDistance(e),r=this.player_.liveTracker;if(r&&r.isLive()){if(i>=.99)return void r.seekToLiveEdge();var a=r.seekableStart(),s=r.liveCurrentTime();if((n=a+i*r.liveWindow())>=s&&(n=s),n<=a&&(n=a+.1),n===1/0)return}else(n=i*this.player_.duration())===this.player_.duration()&&(n-=.1);this.userSeek_(n)}},n.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},n.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},n.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Qi(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(u().isEventKey(t,"Space")||u().isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(u().isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.userSeek_(0);else if(u().isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),n&&n.isLive()?this.userSeek_(n.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(u()(t))){t.preventDefault(),t.stopPropagation();var i=10*(u().codes[u()(t)]-u().codes[0])/100;n&&n.isLive()?this.userSeek_(n.seekableStart()+n.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else u().isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):u().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 a()&&"visibilityState"in a()&&this.off(a(),"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},t}(ga);wa.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},gn||nn||wa.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Hi.registerComponent("SeekBar",wa);var Sa=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).handleMouseMove=wi(Ti(l(i),i.handleMouseMove),bi),i.throttledHandleMouseSeek=wi(Ti(l(i),i.handleMouseSeek),bi),i.handleMouseUpHandler_=function(e){return i.handleMouseUp(e)},i.handleMouseDownHandler_=function(e){return i.handleMouseDown(e)},i.enable(),i}d(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},n.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var n=t.getChild("playProgressBar"),i=t.getChild("mouseTimeDisplay");if(n||i){var r=t.el(),a=Fn(r),s=qn(r,e).x;s=ma(s,0,1),i&&i.update(a,s),n&&n.update(a,t.getProgress())}}},n.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},n.enabled=function(){return this.enabled_}
1,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&&Qi(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}(Hi);Sa.prototype.options_={children:["seekBar"]},Hi.registerComponent("ProgressControl",Sa);var ka=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],function(e){return i.handlePictureInPictureChange(e)}),i.on(t,["disablepictureinpicturechanged","loadedmetadata"],function(e){return i.handlePictureInPictureEnabledChange(e)}),i.on(t,["loadedmetadata","audioonlymodechange","audiopostermodechange"],function(){"audio"===t.currentType().substring(0,5)||t.audioPosterMode()||t.audioOnlyMode()?(t.isInPictureInPicture()&&t.exitPictureInPicture(),i.hide()):i.show()}),i.disable(),i}d(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},n.handlePictureInPictureEnabledChange=function(){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}(ta);ka.prototype.controlText_="Picture-in-Picture",Hi.registerComponent("PictureInPictureToggle",ka);var Ea=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"fullscreenchange",function(e){return i.handleFullscreenChange(e)}),!1===a()[t.fsApi_.fullscreenEnabled]&&i.disable(),i}d(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}(ta);Ea.prototype.controlText_="Fullscreen",Hi.registerComponent("FullscreenToggle",Ea);var Ca=function(e){function t(){return e.apply(this,arguments)||this}return d(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}(Hi);Hi.registerComponent("VolumeLevel",Ca);var Aa=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=wi(Ti(l(i),i.update),bi),i}d(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},n.update=function(e,t,n,i){if(!n){var r=jn(this.el_),a=jn(this.player_.el()),s=e.width*t;if(!a||!r)return;var o=e.left-a.left+s,u=e.width-s+(a.right-e.right),l=r.width/2;o<l?l+=l-o:u<l&&(l=u),l<0?l=0:l>r.width&&(l=r.width),this.el_.style.right="-"+l+"px"}this.write(i+"%")},n.write=function(e){Cn(this.el_,e)},n.updateVolume=function(e,t,n,i,r){var a=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){a.update(e,t,n,i.toFixed(0)),r&&r()})},t}(Hi);
1Hi.registerComponent("VolumeLevelTooltip",Aa);var Pa=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).update=wi(Ti(l(i),i.update),bi),i}d(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t,n){var i=this,r=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,n,r,function(){n?i.el_.style.bottom=e.height*t+"px":i.el_.style.left=e.width*t+"px"})},t}(Hi);Pa.prototype.options_={children:["volumeLevelTooltip"]},Hi.registerComponent("MouseVolumeLevelDisplay",Pa);var xa=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on("slideractive",function(e){return i.updateLastVolume_(e)}),i.on(t,"volumechange",function(e){return i.updateARIAAttributes(e)}),t.ready(function(){return i.updateARIAAttributes()}),i}d(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){zn(t)&&e.prototype.handleMouseDown.call(this,t)},n.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var n=this.el(),i=jn(n),r=this.vertical(),a=qn(n,e);a=r?a.y:a.x,a=ma(a,0,1),t.update(i,a,r)}zn(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}(ga);xa.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},gn||nn||xa.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),xa.prototype.playerEvent="volumechange",Hi.registerComponent("VolumeBar",xa);var Ia=function(e){function t(t,n){var i;return void 0===n&&(n={}),n.vertical=n.vertical||!1,(void 0===n.volumeBar||Kt(n.volumeBar))&&(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),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")})}(l(i=e.call(this,t,n)||this),t),i.throttledHandleMouseMove=wi(Ti(l(i),i.handleMouseMove),bi),i.handleMouseUpHandler_=function(e){return i.handleMouseUp(e)},i.on("mousedown",function(e){return i.handleMouseDown(e)}),i.on("touchstart",function(e){return i.handleMouseDown(e)}),i.on("mousemove",function(e){return i.handleMouseMove(e)}),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}d(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}(Hi);Ia.prototype.options_={children:["volumeBar"]}
1,Hi.registerComponent("VolumeControl",Ia);var Oa=function(e){function t(t,n){var i;return 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")})}(l(i=e.call(this,t,n)||this),t),i.on(t,["loadstart","volumechange"],function(e){return i.update(e)}),i}d(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(e){var t=this.player_.volume(),n=this.player_.lastVolume_();if(0===t){var i=n<.1?.1:n;this.player_.volume(i),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},n.update=function(e){this.updateIcon_(),this.updateControlText_()},n.updateIcon_=function(){var e=this.player_.volume(),t=3;gn&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var n=0;n<4;n++)In(this.el_,"vjs-vol-"+n);xn(this.el_,"vjs-vol-"+t)},n.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},t}(ta);Oa.prototype.controlText_="Mute",Hi.registerComponent("MuteToggle",Oa);var La=function(e){function t(t,n){var i;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,(void 0===n.volumeControl||Kt(n.volumeControl))&&(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(i=e.call(this,t,n)||this).handleKeyPressHandler_=function(e){return i.handleKeyPress(e)},i.on(t,["loadstart"],function(e){return i.volumePanelState_(e)}),i.on(i.muteToggle,"keyup",function(e){return i.handleKeyPress(e)}),i.on(i.volumeControl,"keyup",function(e){return i.handleVolumeControlKeyUp(e)}),i.on("keydown",function(e){return i.handleKeyPress(e)}),i.on("mouseover",function(e){return i.handleMouseOver(e)}),i.on("mouseout",function(e){return i.handleMouseOut(e)}),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}d(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){u().isEventKey(e,"Esc")&&this.muteToggle.focus()},n.handleMouseOver=function(e){this.addClass("vjs-hover"),pi(a(),"keyup",this.handleKeyPressHandler_)},n.handleMouseOut=function(e){this.removeClass("vjs-hover"),fi(a(),"keyup",this.handleKeyPressHandler_)},n.handleKeyPress=function(e){u().isEventKey(e,"Esc")&&this.handleMouseOut()},t}(Hi);La.prototype.options_={children:["muteToggle","volumeControl"]},Hi.registerComponent("VolumePanel",La);var Da=function(e){function t(t,n){var i;return i=e.call(this,t,n)||this,n&&(i.menuButton_=n.menuButton),i.focusedChild_=-1,i.on("keydown",function(e){return i.handleKeyDown(e)}),i.boundHandleBlur_=function(e){return i.handleBlur(e)},i.boundHandleTapClick_=function(e){return i.handleTapClick(e)},i}d(t,e);var n=t.prototype;return n.addEventListenerForItem=function(e){e instanceof Hi&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},n.removeEventListenerForItem=function(e){e instanceof Hi&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},n.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},n.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},n.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=En(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_),pi(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||a().activeElement;if(!this.children().some(function(e){return e.el()===t})){var n=this.menuButton_;n&&n.buttonPressed_&&t!==n.el().firstChild&&n.unpressButton()}},n.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var n=t.filter(function(t){return t.el()===e.target})[0];if(!n)return;"CaptionSettingsMenuItem"!==n.name()&&this.menuButton_.focus()}},n.handleKeyDown=function(e){u().isEventKey(e,"Left")||u().isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(u().isEventKey(e,"Right")||u().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}(Hi);Hi.registerComponent("Menu",Da);var Ma=function(e){function t(t,n){var i;void 0===n&&(n={}),(i=e.call(this,t,n)||this).menuButton_=new ta(t,n),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var r=ta.prototype.buildCSSClass();i.menuButton_.el_.className=i.buildCSSClass()+" "+r,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0;var s=function(e){return i.handleClick(e)};return i.handleMenuKeyUp_=function(e){return i.handleMenuKeyUp(e)},i.on(i.menuButton_,"tap",s),i.on(i.menuButton_,"click",s),i.on(i.menuButton_,"keydown",function(e){return i.handleKeyDown(e)}),i.on(i.menuButton_,"mouseenter",function(){i.addClass("vjs-hover"),i.menu.show(),pi(a(),"keyup",i.handleMenuKeyUp_)}
1),i.on("mouseleave",function(e){return i.handleMouseLeave(e)}),i.on("keydown",function(e){return i.handleSubmenuKeyDown(e)}),i}d(t,e);var n=t.prototype;return n.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))},n.createMenu=function(){var e=new Da(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=En("li",{className:"vjs-menu-title",textContent:Ui(this.options_.title),tabIndex:-1}),n=new Hi(this.player_,{el:t});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e},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+" "+ta.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(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},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"),fi(a(),"keyup",this.handleMenuKeyUp_)},n.focus=function(){this.menuButton_.focus()},n.blur=function(){this.menuButton_.blur()},n.handleKeyDown=function(e){u().isEventKey(e,"Esc")||u().isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),u().isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(u().isEventKey(e,"Up")||u().isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},n.handleMenuKeyUp=function(e){(u().isEventKey(e,"Esc")||u().isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},n.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},n.handleSubmenuKeyDown=function(e){(u().isEventKey(e,"Esc")||u().isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),u().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"),gn&&Sn())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}(Hi);Hi.registerComponent("MenuButton",Ma);var Ra=function(e){function t(t,n){var i,r=n.tracks;if((i=e.call(this,t,n)||this).items.length<=1&&i.hide(),!r)return l(i);var a=Ti(l(i),i.update);return r.addEventListener("removetrack",a),r.addEventListener("addtrack",a),r.addEventListener("labelchange",a),i.player_.on("ready",a),i.player_.on("dispose",function(){r.removeEventListener("removetrack",a),r.removeEventListener("addtrack",a),r.removeEventListener("labelchange",a)}),i}return d(t,e),t}(Ma);Hi.registerComponent("TrackButton",Ra);var Na=["Tab","Esc","Up","Down","Right","Left"],Ua=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).selectable=n.selectable,i.isSelected_=n.selected||!1,i.multiSelectable=n.multiSelectable,i.selected(i.isSelected_),i.selectable?i.multiSelectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitemradio"):i.el_.setAttribute("role","menuitem"),i}d(t,e);var n=t.prototype;
1return n.createEl=function(t,n,i){this.nonIconControl=!0;var r=e.prototype.createEl.call(this,"li",$t({className:"vjs-menu-item",tabIndex:-1},n),i);return r.replaceChild(En("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),r.querySelector(".vjs-icon-placeholder")),r},n.handleKeyDown=function(t){Na.some(function(e){return u().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}(zr);Hi.registerComponent("MenuItem",Ua);var Ba=function(e){function n(n,i){var r,s=i.track,o=n.textTracks();i.label=s.label||s.language||"Unknown",i.selected="showing"===s.mode,(r=e.call(this,n,i)||this).track=s,r.kinds=(i.kinds||[i.kind||r.track.kind]).filter(Boolean);var u,c=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleTracksChange.apply(l(r),t)},d=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.handleSelectedLanguageChange.apply(l(r),t)};(n.on(["loadstart","texttrackchange"],c),o.addEventListener("change",c),o.addEventListener("selectedlanguagechange",d),r.on("dispose",function(){n.off(["loadstart","texttrackchange"],c),o.removeEventListener("change",c),o.removeEventListener("selectedlanguagechange",d)}),void 0===o.onchange)&&r.on(["tap","click"],function(){if("object"!=typeof t().Event)try{u=new(t().Event)("change")}catch(e){}u||(u=a().createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(u)});return r.handleTracksChange(),r}d(n,e);var i=n.prototype;return i.handleClick=function(t){var n=this.track,i=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),i)for(var r=0;r<i.length;r++){var a=i[r];-1!==this.kinds.indexOf(a.kind)&&(a===n?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&(a.mode="disabled"))}},i.handleTracksChange=function(e){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},i.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}}},i.dispose=function(){this.track=null,e.prototype.dispose.call(this)},n}(Ua);Hi.registerComponent("TextTrackMenuItem",Ba);var ja=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}d(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 a=t[i];if(this.options_.kinds.indexOf(a.kind)>-1&&"showing"===a.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 a=t[i];if(["captions","descriptions","subtitles"].indexOf(a.kind)>-1&&"showing"===a.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Ba);Hi.registerComponent("OffTextTrackMenuItem",ja);var Fa=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return d(t,e),t.prototype.createItems=function(e,t){var n;void 0===e&&(e=[]),void 0===t&&(t=Ba),this.label_&&(n=this.label_+" off"),e.push(new ja(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var i=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<i.length;r++){var a=i[r];if(this.kinds_.indexOf(a.kind)>-1){var s=new t(this.player_,{track:a,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+a.kind+"-menu-item"),e.push(s)}}return e},t}(Ra);Hi.registerComponent("TextTrackButton",Fa);var qa=function(e){function t(t,n){var i,r=n.track,a=n.cue,s=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=a.text,n.selected=a.startTime<=s&&s<a.endTime,(i=e.call(this,t,n)||this).track=r,
1i.cue=a,i}return d(t,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime)},t}(Ua);Hi.registerComponent("ChaptersTrackMenuItem",qa);var Va=function(e){function t(t,n,i){var r;return(r=e.call(this,t,n,i)||this).selectCurrentItem_=function(){r.items.forEach(function(e){e.selected(r.track_.activeCues[0]===e.cue)})},r}d(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 n=this.findChaptersTrack();n!==this.track_?(this.setTrack(n),e.prototype.update.call(this)):(!this.items||n&&n.cues&&n.cues.length!==this.items.length)&&e.prototype.update.call(this)}},n.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}},n.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var n=e[t];if(n.kind===this.kind_)return n}},n.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ui(this.kind_))},n.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},n.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,i=t.length;n<i;n++){var r=t[n],a=new qa(this.player_,{track:this.track_,cue:r});e.push(a)}return e},t}(Fa);Va.prototype.kind_="chapters",Va.prototype.controlText_="Chapters",Hi.registerComponent("ChaptersButton",Va);var Ha=function(e){function t(t,n,i){var r;r=e.call(this,t,n,i)||this;var a=t.textTracks(),s=Ti(l(r),r.handleTracksChange);return a.addEventListener("change",s),r.on("dispose",function(){a.removeEventListener("change",s)}),r}d(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 a=t[i];if(a.kind!==this.kind_&&"showing"===a.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}(Fa);Ha.prototype.kind_="descriptions",Ha.prototype.controlText_="Descriptions",Hi.registerComponent("DescriptionsButton",Ha);var Wa=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}d(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}(Fa);Wa.prototype.kind_="subtitles",Wa.prototype.controlText_="Subtitles",Hi.registerComponent("SubtitlesButton",Wa);var Ga=function(e){function t(t,n){var i;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(i=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),i.controlText(", opens "+n.kind+" settings dialog"),i}return d(t,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").open()},t}(Ba);Hi.registerComponent("CaptionSettingsMenuItem",Ga);var $a=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}d(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 Ga(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Fa);$a.prototype.kind_="captions",$a.prototype.controlText_="Captions",Hi.registerComponent("CaptionsButton",$a);var za=function(e){function t(){return e.apply(this,arguments)||this}return d(t,e),t.prototype.createEl=function(t,n,i){var r=e.prototype.createEl.call(this,t,n,i),a=r.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(a.appendChild(En("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(En("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),r},t}(Ba);Hi.registerComponent("SubsCapsMenuItem",za);var Ka=function(e){function t(t,n){var i;return void 0===n&&(n={}),(i=e.call(this,t,n)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1&&(i.label_="captions"),i.menuButton_.controlText(Ui(i.label_)),i}d(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 Ga(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,za)},t}(Fa);Ka.prototype.kinds_=["captions","subtitles"],Ka.prototype.controlText_="Subtitles",Hi.registerComponent("SubsCapsButton",Ka);var Xa=function(e){function t(t,n){var i,r=n.track,a=t.audioTracks();n.label=r.label||r.language||"Unknown",n.selected=r.enabled,(i=e.call(this,t,n)||this).track=r,
1i.addClass("vjs-"+r.kind+"-menu-item");var s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.handleTracksChange.apply(l(i),t)};return a.addEventListener("change",s),i.on("dispose",function(){a.removeEventListener("change",s)}),i}d(t,e);var n=t.prototype;return n.createEl=function(t,n,i){var r=e.prototype.createEl.call(this,t,n,i),a=r.querySelector(".vjs-menu-item-text");return"main-desc"===this.options_.track.kind&&(a.appendChild(En("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(En("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),r},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 r=n[i];r!==this.track&&(r.enabled=r===this.track)}},n.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(Ua);Hi.registerComponent("AudioTrackMenuItem",Xa);var Ya=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}d(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(),n=0;n<t.length;n++){var i=t[n];e.push(new Xa(this.player_,{track:i,selectable:!0,multiSelectable:!1}))}return e},t}(Ra);Ya.prototype.controlText_="Audio Track",Hi.registerComponent("AudioTrackButton",Ya);var Qa=function(e){function t(t,n){var i,r=n.rate,a=parseFloat(r,10);return n.label=r,n.selected=a===t.playbackRate(),n.selectable=!0,n.multiSelectable=!1,(i=e.call(this,t,n)||this).label=r,i.rate=a,i.on(t,"ratechange",function(e){return i.update(e)}),i}d(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}(Ua);Qa.prototype.contentElType="button",Hi.registerComponent("PlaybackRateMenuItem",Qa);var Ja=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).menuButton_.el_.setAttribute("aria-describedby",i.labelElId_),i.updateVisibility(),i.updateLabel(),i.on(t,"loadstart",function(e){return i.updateVisibility(e)}),i.on(t,"ratechange",function(e){return i.updateLabel(e)}),i.on(t,"playbackrateschange",function(e){return i.handlePlaybackRateschange(e)}),i}d(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_=En("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=[],n=e.length-1;n>=0;n--)t.push(new Qa(this.player(),{rate:e[n]+"x"}));return t},n.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},n.handleClick=function(e){var t=this.player().playbackRate(),n=this.playbackRates(),i=(n.indexOf(t)+1)%n.length;this.player().playbackRate(n[i])},n.handlePlaybackRateschange=function(e){this.update()},n.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},n.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},n.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},n.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},t}(Ma);Ja.prototype.controlText_="Playback Rate",Hi.registerComponent("PlaybackRateMenuButton",Ja);var Za=function(e){function t(){return e.apply(this,arguments)||this}d(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(t,n,i){return void 0===t&&(t="div"),void 0===n&&(n={}),void 0===i&&(i={}),n.className||(n.className=this.buildCSSClass()),e.prototype.createEl.call(this,t,n,i)},t}(Hi);Hi.registerComponent("Spacer",Za);var es=function(e){function t(){return e.apply(this,arguments)||this}d(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}(Za);Hi.registerComponent("CustomControlSpacer",es);var ts=function(e){function t(){return e.apply(this,arguments)||this}return d(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(Hi);ts.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in a()&&ts.prototype.options_.children.splice(ts.prototype.options_.children.length-1,0,"pictureInPictureToggle"),Hi.registerComponent("ControlBar",ts);var ns=function(e){function t(t,n){var i;return(i=e.call(this,t,n)||this).on(t,"error",function(e){return i.open(e)}),i}d(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}(nr);ns.prototype.options_=s({}
vendor: 5,964 bytes, line 1
1,nr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Hi.registerComponent("ErrorDisplay",ns);var is="vjs-text-track-settings",rs=["#000","Black"],as=["#00F","Blue"],ss=["#0FF","Cyan"],os=["#0F0","Green"],us=["#F0F","Magenta"],ls=["#F00","Red"],cs=["#FFF","White"],ds=["#FF0","Yellow"],hs=["1","Opaque"],ps=["0.5","Semi-Transparent"],fs=["0","Transparent"],ms={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[rs,cs,ls,os,as,ds,us,ss]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[hs,ps,fs]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[cs,rs,ls,os,as,ds,us,ss]},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:[hs,ps]},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:[fs,ps,hs]}};function gs(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}ms.windowColor.options=ms.backgroundColor.options;var vs=function(e){function n(t,n){var i;return n.temporary=!1,(i=e.call(this,t,n)||this).updateDisplay=i.updateDisplay.bind(l(i)),i.fill(),i.hasBeenOpened_=i.hasBeenFilled_=!0,i.endDialog=En("p",{className:"vjs-control-text",textContent:i.localize("End of dialog window.")}),i.el().appendChild(i.endDialog),i.setDefaults(),void 0===n.persistTextTrackSettings&&(i.options_.persistTextTrackSettings=i.options_.playerOptions.persistTextTrackSettings),i.on(i.$(".vjs-done-button"),"click",function(){i.saveSettings(),i.close()}),i.on(i.$(".vjs-default-button"),"click",function(){i.setDefaults(),i.updateDisplay()}),Gt(ms,function(e){i.on(i.$(e.selector),"change",i.updateDisplay)}),i.options_.persistTextTrackSettings&&i.restoreSettings(),i}d(n,e);var i=n.prototype;return i.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},i.createElSelect_=function(e,t,n){var i=this;void 0===t&&(t=""),void 0===n&&(n="label");var r=ms[e],a=r.id.replace("%s",this.id_),s=[t,a].join(" ").trim();return["<"+n+' id="'+a+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(r.label),"</"+n+">",'<select aria-labelledby="'+s+'">'].concat(r.options.map(function(e){var t=a+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+s+" "+t+'">',i.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")},i.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("")},i.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("")},i.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("")},i.createElColors_=function(){return En("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},i.createElFont_=function(){return En("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("")})},i.createElControls_=function(){var e=this.localize("restore all settings to the default values");return En("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("")})},i.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},i.label=function(){return this.localize("Caption Settings Dialog")},i.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},i.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},i.getValues=function(){var e,t,n,i=this;
1return t=function(e,t,n){var r,a,s=(r=i.$(t.selector),a=t.parser,gs(r.options[r.options.selectedIndex].value,a));return void 0!==s&&(e[n]=s),e},void 0===(n={})&&(n=0),Wt(e=ms).reduce(function(n,i){return t(n,e[i],i)},n)},i.setValues=function(e){var t=this;Gt(ms,function(n,i){!function(e,t,n){if(t)for(var i=0;i<e.options.length;i++)if(gs(e.options[i].value,n)===t){e.selectedIndex=i;break}}(t.$(n.selector),e[i],n.parser)})},i.setDefaults=function(){var e=this;Gt(ms,function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n})},i.restoreSettings=function(){var e;try{e=JSON.parse(t().localStorage.getItem(is))}catch(e){qt.warn(e)}e&&this.setValues(e)},i.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?t().localStorage.setItem(is,JSON.stringify(e)):t().localStorage.removeItem(is)}catch(e){qt.warn(e)}}},i.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},i.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},n}(nr);Hi.registerComponent("TextTrackSettings",vs);var ys=function(e){function n(n,i){var r,a=i.ResizeObserver||t().ResizeObserver;null===i.ResizeObserver&&(a=!1);var s=Bi({createEl:!a,reportTouchActivity:!1},i);return(r=e.call(this,n,s)||this).ResizeObserver=i.ResizeObserver||t().ResizeObserver,r.loadListener_=null,r.resizeObserver_=null,r.debouncedHandler_=function(e,n,i,r){var a;void 0===r&&(r=t());var s=function(){var t=this,s=arguments,o=function(){a=null,o=null,i||e.apply(t,s)};!a&&i&&e.apply(t,s),r.clearTimeout(a),a=r.setTimeout(o,n)};return s.cancel=function(){r.clearTimeout(a),a=null},s}(function(){r.resizeHandler()},100,!1,l(r)),a?(r.resizeObserver_=new r.ResizeObserver(r.debouncedHandler_),r.resizeObserver_.observe(n.el())):(r.loadListener_=function(){if(r.el_&&r.el_.contentWindow){var e=r.debouncedHandler_,t=r.unloadListener_=function(){fi(this,"resize",e),fi(this,"unload",t),t=null};pi(r.el_.contentWindow,"unload",t),pi(r.el_.contentWindow,"resize",e)}},r.one("load",r.loadListener_)),r}d(n,e);var i=n.prototype;return i.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})},i.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},i.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)},n}(Hi);Hi.registerComponent("ResizeManager",ys);var _s={trackingThreshold:20,liveTolerance:15},bs=function(e){function n(t,n){var i,r=Bi(_s,n,{createEl:!1});return(i=e.call(this,t,r)||this).handleVisibilityChange_=function(e){return i.handleVisibilityChange(e)},i.trackLiveHandler_=function(){return i.trackLive_()},i.handlePlay_=function(e){return i.handlePlay(e)},i.handleFirstTimeupdate_=function(e){return i.handleFirstTimeupdate(e)},i.handleSeeked_=function(e){return i.handleSeeked(e)},i.seekToLiveEdge_=function(e){return i.seekToLiveEdge(e)},i.reset_(),i.on(i.player_,"durationchange",function(e){return i.handleDurationchange(e)}),i.on(i.player_,"canplay",function(){return i.toggleTracking()}),cn&&"hidden"in a()&&"visibilityState"in a()&&i.on(a(),"visibilitychange",i.handleVisibilityChange_),i}d(n,e);var i=n.prototype;return i.handleVisibilityChange=function(){this.player_.duration()===1/0&&(a().hidden?this.stopTracking():this.startTracking())},i.trackLive_=function(){var e=this.player_.seekable();if(e&&e.length){var n=Number(t().performance.now().toFixed(4)),i=-1===this.lastTime_?0:(n-this.lastTime_)/1e3;this.lastTime_=n,this.pastSeekEnd_=this.pastSeekEnd()+i;var r=this.liveCurrentTime(),a=this.player_.currentTime(),s=this.player_.paused()||this.seekedBehindLive_||Math.abs(r-a)>this.options_.liveTolerance;this.timeupdateSeen_&&r!==1/0||(s=!1),s!==this.behindLiveEdge_&&(this.behindLiveEdge_=s,this.trigger("liveedgechange"))}},i.handleDurationchange=function(){this.toggleTracking()},i.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())},i.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,bi),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_)))},i.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},i.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},i.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},i.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_)},i.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},i.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},i.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.end(n));return t.length?t.sort()[t.length-1]:1/0},i.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0}
1,i.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},i.isLive=function(){return this.isTracking()},i.atLiveEdge=function(){return!this.behindLiveEdge()},i.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},i.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},i.behindLiveEdge=function(){return this.behindLiveEdge_},i.isTracking=function(){return"number"==typeof this.trackingInterval_},i.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},i.dispose=function(){this.off(a(),"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),e.prototype.dispose.call(this)},n}(Hi);Hi.registerComponent("LiveTracker",bs);var Ts,ws=function(e){var t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;var n=e.$$("source"),i=[],r="";if(!n.length)return!1;for(var a=0;a<n.length;a++){var s=n[a].src;s&&-1===i.indexOf(s)&&i.push(s)}return!!i.length&&(1===i.length&&(r=i[0]),e.triggerSourceset(r),!0)},Ss=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var n=a().createElement(this.nodeName.toLowerCase());n.innerHTML=e;for(var i=a().createDocumentFragment();n.childNodes.length;)i.appendChild(n.childNodes[0]);return this.innerText="",t().Element.prototype.appendChild.call(this,i),this.innerHTML}}),ks=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},Es=function(e){var n=e.el();if(!n.resetSourceWatch_){var i={},r=function(e){return ks([e.el(),t().HTMLMediaElement.prototype,t().Element.prototype,Ss],"innerHTML")}(e),a=function(t){return function(){for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];var s=t.apply(n,r);return ws(e),s}};["append","appendChild","insertAdjacentHTML"].forEach(function(e){n[e]&&(i[e]=n[e],n[e]=a(i[e]))}),Object.defineProperty(n,"innerHTML",Bi(r,{set:a(r.set)})),n.resetSourceWatch_=function(){n.resetSourceWatch_=null,Object.keys(i).forEac
1h(function(e){n[e]=i[e]}),Object.defineProperty(n,"innerHTML",r)},e.one("sourceset",n.resetSourceWatch_)}},Cs=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?yr(t().Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return t().Element.prototype.setAttribute.call(this,"src",e),e}}),As=function(e){if(e.featuresSourceset){var n=e.el();if(!n.resetSourceset_){var i=function(e){return ks([e.el(),t().HTMLMediaElement.prototype,Cs],"src")}(e),r=n.setAttribute,a=n.load;Object.defineProperty(n,"src",Bi(i,{set:function(t){var r=i.set.call(n,t);return e.triggerSourceset(n.src),r}})),n.setAttribute=function(t,i){var a=r.call(n,t,i);return/src/i.test(t)&&e.triggerSourceset(n.src),a},n.load=function(){var t=a.call(n);return ws(e)||(e.triggerSourceset(""),Es(e)),t},n.currentSrc?e.triggerSourceset(n.currentSrc):ws(e)||Es(e),n.resetSourceset_=function(){n.resetSourceset_=null,n.load=a,n.setAttribute=r,Object.defineProperty(n,"src",i),n.resetSourceWatch_&&n.resetSourceWatch_()}}}},Ps=function(e,t,n,i){void 0===i&&(i=!0);var r=function(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})},a={configurable:!0,enumerable:!0,get:function(){var e=n();return r(e),e}};return i&&(a.set=r),Object.defineProperty(e,t,a)},xs=function(e){function n(t,n){var i;i=e.call(this,t,n)||this;var r=t.source,a=!1;if(i.featuresVideoFrameCallback=i.featuresVideoFrameCallback&&"VIDEO"===i.el_.tagName,r&&(i.el_.currentSrc!==r.src||t.tag&&3===t.tag.initNetworkState_)?i.setSource(r):i.handleLateInit_(i.el_),t.enableSourceset&&i.setupSourcesetHandling_(),i.isScrubbing_=!1,i.el_.hasChildNodes()){for(var s=i.el_.childNodes,o=s.length,u=[];o--;){var l=s[o];"track"===l.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(l),i.remoteTextTracks().addTrack(l.track),i.textTracks().addTrack(l.track),a||i.el_.hasAttribute("crossorigin")||!br(l.src)||(a=!0)):u.push(l))}for(var c=0;c<u.length;c++)i.el_.removeChild(u[c])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&a&&qt.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),i.restoreMetadataTracksInIOSNativePlayer_(),(pn||mn||an)&&!0===t.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}d(n,e);var i=n.prototype;return i.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),n.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},i.setupSourcesetHandling_=function(){As(this)},i.restoreMetadataTracksInIOSNativePlayer_=function(){var e,t=this.textTracks(),n=function(){e=[];for(var n=0;n<t.length;n++){var i=t[n];"metadata"===i.kind&&e.push({track:i,storedMode:i.mode})}};n(),t.addEventListener("change",n),this.on("dispose",function(){return t.removeEventListener("change",n)});var i=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",i),t.addEventListener("change",i)}),this.on("webkitendfullscreen",function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",i)})},i.overrideNative_=function(e,t){var n=this;if(t===this["featuresNative"+e+"Tracks"]){var i=e.toLowerCase();this[i+"TracksListeners_"]&&Object.keys(this[i+"TracksListeners_"]).forEach(function(e){n.el()[i+"Tracks"].removeEventListener(e,n[i+"TracksListeners_"][e])}),this["featuresNative"+e+"Tracks"]=!t,this[i+"TracksListeners_"]=null,this.proxyNativeTracksForType_(i)}},i.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},i.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},i.proxyNativeTracksForType_=function(e){var t=this,n=Pr[e],i=this.el()[n.getterName],r=this[n.getterName]();if(this["featuresNative"+n.capitalName+"Tracks"]&&i&&i.addEventListener){var a={change:function(n){var i={type:"change",target:r,currentTarget:r,srcElement:r};r.trigger(i),"text"===e&&t[xr.remoteText.getterName]().trigger(i)},addtrack:function(e){r.addTrack(e.track)},removetrack:function(e){r.removeTrack(e.track)}},s=function(){for(var e=[],t=0;t<r.length;t++){for(var n=!1,a=0;a<i.length;a++)if(i[a]===r[t]){n=!0;break}n||e.push(r[t])}for(;e.length;)r.removeTrack(e.shift())};
1this[n.getterName+"Listeners_"]=a,Object.keys(a).forEach(function(e){var n=a[e];i.addEventListener(e,n),t.on("dispose",function(t){return i.removeEventListener(e,n)})}),this.on("loadstart",s),this.on("dispose",function(e){return t.off("loadstart",s)})}},i.proxyNativeTracks_=function(){var e=this;Pr.names.forEach(function(t){e.proxyNativeTracksForType_(t)})},i.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),n.disposeMediaElement(e),e=t}else{e=a().createElement("video");var i=Bi({},this.options_.tag&&Dn(this.options_.tag));pn&&!0===this.options_.nativeControlsForTouch||delete i.controls,Ln(e,$t(i,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&Rn(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var r=["loop","muted","playsinline","autoplay"],s=0;s<r.length;s++){var o=r[s],u=this.options_[o];void 0!==u&&(u?Rn(e,o,o):Nn(e,o),e[o]=u)}return e},i.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 i=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",i),void this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",i),t||this.trigger("loadstart")})}var r=["loadstart"];r.push("loadedmetadata"),e.readyState>=2&&r.push("loadeddata"),e.readyState>=3&&r.push("canplay"),e.readyState>=4&&r.push("canplaythrough"),this.ready(function(){r.forEach(function(e){this.trigger(e)},this)})}},i.setScrubbing=function(e){this.isScrubbing_=e},i.scrubbing=function(){return this.isScrubbing_},i.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&vn?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){qt(e,"Video is not ready. (Video.js)")}},i.duration=function(){var e=this;if(this.el_.duration===1/0&&nn&&un&&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},i.width=function(){return this.el_.offsetWidth},i.height=function(){return this.el_.offsetHeight},i.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)})}},i.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=t().navigator&&t().navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},i.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Qi(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},i.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},i.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},i.requestVideoFrameCallback=function(t){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(t):e.prototype.requestVideoFrameCallback.call(this,t)},i.cancelVideoFrameCallback=function(t){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(t):e.prototype.cancelVideoFrameCallback.call(this,t)},i.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},i.reset=function(){n.resetMediaElement(this.el_)},i.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},i.setControls=function(e){this.el_.controls=!!e},i.addTextTrack=function(t,n,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,i):e.prototype.addTextTrack.call(this,t,n,i)},i.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=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},i.addRemoteTextTrack=function(t,n){var i=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(i),i},i.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),i=n.length;i--;)t!==n[i]&&t!==n[i].track||this.el().removeChild(n[i])},i.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),t().performance&&"function"==typeof t().performance.now?e.creationTime=t().performance.now():t().performance&&t().performance.timing&&"number"==typeof t().performance.timing.navigationStart&&(e.creationTime=t().Date.now()-t().performance.timing.navigationStart),e},n}(Or);Ps(xs,"TEST_VID",function(){if(Tn()){var e=a().createElement("video"),t=a().createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e}}
1),xs.isSupported=function(){try{xs.TEST_VID.volume=.5}catch(e){return!1}return!(!xs.TEST_VID||!xs.TEST_VID.canPlayType)},xs.canPlayType=function(e){return xs.TEST_VID.canPlayType(e)},xs.canPlaySource=function(e,t){return xs.canPlayType(e.type)},xs.canControlVolume=function(){try{var e=xs.TEST_VID.volume;xs.TEST_VID.volume=e/2+.1;var n=e!==xs.TEST_VID.volume;return n&&gn?(t().setTimeout(function(){xs&&xs.prototype&&(xs.prototype.featuresVolumeControl=e!==xs.TEST_VID.volume)}),!1):n}catch(e){return!1}},xs.canMuteVolume=function(){try{var e=xs.TEST_VID.muted;return xs.TEST_VID.muted=!e,xs.TEST_VID.muted?Rn(xs.TEST_VID,"muted","muted"):Nn(xs.TEST_VID,"muted"),e!==xs.TEST_VID.muted}catch(e){return!1}},xs.canControlPlaybackRate=function(){if(nn&&un&&ln<58)return!1;try{var e=xs.TEST_VID.playbackRate;return xs.TEST_VID.playbackRate=e/2+.1,e!==xs.TEST_VID.playbackRate}catch(e){return!1}},xs.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(a().createElement("video"),"src",{get:e,set:e}),Object.defineProperty(a().createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(a().createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(a().createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},xs.supportsNativeTextTracks=function(){return vn||gn&&un},xs.supportsNativeVideoTracks=function(){return!(!xs.TEST_VID||!xs.TEST_VID.videoTracks)},xs.supportsNativeAudioTracks=function(){return!(!xs.TEST_VID||!xs.TEST_VID.audioTracks)},xs.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(e){var t=e[0],n=e[1];Ps(xs.prototype,t,function(){return xs[n]()},!0)}),xs.prototype.featuresVolumeControl=xs.canControlVolume(),xs.prototype.movingMediaElementInDOM=!gn,xs.prototype.featuresFullscreenResize=!0,xs.prototype.featuresProgressEvents=!0,xs.prototype.featuresTimeupdateEvents=!0,xs.prototype.featuresVideoFrameCallback=!(!xs.TEST_VID||!xs.TEST_VID.requestVideoFrameCallback),xs.patchCanPlayType=function(){rn>=4&&!sn&&!un&&(Ts=xs.TEST_VID&&xs.TEST_VID.constructor.prototype.canPlayType,xs.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":Ts.call(this,e)})},xs.unpatchCanPlayType=function(){var e=xs.TEST_VID.constructor.prototype.canPlayType;return Ts&&(xs.TEST_VID.constructor.prototype.canPlayType=Ts),e},xs.patchCanPlayType(),xs.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){}}()}},xs.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){xs.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){xs.prototype["set"+Ui(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){xs.prototype[e]=function(){return this.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(e){xs.prototype["set"+Ui(e)]=function(t){this.el_[e]=t}}),["pause","load","play"].forEach(function(e){xs.prototype[e]=function(){return this.el_[e]()}}),Or.withSourceHandlers(xs),xs.nativeSourceHandler={},xs.nativeSourceHandler.canPlayType=function(e){try{return xs.TEST_
1VID.canPlayType(e)}catch(e){return""}},xs.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return xs.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=_r(e.src);return xs.nativeSourceHandler.canPlayType("video/"+n)}return""},xs.nativeSourceHandler.handleSource=function(e,t,n){t.setSrc(e.src)},xs.nativeSourceHandler.dispose=function(){},xs.registerSourceHandler(xs.nativeSourceHandler),Or.registerTech("Html5",xs);var Is=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Os={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Ls=["tiny","xsmall","small","medium","large","xlarge","huge"],Ds={};Ls.forEach(function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;Ds[e]="vjs-layout-"+t});var Ms={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Rs=function(e){function n(t,i,r){var s;if(t.id=t.id||i.id||"vjs_video_"+si(),(i=$t(n.getTagSettings(t),i)).initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language)if("function"==typeof t.closest){var o=t.closest("[lang]");o&&o.getAttribute&&(i.language=o.getAttribute("lang"))}else for(var u=t;u&&1===u.nodeType;){if(Dn(u).hasOwnProperty("lang")){i.language=u.getAttribute("lang");break}u=u.parentNode}if((s=e.call(this,null,i,r)||this).boundDocumentFullscreenChange_=function(e){return s.documentFullscreenChange_(e)},s.boundFullWindowOnEscKey_=function(e){return s.fullWindowOnEscKey(e)},s.boundUpdateStyleEl_=function(e){return s.updateStyleEl_(e)},s.boundApplyInitTime_=function(e){return s.applyInitTime_(e)},s.boundUpdateCurrentBreakpoint_=function(e){return s.updateCurrentBreakpoint_(e)},s.boundHandleTechClick_=function(e){return s.handleTechClick_(e)},s.boundHandleTechDoubleClick_=function(e){return s.handleTechDoubleClick_(e)},s.boundHandleTechTouchStart_=function(e){return s.handleTechTouchStart_(e)},s.boundHandleTechTouchMove_=function(e){return s.handleTechTouchMove_(e)},s.boundHandleTechTouchEnd_=function(e){return s.handleTechTouchEnd_(e)},s.boundHandleTechTap_=function(e){return s.handleTechTap_(e)},s.isFullscreen_=!1,s.log=Vt(s.id_),s.fsApi_=Rt,s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,s.debugEnabled_=!1,s.audioOnlyMode_=!1,s.audioPosterMode_=!1,s.audioOnlyCache_={playerHeight:null,hiddenChildren:[]},!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=t,s.tagAttributes=t&&Dn(t),s.language(s.options_.language),i.languages){var c={};Object.getOwnPropertyNames(i.languages).forEach(function(e){c[e.toLowerCase()]=i.languages[e]}),s.languages_=c}else s.languages_=n.prototype.options_.languages;s.resetCache_(),s.poster_=i.poster||"",s.controls_=!!i.controls,t.controls=!1,t.removeAttribute("controls"),s.changingSrc_=!1,s.playCallbacks_=[],s.playTerminatedQueue_=[],t.hasAttribute("autoplay")?s.autoplay(!0):s.autoplay(s.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach(function(e){if("function"!=typeof s[e])throw new Error('plugin "'+e+'" does not exist')}),s.scrubbing_=!1,s.el_=s.createEl(),Di(l(s),{eventBusKey:"el_"}),s.fsApi_.requestFullscreen&&(pi(a(),s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_),s.on(s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_)),s.fluid_&&s.on(["playerreset","resize"],s.boundUpdateStyleEl_);var d=Bi(s.options_);i.plugins&&Object.keys(i.plugins).forEach(function(e){s[e](i.plugins[e])}),i.debug&&s.debug(!0),s.options_.playerOptions=d,s.middleware_=[],s.playbackRates(i.playbackRates),s.initChildren(),s.isAudio("audio"===t.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),pn&&s.addClass("vjs-touch-enabled"),gn||s.addClass("vjs-workinghover"),n.players[s.id_]=l(s);var h=Ot.split(".")[0];return s.addClass("vjs-v"+h),s.userActive(!0),s.reportUserActivity(),s.one("play",function(e){return s.listenForUserActivity_(e)}),s.on("stageclick",function(e){return s.handleStageClick_(e)}),s.on("keydown",function(e){return s.handleKeyDown(e)}),s.on("languagechange",function(e){return s.handleLanguagechange(e)}
1),s.breakpoints(s.options_.breakpoints),s.responsive(s.options_.responsive),s.on("ready",function(){s.audioPosterMode(s.options_.audioPosterMode),s.audioOnlyMode(s.options_.audioOnlyMode)}),s}d(n,e);var i=n.prototype;return i.dispose=function(){var t=this;this.trigger("dispose"),this.off("dispose"),fi(a(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),fi(a(),"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),n.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),function(e){Dr[e.id()]=null}(this),Ir.names.forEach(function(e){var n=Ir[e],i=t[n.getterName]();i&&i.off&&i.off()}),e.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})},i.createEl=function(){var n,i=this.tag,r=this.playerElIngest_=i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute("data-vjs-player"),s="video-js"===this.tag.tagName.toLowerCase();r?n=this.el_=i.parentNode:s||(n=this.el_=e.prototype.createEl.call(this,"div"));var o=Dn(i);if(s){for(n=this.el_=i,i=this.tag=a().createElement("video");n.children.length;)i.appendChild(n.firstChild);Pn(n,"video-js")||xn(n,"video-js"),n.appendChild(i),r=this.playerElIngest_=n,Object.keys(n).forEach(function(e){try{i[e]=n[e]}catch(e){}})}if(i.setAttribute("tabindex","-1"),o.tabindex="-1",(cn||un&&hn)&&(i.setAttribute("role","application"),o.role="application"),i.removeAttribute("width"),i.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach(function(e){s&&"class"===e||n.setAttribute(e,o[e]),s&&i.setAttribute(e,o[e])}),i.playerId=i.id,i.id+="_html5_api",i.className="vjs-tech",i.player=n.player=this,this.addClass("vjs-paused"),!0!==t().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=ii("vjs-styles-dimensions");var u=Xn(".vjs-styles-defaults"),l=Xn("head");l.insertBefore(this.styleEl_,u?u.nextSibling:l.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 c=i.getElementsByTagName("a"),d=0;d<c.length;d++){var h=c.item(d);xn(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return i.initNetworkState_=i.networkState,i.parentNode&&!r&&i.parentNode.insertBefore(n,i),An(i,n),this.children_.unshift(i),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=n,n},i.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):qt.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},i.width=function(e){return this.dimension("width",e)},i.height=function(e){return this.dimension("height",e)},i.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 i=parseFloat(t);isNaN(i)?qt.error('Improper value "'+t+'" supplied for for '+e):(this[n]=i,this.updateStyleEl_())},i.fluid=function(e){var t,n,i=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,Ei(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){i.on(["playerreset","resize"],i.boundUpdateStyleEl_)},Ei(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},i.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")},i.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_()},i.updateStyleEl_=function(){if(!0!==t().VIDEOJS_NO_DYNAMIC_STYLE){var e,n,i,r=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),a=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/a:this.videoWidth()||300,n=void 0!==this.height_?this.height_:e*a,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),ri(this.styleEl_,"\n      ."+i+" {\n        width: "+e+"px;\n        height: "+n+"px;\n      }\n\n      ."+i+".vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: "+100*a+"%;\n      }\n    ")}else{var s="number"==typeof this.width_?this.width_:this.options_.width,o="number"==typeof this.height_?this.height_:this.options_.height,u=this.tech_&&this.tech_.el();u&&(s>=0&&(u.width=s),o>
1=0&&(u.height=o))}},i.loadTech_=function(e,t){var n=this;this.tech_&&this.unloadTech_();var i=Ui(e),r=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(Or.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;var a=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(a=!1);var s={source:t,autoplay:a,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};Ir.names.forEach(function(e){var t=Ir[e];s[t.getterName]=n[t.privateName]}),$t(s,this.options_[i]),$t(s,this.options_[r]),$t(s,this.options_[e.toLowerCase()]),this.tag&&(s.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);var o=Or.getTech(e);if(!o)throw new Error("No Tech named '"+i+"' exists! '"+i+"' should be registered using videojs.registerTech()'");this.tech_=new o(s),this.tech_.ready(Ti(this,this.handleTechReady_),!0),er(this.textTracksJson_||[],this.tech_),Is.forEach(function(e){n.on(n.tech_,e,function(t){return n["handleTech"+Ui(e)+"_"](t)})}),Object.keys(Os).forEach(function(e){n.on(n.tech_,e,function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Os[e]+"_"].bind(n),event:t}):n["handleTech"+Os[e]+"_"](t)})}),this.on(this.tech_,"loadstart",function(e){return n.handleTechLoadStart_(e)}),this.on(this.tech_,"sourceset",function(e){return n.handleTechSourceset_(e)}),this.on(this.tech_,"waiting",function(e){return n.handleTechWaiting_(e)}),this.on(this.tech_,"ended",function(e){return n.handleTechEnded_(e)}),this.on(this.tech_,"seeking",function(e){return n.handleTechSeeking_(e)}),this.on(this.tech_,"play",function(e){return n.handleTechPlay_(e)}),this.on(this.tech_,"firstplay",function(e){return n.handleTechFirstPlay_(e)}),this.on(this.tech_,"pause",function(e){return n.handleTechPause_(e)}),this.on(this.tech_,"durationchange",function(e){return n.handleTechDurationChange_(e)}),this.on(this.tech_,"fullscreenchange",function(e,t){return n.handleTechFullscreenChange_(e,t)}),this.on(this.tech_,"fullscreenerror",function(e,t){return n.handleTechFullscreenError_(e,t)}),this.on(this.tech_,"enterpictureinpicture",function(e){return n.handleTechEnterPictureInPicture_(e)}),this.on(this.tech_,"leavepictureinpicture",function(e){return n.handleTechLeavePictureInPicture_(e)}),this.on(this.tech_,"error",function(e){return n.handleTechError_(e)}),this.on(this.tech_,"posterchange",function(e){return n.handleTechPosterChange_(e)}),this.on(this.tech_,"textdata",function(e){return n.handleTechTextData_(e)}),this.on(this.tech_,"ratechange",function(e){return n.handleTechRateChange_(e)}),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===i&&this.tag||An(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},i.unloadTech_=function(){var e=this;Ir.names.forEach(function(t){var n=Ir[t];e[n.privateName]=e[n.getterName]()}),this.textTracksJson_=Zi(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},i.tech=function(e){return void 0===e&&qt.warn("Using the tech directly can be dangerous. I hope you know 
1what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},i.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_)},i.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_)},i.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},i.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())},i.manualAutoplay_=function(e){var t=this;if(this.tech_&&"string"==typeof e){var n,i=function(){var e=t.muted();t.muted(!0);var n=function(){t.muted(e)};t.playTerminatedQueue_.push(n);var i=t.play();if(Yi(i))return i.catch(function(e){throw n(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(e||""))})};if("any"!==e||this.muted()?n="muted"!==e||this.muted()?this.play():i():Yi(n=this.play())&&(n=n.catch(i)),Yi(n))return n.then(function(){t.trigger({type:"autoplay-success",autoplay:e})}).catch(function(){t.trigger({type:"autoplay-failure",autoplay:e})})}},i.updateSourceCaches_=function(e){void 0===e&&(e="");var t=e,n="";"string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;var n=e.cache_.sources.filter(function(e){return e.src===t});if(n.length)return n[0].type;for(var i=e.$$("source"),r=0;r<i.length;r++){var a=i[r];if(a.type&&a.src&&a.src===t)return a.type}return Hr(t)}(this,t)),this.cache_.source=Bi({},e,{src:t,type:n});for(var i=this.cache_.sources.filter(function(e){return e.src&&e.src===t}),r=[],a=this.$$("source"),s=[],o=0;o<a.length;o++){var u=Dn(a[o]);r.push(u),u.src&&u.src===t&&s.push(u.src)}s.length&&!i.length?this.cache_.sources=r:i.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},i.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var n=function(e){return t.updateSourceCaches_(e)},i=this.currentSource().src,r=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==i)&&(n=function(){}),n(r),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"})},i.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"))},i.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},i.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")},i.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))})},i.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},i.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},i.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},i.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},i.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},i.handleTechFirstPlay_=function(){this.options_.starttime&&(qt.warn("Passing the `starttime` option to the player will be deprecated 
1in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},i.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},i.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")},i.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},i.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()?Qi(this.play()):this.pause()))},i.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()))},i.handleTechTap_=function(){this.userActive(!this.userActive())},i.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},i.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},i.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},i.handleStageClick_=function(){this.reportUserActivity()},i.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},i.documentFullscreenChange_=function(e){var t=e.target.player;if(!t||t===this){var n=this.el(),i=a()[this.fsApi_.fullscreenElement]===n;!i&&n.matches?i=n.matches(":"+this.fsApi_.fullscreen):!i&&n.msMatchesSelector&&(i=n.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(i)}},i.handleTechFullscreenChange_=function(e,t){var n=this;t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",function(){n.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))},i.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},i.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},i.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},i.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},i.handleTechError_=function(){var e=this.tech_.error();this.error(e)},i.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},i.getCache=function(){return this.cache_},i.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}},i.techCall_=function(e,t){this.ready(function(){if(e in Br)return function(e,t,n,i){return t[n](e.reduce(Fr(n),i))}(this.middleware_,this.tech_,e,t);if(e in jr)return Nr(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw qt(e),e}},!0)},i.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in Ur)return function(e,t,n){return e.reduceRight(Fr(n),t[n]())}(this.middleware_,this.tech_,e);if(e in jr)return Nr(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw qt("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t;if("TypeError"===t.name)throw qt("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t;throw qt(t),t}}},i.play=function(){var e=this,n=this.options_.Promise||t().Promise;return n?new n(function(t){e.play_(t)}):this.play_()},i.play_=function(e){var t=this;void 0===e&&(e=Qi),this.playCallbacks_.push(e);var n=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(vn||gn);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!n)return this.waitToPlay_=function(e){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!n&&i&&this.load());var r=this.techGet_("play");
1i&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===r?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(r)},i.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})},i.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(t){t(e)})},i.pause=function(){this.techCall_("pause")},i.paused=function(){return!1!==this.techGet_("paused")},i.played=function(){return this.techGet_("played")||$i(0,0)},i.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")},i.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)},i.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},i.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"))},i.remainingTime=function(){return this.duration()-this.currentTime()},i.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},i.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=$i(0,0)),e},i.bufferedPercent=function(){return zi(this.buffered(),this.duration())},i.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),n=e.end(e.length-1);return n>t&&(n=t),n},i.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)},i.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},i.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},i.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},i.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},i.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_},i.requestFullscreen=function(e){var n=this.options_.Promise||t().Promise;if(n){var i=this;return new n(function(t,n){function r(){i.off("fullscreenerror",s),i.off("fullscreenchange",a)}function a(){r(),t()}function s(e,t){r(),n(t)}i.one("fullscreenchange",a),i.one("fullscreenerror",s);var o=i.requestFullscreenHelper_(e);o&&(o.then(r,r),o.then(t,n))})}return this.requestFullscreenHelper_()},i.requestFullscreenHelper_=function(e){var t,n=this;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){var i=this.el_[this.fsApi_.requestFullscreen](t);return i&&i.then(function(){return n.isFullscreen(!0)},function(){return n.isFullscreen(!1)}),i}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},i.exitFullscreen=function(){var e=this.options_.Promise||t().Promise;if(e){var n=this;return new e(function(e,t){function i(){n.off("fullscreenerror",a),n.off("fullscreenchange",r)}function r(){i(),e()}function a(e,n){i(),t(n)}n.one("fullscreenchange",r),n.one("fullscreenerror",a);var s=n.exitFullscreenHelper_();s&&(s.then(i,i),s.then(e,t))})}return this.exitFullscreenHelper_()},i.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=a()[this.fsApi_.exitFullscreen]();return t&&Qi(t.then(function(){return e.isFullscreen(!1)})),t}this.tech_.supportsFullScreen()&&!0==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},i.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=a().documentElement.style.overflow,pi(a(),"keydown",this.boundFullWindowOnEscKey_),a().documentElement.style.overflow="hidden",xn(a().body,"vjs-full-window"),this.trigger("enterFullWindow")},i.fullWindowOnEscKey=function(e){u().isEventKey(e,"Esc")&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},i.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,fi(a(),"keydown",this.boundFullWindowOnEscKey_),a().documentElement.style.overflow=this.docOrigOverflow,In(a().body,"vjs-full-window"),this.trigger("exitFullWindow")},i.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},i.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},i.requestPictureInPicture=function(){if("pictureInPictureEnabled"in a()&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},i.exitPictureInPicture=function(){if("pictureInPictureEnabled"in a())return a().exitPictureInPicture()},i.handleKeyDown=function(e){var t=this.options_.userActions;if(t&&t.hotkeys){(function(e){var t=e.tagName.toLowerCase();if(e.isContentEditable)return!0;
1if("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))}},i.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},n=t.fullscreenKey,i=void 0===n?function(e){return u().isEventKey(e,"f")}:n,r=t.muteKey,s=void 0===r?function(e){return u().isEventKey(e,"m")}:r,o=t.playPauseKey,l=void 0===o?function(e){return u().isEventKey(e,"k")||u().isEventKey(e,"Space")}:o;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();var c=Hi.getComponent("FullscreenToggle");!1!==a()[this.fsApi_.fullscreenEnabled]&&c.prototype.handleClick.call(this,e)}else if(s.call(this,e)){e.preventDefault(),e.stopPropagation(),Hi.getComponent("MuteToggle").prototype.handleClick.call(this,e)}else if(l.call(this,e)){e.preventDefault(),e.stopPropagation(),Hi.getComponent("PlayToggle").prototype.handleClick.call(this,e)}},i.canPlayType=function(e){for(var t,n=0,i=this.options_.techOrder;n<i.length;n++){var r=i[n],a=Or.getTech(r);if(a||(a=Hi.getComponent(r)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else qt.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},i.selectSource=function(e){var t,n,i=this,r=this.options_.techOrder.map(function(e){return[e,Or.getTech(e)]}).filter(function(e){var t=e[0],n=e[1];return n?n.isSupported():(qt.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),a=function(e,t,n){var i;return e.some(function(e){return t.some(function(t){if(i=n(e,t))return!0})}),i},s=function(e,t){var n=e[0];if(e[1].canPlaySource(t,i.options_[n.toLowerCase()]))return{source:t,tech:n}};return t=this.options_.sourceOrder?a(e,r,(n=s,function(e,t){return n(t,e)})):a(r,e,s),t||!1},i.handleSrc_=function(e,t){var n=this;if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var i=Wr(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),Rr(this,i[0],function(e,r){var a,s;if(n.middleware_=r,t||(n.cache_.sources=i),n.updateSourceCaches_(e),n.src_(e))return i.length>1?n.handleSrc_(i.slice(1)):(n.changingSrc_=!1,n.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),void n.triggerReady());a=r,s=n.tech_,a.forEach(function(e){return e.setTech&&e.setTech(s)})}),this.options_.retryOnError&&i.length>1){var r=function(){n.error(null),n.handleSrc_(i.slice(1),!0)},a=function(){n.off("error",r)};this.one("error",r),this.one("playing",a),this.resetRetryOnError_=function(){n.off("error",r),n.off("playing",a)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)},i.src=function(e){return this.handleSrc_(e,!1)},i.src_=function(e){var t,n,i=this,r=this.selectSource([e]);return!r||(t=r.tech,n=this.techName_,Ui(t)!==Ui(n)?(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready(function(){i.changingSrc_=!1}),!1):(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1))},i.load=function(){this.techCall_("load")},i.reset=function(){var e=this,n=this.options_.Promise||t().Promise;this.paused()||!n?this.doReset_():Qi(this.play().then(function(){return e.doReset_()}))},i.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Ei(this)&&this.trigger("playerreset")},i.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},i.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar||{},t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},i.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},i.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},i.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},i.currentSource=function(){return this.cache_.source||{}},i.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},i.currentType=function(){return this.currentSource()&&this.currentSource().type||""},i.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},i.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)},i.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},i.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},i.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"))},i.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"))}},i.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
1sListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},i.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")))},i.error=function(e){var t=this;if(void 0===e)return this.error_||null;if(Dt("beforeerror").forEach(function(n){var i=n(t,e);zt(i)&&!Array.isArray(i)||"string"==typeof i||"number"==typeof i||null===i?e=i:t.log.error("please return a value that MediaError expects in beforeerror hooks")}),this.options_.suppressNotSupportedError&&e&&4===e.code){var n=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],n),void this.one("loadstart",function(){this.off(["click","touchstart"],n)})}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Ki(e),this.addClass("vjs-error"),qt.error("(CODE:"+this.error_.code+" "+Ki.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),Dt("error").forEach(function(e){return e(t,t.error_)})},i.reportUserActivity=function(e){this.userActivity_=!0},i.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")}},i.listenForUserActivity_=function(){var e,t,n,i=Ti(this,this.reportUserActivity),r=function(t){i(),this.clearInterval(e)};this.on("mousedown",function(){i(),this.clearInterval(e),e=this.setInterval(i,250)}),this.on("mousemove",function(e){e.screenX===t&&e.screenY===n||(t=e.screenX,n=e.screenY,i())}),this.on("mouseup",r),this.on("mouseleave",r);var a,s=this.getChild("controlBar");!s||gn||nn||(s.on("mouseenter",function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),s.on("mouseleave",function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",i),this.on("keyup",i),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},i.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},i.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},i.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},i.enableAudioOnlyUI_=function(){var e=this;this.addClass("vjs-audio-only-mode");var t=this.children(),n=this.getChild("ControlBar"),i=n&&n.currentHeight();t.forEach(function(t){t!==n&&t.el_&&!t.hasClass("vjs-hidden")&&(t.hide(),e.audioOnlyCache_.hiddenChildren.push(t))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(i),this.trigger("audioonlymodechange")},i.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")},i.audioOnlyMode=function(e){var n=this;if("boolean"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=e;var i=this.options_.Promise||t().Promise;if(i){if(e){var r=[];return this.isInPictureInPicture()&&r.push(this.exitPictureInPicture()),this.isFullscreen()&&r.push(this.exitFullscreen()),this.audioPosterMode()&&r.push(this.audioPosterMode(!1)),i.all(r).then(function(){return n.enableAudioOnlyUI_()})}return i.resolve().then(function(){return n.disableAudioOnlyUI_()})}e?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_()},i.enablePosterModeUI_=function(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},i.disablePosterModeUI_=function(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},i.audioPosterMode=function(e){var n=this;if("boolean"!=typeof e||e===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=e;var i=this.options_.Promise||t().Promise;return i?e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(function(){n.enablePosterModeUI_()}):i.resolve().then(function(){n.enablePosterModeUI_()}):i.resolve().then(function(){n.disablePosterModeUI_()}):e?(this.audioOnlyMode()&&this.audioOnlyMode(!1),void this.enablePosterModeUI_()):void this.disablePosterModeUI_()},i.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},i.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},i.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)},i.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},i.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},i.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},i.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Ei(this)&&this.trigger("languagechange"))},i.languages=function(){return Bi(n.prototype.options_.languages,this.languages_)},i.toJSON=function(){var e=Bi(this.options_),t=e.tracks;e.tracks=[];for(var n=0;n<t.length;n++){var i=t[n];(i=Bi(i)).player=void 0,e.tracks[n]=i}return e},i.createModal=function(e,t){var n=this;(t=t||{}).content=e||"";var i=new nr(this,t);return this.addChild(i),i.on("dispose",function(){n.removeChild(i)}),i.open(),i},i.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),n=0;n<Ls.length;n++){var i=Ls[n];
1if(t<=this.breakpoints_[i]){if(e===i)return;e&&this.removeClass(Ds[e]),this.addClass(Ds[i]),this.breakpoint_=i;break}}},i.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},i.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=$t({},Ms,e),this.updateCurrentBreakpoint_()),$t(this.breakpoints_)},i.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},i.currentBreakpoint=function(){return this.breakpoint_},i.currentBreakpointClass=function(){return Ds[this.breakpoint_]||""},i.loadMedia=function(e,t){var n=this;if(e&&"object"==typeof e){this.reset(),this.cache_.media=Bi(e);var i=this.cache_.media,r=i.artwork,a=i.poster,s=i.src,o=i.textTracks;!r&&a&&(this.cache_.media.artwork=[{src:a,type:Hr(a)}]),s&&this.src(s),a&&this.poster(a),Array.isArray(o)&&o.forEach(function(e){return n.addRemoteTextTrack(e,!1)}),this.ready(t)}},i.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:Hr(t.poster)}]),t}return Bi(this.cache_.media)},n.getTagSettings=function(e){var t={sources:[],tracks:[]},n=Dn(e),i=n["data-setup"];if(Pn(e,"vjs-fill")&&(n.fill=!0),Pn(e,"vjs-fluid")&&(n.fluid=!0),null!==i){var r=p()(i||"{}"),a=r[0],s=r[1];a&&qt.error(a),$t(n,s)}if($t(t,n),e.hasChildNodes())for(var o=e.childNodes,u=0,l=o.length;u<l;u++){var c=o[u],d=c.nodeName.toLowerCase();"source"===d?t.sources.push(Dn(c)):"track"===d&&t.tracks.push(Dn(c))}return t},i.flexNotSupported_=function(){var e=a().createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},i.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)},i.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"))},n}(Hi);Ir.names.forEach(function(e){var t=Ir[e];Rs.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),Rs.prototype.crossorigin=Rs.prototype.crossOrigin,Rs.players={};var Ns=t().navigator;Rs.prototype.options_={techOrder:Or.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Ns&&(Ns.languages&&Ns.languages[0]||Ns.userLanguage||Ns.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){Rs.prototype[e]=function(){return this.techGet_(e)}}),Is.forEach(function(e){Rs.prototype["handleTech"+Ui(e)+"_"]=function(){return this.trigger(e)}}),Hi.registerComponent("Player",Rs);var Us="plugin",Bs="activePlugins_",js={},Fs=function(e){return js.hasOwnProperty(e)},qs=function(e){return Fs(e)?js[e]:void 0},Vs=function(e,t){e[Bs]=e[Bs]||{},e[Bs][t]=!0},Hs=function(e,t,n){var i=(n?"before":"")+"pluginsetup";e.trigger(i,t),e.trigger(i+":"+t.name,t)},Ws=function(e,t){return t.prototype.name=e,function(){Hs(this,{name:e,plugin:t,instance:null},!0);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var a=_(t,[this].concat(i));return this[e]=function(){return a},Hs(this,a.getEventHash()),a}},Gs=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)),Di(this),delete this.trigger,Ri(this,this.constructor.defaultState),Vs(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={}),mi(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[Bs][e]=!1,this.player=this.state=null,t[e]=Ws(e,js[e])},e.isBasic=function(t){var n="string"==typeof t?qs(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.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(Fs(t))qt.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(Rs.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 js[t]=n,t!==Us&&(e.isBasic(n)?Rs.prototype[t]=function(e,t){var n=function(){Hs(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return Vs(this,e),Hs(this,{name:e,plugin:t,instance:n}),n};return Object.keys(t).forEach(function(e){n[e]=t[e]}),n}(t,n):Rs.prototype[t]=Ws(t,n)),n},e.deregisterPlugin=function(e){if(e===Us)throw new Error("Cannot de-register base plugin.");Fs(e)&&(delete js[e],delete Rs.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(js)),e.forEach(function(e){var n=qs(e);n&&((t=t||{})[e]=n)}),t},e.getPluginVersion=function(e){var t=qs(e);return t&&t.VERSION||""},e}();Gs.getPlugin=qs,Gs.BASE_PLUGIN_NAME=Us,Gs.registerPlugin(Us,Gs),Rs.prototype.usingPlugin=function(e){return!!this[Bs]&&!0===this[Bs][e]},Rs.prototype.hasPlugin=function(e){return!!Fs(e)};var $s=!1,zs=function(e){return 0===e.indexOf("#")?e.slice(1):e};function Ks(e,t,n){var i=Ks.getPlayer(e);if(i)return t&&qt.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&i.ready(n),i;var r="string"==typeof e?Xn("#"+zs(e)):e;if(!wn(r))throw new TypeError("The element or ID supplied is not val
1id. (videojs)");r.ownerDocument.defaultView&&r.ownerDocument.body.contains(r)||qt.warn("The element supplied is not included in the DOM"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(r.parentNode&&r.parentNode.hasAttribute("data-vjs-player")?r.parentNode:r).cloneNode(!0)),Dt("beforesetup").forEach(function(e){var n=e(r,Bi(t));zt(n)&&!Array.isArray(n)?t=Bi(t,n):qt.error("please return an object in beforesetup hooks")});var a=Hi.getComponent("Player");return i=new a(r,t,n),Dt("setup").forEach(function(e){return e(i)}),i}if(Ks.hooks_=Lt,Ks.hooks=Dt,Ks.hook=function(e,t){Dt(e,t)},Ks.hookOnce=function(e,t){Dt(e,[].concat(t).map(function(t){return function n(){return Mt(e,n),t.apply(void 0,arguments)}}))},Ks.removeHook=Mt,!0!==t().VIDEOJS_NO_DYNAMIC_STYLE&&Tn()){var Xs=Xn(".vjs-styles-defaults");if(!Xs){Xs=ii("vjs-styles-defaults");var Ys=Xn("head");Ys&&Ys.insertBefore(Xs,Ys.firstChild),ri(Xs,"\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    ")}}ei(1,Ks),Ks.VERSION=Ot,Ks.options=Rs.prototype.options_,Ks.getPlayers=function(){return Rs.players},Ks.getPlayer=function(e){var t,n=Rs.players;if("string"==typeof e){var i=zs(e),r=n[i];if(r)return r;t=Xn("#"+i)}else t=e;if(wn(t)){var a=t,s=a.player,o=a.playerId;if(s||n[o])return s||n[o]}},Ks.getAllPlayers=function(){return Object.keys(Rs.players).map(function(e){return Rs.players[e]}).filter(Boolean)},Ks.players=Rs.players,Ks.getComponent=Hi.getComponent,Ks.registerComponent=function(e,t){Or.isTech(t)&&qt.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Hi.registerComponent.call(Hi,e,t)},Ks.getTech=Or.getTech,Ks.registerTech=Or.registerTech,Ks.use=function(e,t){Lr[e]=Lr[e]||[],Lr[e].push(t)},Object.defineProperty(Ks,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Ks.middleware,"TERMINATOR",{value:Mr,writeable:!1,enumerable:!0}),Ks.browser=yn,Ks.TOUCH_ENABLED=pn,Ks.extend=function(e,t){void 0===t&&(t={}),$s||(qt.warn("videojs.extend is deprecated as of Video.js 7.22.0 and will be removed in Video.js 8.0.0"),$s=!0);var n=function(){e.apply(this,arguments)},i={};for(var r in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),i=t):"function"==typeof t&&(n=t),function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(n,e),e&&(n.super_=e),i)i.hasOwnProperty(r)&&(n.prototype[r]=i[r]);return n},Ks.mergeOptions=Bi,Ks.bind=Ti,Ks.registerPlugin=Gs.registerPlugin,Ks.deregisterPlugin=Gs.deregisterPlugin,Ks.plugin=function(e,t){return qt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Gs.registerPlugin(e,t)},Ks.getPlugins=Gs.getPlugins,Ks.getPlugin=Gs.getPlugin,Ks.getPluginVersion=Gs.getPluginVersion,Ks.addLanguage=function(e,t){var n;return e=(""+e).toLowerCase(),Ks.options.languages=Bi(Ks.options.languages,((n={})[e]=t,n)),Ks.options.languages[e]},Ks.log=qt,Ks.createLogger=Vt,Ks.createTimeRange=Ks.createTimeRanges=$i,Ks.formatTime=oa,Ks.setFormatTime=function(e){sa=e},Ks.resetFormatTime=function(){sa=aa},Ks.parseUrl=vr,Ks.isCrossOrigin=br,Ks.EventTarget=Si,Ks.on=pi,Ks.one=gi,Ks.off=fi,Ks.trigger=mi,Ks.xhr=m(),Ks.TextTrack=kr,Ks.AudioTrack=Er,Ks.VideoTrack=Cr,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(e){Ks[e]=function(){return qt.warn("videojs."+e+"() is deprecated; use videojs.dom."+e+"() instead"),Qn[e].apply(null,arguments)}}),Ks.computedStyle=Xt,Ks.dom=Qn,Ks.url=Tr,Ks.defineLazyProperty=Ps,Ks.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var Qs=S,Js=function(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t},Zs=function(e){return Ks.log.debug?Ks.log.debug.bind(Ks,"VHS:",e+" >"):function(){}},eo=1/30,to=.1,no=function(e,t){var n,i=[];if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&i.push([e.start(n),e.end(n)]);return Ks.createTimeRanges(i)},io=function(e,t){return no(e,function(e,n){return e-to<=t&&n+to>=t})},ro=function(e,t){return no(e,function(e){return e-eo>=t})},ao=function(e){var t=[];if(!e||!e.length)return"";for(var n=0;n<e.length;n++)t.push(e.start(n)+" => "+e.end(n));return t.join(", ")},so=function(e){for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t},oo=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},uo=function(e,t){var n=0;if(!e||!e.length)return n;for(var i=0;i<e.length;i++){var r=e.start(i),a=e.end(i);t>a||(n+=t>r&&t<=a?a-t:a-r)}return n},lo=Ks.createTimeRange,co=function(e,t){if(!t.preload)return t.duration;var n=0;
1return(t.parts||[]).forEach(function(e){n+=e.duration}),(t.preloadHints||[]).forEach(function(t){"PART"===t.type&&(n+=e.partTargetDuration)}),n},ho=function(e){return(e.segments||[]).reduce(function(e,t,n){return t.parts?t.parts.forEach(function(i,r){e.push({duration:i.duration,segmentIndex:n,partIndex:r,part:i,segment:t})}):e.push({duration:t.duration,segmentIndex:n,partIndex:null,segment:t,part:null}),e},[])},po=function(e){var t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},fo=function(e){var t=e.preloadSegment;if(t){var n=t.parts,i=(t.preloadHints||[]).reduce(function(e,t){return e+("PART"===t.type?1:0)},0);return i+=n&&n.length?n.length:0}},mo=function(e,t){if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;var n=po(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},go=function(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var i=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+=co(e,r),void 0!==r.start)return{result:n+r.start,precise:!0}}return{result:n,precise:!1}}(e,t);if(i.precise)return i.result;var r=function(e,t){for(var n,i=0,r=t-e.mediaSequence;r<e.segments.length;r++){if(void 0!==(n=e.segments[r]).start)return{result:n.start-i,precise:!0};if(i+=co(e,n),void 0!==n.end)return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}}(e,t);return r.precise?r.result:i.result+n},vo=function(e,n,i){if(!e)return 0;if("number"!=typeof i&&(i=0),void 0===n){if(e.totalDuration)return e.totalDuration;if(!e.endList)return t()[1/0]}return go(e,n,i)},yo=function(e){var t=e.defaultDuration,n=e.durationList,i=e.startIndex,r=e.endIndex,a=0;if(i>r){var s=[r,i];i=s[0],r=s[1]}if(i<0){for(var o=i;o<Math.min(0,r);o++)a+=t;i=0}for(var u=i;u<r;u++)a+=n[u].duration;return a},_o=function(e,t,n,i){if(!e||!e.segments)return null;if(e.endList)return vo(e);if(null===t)return null;t=t||0;var r=go(e,e.mediaSequence+e.segments.length,t);return n&&(r-=i="number"==typeof i?i:mo(null,e)),Math.max(0,r)},bo=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},To=function(e){return e.excludeUntil&&e.excludeUntil===1/0},wo=function(e){var t=bo(e);return!e.disabled&&!t},So=function(e,t){return t.attributes&&t.attributes[e]},ko=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!!wo(e)&&(e.attributes.BANDWIDTH||0)<n}).length},Eo=function(e,t){return!(!e&&!t||!e&&t||e&&!t)&&(e===t||(!(!e.id||!t.id||e.id!==t.id)||(!(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)||!(!e.uri||!t.uri||e.uri!==t.uri))))},Co=function(e,t){var n=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{},i=!1;for(var r in n){for(var a in n[r])if(i=t(n[r][a]))break;if(i)break}return!!i},Ao=function(e){if(!e||!e.playlists||!e.playlists.length)return Co(e,function(e){return e.playlists&&e.playlists.length||e.uri});for(var t=function(t){var n=e.playlists[t],i=n.attributes&&n.attributes.CODECS;return i&&i.split(",").every(function(e){return q(e)})||Co(e,function(e){return Eo(n,e)})?"continue":{v:!1}},n=0;n<e.playlists.length;n++){var i=t(n);if("continue"!==i&&"object"==typeof i)return i.v}return!0},Po={liveEdgeDelay:mo,duration:vo,seekable:function(e,t,n){var i=t||0,r=_o(e,t,!0,n);return null===r?lo():lo(i,r)},getMediaInfoForTime:function(e){for(var t=e.playlist,n=e.currentTime,i=e.startingSegmentIndex,r=e.startingPartIndex,a=e.startTime,s=e.experimentalExactManifestTimings,o=n-a,u=ho(t),l=0,c=0;c<u.length;c++){var d=u[c];if(i===d.segmentIndex&&("number"!=typeof r||"number"!=typeof d.partIndex||r===d.partIndex)){l=c;break}}if(o<0){if(l>0)for(var h=l-1;h>=0;h--){var p=u[h];
1if(o+=p.duration,s){if(o<0)continue}else if(o+eo<=0)continue;return{partIndex:p.partIndex,segmentIndex:p.segmentIndex,startTime:a-yo({defaultDuration:t.targetDuration,durationList:u,startIndex:l,endIndex:h})}}return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:n}}if(l<0){for(var f=l;f<0;f++)if((o-=t.targetDuration)<0)return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:n};l=0}for(var m=l;m<u.length;m++){var g=u[m];if(o-=g.duration,s){if(o>0)continue}else if(o-eo>=0)continue;return{partIndex:g.partIndex,segmentIndex:g.segmentIndex,startTime:a+yo({defaultDuration:t.targetDuration,durationList:u,startIndex:l,endIndex:m})}}return{segmentIndex:u[u.length-1].segmentIndex,partIndex:u[u.length-1].partIndex,startTime:n}},isEnabled:wo,isDisabled:function(e){return e.disabled},isBlacklisted:bo,isIncompatible:To,playlistEnd:_o,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:So,estimateSegmentRequestTime:function(e,t,n,i){return void 0===i&&(i=0),So("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*i)/t:NaN},isLowestEnabledRendition:ko,isAudioOnly:Ao,playlistMatch:Eo,segmentDurationWithParts:co},xo=Ks.log,Io=function(e,t){return e+"-"+t},Oo=function(e,t,n){return"placeholder-uri-"+e+"-"+t+"-"+n},Lo=function(e,t){e.mediaGroups&&["AUDIO","SUBTITLES"].forEach(function(n){if(e.mediaGroups[n])for(var i in e.mediaGroups[n])for(var r in e.mediaGroups[n][i]){var a=e.mediaGroups[n][i][r];t(a,n,i,r)}})},Do=function(e){var t=e.playlist,n=e.uri,i=e.id;t.id=i,t.playlistErrors_=0,n&&(t.uri=n),t.attributes=t.attributes||{}},Mo=function(e,t,n){void 0===n&&(n=Oo),e.uri=t;
1for(var i=0;i<e.playlists.length;i++)if(!e.playlists[i].uri){var r="placeholder-uri-"+i;e.playlists[i].uri=r}var a=Ao(e);Lo(e,function(t,i,r,o){if(!t.playlists||!t.playlists.length){if(a&&"AUDIO"===i&&!t.uri)for(var u=0;u<e.playlists.length;u++){var l=e.playlists[u];if(l.attributes&&l.attributes.AUDIO&&l.attributes.AUDIO===r)return}t.playlists=[s({},t)]}t.playlists.forEach(function(t,a){var s=n(i,r,o,t),u=Io(a,s);t.uri?t.resolvedUri=t.resolvedUri||Qs(e.uri,t.uri):(t.uri=0===a?s:u,t.resolvedUri=t.uri),t.id=t.id||u,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t})}),function(e){for(var t=e.playlists.length;t--;){var n=e.playlists[t];Do({playlist:n,id:Io(t,n.uri)}),n.resolvedUri=Qs(e.uri,n.uri),e.playlists[n.id]=n,e.playlists[n.uri]=n,n.attributes.BANDWIDTH||xo.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(e),function(e){Lo(e,function(t){t.uri&&(t.resolvedUri=Qs(e.uri,t.uri))})}(e)},Ro=Ks.mergeOptions,No=Ks.EventTarget,Uo=function(e,t){if(!e)return t;var n=Ro(e,t);if(e.preloadHints&&!t.preloadHints&&delete n.preloadHints,e.parts&&!t.parts)delete n.parts;else if(e.parts&&t.parts)for(var i=0;i<t.parts.length;i++)e.parts&&e.parts[i]&&(n.parts[i]=Ro(e.parts[i],t.parts[i]));return!e.skipped&&t.skipped&&(n.skipped=!1),e.preload&&!t.preload&&(n.preload=!1),n},Bo=function(e,t){!e.resolvedUri&&e.uri&&(e.resolvedUri=Qs(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Qs(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Qs(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=Qs(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach(function(e){e.resolvedUri||(e.resolvedUri=Qs(t,e.uri))}),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach(function(e){e.resolvedUri||(e.resolvedUri=Qs(t,e.uri))})},jo=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},Fo=function(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment},qo=function(e,t,n){void 0===n&&(n=Fo);var i=Ro(e,{}),r=i.playlists[t.id];if(!r)return null;if(n(r,t))return null;t.segments=jo(t);var a=Ro(r,t);if(a.preloadSegment&&!t.preloadSegment&&delete a.preloadSegment,r.segments){if(t.skip){t.segments=t.segments||[];for(var s=0;s<t.skip.skippedSegments;s++)t.segments.unshift({skipped:!0})}a.segments=function(e,t,n){var i=e.slice(),r=t.slice();n=n||0;for(var a,s=[],o=0;o<r.length;o++){var u=i[o+n],l=r[o];
1u?(a=u.map||a,s.push(Uo(u,l))):(a&&!l.map&&(l.map=a),s.push(l))}return s}(r.segments,t.segments,t.mediaSequence-r.mediaSequence)}a.segments.forEach(function(e){Bo(e,a.resolvedUri)});for(var o=0;o<i.playlists.length;o++)i.playlists[o].id===t.id&&(i.playlists[o]=a);return i.playlists[t.id]=a,i.playlists[t.uri]=a,Lo(e,function(e,n,i,r){if(e.playlists)for(var s=0;s<e.playlists.length;s++)t.id===e.playlists[s].id&&(e.playlists[s]=a)}),i},Vo=function(e,t){var n=e.segments||[],i=n[n.length-1],r=i&&i.parts&&i.parts[i.parts.length-1],a=r&&r.duration||i&&i.duration;return t&&a?1e3*a:500*(e.partTargetDuration||e.targetDuration||10)},Ho=function(e){function n(t,n,i){var r;if(void 0===i&&(i={}),r=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");r.logger_=Zs("PlaylistLoader");var a=i,s=a.withCredentials,o=void 0!==s&&s,u=a.handleManifestRedirects,c=void 0!==u&&u;r.src=t,r.vhs_=n,r.withCredentials=o,r.handleManifestRedirects=c;var d=n.options_;return r.customTagParsers=d&&d.customTagParsers||[],r.customTagMappers=d&&d.customTagMappers||[],r.experimentalLLHLS=d&&d.experimentalLLHLS||!1,Ks.browser.IE_VERSION&&(r.experimentalLLHLS=!1),r.state="HAVE_NOTHING",r.handleMediaupdatetimeout_=r.handleMediaupdatetimeout_.bind(l(r)),r.on("mediaupdatetimeout",r.handleMediaupdatetimeout_),r}d(n,e);var i=n.prototype;return i.handleMediaupdatetimeout_=function(){var e=this;if("HAVE_METADATA"===this.state){var n=this.media(),i=Qs(this.master.uri,n.uri);this.experimentalLLHLS&&(i=function(e,n){if(n.endList||!n.serverControl)return e;var i={};if(n.serverControl.canBlockReload){var r=n.preloadSegment,a=n.mediaSequence+n.segments.length;if(r){var s=r.parts||[],o=fo(n)-1;o>-1&&o!==s.length-1&&(i._HLS_part=o),(o>-1||s.length)&&a--}i._HLS_msn=a}if(n.serverControl&&n.serverControl.canSkipUntil&&(i._HLS_skip=n.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){var u=new(t().URL)(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(e){i.hasOwnProperty(e)&&u.searchParams.set(e,i[e])}),e=u.toString()}return e}(i,n)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:i,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})})}},i.playlistRequestError=function(e,t,n){var i=t.uri,r=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[r],status:e.status,message:"HLS playlist request error at URL: "+i+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},i.parseManifest_=function(e){var t=this,n=e.url;return function(e){var t=e.onwarn,n=e.oninfo,i=e.manifestString,r=e.customTagParsers,a=void 0===r?[]:r,s=e.customTagMappers,o=void 0===s?[]:s,u=e.experimentalLLHLS,l=new R;t&&l.on("warn",t),n&&l.on("info",n),a.forEach(function(e){return l.addParser(e)}),o.forEach(function(e){return l.addTagMapper(e)}),l.push(i),l.end();var c=l.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(e){c.hasOwnProperty(e)&&delete c[e]}),c.segments&&c.segments.forEach(function(e){["parts","preloadHints"].forEach(function(t){e.hasOwnProperty(t)&&delete e[t]})})),!c.targetDuration){var d=10;c.segments&&c.segments.length&&(d=c.segments.reduce(function(e,t){return Math.max(e,t.duration)},0)),t&&t("manifest has no targetDuration defaulting to "+d),c.targetDuration=d}var h=po(c);if(h.length&&!c.partTargetDuration){var p=h.reduce(function(e,t){return Math.max(e,t.duration)},0);t&&(t("manifest has no partTargetDuration defaulting to "+p),xo.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.")),c.partTargetDuration=p}return c}({onwarn:function(e){var i=e.message;return t.logger_("m3u8-parser warn for "+n+": "+i)},oninfo:function(e){var i=e.message;return t.logger_("m3u8-parser info for "+n+": "+i)},manifestString:e.manifestString,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},i.haveMetadata=function(e){var t=e.playlistString,n=e.playlistOb
1ject,i=e.url,r=e.id;this.request=null,this.state="HAVE_METADATA";var a=n||this.parseManifest_({url:i,manifestString:t});a.lastRequest=Date.now(),Do({playlist:a,uri:i,id:r});var s=qo(this.master,a);this.targetDuration=a.partTargetDuration||a.targetDuration,this.pendingMedia_=null,s?(this.master=s,this.media_=this.master.playlists[r]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Vo(this.media(),!!s)),this.trigger("loadedplaylist")},i.dispose=function(){this.trigger("dispose"),this.stopRequest(),t().clearTimeout(this.mediaUpdateTimeout),t().clearTimeout(this.finalRenditionTimeout),this.off()},i.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},i.media=function(e,n){var i=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(t().clearTimeout(this.finalRenditionTimeout),n){var r=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=t().setTimeout(this.media.bind(this,e,!1),r)}else{var a=this.state,s=!this.media_||e.id!==this.media_.id,o=this.master.playlists[e.id];if(o&&o.endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(s&&(this.trigger("mediachanging"),"HAVE_MASTER"===a?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Vo(e,!0)),s){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,n){if(i.request){if(e.lastRequest=Date.now(),e.resolvedUri=Js(i.handleManifestRedirects,e.resolvedUri,n),t)return i.playlistRequestError(i.request,e,a);i.haveMetadata({playlistString:n.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===a?i.trigger("loadedmetadata"):i.trigger("mediachange")}})}}},i.pause=function(){this.mediaUpdateTimeout&&(t().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")},i.load=function(e){var n=this;this.mediaUpdateTimeout&&(t().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var i=this.media();if(e){var r=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=t().setTimeout(function(){n.mediaUpdateTimeout=null,n.load()},r)}else this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},i.updateMediaUpdateTimeout_=function(e){var n=this;this.mediaUpdateTimeout&&(t().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=t().setTimeout(function(){n.mediaUpdateTimeout=null,n.trigger("mediaupdatetimeout"),n.updateMediaUpdateTimeout_(e)},e))},i.start=function(){var e=this;
1if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=t().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=Js(e.handleManifestRedirects,e.src,n);var i=e.parseManifest_({manifestString:n.responseText,url:e.src});e.setupInitialPlaylist(i)}})},i.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},i.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,Mo(this.master,this.srcUri()),e.playlists.forEach(function(e){e.segments=jo(e),e.segments.forEach(function(t){Bo(t,e.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var n=this.srcUri()||t().location.href;this.master=function(e,n){var i=Io(0,n),r={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:t().location.href,resolvedUri:t().location.href,playlists:[{uri:n,id:i,resolvedUri:n,attributes:{}}]};return r.playlists[i]=r.playlists[0],r.playlists[n]=r.playlists[0],r}(0,n),this.haveMetadata({playlistObject:e,url:n,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},n}(No),Wo=Ks.xhr,Go=Ks.mergeOptions,$o=function(e,t,n,i){var r="arraybuffer"===e.responseType?e.response:e.responseText;!t&&r&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=r.byteLength||r.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(r||e.responseText)))),i(t,e)},zo=function(){var e=function e(t,n){t=Go({timeout:45e3},t);var i=e.beforeRequest||Ks.Vhs.xhr.beforeRequest;if(i&&"function"==typeof i){var r=i(t);r&&(t=r)}var a=(!0===Ks.Vhs.xhr.original?Wo:Ks.Vhs.xhr)(t,function(e,t){return $o(a,e,t,n)}),s=a.abort;return a.abort=function(){return a.aborted=!0,s.apply(a,arguments)},a.uri=t.uri,a.requestTime=Date.now(),a};return e.original=!0,e},Ko=function(e){var n,i={};return e.byterange&&(i.Range="bytes="+(n=e.byterange).offset+"-"+("bigint"==typeof n.offset||"bigint"==typeof n.length?t().BigInt(n.offset)+t().BigInt(n.length)-t().BigInt(1):n.offset+n.length-1)),i},Xo=function(e,t){return e.start(t)+"-"+e.end(t)},Yo=function(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")},Qo=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Jo=function(e){var t={};return Object.keys(e).forEach(function(n){var i=e[n];X(i)?t[n]={bytes:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength}:t[n]=i}),t},Zo=function(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},eu=function(e){return e.resolvedUri},tu=function(e){for(var t=Array.prototype.slice.call(e),n=16,i="",r=0;r<t.length/n;r++)i+=t.slice(r*n,r*n+n).map(Yo).join("")+" "+t.slice(r*n,r*n+n).map(Qo).join("")+"\n";return i},nu=Object.freeze({__proto__:null,createTransferableMessage:Jo,initSegmentId:Zo,segmentKeyId:eu,hexDump:tu,tagDump:function(e){var t=e.bytes;return tu(t)},textRanges:function(e){var t,n="";for(t=0;t<e.length;t++)n+=Xo(e,t)+" ";return n}}),iu=function(e){var t=e.playlist,n=e.time,i=void 0===n?void 0:n,r=e.callback;if(!r)throw new Error("getProgramTime: callback must be provided");if(!t||void 0===i)return r({message:"getProgramTime: playlist and time must be provided"});var a=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n,i=0,r=0;r<t.segments.length&&!(e<=(i=(n=t.segments[r]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration));r++);var a=t.segments[t.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>i){if(e>i+.25*a.duration)return null;n=a}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(i,t);if(!a)return r({message:"valid programTime was not found"});if("estimate"===a.type)return r({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var s={mediaSeconds:i},o=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,i=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*i)}(i,a.segment);return o&&(s.programDateTime=o.toISOString()),r(null,s)},ru=function e(t){var n=t.programTime,i=t.playlist,r=t.retryCount,a=void 0===r?2:r,
1s=t.seekTo,o=t.pauseAfterSeek,u=void 0===o||o,l=t.tech,c=t.callback;if(!c)throw new Error("seekToProgramTime: callback must be provided");if(void 0===n||!i||!s)return c({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!i.endList&&!l.hasStarted_)return c({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(i))return c({message:"programDateTime tags must be provided in the manifest "+i.resolvedUri});var d=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 i=t.segments[0];if(n<i.dateTimeObject)return null;for(var r=0;r<t.segments.length-1&&(i=t.segments[r],!(n<t.segments[r+1].dateTimeObject));r++);var a,s=t.segments[t.segments.length-1],o=s.dateTimeObject,u=s.videoTimingInfo?(a=s.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:s.duration+.25*s.duration;return n>new Date(o.getTime()+1e3*u)?null:(n>o&&(i=s),{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:Po.duration(t,t.mediaSequence+t.segments.indexOf(i)),type:i.videoTimingInfo?"accurate":"estimate"})}(n,i);if(!d)return c({message:n+" was not found in the stream"});var h=d.segment,p=function(e,t){var n,i;try{n=new Date(e),i=new Date(t)}catch(e){}var r=n.getTime();return(i.getTime()-r)/1e3}(h.dateTimeObject,n);if("estimate"===d.type)return 0===a?c({message:n+" is not buffered yet. Try again"}):(s(d.estimatedStart+p),void l.one("seeked",function(){e({programTime:n,playlist:i,retryCount:a-1,seekTo:s,pauseAfterSeek:u,tech:l,callback:c})}));var f=h.start+p;l.one("seeked",function(){return c(null,l.currentTime())}),u&&l.pause(),s(f)},au=function(e,t){if(4===e.readyState)return t()},su=function(e,t,n){var i,r=[],a=!1,s=function(e,t,i,r){return t.abort(),a=!0,n(e,t,i,r)},o=function(e,t){if(!a){if(e)return s(e,t,"",r);var n=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t=t.filter(function(e){return e&&(e.byteLength||e.length)&&"string"!=typeof e}),t.length<=1)return Y(t[0]);var i=t.reduce(function(e,t,n){return e+(t.byteLength||t.length)},0),r=new Uint8Array(i),a=0;return t.forEach(function(e){e=Y(e),r.set(e,a),a+=e.byteLength}),r}(r,te(n,!0)),i=i||ot(r),r.length<10||i&&r.length<i+2)return au(t,function(){return s(e,t,"",r)});var o=Ct(r);return"ts"===o&&r.length<188||!o&&r.length<376?au(t,function(){return s(e,t,"",r)}):s(null,t,o,r)}},u={uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",function(t){return t.total,t.loaded,$o(e,null,{statusCode:e.status},o)})}},l=t(u,function(e,t){return $o(l,e,t,o)});return l},ou=Ks.EventTarget,uu=Ks.mergeOptions,lu=function(e,t){if(!Fo(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(var n=0;n<e.segments.length;n++){var i=e.segments[n],r=t.segments[n];if(i.uri!==r.uri)return!1;if(i.byterange||r.byterange){var a=i.byterange,s=r.byterange;if(a&&!s||!a&&s)return!1;if(a.offset!==s.offset||a.length!==s.length)return!1}}return!0},cu=function(e,t,n,i){return"placeholder-uri-"+e+"-"+t+"-"+(i.attributes.NAME||n)},du=function(e,t,n){for(var i=!0,r=uu(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts}),a=0;a<t.playlists.length;a++){var s=t.playlists[a];if(s.sidx){var o=Pe(s.sidx);n&&n[o]&&n[o].sidx&&Te(s,n[o].sidx,s.sidx.resolvedUri)}var u=qo(r,s,lu);u&&(r=u,i=!1)}return Lo(t,function(e,t,n,a){if(e.playlists&&e.playlists.length){var s=e.playlists[0].id,o=qo(r,e.playlists[0],lu);o&&(a in(r=o).mediaGroups[t][n]||(r.mediaGroups[t][n][a]=e),r.mediaGroups[t][n][a].playlists[0]=r.playlists[s],i=!1)}}),function(e,t){Lo(e,function(n,i,r,a){a in t.mediaGroups[i][r]||delete e.mediaGroups[i][r][a]})}(r,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(i=!1),i?null:r},hu=function(e,t){return(Boolean(!e.map&&!t.map)||Boolean(e.map&&t.map&&e.map.byterange.offset===t.map.byterange.offset&&e.map.byterange.length===t.map.byterange.length))&&e.uri===t.uri&&e.byterange.offset===t.byterange.offset&&e.byterange.length===t.byterange.length},pu=function(e,t){var n={};for(var i in e){var r=e[i].sidx;if(r){var a=Pe(r);if(!t[a])break;var s=t[a].sidxInfo;hu(s,r)&&(n[a]=t[a])}}return n},fu=function(e){function n(t,n,i,r){var a;void 0===i&&(i={}),(a=e.call(this)||this).masterPlaylistLoader_=r||l(a),r||(a.isMaster_=!0);var s=i,o=s.withCredentials,u=void 0!==o&&o,c=s.handleManifestRedirects,d=void 0!==c&&c;if(a.vhs_=n,a.withCredentials=u,a.handleManifestRedirects=d,!t)throw new Error("A non-empty playlist URL or object is required");return a.on("minimumUpdatePeriod",function(){a.refreshXml_()}),a.on("mediaupdatetimeout",function(){a.refreshMedia_(a.media().id)}),a.state="HAVE_NOTHING",a.loadedPlaylists_={},a.logger_=Zs("DashPlaylistLoader"),a.isMaster_?(a.masterPlaylistLoader_.srcUrl=t,a.masterPlaylistLoader_.sidxMapping_={}):a.childPlaylist_=t,a}d(n,e);var i=n.prototype;return i.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)},i.addSidxSegments_=function(e,n,i){var r=this,a=e.sidx&&Pe(e.sidx);if(e.sidx&&a&&!this.masterPlaylistLoader_.sidxMapping_[a]){var s=Js(this.handleManifestRedirects,e.sidx.resolvedUri),o=function(t,s){if(!r.requestErrored_(t,s,n)){var o,u=r.masterPlaylistLoader_.sidxMapping_;try{o=at()(Y(s.response).subarray(8))}catch(e){return void r.requestErrored_(e,s,n)}return u[a]={sidxInfo:e.sidx,sidx:o},Te(e,o,e.sidx.resolvedUri),i(!0)}};this.request=su(s,this.vhs_.xhr,function(t,n,i,a){if(t)return o(t,n);if(!i||"mp4"!==i)return o({status:n.status,message:"Unsupported "+(i||"unknown")+" container type for sidx segment at URL: "+s,response:"",playlist:e,internal:!0,blackl
1istDuration:1/0,code:2},n);var u=e.sidx.byterange,l=u.offset,c=u.length;if(a.length>=c+l)return o(t,{response:a.subarray(l,l+c),status:n.status,uri:n.uri});r.request=r.vhs_.xhr({uri:s,responseType:"arraybuffer",headers:Ko({byterange:e.sidx.byterange})},o)})}else this.mediaRequest_=t().setTimeout(function(){return i(!1)},0)},i.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},t().clearTimeout(this.minimumUpdatePeriodTimeout_),t().clearTimeout(this.mediaRequest_),t().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()},i.hasPendingRequest=function(){return this.request||this.mediaRequest_},i.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},i.media=function(e){var t=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var n=this.state;if("string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,function(i){t.haveMetadata({startingState:n,playlist:e})}))},i.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")},i.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),t().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(t().clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)},i.load=function(e){var n=this;t().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var i=this.media();if(e){var r=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=t().setTimeout(function(){return n.load()},r)}else this.started?i&&!i.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()},i.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_=t().setTimeout(function(){return e.haveMaster_()},0)},i.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(n,i){if(!t.requestErrored_(n,i)){var r=i.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=i.responseText,i.responseHeaders&&i.responseHeaders.date?t.masterLoaded_=Date.parse(i.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=Js(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,i),r?(t.handleMaster_(),void t.syncClientServerClock_(function(){return e(i,r)})):e(i,r)}"HAVE_NOTHING"===t.state&&(t.started=!1)})},i.syncClientServerClock_=function(e){var t=this,n=it(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:Qs(this.masterPlaylistLoader_.srcUrl,n.value),method:n.method,withCredentials:this.withCredentials},function(i,r){if(t.request){if(i)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var a;a="HEAD"===n.method?r.responseHeaders&&r.responseHeaders.date?Date.parse(r.responseHeaders.date):t.masterLoaded_:Date.parse(r.responseText),t.masterPlaylistLoader_.clientOffset_=a-Date.now(),e()}}))},i.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},i.handleMaster_=function(){this.mediaRequest_=null;var e,t,n,i,r,a,s,o=this.masterPlaylistLoader_.master,u=(e={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:o},t=e.masterXml,n=e.srcUrl,i=e.clientOffset,r=e.sidxMapping,a=e.previousManifest,s=nt(t,{manifestUri:n,clientOffset:i,sidxMapping:r,previousManifest:a}),Mo(s,n,cu),s);o&&(u=du(o,u,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=u||o;var l=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return l&&l!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=l),(!o||u&&u.minimumUpdatePeriod!==o.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(u)},i.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(t().clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var n=e.master&&e.master.minimumUpdatePeriod;0===n&&(e.media()?n=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof n||n<=0?n<0&&this.logger_("found invalid minimumUpdatePeriod of "+n+", not setting a timeout"):this.createMUPTimeout_(n)},i.createMUPTimeout_=function(e){var n=this.masterPlaylistLoader_;n.minimumUpdatePeriodTimeout_=t().setTimeout(function(){n.minimumUpdatePeriodTimeout_=null,n.trigger("minimumUpdatePeriod"),n.createMUPTimeout_(e)},e)},i.refreshXml_=function(){var e=this;this.requestMaster_(function(t,n){var i,r,a;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(i=e.masterPlaylistLoader_.master,r=e.masterPlaylistLoader_.sidxMapping_,a=pu(i.playlists,r),Lo(i,function(e,t,n,i){if(e.playlists&&e.playlists.length){var s=e.playlists;a=uu(a,pu(s,r))}}),a),e.addSidxSegments_(e.media(),e.state,function(t){e.refreshMedia_(e.media().id)}))})},i.refreshMedia_=function(e){var n=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var i=this.masterPlaylistLoader_.master.playlists,r=!this.media_||this.media_!==i[e];if(r?this.media_=i[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){!function e(){n.media().endList||(n.mediaUpdateTimeout=t().setTimeout(function(){n.trigger("mediaupdatetimeout"),e()},Vo(n.media(),Boolean(r))))}()}this.trigger("loadedplaylist")},n}(ou),mu={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},gu=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},vu=function(e){return function(){var t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(n){var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),n=gu(new Worker(t));n.objURL=t;var i=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(t),i.call(this)},n}},yu=function(e){return"var browserWorkerPolyFill = "+gu.toString()+";\nbrowserWorkerPolyFill(self);\n"+e},_u=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},bu=yu(_u(function(){var e=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var i;return!!e[t]&&(i=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(i,1),i>-1)},this.trigger=function(t){var n,i,r,a;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(a=[],i=arguments.length,i=1;i<arguments.length;++i)a.push(arguments[i]);for(r=n.length,i=0;i<r;++i)n[i].apply(this,a)}},this.dispose=function(){e={}}}};e.prototype.pipe=function(e){return this.on("data",function(t){e.push(t)}),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},e.prototype.push=function(e){this.trigger("data",e)},e.prototype.flush=function(e){this.trigger("done",e)},e.prototype.partialFlush=function(e){this.trigger("partialdone",e)},e.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},e.prototype.reset=function(e){this.trigger("reset",e)};var t,i,r,a,s,o,u,l,c,d,h,p,f,m,g,v,y,_,b,T,w,S,k,E,C,A,P,x,I,O,L,D,M,R,N,U,B,j,F,q,V=e,H=Math.pow(2,32),W={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?
vendor: 14,674 bytes, line 1
1Number(t):t:n.getUint32(0)*H+n.getUint32(4)},MAX_UINT32:H},G=W.MAX_UINT32;!function(){var e;if(S={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(e in S)S.hasOwnProperty(e)&&(S[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);k=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),C=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),E=new Uint8Array([0,0,0,1]),A=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]),P=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]),x={video:A,audio:P},L=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),O=new Uint8Array([0,0,0,0,0,0,0,0]),D=new Uint8Array([0,0,0,0,0,0,0,0]),M=D,R=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),N=D,I=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,n,i=[],r=0;for(t=1;t<arguments.length;t++)i.push(arguments[t]);for(t=i.length;t--;)r+=i[t].byteLength;for(n=new Uint8Array(r+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,r=8;t<i.length;t++)n.set(i[t],r),r+=i[t].byteLength;return n},i=function(){return t(S.dinf,t(S.dref,L))},r=function(e){return t(S.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,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},g=function(e){return t(S.hdlr,x[e])},m=function(e){var n=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(n[12]=e.samplerate>>>24&255,n[13]=e.samplerate>>>16&255,n[14]=e.samplerate>>>8&255,n[15]=255&e.samplerate),t(S.mdhd,n)},f=function(e){return t(S.mdia,m(e),g(e.type),o(e))},s=function(e){return t(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},o=function(e){return t(S.minf,"video"===e.type?t(S.vmhd,I):t(S.smhd,O),i(),y(e))},u=function(e,n){for(var i=[],r=n.length;r--;)i[r]=b(n[r]);return t.apply(null,[S.moof,s(e)].concat(i))},l=function(e){for(var n=e.length,i=[];n--;)i[n]=h(e[n]);return t.apply(null,[S.moov,d(4294967295)].concat(i).concat(c(e)))},c=function(e){for(var n=e.length,i=[];n--;)i[n]=T(e[n]);return t.apply(null,[S.mvex].concat(i))},d=function(e){var n=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 t(S.mvhd,n)},v=function(e){var n,i,r=e.samples||[],a=new Uint8Array(4+r.length);for(i=0;i<r.length;i++)n=r[i].flags,a[i+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t(S.sdtp,a)},y=function(e){return t(S.stbl,_(e),t(S.stts,N),t(S.stsc,M),t(S.stsz,R),t(S.stco,D))},_=function(e){return t(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?U(e):B(e))},U=function(e){var n,i,r=e.sps||[],a=e.pps||[],s=[],o=[];for(n=0;n<r.length;n++)s.push((65280&r[n].byteLength)>>>8),s.push(255&r[n].byteLength),s=s.concat(Array.prototype.slice.call(r[n]));for(n=0;n<a.length;n++)o.push((65280&a[n].byteLength)>>>8),o.push(255&a[n].byteLength),o=o.concat(Array.prototype.slice.call(a[n]));if(i=[S.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t(S.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([r.length],s,[a.length],o))),t(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var u=e.sarRatio[0],l=e.sarRatio[1];i.push(t(S.pasp,new Uint8Array([(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u,(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l])))}return t.apply(null,i)},B=function(e){return t(S.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),r(e))},p=function(e){var n=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return t(S.tkhd,n)},b=function(e){var n,i,r,a,s,o;return n=t(S.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),s=Math.floor(e.baseMediaDecodeTime/G),o=Math.floor(e.baseMediaDecodeTime%G),i=t(S.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===e.type?(r=w(e,92),t(S.traf,n,i,r)):(a=v(e),r=w(e,a.length+92),t(S.traf,n,i,r,a))},h=function(e){return e.duration=e.duration||4294967295,t(S.trak,p(e),f(e))},T=function(e){var n=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(n[n.length-1]=0),t(S.trex,n)},q=function(e,t){var n=0,i=0,r=0,a=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(i=2),void 0!==e[0].flags&&(r=4),void 0!==e[0].compositionTimeOffset&&(a=8)),[0,0,n|i|r|a,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},F=function(e,n){var i,r,a,s,o,u;for(n+=20+16*(s=e.samples||[]).length,a=q(s,n),(r=new Uint8Array(a.length+16*s.length)).set(a),i=a.length,u=0;u<s.length;u++)o=s[u],r[i++]=(4278190080&o.duration)>>>24,r[i++]=(16711680&o.duration)>>>16,r[i++]=(65280&o.duration)>>>8,r[i++]=255&o.duration,r[i++]=(4278190080&o.size)>>>24,r[i++]=(16711680&o.size)>>>16,r[i++]=(65280&o.size)>>>8,r[i++]=255&o.size,r[i++]=o.flags.isLeading<<2|o.flags.dependsOn,r[i++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,r[i++]=61440&o.flags.degradationPriority,r[i++]=15&o.flags.degradationPriority,r[i++]=(4278190080&o.compositionTimeOffset)>>>24,r[i++]=(16711680&o.compositionTimeOffset)>>>16,r[i++]=(65280&o.compositionTimeOffset)>>>8,r[i++]=255&o.compositionTimeOffset;return t(S.trun,r)},j=function(e,n){var i,r,a,s,o,u;for(n+=20+8*(s=e.samples||[]).length,a=q(s,n),(i=new Uint8Array(a.length+8*s.length)).set(a),r=a.length,u=0;u<s.length;u++)o=s[u],i[r++]=(4278190080&o.duration)>>>24,i[r++]=(16711680&o.duration)>>>16,i[r++]=(65280&o.duration)>>>8,i[r++]=255&o.duration,i[r++]=(4278190080&o.size)>>>24,i[r++]=(16711680&o.size)>>>16,i[r++]=(65280&o.size)>>>8,i[r++]=255&o.size;return t(S.trun,i)},w=function(e,t){return"audio"===e.type?j(e,t):F(e,t)};a=function(){return t(S.ftyp,k,E,k,C)};var $,z,K,X,Y,Q,J,Z,ee=function(e){return t(S.mdat,e)},te=u,ne=function(e){var t,n=a(),i=l(e);return(t=new Uint8Array(n.byteLength+i.byteLength)).set(n),t.set(i,n.byteLength),t},ie=function(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n},re=function(e){var t,n,i=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,i.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(n=e[t]).nalUnitType?(i.length&&(i.duration=n.dts-i.dts,r.byteLength+=i.byteLength,r.nalCount+=i.length,r.duration+=i.duration,r.push(i)),(i=[n]).byteLength=n.data.byteLength,i.pts=n.pts,i.dts=n.dts):("slice_layer_without_partitioning_rbsp_idr"===n.nalUnitType&&(i.keyFrame=!0),i.duration=n.dts-i.dts,i.byteLength+=n.data.byteLength,i.push(n));return r.length&&(!i.duration||i.duration<=0)&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.length,r.duration+=i.duration,r.push(i),r},ae=function(e){var t,n,i=[],r=[];for(i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=e[0].pts,i.dts=e[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=e[0].pts,r.dts=e[0].dts,t=0;t<e.length;t++)(n=e[t]).keyFrame?(i.length&&(r.push(i),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration),(i=[n]).nalCount=n.length,i.byteLength=n.byteLength,i.pts=n.pts,i.dts=n.dts,i.duration=n.duration):(i.duration+=n.duration,i.nalCount+=n.length,i.byteLength+=n.byteLength,i.push(n));return r.length&&i.duration<=0&&(i.duration=r[r.length-1].duration),r.byteLength+=i.byteLength,r.nalCount+=i.nalCount,r.duration+=i.duration,r.push(i),r},se=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},oe=function(e,t){var n,i,r,a,s,o=t||0,u=[];for(n=0;n<e.length;n++)for(a=e[n],i=0;i<a.length;i++)s=a[i],o+=(r=ie(s,o)).size,u.push(r);return u},ue=function(e){var t,n,i,r,a,s,o=0,u=e.byteLength,l=e.nalCount,c=new Uint8Array(u+4*l),d=new DataView(c.buffer);for(t=0;t<e.length;t++)for(r=e[t],n=0;n<r.length;n++)for(a=r[n],i=0;i<a.length;i++)s=a[i],d.setUint32(o,s.data.byteLength),o+=4,c.set(s.data,o),o+=s.data.byteLength;return c},le=[33,16,5,32,164,27],ce=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],de=function(e){for(var t=[];e--;)t.push(0);return t},he=function(){if(!$){var e={96e3:[le,[227,64],de(154),[56]],88200:[le,[231],de(170),[56]],64e3:[le,[248,192],de(240),[56]],48e3:[le,[255,192],de(268),[55,148,128],de(54),[112]],44100:[le,[255,192],de(268),[55,163,128],de(84),[112]],32e3:[le,[255,192],de(268),[55,234],de(226),[112]],24e3:[le,[255,192],de(268),[55,255,128],de(268),[111,112],de(126),[224]],16e3:[le,[255,192],de(268),[55,255,128],de(268),[111,255],de(269),[223,108],de(195),[1,192]],12e3:[ce,de(268),[3,127,248],de(268),[6,255,240],de(268),[13,255,224],de(268),[27,253,128],de(259),[56]],11025:[ce,de(268),[3,127,248],de(268),[6,255,240],de(268),[13,255,224],de(268),[27,255,192],de(268),[55,175,128],de(108),[112]],8e3:[ce,de(268),[3,121,16],de(47),[7]]};t=e,$=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 $},pe=9e4;Q=function(e,t){return z(Y(e,t))},J=function(e,t){return K(X(e),t)},Z=function(e,t,n){return X(n?e:e-t)};var fe=pe,me=z=function(e){return e*pe},ge=(K=function(e,t){return e*t},X=function(e){return e/pe}),ve=(Y=function(e,t){return e/t},Q),ye=J,_e=Z,be=function(e,t,n,i){var r,a,s,o,u,l=0,c=0,d=0;if(t.length&&(r=ve(e.baseMediaDecodeTime,e.samplerate),a=Math.ceil(fe/(e.samplerate/1024)),n&&i&&(l=r-Math.max(n,i),d=(c=Math.floor(l/a))*a),!(c<1||d>fe/2))){for((s=he()[e.samplerate])||(s=t[0].data),o=0;o<c;o++)u=t[0],t.splice(0,0,{data:s,dts:u.dts-a,pts:u.pts-a});return e.baseMediaDecodeTime-=Math.floor(ye(d,e.samplerate)),d}},Te=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},we=function(e){var t,n,i=[];for(t=0;t<e.length;t++)n=e[t],i.push({size:n.data.byteLength,duration:1024});return i},Se=function(e){var t,n,i=0,r=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],r.set(n.data,i),i+=n.data.byteLength;return r},ke=fe,Ee=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},Ce=function(e,t){var n,i=e.minSegmentDts;return t||(i-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=i,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/ke,n=Math.floor(n)),n},Ae=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},Pe=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},i=0,r=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)i+=255,t++;for(i+=e[t++];255===e[t];)r+=255,t++;if(r+=e[t++],!n.payload&&4===i){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=i,n.payloadSize=r,n.payload=e.subarray(t,t+r);break}n.payload=void 0}t+=r,i=0,r=0}return n},xe=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)},Ie=function(e,t){var n,i,r,a,s=[];if(!(64&t[0]))return s;for(i=31&t[0],n=0;n<i;n++)a={type:3&t[(r=3*n)+2],pts:e},4&t[r+2]&&(a.ccData=t[r+3]<<8|t[r+4],s.push(a));return s},Oe=function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),n[a]=e[s];return n},Le=4,De=function e(t){t=t||{},e.prototype.init.call(this),this.parse708captions_="boolean"!=typeof t.parse708captions||t.parse708captions,this.captionPackets_=[],this.ccStreams_=[new He(0,0),new He(0,1),new He(1,0),new He(1,1)],this.parse708captions_&&(this.cc708Stream_=new Be({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")))};(De.prototype=new V).push=function(e){var t,n,i;
vendor: 7,518 bytes, line 1
1if("sei_rbsp"===e.nalUnitType&&(t=Pe(e.escapedRBSP)).payload&&t.payloadType===Le&&(n=xe(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));i=Ie(e.pts,n),this.captionPackets_=this.captionPackets_.concat(i),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},De.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return"flush"===e?t.flush():t.partialFlush()},this)},De.prototype.flushStream=function(e){this.captionPackets_.length?(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.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)},De.prototype.flush=function(){return this.flushStream("flush")},De.prototype.partialFlush=function(){return this.flushStream("partialFlush")},De.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},De.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)},De.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},De.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},De.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},De.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var Me={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},Re=function(e){return 32<=e&&e<=127||160<=e&&e<=255},Ne=function(e){this.windowNum=e,this.reset()};Ne.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},Ne.prototype.getText=function(){return this.rows.join("\n")},Ne.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Ne.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--},Ne.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Ne.prototype.addText=function(e){this.rows[this.rowIdx]+=e},Ne.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var Ue=function(e,t,n){this.serviceNum=e,this.text="",this.currentWindow=new Ne(-1),this.windows=[],this.stream=n,"string"==typeof t&&this.createTextDecoder(t)};Ue.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new Ne(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},Ue.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},Ue.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 Be=function e(t){t=t||{},e.prototype.init.call(this);var n,i=this,r=t.captionServices||{},a={};Object.keys(r).forEach(function(e){n=r[e],/^SERVICE/.test(e)&&(a[e]=n.encoding)}),this.serviceEncodings=a,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Be.prototype=new V,Be.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Be.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,i=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(i)},Be.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,n=null,i=null,r=0,a=t[r++];for(e.seq=a>>6,e.sizeCode=63&a;r<t.length;r++)i=31&(a=t[r++]),7===(n=a>>5)&&i>0&&(n=a=t[r++]),this.pushServiceBlock(n,r,i),i>0&&(r+=i-1)},Be.prototype.pushServiceBlock=function(e,t,n){var i,r=t,a=this.current708Packet.data,s=this.services[e];for(s||(s=this.initService(e,r));r<t+n&&r<a.length;r++)i=a[r],Re(i)?r=this.handleText(r,s):24===i?r=this.multiByteCharacter(r,s):16===i?r=this.extendedCommands(r,s):128<=i&&i<=135?r=this.setCurrentWindow(r,s):152<=i&&i<=159?r=this.defineWindow(r,s):136===i?r=this.clearWindows(r,s):140===i?r=this.deleteWindows(r,s):137===i?r=this.displayWindows(r,s):138===i?r=this.hideWindows(r,s):139===i?r=this.toggleWindows(r,s):151===i?r=this.setWindowAttributes(r,s):144===i?r=this.setPenAttributes(r,s):145===i?r=this.setPenColor(r,s):146===i?r=this.setPenLocation(r,s):143===i?s=this.reset(r,s):8===i?s.currentWindow.backspace():12===i?s.currentWindow.clearText():13===i?s.currentWindow.pendingNewLine=!0:14===i?s.currentWindow.clearText():141===i&&r++},Be.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return Re(n)&&(e=this.handleText(e,t,{isExtended:!0})),e},Be.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Be.prototype.initService=function(e,t){var n,i,r=this;return(n="SERVICE"+e)in this.serviceEncodings&&(i=this.serviceEncodings[n]),this.services[e]=new Ue(e,i,r),this.services[e].init(this.getPts(t),function(t){r.flushDisplayed(t,r.services[e])}),this.services[e]},Be.prototype.handleText=function(e,t,n){var i,r,a,s,o=n&&n.isExtended,u=n&&n.isMultiByte,l=this.current708Packet.data,c=o?4096:0,d=l[e],h=l[e+1],p=t.currentWindow;return t.textDecoder_&&!o?(u?(r=[d,h],e++):r=[d],i=t.textDecoder_.decode(new Uint8Array(r))):(s=Me[a=c|d]||a,i=4096&a&&a===s?"":String.fromCharCode(s)),p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(i),e},Be.prototype.multiByteCharacter=function(e,t){var n=this.current708Packet.data,i=n[e+1],r=n[e+2];return Re(i)&&Re(r)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Be.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},Be.prototype.defineWindow=function(e,t){var n=this.current708Packet.data,i=n[e],r=7&i;t.setCurrentWindow(r);var a=t.currentWindow;return i=n[++e],a.visible=(32&i)>>5,a.rowLock=(16&i)>>4,a.columnLock=(8&i)>>3,a.priority=7&i,i=n[++e],a.relativePositioning=(128&i)>>
vendor: 6,145 bytes, line 1
17,a.anchorVertical=127&i,i=n[++e],a.anchorHorizontal=i,i=n[++e],a.anchorPoint=(240&i)>>4,a.rowCount=15&i,i=n[++e],a.columnCount=63&i,i=n[++e],a.windowStyle=(56&i)>>3,a.penStyle=7&i,a.virtualRowCount=a.rowCount+1,e},Be.prototype.setWindowAttributes=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.winAttr;return i=n[++e],r.fillOpacity=(192&i)>>6,r.fillRed=(48&i)>>4,r.fillGreen=(12&i)>>2,r.fillBlue=3&i,i=n[++e],r.borderType=(192&i)>>6,r.borderRed=(48&i)>>4,r.borderGreen=(12&i)>>2,r.borderBlue=3&i,i=n[++e],r.borderType+=(128&i)>>5,r.wordWrap=(64&i)>>6,r.printDirection=(48&i)>>4,r.scrollDirection=(12&i)>>2,r.justify=3&i,i=n[++e],r.effectSpeed=(240&i)>>4,r.effectDirection=(12&i)>>2,r.displayEffect=3&i,e},Be.prototype.flushDisplayed=function(e,t){for(var n=[],i=0;i<8;i++)t.windows[i].visible&&!t.windows[i].isEmpty()&&n.push(t.windows[i].getText());t.endPts=e,t.text=n.join("\n\n"),this.pushCaption(t),t.startPts=e},Be.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)},Be.prototype.displayWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible=1);return e},Be.prototype.hideWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible=0);return e},Be.prototype.toggleWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&(t.windows[r].visible^=1);return e},Be.prototype.clearWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&t.windows[r].clearText();return e},Be.prototype.deleteWindows=function(e,t){var n=this.current708Packet.data[++e],i=this.getPts(e);this.flushDisplayed(i,t);for(var r=0;r<8;r++)n&1<<r&&t.windows[r].reset();return e},Be.prototype.setPenAttributes=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penAttr;return i=n[++e],r.textTag=(240&i)>>4,r.offset=(12&i)>>2,r.penSize=3&i,i=n[++e],r.italics=(128&i)>>7,r.underline=(64&i)>>6,r.edgeType=(56&i)>>3,r.fontStyle=7&i,e},Be.prototype.setPenColor=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penColor;return i=n[++e],r.fgOpacity=(192&i)>>6,r.fgRed=(48&i)>>4,r.fgGreen=(12&i)>>2,r.fgBlue=3&i,i=n[++e],r.bgOpacity=(192&i)>>6,r.bgRed=(48&i)>>4,r.bgGreen=(12&i)>>2,r.bgBlue=3&i,i=n[++e],r.edgeRed=(48&i)>>4,r.edgeGreen=(12&i)>>2,r.edgeBlue=3&i,e},Be.prototype.setPenLocation=function(e,t){var n=this.current708Packet.data,i=n[e],r=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,i=n[++e],r.row=15&i,i=n[++e],r.column=63&i,e},Be.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};var je={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},Fe=function(e){return null===e?"":(e=je[e]||e,String.fromCharCode(e))},qe=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ve=function(){for(var e=[],t=15;t--;)e.push("");return e},He=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,n,i,r,a;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),i=t>>>8,r=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),n=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=n,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Ve();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ve();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ve()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(i,r))a=Fe((i=(3&i)<<8)|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isExtCharacter(i,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),a=Fe((i=(3&i)<<8)|r),this[this.mode_](e.pts,a),this.column_++;else if(this.isMidRowCode(i,r))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14&~r||this.addFormatting(e.pts,["i"]),1&~r||this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(i,r))this.column_+=3&r;else if(this.isPAC(i,r)){var s=qe.indexOf(7968&t);"rollUp"===this.mode_&&(s-this.rollUpRows_+1<0&&(s=this.rollUpRows_-1),this.setRollUp(e.pts,s)
1),s!==this.row_&&(this.clearFormatting(e.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16&~t||(this.column_=4*((14&t)>>1)),this.isColorPAC(r)&&(14&~r||this.addFormatting(e.pts,["i"]))}else this.isNormalChar(i)&&(0===r&&(r=null),a=Fe(i),a+=Fe(r),this[this.mode_](e.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};He.prototype=new V,He.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e,t){try{return e.trim()}catch(e){return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+t+"."}),""}},this).join("\n").replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},He.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ve(),this.nonDisplayed_=Ve(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},He.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},He.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},He.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},He.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},He.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},He.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},He.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},He.prototype.isNormalChar=function(e){return e>=32&&e<=127},He.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ve(),this.displayed_=Ve()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},He.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,n)},He.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},He.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},He.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},He.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},He.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};var We={CaptionStream:De,Cea608Stream:He,Cea708Stream:Be},Ge={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},$e="shared",ze=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},Ke=function e(t){var n,i;e.prototype.init.call(this),this.type_=t||$e,this.push=function(e){this.type_!==$e&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=ze(e.dts,i),e.pts=ze(e.pts,i),n=e.dts,this.trigger("data",e))},this.flush=function(){i=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,n=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ke.prototype=new V;var Xe,Ye=Ke,Qe=ze,Je=function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r},Ze=function(e,t,n){return decodeURIComponent(Je(e,t,n))},et=function(e,t,n){return unescape(Je(e,t,n))},tt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},nt={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Ze(e.data,1,t),e.value=Ze(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=Ze(e.data,1,t),e.url=Ze(e.data,t+1,e.data.length);break}},PRIV:function(e){var t;for(t=0;t<e.data.length;
vendor: 16,222 bytes, line 1
1t++)if(0===e.data[t]){e.owner=et(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}};Xe=function(e){var t,n={descriptor:e&&e.descriptor},i=0,r=[],a=0;if(Xe.prototype.init.call(this),this.dispatchType=Ge.METADATA_STREAM_TYPE.toString(16),n.descriptor)for(t=0;t<n.descriptor.length;t++)this.dispatchType+=("00"+n.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,n,s,o,u;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(a=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),a+=e.data.byteLength,1===r.length&&(i=tt(e.data.subarray(6,10)),i+=10),!(a<i)){for(t={data:new Uint8Array(i),frames:[],pts:r[0].pts,dts:r[0].dts},u=0;u<i;)t.data.set(r[0].data.subarray(0,i-u),u),u+=r[0].data.byteLength,a-=r[0].data.byteLength,r.shift();n=10,64&t.data[5]&&(n+=4,n+=tt(t.data.subarray(10,14)),i-=tt(t.data.subarray(16,20)));do{if((s=tt(t.data.subarray(n+4,n+8)))<1)return void this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});if((o={id:String.fromCharCode(t.data[n],t.data[n+1],t.data[n+2],t.data[n+3]),data:t.data.subarray(n+10,n+s+10)}).key=o.id,nt[o.id]&&(nt[o.id](o),"com.apple.streaming.transportStreamTimestamp"===o.owner)){var l=o.data,c=(1&l[3])<<30|l[4]<<22|l[5]<<14|l[6]<<6|l[7]>>>2;c*=4,c+=3&l[7],o.timeStamp=c,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),n+=10,n+=s}while(n<i);this.trigger("data",t)}}},Xe.prototype=new V;var it,rt,at,st=Xe,ot=Ye,ut=188;(it=function(){var e=new Uint8Array(ut),t=0;it.prototype.init.call(this),this.push=function(n){var i,r=0,a=ut;for(t?((i=new Uint8Array(n.byteLength+t)).set(e.subarray(0,t)),i.set(n,t),t=0):i=n;a<i.byteLength;)71!==i[r]||71!==i[a]?(r++,a++):(this.trigger("data",i.subarray(r,a)),r+=ut,a+=ut);r<i.byteLength&&(e.set(i.subarray(r),0),t=i.byteLength-r)},this.flush=function(){t===ut&&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 V,rt=function(){var e,t,n,i;rt.prototype.init.call(this),i=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,i){var r=0;i.payloadUnitStartIndicator&&(r+=e[r]+1),"pat"===i.type?t(e.subarray(r),i):n(e.subarray(r),i)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],i.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=i.pmtPid},n=function(e,t){var n,r;if(1&e[5]){for(i.programMapTable={video:null,audio:null,"timed-metadata":{}},n=3+((15&e[1])<<8|e[2])-4,r=12+((15&e[10])<<8|e[11]);r<n;){var a=e[r],s=(31&e[r+1])<<8|e[r+2];a===Ge.H264_STREAM_TYPE&&null===i.programMapTable.video?i.programMapTable.video=s:a===Ge.ADTS_STREAM_TYPE&&null===i.programMapTable.audio?i.programMapTable.audio=s:a===Ge.METADATA_STREAM_TYPE&&(i.programMapTable["timed-metadata"][s]=a),r+=5+((15&e[r+3])<<8|e[r+4])}t.programMapTable=i.programMapTable}},this.push=function(t){var n={},i=4;if(n.payloadUnitStartIndicator=!!(64&t[1]),n.pid=31&t[1],n.pid<<=8,n.pid|=t[2],(48&t[3])>>>4>1&&(i+=t[i]+1),0===n.pid)n.type="pat",e(t.subarray(i),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",e(t.subarray(i),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,n]):this.processPes_(t,i,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=Ge.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=Ge.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}},rt.prototype=new V,rt.STREAM_TYPES={h264:27,adts:15},at=function(){var e,t=this,n=!1,i={data:[],size:0},r={data:[],size:0},a={data:[],size:0},s=function(e,n,i){var r,a,s=new Uint8Array(e.size),o={type:n},u=0,l=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,u=0;u<e.data.length;u++)a=e.data[u],s.set(a.data,l),l+=a.data.byteLength;var c,d,h,p;d=o,p=(c=s)[0]<<16|c[1]<<8|c[2],d.data=new Uint8Array,1===p&&(d.packetLength=6+(c[4]<<8|c[5]),d.dataAlignmentIndicator=!!(4&c[6]),192&(h=c[7])&&(d.pts=(14&c[9])<<27|(255&c[10])<<20|(254&c[11])<<12|(255&c[12])<<5|(254&c[13])>>>3,d.pts*=4,d.pts+=(6&c[13])>>>1,d.dts=d.pts,64&h&&(d.dts=(14&c[14])<<27|(255&c[15])<<20|(254&c[16])<<12|(255&c[17])<<5|(254&c[18])>>>3,d.dts*=4,d.dts+=(6&c[18])>>>1)),d.data=c.subarray(9+c[8])),r="video"===n||o.packetLength<=e.size,(i||r)&&(e.size=0,e.data.length=0),r&&t.trigger("data",o)}};at.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Ge.H264_STREAM_TYPE:e=i,t="video";break;case Ge.ADTS_STREAM_TYPE:e=r,t="audio";break;case Ge.METADATA_STREAM_TYPE:e=a,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&s(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var i={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),n=!0,t.trigger("data",i)}})[o.type]()},this.reset=function(){i.size=0,i.data.length=0,r.size=0,r.data.length=0,this.trigger("reset")},this.flushStreams_=function(){s(i,"video"),s(r,"audio"),s(a,"timed-metadata")},this.flush=function(){if(!n&&e){var i={type:"metadata",tracks:[]};null!==e.video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",i)}n=!1,this.flushStreams_(),this.trigger("done")}},at.prototype=new V;var lt={PAT_PID:0,MP2T_PACKET_LENGTH:ut,TransportPacketStream:it,TransportParseStream:rt,ElementaryStream:at,TimestampRolloverStream:ot,CaptionStream:We.CaptionStream,Cea608Stream:We.Cea608Stream,Cea708Stream:We.Cea708Stream,MetadataStream:st};for(var ct in Ge)Ge.hasOwnProperty(ct)&&(lt[ct]=Ge[ct]);var dt,ht=lt,pt=fe,ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];dt=function(e){var t,n=0;dt.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:"adts skiping bytes "+e+" to "+t+" in frame "+n+" outside syncword"})},this.push=function(i){var r,a,s,o,u,l=0;if(e||(n=0),"audio"===i.type){var c;for(t&&t.length?(s=t,(t=new Uint8Array(s.byteLength+i.data.byteLength)).set(s),t.set(i.data,s.byteLength)):t=i.data;l+7<t.length;)if(255===t[l]&&240==(246&t[l+1])){if("number"==typeof c&&(this.skipWarn_(c,l),c=null),a=2*(1&~t[l+1]),r=(3&t[l+3])<<11|t[l+4]<<3|(224&t[l+5])>>5,u=(o=1024*(1+(3&t[l+6])))*pt/ft[(60&t[l+2])>>>2],t.byteLength-l<r)break;this.trigger("data",{pts:i.pts+n*u,dts:i.dts+n*u,sampleCount:o,audioobjecttype:1+(t[l+2]>>>6&3),channelcount:(1&t[l+2])<<2|(192&t[l+3])>>>6,samplerate:ft[(60&t[l+2])>>>2],samplingfrequencyindex:(60&t[l+2])>>>2,samplesize:16,data:t.subarray(l+7+a,l+r)}),n++,l+=r}else"number"!=typeof c&&(c=l),l++;"number"==typeof c&&(this.skipWarn_(c,l),c=null),t=t.subarray(l)}},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")}},dt.prototype=new V;var mt,gt,vt,yt=dt,_t=function(e){var t=e.byteLength,n=0,i=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+i},this.loadWord=function(){var r=e.byteLength-t,a=new Uint8Array(4),s=Math.min(4,t);if(0===s)throw new Error("no bytes available");a.set(e.subarray(r,r+s)),n=new DataView(a.buffer).getUint32(0),i=8*s,t-=s},this.skipBits=function(e){var r;i>e?(n<<=e,i-=e):(e-=i,e-=8*(r=Math.floor(e/8)),t-=r,this.loadWord(),n<<=e,i-=e)},this.readBits=function(e){var r=Math.min(i,e),a=n>>>32-r;return(i-=r)>0?n<<=r:t>0&&this.loadWord(),(r=e-r)>0?a<<r|this.readBits(r):a},this.skipLeadingZeros=function(){var e;for(e=0;e<i;++e)if(n&2147483648>>>e)return n<<=e,i-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};gt=function(){var e,t,n=0;gt.prototype.init.call(this),this.push=function(i){var r;t?((r=new Uint8Array(t.byteLength+i.data.byteLength)).set(t),r.set(i.data,t.byteLength),t=r):t=i.data;for(var a=t.byteLength;n<a-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<a;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));do{e++}while(1!==t[e]&&e<a);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},gt.prototype=new V,vt={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},mt=function(){var e,t,n,i,r,a,s,o=new gt;mt.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,n=e.pts,i=e.dts,o.push(e))},o.on("data",function(s){var o={trackId:t,pts:n,dts:i,data:s,nalUnitTypeCode:31&s[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(s.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(s.subarray(1)),o.config=a(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)}),o.on("done",function(){e.trigger("done")}),o.on("partialdone",function(){e.trigger("partialdone")}),o.on("reset",function(){e.trigger("reset")}),o.on("endedtimeline",function(){e.trigger("endedtimeline")}),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},s=function(e,t){var n,i=8,r=8;for(n=0;n<e;n++)0!==r&&(r=(i+t.readExpGolomb()+256)%256),i=0===r?i:r},r=function(e){for(var t,n,i=e.byteLength,r=[],a=1;a<i-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(r.push(a+2),a+=2):a++;if(0===r.length)return e;t=i-r.length,n=new Uint8Array(t);var s=0;for(a=0;a<t;s++,a++)s===r[0]&&(s++,r.shift()),n[a]=e[s];return n},a=function(e){var t,n,i,r,a,o,u,l,c,d,h,p,f=0,m=0,g=0,v=0,y=[1,1];if(n=(t=new _t(e)).readUnsignedByte(),r=t.readUnsignedByte(),i=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),vt[n]&&(3===(a=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==a?8:12,p=0;p<h;p++)t.readBoolean()&&s(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),u=t.readUnsignedExpGolomb(),p=0;p<u;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(d=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(f=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:y=[1,1];break;case 2:y=[12,11];break;case 3:y=[10,11];break;case 4:y=[16,11];break;case 5:y=[40,33];break;case 6:y=[24,11];break;case 7:y=[20,11];break;case 8:y=[32,11];break;case 9:y=[80,33];break;case 10:y=[18,11];break;case 11:y=[15,11];break;case 12:y=[64,33];break;case 13:y=[160,99];break;case 14:y=[4,3];break;case 15:y=[3,2];break;case 16:y=[2,1];break;case 255:y=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}y&&(y[0],y[1])}return{profileIdc:n,levelIdc:i,profileCompatibility:r,width:16*(l+1)-2*f-2*m,height:(2-d)*(c+1)*16-2*g-2*v,sarRatio:y}}},mt.prototype=new V;var bt,Tt={H264Stream:mt,NalByteStream:gt},wt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],St=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},kt=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=St(t,n))},Et=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Ct=function(e,t,n){return unescape(function(e,t,n){var i,r="";for(i=t;i<n;i++)r+="%"+("00"+e[i].toString(16)).slice(-2);return r}(e,t,n))},At={isLikelyAacData:function(e){var t=kt(e,0);return e.length>=t+2&&!(255&~e[t])&&!(240&~e[t+1])&&16==(22&e[t+1])},parseId3TagSize:St,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,i=e[t+4]<<3;return 6144&e[t+3]|i|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&!(240&~e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return wt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,i;t=10,64&e[5]&&(t+=4,t+=Et(e.subarray(10,14)));do{if((n=Et(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){i=e.subarray(t+10,t+n+10);for(var r=0;r<i.byteLength;r++)if(0===i[r]){if("com.apple.streaming.transportStreamTimestamp"===Ct(i,0,r)){var a=i.subarray(r+1),s=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return s*=4,s+=3&a[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}};(bt=function(){var e=new Uint8Array,t=0;bt.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var i,r,a,s,o=0,u=0;for(e.length?(s=e.length,(e=new Uint8Array(n.byteLength+s)).set(e.subarray(0,s)),e.set(n,s)):e=n;e.length-u>=3;)if(e[u]!=="I".charCodeAt(0)||e[u+1]!=="D".charCodeAt(0)||e[u+2]!=="3".charCodeAt(0))if(255&~e[u]||240&~e[u+1])u++;else{if(e.length-u<7)break;if(u+(o=At.parseAdtsSize(e,u))>e.length)break;a={type:"audio",data:e.subarray(u,u+o),pts:t,dts:t},this.trigger("data",a),u+=o}else{if(e.length-u<10)break;if(u+(o=At.parseId3TagSize(e,u))>e.length)break;r={type:"timed-metadata",data:e.subarray(u,u+o)},this.trigger("data",r),u+=o}i=e.length-u,e=i>0?e.subarray(u):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new V;var Pt,xt,It,Ot,Lt=bt,Dt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Mt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Rt=Tt.H264Stream,Nt=At.isLikelyAacData,Ut=fe,Bt=function(e,t){t.stream=e,this.trigger("log",t)},jt=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",Bt.bind(e,r))}},Ft=function(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},qt=function(e,t,n,i,r,a){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(i-t),pts:e+(r-n)},prependedContentDuration:a,baseMediaDecodeTime:e}};xt=function(e,t){var n,i=[],r=0,a=0,s=1/0;n=(t=t||{}).firstSequenceNumber||0,xt.prototype.init.call(this),this.push=function(t){Ae(e,t),e&&Dt.forEach(function(n){e[n]=t[n]}),i.push(t)},this.setEarliestDts=function(e){r=e},this.setVideoBaseMediaDecodeTime=function(e){s=e},this.setAudioAppendStart=function(e){a=e},this.flush=function(){var o,u,l,c,d,h,p;0!==i.length?(o=Te(i,e,r),e.baseMediaDecodeTime=Ce(e,t.keepOriginalTimestamps),p=be(e,o,a,s),e.samples=we(o),l=ee(Se(o
vendor: 4,721 bytes, line 1
1)),i=[],u=te(n,[e]),c=new Uint8Array(u.byteLength+l.byteLength),n++,c.set(u),c.set(l,u.byteLength),Ee(e),d=Math.ceil(1024*Ut/e.samplerate),o.length&&(h=o.length*d,this.trigger("segmentTimingInfo",qt(ve(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+h,o[0].pts+h,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+h})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){Ee(e),i=[],this.trigger("reset")}},xt.prototype=new V,Pt=function(e,t){var n,i,r,a=[],s=[];n=(t=t||{}).firstSequenceNumber||0,Pt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){Ae(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.config,e.sps=[t.data],Mt.forEach(function(t){e[t]=i[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),a.push(t)},this.flush=function(){for(var i,r,o,u,l,c,d,h,p=0;a.length&&"access_unit_delimiter_rbsp"!==a[0].nalUnitType;)a.shift();if(0===a.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(i=re(a),(o=ae(i))[0][0].keyFrame||((r=this.getGopForFusion_(a[0],e))?(p=r.duration,o.unshift(r),o.byteLength+=r.byteLength,o.nalCount+=r.nalCount,o.pts=r.pts,o.dts=r.dts,o.duration+=r.duration):o=se(o)),s.length){var f;if(!(f=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");Ee(e),o=f}Ae(e,o),e.samples=oe(o),l=ee(ue(o)),e.baseMediaDecodeTime=Ce(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),d=o[0],h=o[o.length-1],this.trigger("segmentTimingInfo",qt(e.baseMediaDecodeTime,d.dts,d.pts,h.dts+h.duration,h.pts+h.duration,p)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),a=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),u=te(n,[e]),c=new Uint8Array(u.byteLength+l.byteLength),n++,c.set(u),c.set(l,u.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),a=[],this.gopCache_.length=0,s.length=0,this.trigger("reset")},this.resetStream_=function(){Ee(e),i=void 0,r=void 0},this.getGopForFusion_=function(t){var n,i,r,a,s,o=1/0;for(s=0;s<this.gopCache_.length;s++)r=(a=this.gopCache_[s]).gop,e.pps&&Ft(e.pps[0],a.pps[0])&&e.sps&&Ft(e.sps[0],a.sps[0])&&(r.dts<e.timelineStartInfo.dts||(n=t.dts-r.dts-r.duration)>=-1e4&&n<=45e3&&(!i||o>n)&&(i=a,o=n));return i?i.gop:null},this.alignGopsAtStart_=function(e){var t,n,i,r,a,o,u,l;for(a=e.byteLength,o=e.nalCount,u=e.duration,t=n=0;t<s.length&&n<e.length&&(i=s[t],r=e[n],i.pts!==r.pts);)r.pts>i.pts?t++:(n++,a-=r.byteLength,o-=r.nalCount,u-=r.duration);return 0===n?e:n===e.length?null:((l=e.slice(n)).byteLength=a,l.duration=u,l.nalCount=o,l.pts=l[0].pts,l.dts=l[0].dts,l)},this.alignGopsAtEnd_=function(e){var t,n,i,r,a,o,u;for(t=s.length-1,n=e.length-1,a=null,o=!1;t>=0&&n>=0;){if(i=s[t],r=e[n],i.pts===r.pts){o=!0;break}i.pts>r.pts?t--:(t===s.length-1&&(a=n),n--)}if(!o&&null===a)return null;if(0===(u=o?n:a))return e;var l=e.slice(u),c=l.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 l.byteLength=c.byteLength,l.duration=c.duration,l.nalCount=c.nalCount,l.pts=l[0].pts,l.dts=l[0].dts,l},this.alignGopsWith=function(e){s=e}},Pt.prototype=new V,Ot=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,Ot.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}},Ot.prototype=new V,Ot.prototype.flush=function(e){var t,n,i,r,a=0,s={captions:[],captionStream
vendor: 21,556 bytes, line 1
1s:{},metadata:[],info:{}},o=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?(o=this.videoTrack.timelineStartInfo.pts,Mt.forEach(function(e){s.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Dt.forEach(function(e){s.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,i=ne(this.pendingTracks),s.initSegment=new Uint8Array(i.byteLength),s.initSegment.set(i),s.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)s.data.set(this.pendingBoxes[r],a),a+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(t=this.pendingCaptions[r]).startTime=_e(t.startPts,o,this.keepOriginalTimestamps),t.endTime=_e(t.endPts,o,this.keepOriginalTimestamps),s.captionStreams[t.stream]=!0,s.captions.push(t);for(r=0;r<this.pendingMetadata.length;r++)(n=this.pendingMetadata[r]).cueTime=_e(n.pts,o,this.keepOriginalTimestamps),s.metadata.push(n);for(s.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",s),r=0;r<s.captions.length;r++)t=s.captions[r],this.trigger("caption",t);for(r=0;r<s.metadata.length;r++)n=s.metadata[r],this.trigger("id3Frame",n)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Ot.prototype.setRemux=function(e){this.remuxTracks=e},It=function(e){var t,n,i=this,r=!0;It.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="aac",r.metadataStream=new ht.MetadataStream,r.aacStream=new Lt,r.audioTimestampRolloverStream=new ht.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new ht.TimestampRolloverStream("timed-metadata"),r.adtsStream=new yt,r.coalesceStream=new Ot(e,r.metadataStream),r.headOfPipeline=r.aacStream,r.aacStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.aacStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.metadataStream.on("timestamp",function(e){r.aacStream.setTimestamp(e.timeStamp)}),r.aacStream.on("data",function(a){"timed-metadata"!==a.type&&"audio"!==a.type||r.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:i.baseMediaDecodeTime},codec:"adts",type:"audio"},r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new xt(n,e),r.audioSegmentStream.on("log",i.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream),i.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t}))}),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),jt(this,r)},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new ht.MetadataStream,r.packetStream=new ht.TransportPacketStream,r.parseStream=new ht.TransportParseStream,r.elementaryStream=new ht.ElementaryStream,r.timestampRolloverStream=new ht.TimestampRolloverStream,r.adtsStream=new yt,r.h264Stream=new Rt,r.captionStream=new ht.CaptionStream(e),r.coalesceStream=new Ot(e,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream).pipe(r.timestampRolloverStream),r.timestampRolloverStream.pipe(r.h264Stream),r.timestampRolloverStream.pipe(r.adtsStream),r.timestampRolloverStream.pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",function(a){var s;if("metadata"===a.type){for(s=a.tracks.length;s--;)t||"video"!==a.tracks[s].type?n||"audio"!==a.tracks[s].type||((n=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime):(t=a.tracks[s]).timelineStartInfo.baseMediaDecodeTime=i.baseMediaDecodeTime;t&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new Pt(t,e),r.videoSegmentStream.on("log",i.getLogTrigger_("videoSegmentStream")),r.videoSegmentStream.on("timelineStartInfo",function(t){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=t,r.audioSegmentStream.setEarliestDts(t.dts-i.baseMediaDecodeTime))}),r.videoSegmentStream.on("processedGopsInfo",i.trigger.bind(i,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",function(e){n&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),r.videoSegmentStream.on("timingInfo",i.trigger.bind(i,"videoTimingInfo")),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),n&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new xt(n,e),r.audioSegmentStream.on("log",i.getLogTrigger_("audioSegmentStream")),r.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),r.audioSegmentStream.on("segmentTimingInfo",i.trigger.bind(i,"audioSegmentTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream)),i.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!t})}}),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("id3Frame",function(e){e.dispatchType=r.metadataStream.dispatchType,i.trigger("id3Frame",e)}),r.coalesceStream.on("caption",this.trigger.bind(this,"caption")),r.coalesceStream.on("done",this.trigger.bind(this,"done")),jt(this,r)},this.setBaseMediaDecodeTime=function(i){var r=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=i),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,Ee(n),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),t&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,Ee(t),r.captionStream.reset()),r.timestampRolloverStream&&r.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(n){n.stream=e,t.trigger("log",n)}},this.push=function(e){if(r){var t=Nt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){r=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},It.prototype=new V;var Vt,Ht,Wt,Gt={Transmuxer:It,VideoSegmentStream:Pt,AudioSegmentStream:xt,AUDIO_PROPERTIES:Dt,VIDEO_PROPERTIES:Mt,generateSegmentTimingInfo:qt},$t=function(e){return e>>>0},zt=function(e){return("00"+e.toString(16)).slice(-2)},Kt=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])},Xt=$t,Yt=function e(t,n){var i,r,a,s,o,u=[];if(!n.length)return null;for(i=0;i<t.byteLength;)r=Xt(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3]),a=Kt(t.subarray(i+4,i+8)),s=r>1?i+r:t.byteLength,a===n[0]&&(1===n.length?u.push(t.subarray(i+8,s)):(o=e(t.subarray(i+8,s),n.slice(1))).length&&(u=u.concat(o))),i=s;return u},Qt=$t,Jt=W.getUint64,Zt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=Jt(e.subarray(4)):t.baseMediaDecodeTime=Qt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},en=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]}},tn=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],o=2&n.flags[1],u=4&n.flags[1],l=8&n.flags[1],c=i.getUint32(4),d=8;for(r&&(n.dataOffset=i.getInt32(d),d+=4),a&&c&&(t={flags:en(e.subarray(d,d+4))},d+=4,s&&(t.duration=i.getUint32(d),d+=4),o&&(t.size=i.getUint32(d),d+=4),l&&(1===n.version?t.compositionTimeOffset=i.getInt32(d):t.compositionTimeOffset=i.getUint32(d),d+=4),n.samples.push(t),c--);c--;)t={},s&&(t.duration=i.getUint32(d),d+=4),o&&(t.size=i.getUint32(d),d+=4),u&&(t.flags=en(e.subarray(d,d+4)),d+=4),l&&(1===n.version?t.compositionTimeOffset=i.getInt32(d):t.compositionTimeOffset=i.getUint32(d),d+=4),n.samples.push(t);return n},nn=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},r=1&i.flags[2],a=2&i.flags[2],s=8&i.flags[2],o=16&i.flags[2],u=32&i.flags[2],l=65536&i.flags[0],c=131072&i.flags[0];return t=8,r&&(t+=4,i.baseDataOffset=n.getUint32(12),t+=4),a&&(i.sampleDescriptionIndex=n.getUint32(t),t+=4),s&&(i.defaultSampleDuration=n.getUint32(t),t+=4),o&&(i.defaultSampleSize=n.getUint32(t),t+=4),u&&(i.defaultSampleFlags=n.getUint32(t)),l&&(i.durationIsEmpty=!0),!r&&c&&(i.baseDataOffsetIsMoof=!0),i},rn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},an="undefined"!=typeof window?window:void 0!==rn?rn:"undefined"!=typeof self?self:{},sn=Oe,on=We.CaptionStream,un=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},ln=function(e,t){var n=Yt(e,["moof","traf"]),i=Yt(e,["mdat"]),r={},a=[];return i.forEach(function(e,t){var i=n[t];a.push({mdat:e,traf:i})}),a.forEach(function(e){var n,i,a=e.mdat,s=e.traf,o=Yt(s,["tfhd"]),u=nn(o[0]),l=u.trackId,c=Yt(s,["tfdt"]),d=c.length>0?Zt(c[0]).baseMediaDecodeTime:0,h=Yt(s,["trun"]);t===l&&h.length>0&&(n=function(e,t,n){var i=t,r=n.defaultSampleDuration||0,a=n.defaultSampleSize||0,s=n.trackId,o=[];return e.forEach(function(e){var t=tn(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=r),void 0===e.size&&(e.size=a),e.trackId=s,e.dts=i,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof i?(e.pts=i+an.BigInt(e.compositionTimeOffset),i+=an.BigInt(e.duration)):(e.pts=i+e.compositionTimeOffset,i+=e.duration)}),o=o.concat(t)}),o}(h,d,u),i=function(e,t,n){var i,r,a,s,o=new DataView(e.buffer,e.byteOffset,e.byteLength),u={logs:[],seiNals:[]};for(r=0;r+4<e.length;r+=a)if(a=o.getUint32(r),r+=4,!(a<=0))switch(31&e[r]){case 6:var l=e.subarray(r+1,r+1+a),c=un(r,t);if(i={nalUnitType:"sei_rbsp",size:a,data:l,escapedRBSP:sn(l),trackId:n},c)i.pts=c.pts,i.dts=c.dts,s=c;else{if(!s){u.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+r+" for trackId "+n+". See mux.js#223."});break}i.pts=s.pts,i.dts=s.dts}u.seiNals.push(i)}return u}(a,n,l),r[l]||(r[l]={seiNals:[],logs:[]}),r[l].seiNals=r[l].seiNals.concat(i.seiNals),r[l].logs=r[l].logs.concat(i.logs))}),r},cn=function(){var e,t,n,i,r,a,s=!1;this.isInitialized=function(){return s},this.init=function(t){e=new on,s=!0,a=!!t&&t.isPartial,e.on("data",function(e){e.startTime=e.startPts/i,e.endTime=e.endPts/i,r.captions.push(e),r.captionStreams[e.stream]=!0}),e.on("log",function(e){r.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]||i!==t[n])},this.parse=function(e,a,s){var o;if(!this.isInitialized())return null;if(!a||!s)return null;if(this.isNewInit(a,s))n=a[0],i=s[n];else if(null===n||!i)return t.push(e),null;for(;t.length>0;){var u=t.shift();this.parse(u,a,s)}return o=function(e,t,n){if(null===t)return null;var i=ln(e,t)[t]||{};return{seiNals:i.seiNals,logs:i.logs,timescale:n}}(e,n,i),o&&o.logs&&(r.logs=r.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):r.logs.length?{logs:r.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach(function(t){e.push(t)})},this.flushStream=function(){if(!this.isInitialized())return null;a?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={},r.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],n=null,i=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},dn=$t,hn=zt,pn=W.getUint64;Vt=function(e,t){var n=Yt(t,["moof","traf"]).reduce(function(t,n){var i,r,a=Yt(n,["tfhd"])[0],s=dn(a[4]<<24|a[5]<<16|a[6]<<8|a[7]),o=e[s]||9e4,u=Yt(n,["tfdt"])[0],l=new DataView(u.buffer,u.byteOffset,u.byteLength);return"bigint"==typeof(i=1===u[0]?pn(u.subarray(4,12)):l.getUint32(4))?r=i/an.BigInt(o):"number"!=typeof i||isNaN(i)||(r=i/o),r<Number.MAX_SAFE_INTEGER&&(r=Number(r)),r<t&&(t=r),t},1/0);return"bigint"==typeof n||isFinite(n)?n:0},Wt=function(e){var t=0===e[0]?12:20;return dn(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},Ht=function(e){var t=Yt(e,["moov","trak"]),n=[];return t.forEach(function(e){var t,i,r={},a=Yt(e,["tkhd"])[0];a&&(i=(t=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0),r.id=0===i?t.getUint32(12):t.getUint32(20));var s=Yt(e,["mdia","hdlr"])[0];if(s){var o=Kt(s.subarray(8,12));r.type="vide"===o?"video":"soun"===o?"audio":o}var u=Yt(e,["mdia","minf","stbl","stsd"])[0];if(u){var l=u.subarray(8);r.codec=Kt(l.subarray(4,8));var c,d=Yt(l,[r.codec])[0];d&&(/^[asm]vc[1-9]$/i.test(r.codec)?(c=d.subarray(78),"avcC"===Kt(c.subarray(4,8))&&c.length>11?(r.codec+=".",r.codec+=hn(c[9]),r.codec+=hn(c[10]),r.codec+=hn(c[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)?(c=d.subarray(28),"esds"===Kt(c.subarray(4,8))&&c.length>20&&0!==c[19]?(r.codec+="."+hn(c[19]),r.codec+="."+hn(c[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"):r.codec=r.codec.toLowerCase())}var h=Yt(e,["mdia","mdhd"])[0];h&&(r.timescale=Wt(h)),n.push(r)}),n};var fn=Vt,mn=Ht,gn=function(e){var t=31&e[1];return t<<=8,t|=e[2]},vn=function(e){return!!(64&e[1])},yn=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},_n=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}},bn={parseType:function(e,t){var n=gn(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=vn(e),n=4+yn(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=vn(e),i=4+yn(e);if(n&&(i+=e[i]+1),1&e[i+5]){var r;r=3+((15&e[i+1])<<8|e[i+2])-4;for(var a=12+((15&e[i+10])<<8|e[i+11]);a<r;){var s=i+a;t[(31&e[s+1])<<8|e[s+2]]=e[s],a+=5+((15&e[s+3])<<8|e[s+4])}return t}},parsePayloadUnitStartIndicator:vn,parsePesType:function(e,t){switch(t[gn(e)]){case Ge.H264_STREAM_TYPE:return"video";case Ge.ADTS_STREAM_TYPE:return"audio";case Ge.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!vn(e))return null;var t=4+yn(e);if(t>=e.byteLength)return null;var n,i=null;return 192&(n=e[t+7])&&((i={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,i.pts*=4,i.pts+=(6&e[t+13])>>>1,i.dts=i.pts,64&n&&(i.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,i.dts*=4,i.dts+=(6&e[t+18])>>>1)),i},videoPacketContainsKeyFrame:function(e){for(var t=4+yn(e),n=e.subarray(t),i=0,r=0,a=!1;r<n.byteLength-3;r++)if(1===n[r+2]){i=r+5;break}for(;i<n.byteLength;)switch(n[i]){case 0:if(0!==n[i-1]){i+=2;break}if(0!==n[i-2]){i++;break}r+3!==i-2&&"slice_layer_without_partitioning_rbsp_idr"===_n(31&n[r+3])&&(a=!0);do{i++}while(1!==n[i]&&i<n.length);r=i-2,i+=3;break;case 1:if(0!==n[i-1]||0!==n[i-2]){i+=3;break}"slice_layer_without_partitioning_rbsp_idr"===_n(31&n[r+3])&&(a=!0),r=i-2,i+=3;break;default:i+=3}return n=n.subarray(r),i-=r,r=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===_n(31&n[r+3])&&(a=!0),a}},Tn=Qe,wn={};wn.ts=bn,wn.aac=At;var Sn=fe,kn=188,En=71,Cn=function(e,t,n){for(var i,r,a,s,o=0,u=kn,l=!1;u<=e.byteLength;)if(e[o]!==En||e[u]!==En&&u!==e.byteLength)o++,u++;else{if(i=e.subarray(o,u),"pes"===wn.ts.parseType(i,t.pid))r=wn.ts.parsePesType(i,t.table),a=wn.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&a&&(s=wn.ts.parsePesTime(i))&&(s.type="audio",n.audio.push(s),l=!0);if(l)break;o+=kn,u+=kn}for(o=(u=e.byteLength)-kn,l=!1;o>=0;)if(e[o]!==En||e[u]!==En&&u!==e.byteLength)o--,u--;else{if(i=e.subarray(o,u),"pes"===wn.ts.parseType(i,t.pid))r=wn.ts.parsePesType(i,t.table),a=wn.ts.parsePayloadUnitStartIndicator(i),"audio"===r&&a&&(s=wn.ts.parsePesTime(i))&&(s.type="audio",n.audio.push(s),l=!0);if(l)break;o-=kn,u-=kn}},An=function(e,t,n){for(var i,r,a,s,o,u,l,c=0,d=kn,h=!1,p={data:[],size:0};d<e.byteLength;)if(e[c]!==En||e[d]!==En)c++,d++;else{if(i=e.subarray(c,d),"pes"===wn.ts.parseType(i,t.pid))if(r=wn.ts.parsePesType(i,t.table),a=wn.ts.parsePayloadUnitStartIndicator(i),"video"===r&&(a&&!h&&(s=wn.ts.parsePesTime(i))&&(s.type="video",n.video.push(s),h=!0),!n.firstKeyFrame)){if(a&&0!==p.size){for(o=new Uint8Array(p.size),u=0;p.data.length;)l=p.data.shift(),o.set(l,u),u+=l.byteLength;if(wn.ts.videoPacketContainsKeyFrame(o)){var f=wn.ts.parsePesTime(o);f?(n.firstKeyFrame=f,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.")}p.size=0}p.data.push(i),p.size+=i.byteLength}if(h&&n.firstKeyFrame)break;c+=kn,d+=kn}for(c=(d=e.byteLength)-kn,h=!1;c>=0;)if(e[c]!==En||e[d]!==En)c--,d--;else{if(i=e.subarray(c,d),"pes"===wn.ts.parseType(i,t.pid))r=wn.ts.parsePesType(i,t.table),a=wn.ts.parsePayloadUnitStartIndicator(i),"video"===r&&a&&(s=wn.ts.parsePesTime(i))&&(s.type="video",n.video.push(s),h=!0);if(h)break;c-=kn,d-=kn}},Pn=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,i=0,r=kn;r<e.byteLength;)if(e[i]!==En||e[r]!==En)i++,r++;else{switch(n=e.subarray(i,r),wn.ts.parseType(n,t.pid)){case"pat":t.pid=wn.ts.parsePat(n);break;case"pmt":var a=wn.ts.parsePmt(n);t.table=t.table||{},Object.keys(a).forEach(function(e){t.table[e]=a[e]})}i+=kn,r+=kn}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case Ge.H264_STREAM_TYPE:n.video=[],An(e,t,n),0===n.video.length&&delete n.video;break;case Ge.ADTS_STREAM_TYPE:n.audio=[],Cn(e,t,n),0===n.audio.length&&delete n.audio}}return n},xn=function(e,t){var n;return n=wn.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,i=0,r=null,a=null,s=0,o=0;e.length-o>=3;){switch(wn.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){n=!0;break}if((s=wn.aac.parseId3TagSize(e,o))>e.length){n=!0;break}null===a&&(t=e.subarray(o,o+s),a=wn.aac.parseAacTimestamp(t)),o+=s;break;case"audio":if(e.length-o<7){n=!0;break}if((s=wn.aac.parseAdtsSize(e,o))>e.length){n=!0;break}null===r&&(t=e.subarray(o,o+s),r=wn.aac.parseSampleRate(t)),i++,o+=s;break;default:o++}if(n)return null}if(null===r||null===a)return null;var u=Sn/r;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*i*u,pts:a+1024*i*u}]}}(e):Pn(e),n&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;(void 0===n||isNaN(n))&&(n=e.audio[0].dts),e.audio.forEach(function(e){e.dts=Tn(e.dts,n),e.pts=Tn(e.pts,n),e.dtsTime=e.dts/Sn,e.ptsTime=e.pts/Sn})}if(e.video&&e.video.length){var i=t;if((void 0===i||isNaN(i))&&(i=e.video[0].dts),e.video.forEach(function(e){e.dts=Tn(e.dts,i),e.pts=Tn(e.pts,i),e.dtsTime=e.dts/Sn,e.ptsTime=e.pts/Sn}),e.firstKeyFrame){var r=e.firstKeyFrame;r.dts=Tn(r.dts,i),r.pts=Tn(r.pts,i),r.dtsTime=r.dts/Sn,r.ptsTime=r.pts/Sn}}}(n,t),n):null},In=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 Gt.Transmuxer(this.options),function(e,t){t.on("data",function(t){var n=t.initSegment;t.initSegment={data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength};var i=t.data;t.data=i.buffer,e.postMessage({action:"data",segment:t,byteOffset:i.byteOffset,byteLength:i.byteLength},[t.data])}),t.on("done",function(t){e.postMessage({action:"done"})}),t.on("gopInfo",function(t){e.postMessage({action:"gopInfo",gopInfo:t})}),t.on("videoSegmentTimingInfo",function(t){var n={start:{decode:ge(t.start.dts),presentation:ge(t.start.pts)},end:{decode:ge(t.end.dts),presentation:ge(t.end.pts)},baseMediaDecodeTime:ge(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=ge(t.prepe
1ndedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})}),t.on("audioSegmentTimingInfo",function(t){var n={start:{decode:ge(t.start.dts),presentation:ge(t.start.pts)},end:{decode:ge(t.end.dts),presentation:ge(t.end.pts)},baseMediaDecodeTime:ge(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=ge(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})}),t.on("id3Frame",function(t){e.postMessage({action:"id3Frame",id3Frame:t})}),t.on("caption",function(t){e.postMessage({action:"caption",caption:t})}),t.on("trackinfo",function(t){e.postMessage({action:"trackinfo",trackInfo:t})}),t.on("audioTimingInfo",function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:ge(t.start),end:ge(t.end)}})}),t.on("videoTimingInfo",function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ge(t.start),end:ge(t.end)}})}),t.on("log",function(t){e.postMessage({action:"log",log:t})})}(this.self,this.transmuxer)},t.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new cn,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],logs:n&&n.logs||[],data:t.buffer},[t.buffer])},t.probeMp4StartTime=function(e){var t=e.timescales,n=e.data,i=fn(t,n);this.self.postMessage({action:"probeMp4StartTime",startTime:i,data:n},[n.buffer])},t.probeMp4Tracks=function(e){var t=e.data,n=mn(t);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:t},[t.buffer])},t.probeTs=function(e){var t=e.data,n=e.baseStartTime,i="number"!=typeof n||isNaN(n)?void 0:n*fe,r=xn(t,i),a=null;r&&((a={hasVideo:r.video&&2===r.video.length||!1,hasAudio:r.audio&&2===r.audio.length||!1}).hasVideo&&(a.videoStart=r.video[0].ptsTime),a.hasAudio&&(a.audioStart=r.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:a,data:t},[t.buffer])},t.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},t.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},t.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},t.reset=function(){this.transmuxer.reset()},t.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(me(t)))},t.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(me(e.appendStart)))},t.setRemux=function(e){this.transmuxer.setRemux(e.remux)},t.flush=function(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},t.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},t.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},e}();self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new In(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new In(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})),Tu=vu(bu),wu=function(e){var t=e.transmuxer,n=e.bytes,i=e.audioAppendStart,r=e.gopsToAlignWith,a=e.remux,s=e.onData,o=e.onTrackInfo,u=e.onAudioTimingInfo,l=e.onVideoTimingInfo,c=e.onVideoSegmentTimingInfo,d=e.onAudioSegmentTimingInfo,h=e.onId3,p=e.onCaptions,f=e.onDone,m=e.onEndedTimeline,g=e.onTransmuxerLog,v=e.isEndOfTimeline,y={buffer:[]},_=v;if(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var i=e.data.segment,r=i.type,a=i.initSegment,s=i.captions,o=i.captionStreams,u=i.metadata,l=i.videoFrameDtsTime,c=i.videoFramePtsTime;t.buffer.push({captions:s,captionStreams:o,metadata:u});var d=e.data.segment.boxes||{data:e.data.segment.data},h={type:r,data:new Uint8Array(d.data,d.data.byteOffset,d.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};void 0!==l&&(h.videoFrameDtsTime=l),void 0!==c&&(h.videoFramePtsTime=c),n(h)}(n,y,s),"trackinfo"===n.data.action&&o(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,y),"audioTimingInfo"===n.data.action&&u(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&l(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&c(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&d(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&h([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&p(n.data.caption),"endedtimeline"===n.data.action&&(_=!1,m()),"log"===n.data.action&&g(n.data.log),"transmuxed"===n.data.type&&(_||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:y,callback:f}),Su(t))))},i&&t.postMessage({action:"setAudioAppendStart",appendStart:i}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),void 0!==a&&t.postMessage({action:"setRemux",remux:a}),n.byteLength){var b=n instanceof ArrayBuffer?n:n.buffer,T=n instanceof ArrayBuffer?0:n.byteOffset;t.postMessage({action:"push",data:b,byteOffset:T,byteLength:n.byteLength},[b])}v&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},Su=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():wu(e.currentTransmux))}
1,ku=function(e,t){e.postMessage({action:t}),Su(e)},Eu=function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void ku(t,e);t.transmuxQueue.push(ku.bind(null,t,e))},Cu=function(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void wu(e);e.transmuxer.transmuxQueue.push(e)},Au=function(e){Eu("reset",e)},Pu=function(e){var t=new Tu;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},xu=function(e){var t=e.transmuxer,n=e.endAction||e.action,i=e.callback,r=s({},e,{endAction:null,transmuxer:null,callback:null});if(t.addEventListener("message",function r(a){a.data.action===n&&(t.removeEventListener("message",r),a.data.data&&(a.data.data=new Uint8Array(a.data.data,e.byteOffset||0,e.byteLength||a.data.data.byteLength),e.data&&(e.data=a.data.data)),i(a.data))}),e.data){var a=e.data instanceof ArrayBuffer;r.byteOffset=a?0:e.data.byteOffset,r.byteLength=e.data.byteLength;var o=[a?e.data:e.data.buffer];t.postMessage(r,o)}else t.postMessage(r)},Iu=2,Ou=-101,Lu=-102,Du=function(e){e.forEach(function(e){e.abort()})},Mu=function(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Ou,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Lu,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Iu,xhr:t}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:Iu,xhr:t}:null},Ru=function(e,t,n){return function(i,r){var a=r.response,s=Mu(i,r);if(s)return n(s,e);if(16!==a.byteLength)return n({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:Iu,xhr:r},e);for(var o=new DataView(a),u=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]),l=0;l<t.length;l++)t[l].bytes=u;return n(null,e)}},Nu=function(e,t){var n=Ct(e.map.bytes);if("mp4"!==n){var i=e.map.resolvedUri||e.map.uri;return t({internal:!0,message:"Found unsupported "+(n||"unknown")+" container for initialization segment at URL: "+i,
1code:Iu})}xu({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:function(n){var i=n.tracks,r=n.data;return e.map.bytes=r,i.forEach(function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))}),t(null)}})},Uu=function(e){var t=e.segment,n=e.finishProcessingFn,i=e.responseType;return function(e,r){var a=Mu(e,r);if(a)return n(a,t);var s="arraybuffer"!==i&&r.responseText?function(e){for(var t=new Uint8Array(new ArrayBuffer(e.length)),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t.buffer}(r.responseText.substring(t.lastReachedChar||0)):r.response;return t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(r),t.key?t.encryptedBytes=new Uint8Array(s):t.bytes=new Uint8Array(s),n(null,t)}},Bu=function(e){var t=e.segment,n=e.bytes,i=e.trackInfoFn,r=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=t.map&&t.map.tracks||{},m=Boolean(f.audio&&f.video),g=r.bind(null,t,"audio","start"),v=r.bind(null,t,"audio","end"),y=r.bind(null,t,"video","start"),_=r.bind(null,t,"video","end");xu({action:"probeTs",transmuxer:t.transmuxer,data:n,baseStartTime:t.baseStartTime,callback:function(e){t.bytes=n=e.data;var r=e.result;r&&(i(t,{hasAudio:r.hasAudio,hasVideo:r.hasVideo,isMuxed:m}),i=null,r.hasAudio&&!m&&g(r.audioStart),r.hasVideo&&y(r.videoStart),g=null,y=null),Cu({bytes:n,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,remux:m,onData:function(e){e.type="combined"===e.type?"video":e.type,d(t,e)},onTrackInfo:function(e){i&&(m&&(e.isMuxed=!0),i(t,e))},onAudioTimingInfo:function(e){g&&void 0!==e.start&&(g(e.start),g=null),v&&void 0!==e.end&&v(e.end)},onVideoTimingInfo:function(e){y&&void 0!==e.start&&(y(e.start),y=null),_&&void 0!==e.end&&_(e.end)},onVideoSegmentTimingInfo:function(e){a(e)},onAudioSegmentTimingInfo:function(e){s(e)},onId3:function(e,n){o(t,e,n)},onCaptions:function(e){u(t,[e])},isEndOfTimeline:l,onEndedTimeline:function(){c()},onTransmuxerLog:p,onDone:function(e){h&&(e.type="combined"===e.type?"video":e.type,h(null,t,e))}})}})},ju=function(e){var t=e.segment,n=e.bytes,i=e.trackInfoFn,r=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=new Uint8Array(n);if(function(e){return ct(e,["moof"]).length>0}(f)){t.isFmp4=!0;var m=t.map.tracks,g={isFmp4:!0,hasVideo:!!m.video,hasAudio:!!m.audio};m.audio&&m.audio.codec&&"enca"!==m.audio.codec&&(g.audioCodec=m.audio.codec),m.video&&m.video.codec&&"encv"!==m.video.codec&&(g.videoCodec=m.video.codec),m.video&&m.audio&&(g.isMuxed=!0),i(t,g);var v=function(e){d(t,{data:f,type:g.hasAudio&&!g.isMuxed?"audio":"video"}),e&&e.length&&u(t,e),h(null,t,{})};xu({action:"probeMp4StartTime",timescales:t.map.timescales,data:f,transmuxer:t.transmuxer,callback:function(e){var i=e.data,a=e.startTime;n=i.buffer,t.bytes=f=i,g.hasAudio&&!g.isMuxed&&r(t,"audio","start",a),g.hasVideo&&r(t,"video","start",a),m.video&&i.byteLength&&t.transmuxer?xu({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:t.transmuxer,data:f,timescales:t.map.timescales,trackIds:[m.video.id],callback:function(e){n=e.data.buffer,t.bytes=f=e.data,e.logs.forEach(function(e){p(Ks.mergeOptions(e,{stream:"mp4CaptionParser"}))}),v(e.captions)}}):v()}})}else if(t.transmuxer){if(void 0===t.container&&(t.container=Ct(f)),"ts"!==t.container&&"aac"!==t.container)return i(t,{hasAudio:!1,hasVideo:!1}),void h(null,t,{});Bu({segment:t,bytes:n,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p})}else h(null,t,{})},Fu=function(e,t){var n,i=e.id,r=e.key,a=e.encryptedBytes,s=e.decryptionWorker;s.addEventListener("message",function e(n){if(n.data.source===i){s.removeEventListener("message",e);var r=n.data.decrypted;t(new Uint8Array(r.bytes,r.byteOffset,r.byteLength))}}),n=r.bytes.slice?r.bytes.slice():new Uint32Array(Array.prototype.slice.call(r.bytes)),s.postMessage(Jo({source:i,encrypted:a,key:n,iv:r.iv}),[a.buffer,n.buffer])},qu=function(e){var t=e.activeXhrs,n=e.decryptionWorker,i=e.trackInfoFn,r=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog,f=0,m=!1;return function(e,g){if(!m){if(e)return m=!0,Du(t),h(e,g);if((f+=1)===t.length){var v=function(){if(g.encryptedBytes)return function(e){var t=e.decryptionWorker,n=e.segment,i=e.trackInfoFn,r=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,s=e.audioSegmentTimingInfoFn,o=e.id3Fn,u=e.captionsFn,l=e.isEndOfTimeline,c=e.endedTimelineFn,d=e.dataFn,h=e.doneFn,p=e.onTransmuxerLog;Fu({id:n.requestId,key:n.key,encryptedBytes:n.encryptedBytes,decryptionWorker:t}
1,function(e){n.bytes=e,ju({segment:n,bytes:n.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p})})}({decryptionWorker:n,segment:g,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p});ju({segment:g,bytes:g.bytes,trackInfoFn:i,timingInfoFn:r,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:s,id3Fn:o,captionsFn:u,isEndOfTimeline:l,endedTimelineFn:c,dataFn:d,doneFn:h,onTransmuxerLog:p})};if(g.endOfAllRequests=Date.now(),g.map&&g.map.encryptedBytes&&!g.map.bytes)return Fu({decryptionWorker:n,id:g.requestId+"-init",encryptedBytes:g.map.encryptedBytes,key:g.map.key},function(e){g.map.bytes=e,Nu(g,function(e){if(e)return Du(t),h(e,g);v()})});v()}}}},Vu=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=Ks.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)}},Hu=function(e){var t=e.xhr,n=e.xhrOptions,i=e.decryptionWorker,r=e.segment,a=e.abortFn,s=e.progressFn,o=e.trackInfoFn,u=e.timingInfoFn,l=e.videoSegmentTimingInfoFn,c=e.audioSegmentTimingInfoFn,d=e.id3Fn,h=e.captionsFn,p=e.isEndOfTimeline,f=e.endedTimelineFn,m=e.dataFn,g=e.doneFn,v=e.onTransmuxerLog,y=[],_=qu({activeXhrs:y,decryptionWorker:i,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:f,dataFn:m,doneFn:g,onTransmuxerLog:v});if(r.key&&!r.key.bytes){var b=[r.key];r.map&&!r.map.bytes&&r.map.key&&r.map.key.resolvedUri===r.key.resolvedUri&&b.push(r.map.key);var T=t(Ks.mergeOptions(n,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),Ru(r,b,_));y.push(T)}if(r.map&&!r.map.bytes){if(r.map.key&&(!r.key||r.key.resolvedUri!==r.map.key.resolvedUri)){var w=t(Ks.mergeOptions(n,{uri:r.map.key.resolvedUri,responseType:"arraybuffer"}),Ru(r,[r.map.key],_));y.push(w)}var S=Ks.mergeOptions(n,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Ko(r.map)}),k=function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,i){var r=Mu(e,i);if(r)return n(r,t);var a=new Uint8Array(i.response);if(t.map.key)return t.map.encryptedBytes=a,n(null,t);t.map.bytes=a,Nu(t,function(e){if(e)return e.xhr=i,e.status=i.status,n(e,t);n(null,t)})}}({segment:r,finishProcessingFn:_}),E=t(S,k);y.push(E)}var C=Ks.mergeOptions(n,{uri:r.part&&r.part.resolvedUri||r.resolvedUri,responseType:"arraybuffer",headers:Ko(r)}),A=t(C,Uu({segment:r,finishProcessingFn:_,responseType:C.responseType}));A.addEventListener("progress",Vu({segment:r,progressFn:s,trackInfoFn:o,timingInfoFn:u,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:c,id3Fn:d,captionsFn:h,isEndOfTimeline:p,endedTimelineFn:f,dataFn:m})),y.push(A);var P={};return y.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:P,abortFn:a}))}),function(){return Du(y)}},Wu=Zs("CodecUtils"),Gu=function(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]},$u=function(e){var t={};return e.forEach(function(e){var n=e.mediaType,i=e.type,r=e.details;t[n]=t[n]||[],t[n].push(j(""+i+r))}),Object.keys(t).forEach(function(e){if(t[e].length>1)return Wu("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},zu=function(e){var t=0;return e.audio&&t++,e.video&&t++,t},Ku=function(e,t){var n=t.attributes||{},i=$u(function(e){var t=e.attributes||{};if(t.CODECS)return F(t.CODECS)}(t)||[]);if(Gu(e,t)&&!i.audio&&!function(e,t){if(!Gu(e,t))return!0;var n=t.attributes||{},i=e.mediaGroups.AUDIO[n.AUDIO];for(var r in i)if(!i[r].uri&&!i[r].playlists)return!0;return!1}(e,t)){var r=$u(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var i in n){var r=n[i];if(r.default&&r.playlists)return F(r.playlists[0].attributes.CODECS)}return null}(e,n.AUDIO)||[]);r.audio&&(i.audio=r.audio)}return i},Xu=Zs("PlaylistSelector"),Yu=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||""})}},Qu=function(e,n){if(!e)return"";var i=t().getComputedStyle(e);return i?i[n]:""},Ju=function(e,t){var n=e.slice();e.sort(function(e,i){var r=t(e,i);return 0===r?n.indexOf(e)-n.indexOf(i):r})},Zu=function(e,n){var i,r;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||t().Number.MAX_VALUE,n.attributes.BANDWIDTH&&(r=n.attributes.BANDWIDTH),i-(r=r||t().Number.MAX_VALUE)},el=function(e,n,i,r,a,s){if(e){var o={bandwidth:n,width:i,height:r,limitRenditionByPlayerDimensions:a},u=e.playlists;Po.isAudioOnly(e)&&(u=s.getAudioTrackPlaylists_(),o.audioOnly=!0);var l=u.map(function(e){var n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes&&e.attributes.BANDWIDTH||t().Number.MAX_VALUE,width:n,height:i,playlist:e}});Ju(l,function(e,t){return e.bandwidth-t.bandwidth});var c=(l=l.filter(function(e){return!Po.isIncompatible(e.playlist)})).filter(function(e){return Po.isEnabled(e.playlist)});c.length||(c=l.filter(function(e){return!Po.isDisabled(e.playlist)}));var d=c.filter(function(e){return e.bandwidth*mu.BANDWIDTH_VARIANCE<n}),h=d[d.length-1],p=d.filter(function(e){return e.bandwidth===h.bandwidth})[0];if(!1===a){var f=p||c[0]||l[0];if(f&&f.playlist){var m="sortedPlaylistReps";return p&&(m="bandwidthBestRep"),c[0]&&(m="enabledPlaylistReps"),Xu("
1choosing "+Yu(f)+" using "+m+" with options",o),f.playlist}return Xu("could not choose a playlist with options",o),null}var g=d.filter(function(e){return e.width&&e.height});Ju(g,function(e,t){return e.width-t.width});var v=g.filter(function(e){return e.width===i&&e.height===r});h=v[v.length-1];var y,_,b,T,w=v.filter(function(e){return e.bandwidth===h.bandwidth})[0];if(w||(_=(y=g.filter(function(e){return e.width>i||e.height>r})).filter(function(e){return e.width===y[0].width&&e.height===y[0].height}),h=_[_.length-1],b=_.filter(function(e){return e.bandwidth===h.bandwidth})[0]),s.experimentalLeastPixelDiffSelector){var S=g.map(function(e){return e.pixelDiff=Math.abs(e.width-i)+Math.abs(e.height-r),e});Ju(S,function(e,t){return e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff}),T=S[0]}var k=T||b||w||p||c[0]||l[0];if(k&&k.playlist){var E="sortedPlaylistReps";return T?E="leastPixelDiffRep":b?E="resolutionPlusOneRep":w?E="resolutionBestRep":p?E="bandwidthBestRep":c[0]&&(E="enabledPlaylistReps"),Xu("choosing "+Yu(k)+" using "+E+" with options",o),k.playlist}return Xu("could not choose a playlist with options",o),null}},tl=function(){var e=this.useDevicePixelRatio&&t().devicePixelRatio||1;return el(this.playlists.master,this.systemBandwidth,parseInt(Qu(this.tech_.el(),"width"),10)*e,parseInt(Qu(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},nl=function(e){var n=e.inbandTextTracks,i=e.metadataArray,r=e.timestampOffset,a=e.videoDuration;if(i){var s=t().WebKitDataCue||t().VTTCue,o=n.metadataTrack_;if(o&&(i.forEach(function(e){var n=e.cueTime+r;!("number"!=typeof n||t().isNaN(n)||n<0)&&n<1/0&&e.frames.forEach(function(e){var t=new s(n,n,e.value||e.url||e.data||"");t.frame=e,t.value=e,function(e){Object.defineProperties(e.frame,{id:{get:function(){return Ks.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return Ks.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return Ks.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(t),o.addCue(t)})}),o.cues&&o.cues.length)){for(var u=o.cues,l=[],c=0;c<u.length;c++)u[c]&&l.push(u[c]);var d=l.reduce(function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e},{}),h=Object.keys(d).sort(function(e,t){return Number(e)-Number(t)});h.forEach(function(e,t){var n=d[e],i=Number(h[t+1])||a;n.forEach(function(e){e.endTime=i})})}}},il=function(e,t,n){var i,r;if(n&&n.cues)for(i=n.cues.length;i--;)(r=n.cues[i]).startTime>=e&&r.endTime<=t&&n.removeCue(r)},rl=function(e){return"number"==typeof e&&isFinite(e)},al=1/60,sl=function(e){var t=e.startOfSegment,n=e.duration,i=e.segment,r=e.part,a=e.playlist,s=a.mediaSequence,o=a.id,u=a.segments,l=void 0===u?[]:u,c=e.mediaIndex,d=e.partIndex,h=e.timeline,p=l.length-1,f="mediaIndex/partIndex increment";e.getMediaInfoForTime?f="getMediaInfoForTime ("+e.getMediaInfoForTime+")":e.isSyncRequest&&(f="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(f+=" with independent "+e.independent);var m="number"==typeof d,g=e.segment.uri?"segment":"pre-segment",v=m?fo({preloadSegment:i})-1:0;return g+" ["+(s+c)+"/"+(s+p)+"]"+(m?" part ["+d+"/"+v+"]":"")+" segment start/end ["+i.start+" => "+i.end+"]"+(m?" part start/end ["+r.start+" => "+r.end+"]":"")+" startOfSegment ["+t+"] duration ["+n+"] timeline ["+h+"] selected by ["+f+"] playlist ["+o+"]"},ol=function(e){return e+"TimingInfo"},ul=function(e){var t=e.timelineChangeController,n=e.currentTimeline,i=e.segmentTimeline,r=e.loaderType,a=e.audioDisabled;if(n===i)return!1;if("audio"===r){var s=t.lastTimelineChange({type:"main"});return!s||s.to!==i}if("main"===r&&a){var o=t.pendingTimelineChange({type:"audio"});return!o||o.to!==i}return!1},ll=function(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+eo},cl=function(e,n){if("hls"!==n)return null;var i,r,a=(i={audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo},r=0,["video","audio"].forEach(function(e){var n=i[e+"TimingInfo"];if(n){var a,s=n.start,o=n.end;"bigint"==typeof s||"bigint"==typeof o?a=t().BigInt(o)-t().BigInt(s):"number"==typeof s&&"number"==typeof o&&(a=o-s),void 0!==a&&a>r&&(r=a)}}),"bigint"==typeof r&&r<Number.MAX_SAFE_INTEGER&&(r=Number(r)),r);if(!a)return null;var s=e.playlist.targetDuration,o=ll({segmentDuration:a,maxDuration:2*s}),u=ll({segmentDuration:a,maxDuration:s}),l="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+a+" when the reported duration is "+e.duration+" and the target duration is "+s+". 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 o||u?{severity:o?"warn":"info",message:l}:null},dl=function(e){function n(t,n){var i;if(i=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 i.bandwidth=t.bandwidth,i.throughput={rate:0,count:0},i.roundTrip=NaN,i.resetStats_(),i.mediaIndex=null,i.partIndex=null,i.hasPlayed_=t.hasPlayed,i.currentTime_=t.currentTime,i.seekable_=t.seekable,i.seeking_=t.seeking,i.duration_=t.duration,i.mediaSource_=t.mediaSource,i.vhs_=t.vhs,i.loaderType_=t.loaderType,i.currentMediaInfo_=void 0,i.startingMediaInfo_=void 0,i.segmentMetadataTrack_=t.segmentMetadataTrack,i.goalBufferLength_=t.goalBufferLength,i.sourceType_=t.sourceType,i.sourceUpdater_=t.sourceUpdater,i.inbandTextTracks_=t.inbandTextTracks,i.state_="INIT",i.timelineChangeController_=t.timelineChangeController,i.shouldSaveSegmentTimingInfo_=!0,i.parse708captions_=t.parse708captions,i.useDtsForTimestampOffset_=t.useDtsForTimestampOffset,i.captionServices_=t.captionServices,i.experimentalExactManifestTimings=t.experimentalExactManifestTimings,i.checkBufferTimeout_=null,i.error_=void 0,i.currentTimeline_=-1,i.pendingSegment_=null,i.xhrOptions_=null,i.pendingSegments_=[],i.audioDisabled_=!1,i.isPendingTimestampOffset_=!1,i.gopBuffer_=[],i.timeMapping_=0,i.safeAppend_=Ks.browser.IE_VERSION>=11,i.appendInitSegment_={audio:!0,video:!0},i.playlistOfLastInitSegment_={audio:null,video:null},i.callQueue_=[],i.loadQueue_=[],i.metadataQueue_={id3:[],caption:[]},i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=null,i.activeInitSegmentId_=null,i.initSegments_={},i.cacheEncryptionKeys_=t.cacheEncryptionKeys,i.keyCache_={},i.decrypter_=t.decrypter,i.syncController_=t.syncController,i.syncPoint_={segmentIndex:0,time:0},i.transmuxer_=i.createTransmuxer_(),i.triggerSyncInfoUpdate_=function(){return i.trigger("syncinfoupdate")},i.syncController_.on("syncinfoupdate",i.triggerSyncInfoUpdate_),i.mediaSource_.addEventListener("sourceopen",function(){i.isEndOfStream_
1()||(i.ended_=!1)}),i.fetchAtBuffer_=!1,i.logger_=Zs("SegmentLoader["+i.loaderType_+"]"),Object.defineProperty(l(i),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),i.sourceUpdater_.on("ready",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),"main"===i.loaderType_&&i.timelineChangeController_.on("pendingtimelinechange",function(){i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),"audio"===i.loaderType_&&i.timelineChangeController_.on("timelinechange",function(){i.hasEnoughInfoToLoad_()&&i.processLoadQueue_(),i.hasEnoughInfoToAppend_()&&i.processCallQueue_()}),i}d(n,e);var i=n.prototype;return i.createTransmuxer_=function(){return Pu({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},i.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},i.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&t().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},i.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},i.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},i.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,t().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},i.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},i.error=function(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},i.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Au(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},i.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Ks.createTimeRanges();if("main"===this.loaderType_){var t=e.hasAudio,n=e.hasVideo,i=e.isMuxed;if(n&&t&&!this.audioDisabled_&&!i)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},i.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Zo(e),i=this.initSegments_[n];return t&&!i&&e.bytes&&(this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),i||e},i.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=eu(e),i=this.keyCache_[n];this.cacheEncryptionKeys_&&t&&!i&&e.bytes&&(this.keyCache_[n]=i={resolvedUri:e.resolvedUri,bytes:e.bytes});var r={resolvedUri:(i||e).resolvedUri};return i&&(r.bytes=i.bytes),r},i.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},i.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"))},i.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},i.playlist=function(e,t){if(void 0===t&&(t={}),e){var n=this.playlist_,i=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));var r=null;if(n&&(n.id?r=n.id:n.uri&&(r=n.uri)),this.logger_("playlist update ["+r
1+" => "+(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 a=e.mediaSequence-n.mediaSequence;if(this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex)if(this.mediaIndex-=a,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var s=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!s.parts||!s.parts.length||!s.parts[this.partIndex])){var o=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=o}}i&&(i.mediaIndex-=a,i.mediaIndex<0?(i.mediaIndex=null,i.partIndex=null):(i.mediaIndex>=0&&(i.segment=e.segments[i.mediaIndex]),i.partIndex>=0&&i.segment.parts&&(i.part=i.segment.parts[i.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}},i.pause=function(){this.checkBufferTimeout_&&(t().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},i.paused=function(){return null===this.checkBufferTimeout_},i.resetEverything=function(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},i.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},i.resyncLoader=function(){this.transmuxer_&&Au(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"})},i.remove=function(e,t,n,i){if(void 0===n&&(n=function(){}),void 0===i&&(i=!1),t===1/0&&(t=this.duration_()),t<=e)this.logger_("skipping remove because end ${end} is <= start ${start}");else if(this.sourceUpdater_&&this.getMediaInfo_()){var r=1,a=function(){0===--r&&n()};for(var s in!i&&this.audioDisabled_||(r++,this.sourceUpdater_.removeAudio(e,t,a)),(i||"main"===this.loaderType_)&&(this.gopBuffer_=function(e,t,n,i){for(var r=Math.ceil((t-i)*At.ONE_SECOND_IN_TS),a=Math.ceil((n-i)*At.ONE_SECOND_IN_TS),s=e.slice(),o=e.length;o--&&!(e[o].pts<=a););if(-1===o)return s;for(var u=o+1;u--&&!(e[u].pts<=r););return u=Math.max(u,0),s.splice(u,o-u+1),s}(this.gopBuffer_,e,t,this.timeMapping_),r++,this.sourceUpdater_.removeVideo(e,t,a)),this.inbandTextTracks_)il(e,t,this.inbandTextTracks_[s]);il(e,t,this.segmentMetadataTrack_),a()}else this.logger_("skipping remove because no source updater or starting media info")},i.monitorBuffer_=function(){this.checkBufferTimeout_&&t().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=t().setTimeout(this.monitorBufferTick_.bind(this),1)},i.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&t().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=t().setTimeout(this.monitorBufferTick_.bind(this),500)},i.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))}},i.isEndOfStream_=function(e,t,n){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),void 0===n&&(n=this.partIndex),!t||!this.mediaSource_)return!1;var i="number"==typeof e&&t.segments[e],r=e+1===t.segments.length,a=!i||!i.parts||n+1===i.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&r&&a},i.chooseNextRequest_=function(){var e=this.buffered_(),t=oo(e)||0,n=uo(e,this.currentTime_()),i=!this.hasPlayed_()&&n>=1,r=n>=this.goalBufferLength_(),a=this.playlist_.segments;if(!a.length||i||r)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var s={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(s.isSyncRequest)s.mediaIndex=function(e,t,n){t=t||[];for(var i=[],r=0,a=0;a<t.length;a++){var s=t[a];if(e===s.timeline&&(i.push(a),(r+=s.duration)>n))return a}return 0===i.length?0:i[i.length-1]}(this.currentTimeline_,a,t);else if(null!==this.mediaIndex){var o=a[this.mediaIndex],u="number"==typeof this.partIndex?this.partIndex:-1;s.startOfSegment=o.end?o.end:t,o.parts&&o.parts[u+1]?(s.mediaIndex=this.mediaIndex,s.partIndex=u+1):s.mediaIndex=this.mediaIndex+1}else{var l=Po.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}),c=l.segmentIndex,d=l.startTime,h=l.partIndex;s.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),s.mediaIndex=c,s.startOfSegment=d,s.partIndex=h}var p=a[s.mediaIndex],f=p&&"number"==typeof s.partIndex&&p.parts&&p.parts[s.partIndex];if(!p||"number"==typeof s.partIndex&&!f)return null;if("number"!=typeof s.partIndex&&p.parts&&(s.partIndex=0,f=p.parts[0]),!n&&f&&!f.independent)if(0===s.partIndex){var m=a[s.mediaIndex-1],g=m.parts&&m.parts.length&&m.parts[m.parts.length-1];g&&g.independent&&(s.mediaIndex-=1,s.partIndex=m.parts.length-1,s.independent="previous segment")}else p.parts[s.partIndex-1].independent&&(s.partIndex-=1,s.independent="previous part");var v=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return s.mediaIndex>=a.length-1&&v&&!this.seeking_()?null:this.generateSegmentInfo_(s)},i.generateSegmentInfo_=function(e){var t=e.independent,n=e.playlist,i=e.mediaIndex,r=e.startOfSegment,a=e.isSyncRequest,s=e.partIndex,o=e.forceTimestampOffset,u=e.getMediaInfoForTime,l=n.segments[i],c="number"==typeof s&&l.parts[s],d={requestId:"segment-loader-"+Math.random(),uri:c&&c.resolvedUri||l.resolvedUri,mediaIndex:i,partIndex:c?s:null,isSyncRequest:a,startOfSegment:r,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:l.timeline,duration:c&&c.duration||l.duration,segment:l,part:c,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:u,independent:t},h=void 0!==o?o:this.isPendingTimestampOffset_;d.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:l.timeline,currentTimeline:this.currentTimeline_,startOfSegment:r,buffered:this.buffered_(),overrideCheck:h});
1var p=oo(this.sourceUpdater_.audioBuffered());return"number"==typeof p&&(d.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(d.gopsToAlignWith=function(e,t,n){if(null==t||!e.length)return[];var i,r=Math.ceil((t-n+3)*At.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_)),d},i.timestampOffsetForSegment_=function(e){return n=(t=e).segmentTimeline,i=t.currentTimeline,r=t.startOfSegment,a=t.buffered,t.overrideCheck||n!==i?n<i?r:a.length?a.end(a.length-1):r:null;var t,n,i,r,a},i.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,i=this.pendingSegment_.duration,r=Po.estimateSegmentRequestTime(i,n,this.playlist_,e.bytesReceived),a=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(!(r<=a)){var s=function(e){var t=e.master,n=e.currentTime,i=e.bandwidth,r=e.duration,a=e.segmentDuration,s=e.timeUntilRebuffer,o=e.currentTimeline,u=e.syncController,l=t.playlists.filter(function(e){return!Po.isIncompatible(e)}),c=l.filter(Po.isEnabled);c.length||(c=l.filter(function(e){return!Po.isDisabled(e)}));var d=c.filter(Po.hasAttribute.bind(null,"BANDWIDTH")).map(function(e){var t=u.getSyncPoint(e,r,o,n)?1:2;return{playlist:e,rebufferingImpact:Po.estimateSegmentRequestTime(a,i,e)*t-s}}),h=d.filter(function(e){return e.rebufferingImpact<=0});return Ju(h,function(e,t){return Zu(t.playlist,e.playlist)}),h.length?h[0]:(Ju(d,function(e,t){return e.rebufferingImpact-t.rebufferingImpact}),d[0]||null)}({master:this.vhs_.playlists.master,currentTime:t,bandwidth:n,duration:this.duration_(),segmentDuration:i,timeUntilRebuffer:a,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(s){var o=r-a-s.rebufferingImpact,u=.5;a<=eo&&(u=1),!s.playlist||s.playlist.uri===this.playlist_.uri||o<u||(this.bandwidth=s.playlist.attributes.BANDWIDTH*mu.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},i.handleAbort_=function(e){this.logger_("Aborting "+sl(e)),this.mediaRequestsAborted+=1},i.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},i.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var n=Object.keys(e).sort(),i=Object.keys(t).sort();if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++){var a=n[r];if(a!==i[r])return!1;if(e[a]!==t[a])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_()))},i.handleTimingInfo_=function(e,t,n,i){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var r=this.pendingSegment_,a=ol(t);r[a]=r[a]||{},r[a][n]=i,this.logger_("timinginfo: "+t+" - "+n+" - "+i),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},i.handleCaptions_=function(e,n){var i=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==n.length)if(this.pendingSegment_.hasAppendedData_){var r=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),a={};n.forEach(function(e){a[e.stream]=a[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=a[e.stream];t.startTime=Math.min(t.startTime,e.startTime+r),t.endTime=Math.max(t.endTime,e.endTime+r),t.captions.push(e)}),Object.keys(a).forEach(function(e){var n=a[e],s=n.startTime,o=n.endTime,u=n.captions,l=i.inbandTextTracks_;i.logger_("adding cues from "+s+" -> "+o+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var i=n;/^cc708_/.test(n)&&(i="SERVICE"+n.split("_")[1]);var r=t.textTracks().getTrackById(i);if(r)e[n]=r;else{var a=n,s=n,o=!1,u=(t.options_.vhs&&t.options_.vhs.captionServices||{})[i];u&&(a=u.label,s=u.language,o=u.default),e[n]=t.addRemoteTextTrack({kind:"captions",id:i,default:o,label:a,language:s},!1).track}}}(l,i.vhs_.tech_,e),il(s,o,l[e]),function(e){var n=e.inbandTextTracks,i=e.captionArray,r=e.timestampOffset;if(i){var a=t().WebKitDataCue||t().VTTCue;
1i.forEach(function(e){var t=e.stream;n[t].addCue(new a(e.startTime+r,e.endTime+r,e.text))})}}({captionArray:u,inbandTextTracks:l,timestampOffset:r})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,n));else this.logger_("SegmentLoader received no captions from a caption event")},i.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),nl({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:i,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},i.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(e){return e()}),this.metadataQueue_.caption.forEach(function(e){return e()}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},i.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach(function(e){return e()})},i.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach(function(e){return e()})},i.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.getCurrentMediaInfo_()||!ul({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},i.getCurrentMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),e&&e.trackInfo||this.currentMediaInfo_},i.getMediaInfo_=function(e){return void 0===e&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},i.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null},i.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;var n=t.hasAudio,i=t.hasVideo,r=t.isMuxed;return!(i&&!e.videoTimingInfo)&&(!(n&&!this.audioDisabled_&&!r&&!e.audioTimingInfo)&&!ul({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},i.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[ol(t.type)].start;else{var i,r=this.getCurrentMediaInfo_(),a="main"===this.loaderType_&&r&&r.hasVideo;a&&(i=n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:a,firstVideoFrameTimeForData:i,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.isSyncRequest){this.updateTimingInfoEnd_(n),this.syncController_.saveSegmentTimingInfo({segmentInfo:n,shouldSaveTimelineMapping:"main"===this.loaderType_});var s=this.chooseNextRequest_();if(s.mediaIndex!==n.mediaIndex||s.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))},i.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)},i.getInitSegmentAndUpdateState_=function(e){var t=e.type,n=e.initSegment,i=e.map,r=e.playlist;if(i){var a=Zo(i);if(this.activeInitSegmentId_===a)return null;n=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=a}return n&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=r,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,n):null},i.handleQuotaExceededError_=function(e,n){var i=this,r=e.segmentInfo,a=e.type,s=e.bytes,o=this.sourceUpdater_.audio
1Buffered(),u=this.sourceUpdater_.videoBuffered();o.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+so(o).join(", ")),u.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+so(u).join(", "));var l=o.length?o.start(0):0,c=o.length?o.end(o.length-1):0,d=u.length?u.start(0):0,h=u.length?u.end(u.length-1):0;if(c-l<=1&&h-d<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+s.byteLength+", audio buffer: "+so(o).join(", ")+", video buffer: "+so(u).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:a,bytes:s}));var p=this.currentTime_()-1;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+p),this.remove(0,p,function(){i.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),i.waitingOnRemove_=!1,i.quotaExceededErrorRetryTimeout_=t().setTimeout(function(){i.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),i.quotaExceededErrorRetryTimeout_=null,i.processCallQueue_()},1e3)},!0)},i.handleAppendError_=function(e,t){var n=e.segmentInfo,i=e.type,r=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(i+" append of "+r.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:i,bytes:r}))},i.appendToSourceBuffer_=function(e){var t,n,i,r=e.segmentInfo,a=e.type,s=e.initSegment,o=e.data,u=e.bytes;if(!u){var l=[o],c=o.byteLength;s&&(l.unshift(s),c+=s.byteLength),i=0,(t={bytes:c,segments:l}).bytes&&(n=new Uint8Array(t.bytes),t.segments.forEach(function(e){n.set(e,i),i+=e.byteLength})),u=n}this.sourceUpdater_.appendBuffer({segmentInfo:r,type:a,bytes:u},this.handleAppendError_.bind(this,{segmentInfo:r,type:a,bytes:u}))},i.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var i=this.pendingSegment_.segment,r=e+"TimingInfo";i[r]||(i[r]={}),i[r].transmuxerPrependedSeconds=n.prependedContentDuration||0,i[r].transmuxedPresentationStart=n.start.presentation,i[r].transmuxedDecodeStart=n.start.decode,i[r].transmuxedPresentationEnd=n.end.presentation,i[r].transmuxedDecodeEnd=n.end.decode,i[r].baseMediaDecodeTime=n.baseMediaDecodeTime}},i.appendData_=function(e,t){var n=t.type,i=t.data;if(i&&i.byteLength&&("audio"!==n||!this.audioDisabled_)){var r=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:r,data:i})}},i.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=s({},e,{forceTimestampOffset:!0});s(e,t.generateSegmentInfo_(n)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)})},i.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var n=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),r=null!==this.mediaIndex,a=e.timeline!==this.currentTimeline_&&e.timeline>0,s=i||r&&a;this.logger_("Requesting "+sl(e)),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Hu({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
1ind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:s,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(n){var i=n.message,r=n.level,a=n.stream;t.logger_(sl(e)+" logged from transmuxer stream "+a+" as a "+r+": "+i)}})},i.trimBackBuffer_=function(e){var t=function(e,t,n){var i=t-mu.BACK_BUFFER_LENGTH;e.length&&(i=Math.max(i,e.start(0)));var r=t-n;return Math.min(r,i)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},i.createSimplifiedSegmentObj_=function(e){var t=e.segment,n=e.part,i={resolvedUri:n?n.resolvedUri:t.resolvedUri,byterange:n?n.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},r=e.playlist.segments[e.mediaIndex-1];if(r&&r.timeline===t.timeline&&(r.videoTimingInfo?i.baseStartTime=r.videoTimingInfo.transmuxedDecodeEnd:r.audioTimingInfo&&(i.baseStartTime=r.audioTimingInfo.transmuxedDecodeEnd)),t.key){var a=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);i.key=this.segmentKey(t.key),i.key.iv=a}return t.map&&(i.map=this.initSegmentForMap(t.map)),i},i.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},i.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<al?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+al):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},i.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")},i.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===Lu)return;return this.pause(),e.code===Ou?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var i=this.pendingSegment_;this.saveBandwidthRelatedStats_(i.duration,t.stats),i.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var i=t[0].pts,r=0;r<e.length&&!(e[r].pts>=i);r++);return e.slice(0,r).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(i)}},i.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},i.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},i.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},i.trueSegmentStart_=function(e){var t=e.currentStart,n=e.playlist,i=e.mediaIndex,r=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,s=e.useVideoTimingInfo,o=e.videoTimingInfo,u=e.audioTimingInfo;if(void 0!==t)return t;if(!s)return u.start;var l=n.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===r+a?o.start:r},i.waitForAppendsToComplete_=function(e){var t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var n=t.hasAudio,i=t.hasVideo,r=t.isMuxed,a="main"===this.loaderType_&&i,s=!this.audioDisabled_&&n&&!r;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);a&&e.waitingOnAppends++,s&&e.waitingOnAppends++,a&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),s&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},i.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||
1(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},i.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)},i.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")}},i.getSegmentStartTimeForTimestampOffsetCalculation_=function(e){var t=e.videoTimingInfo,n=e.audioTimingInfo,i=e.timingInfo;return this.useDtsForTimestampOffset_?t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:n&&"number"==typeof n.transmuxedDecodeStart?n.transmuxedDecodeStart:i.start:i.start},i.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)},i.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=cl(e,this.sourceType_);if(t&&("warn"===t.severity?Ks.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 "+sl(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var n=e.segment,i=e.part,r=n.end&&this.currentTime_()-n.end>3*e.playlist.targetDuration,a=i&&i.end&&this.currentTime_()-i.end>3*e.playlist.partTargetDuration;if(r||a)return this.logger_("bad "+(r?"segment":"part")+" "+sl(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 "+sl(e))},i.recordThroughput_=function(e){if(e.duration<al)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+al);else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,i=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(i-t)/++this.throughput.count}},i.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var n=e.segment,i=n.start,r=n.end;if(rl(i)&&rl(r)){il(i,r,this.segmentMetadataTrack_);var a=t().WebKitDataCue||t().VTTCue,s={custom:n.custom,dateTimeObject:n.dateTimeObject,dateTimeString:n.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.ur
1i,timeline:e.timeline,playlist:e.playlist.id,start:i,end:r},o=new a(i,r,JSON.stringify(s));o.value=s,this.segmentMetadataTrack_.addCue(o)}}},n}(Ks.EventTarget);function hl(){}var pl,fl=function(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})},ml=["video","audio"],gl=function(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]},vl=function e(t,n){if(0!==n.queue.length){var i=0,r=n.queue[i];if("mediaSource"!==r.type){if("mediaSource"!==t&&n.ready()&&"closed"!==n.mediaSource.readyState&&!gl(t,n)){if(r.type!==t){if(i=function(e,t){for(var n=0;n<t.length;n++){var i=t[n];if("mediaSource"===i.type)return null;if(i.type===e)return n}return null}(t,n.queue),null===i)return;r=n.queue[i]}return n.queue.splice(i,1),n.queuePending[t]=r,r.action(t,n),r.doneFn?void 0:(n.queuePending[t]=null,void e(t,n))}}else n.updating()||"closed"===n.mediaSource.readyState||(n.queue.shift(),r.action(n),r.doneFn&&r.doneFn(),e("audio",n),e("video",n))}},yl=function(e,t){var n=t[e+"Buffer"],i=fl(e);n&&(n.removeEventListener("updateend",t["on"+i+"UpdateEnd_"]),n.removeEventListener("error",t["on"+i+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)},_l=function(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)},bl=function(e,t,n){return function(i,r){var a=r[i+"Buffer"];if(_l(r.mediaSource,a)){r.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+i+"Buffer");try{a.appendBuffer(e)}catch(e){r.logger_("Error with code "+e.code+" "+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+i+"Buffer"),r.queuePending[i]=null,n(e)}}}},Tl=function(e,t){return function(n,i){var r=i[n+"Buffer"];if(_l(i.mediaSource,r)){i.logger_("Removing "+e+" to "+t+" from "+n+"Buffer");try{r.remove(e,t)}catch(r){i.logger_("Remove "+e+" to "+t+" from "+n+"Buffer failed")}}}},wl=function(e){return function(t,n){var i=n[t+"Buffer"];_l(n.mediaSource,i)&&(n.logger_("Setting "+t+"timestampOffset to "+e),i.timestampOffset=e)}},Sl=function(e){return function(t,n){e()}},kl=function(e){return function(t){if("open"===t.mediaSource.readyState){t.logger_("Calling mediaSource endOfStream("+(e||"")+")");try{t.mediaSource.endOfStream(e)}catch(e){Ks.log.warn("Failed to call media source endOfStream",e)}}}},El=function(e){return function(t){t.logger_("Setting mediaSource duration to "+e);try{t.mediaSource.duration=e}catch(e){Ks.log.warn("Failed to set media source duration",e)}}},Cl=function(){return function(e,t){if("open"===t.mediaSource.readyState){var n=t[e+"Buffer"];if(_l(t.mediaSource,n)){t.logger_("calling abort on "+e+"Buffer");try{n.abort()}catch(t){Ks.log.warn("Failed to abort on "+e+"Buffer",t)}}}}},Al=function(e,t){return function(n){var i=fl(e),r=V(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource");var a=n.mediaSource.addSourceBuffer(r);a.addEventListener("updateend",n["on"+i+"UpdateEnd_"]),a.addEventListener("error",n["on"+i+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=a}},Pl=function(e){return function(t){var n=t[e+"Buffer"];if(yl(e,t),_l(t.mediaSource,n)){t.logger_("Removing "+e+"Buffer with codec "+t.codecs[e]+" from mediaSource");try{t.mediaSource.removeSourceBuffer(n)}catch(t){Ks.log.warn("Failed to removeSourceBuffer "+e+"Buffer",t)}}}},xl=function(e){return function(t,n){var i=n[t+"Buffer"],r=V(e);if(_l(n.mediaSource,i)&&n.codecs[t]!==e){n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e);try{i.changeType(r),n.codecs[t]=e}catch(e){Ks.log.warn("Failed to changeType on "+t+"Buffer",e)}}}},Il=function(e){var t=e.type,n=e.sourceUpdater,i=e.action,r=e.doneFn,a=e.name;n.queue.push({type:t,action:i,doneFn:r,name:a}),vl(t,n)},Ol=function(e,t){return function(n){if(t.queuePending[e]){var i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[e+"Error_"])}vl(e,t)}},Ll=function(e){function n(t){var n;return(n=e.call(this)||this).mediaSource=t,n.sourceopenListener_=function(){return vl("mediaSource",l(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=Zs("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null}
1,n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=Ol("video",l(n)),n.onAudioUpdateEnd_=Ol("audio",l(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}d(n,e);var i=n.prototype;return i.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},i.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},i.hasInitializedAnyEme=function(){return this.initializedEme_},i.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},i.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},i.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},i.addSourceBuffer=function(e,t){Il({type:"mediaSource",sourceUpdater:this,action:Al(e,t),name:"addSourceBuffer"})},i.abort=function(e){Il({type:e,sourceUpdater:this,action:Cl(e),name:"abort"})},i.removeSourceBuffer=function(e){this.canRemoveSourceBuffer()?Il({type:"mediaSource",sourceUpdater:this,action:Pl(e),name:"removeSourceBuffer"}):Ks.log.error("removeSourceBuffer is not supported!")},i.canRemoveSourceBuffer=function(){return!Ks.browser.IE_VERSION&&!Ks.browser.IS_FIREFOX&&t().MediaSource&&t().MediaSource.prototype&&"function"==typeof t().MediaSource.prototype.removeSourceBuffer},n.canChangeType=function(){return t().SourceBuffer&&t().SourceBuffer.prototype&&"function"==typeof t().SourceBuffer.prototype.changeType},i.canChangeType=function(){return this.constructor.canChangeType()},i.changeType=function(e,t){this.canChangeType()?Il({type:e,sourceUpdater:this,action:xl(t),name:"changeType"}):Ks.log.error("changeType is not supported!")},i.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 i=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,i);t.canChangeType()&&t.changeType(n,i)})},i.appendBuffer=function(e,t){var n=this,i=e.segmentInfo,r=e.type,a=e.bytes;if(this.processedAppend_=!0,"audio"===r&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+a.length+" until video append");if(Il({type:r,sourceUpdater:this,action:bl(a,i||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===r){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var s=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+s.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,s.forEach(function(e){n.appendBuffer.apply(n,e)})}},i.audioBuffered=function(){return _l(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Ks.createTimeRange()},i.videoBuffered=function(){return _l(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Ks.createTimeRange()},i.buffered=function(){var e=_l(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=_l(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){var n=null,i=null,r=0,a=[],s=[];if(!(e&&e.length&&t&&t.length))return Ks.createTimeRange();for(var o=e.length;o--;)a.push({time:e.start(o),type:"start"}),a.push({time:e.end(o),type:"end"});for(o=t.length;o--;)a.push({time:t.start(o),type:"start"}),a.push({time:t.end(o),type:"end"});for(a.sort(function(e,t){return e.time-t.time}),o=0;o<a.length;o++)"start"===a[o].type?2===++r&&(n=a[o].time):"end"===a[o].type&&1===--r&&(i=a[o].time),null!==n&&null!==i&&(s.push([n,i]),n=null,i=null);return Ks.createTimeRanges(s)}(this.audioBuffered(),this.videoBuffered())},i.setDuration=function(e,t){void 0===t&&(t=hl),Il({type:"mediaSource",sourceUpdater:this,action:El(e),name:"duration",doneFn:t})},i.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=hl),"string"!=typeof e&&(e=void 0),Il({type:"mediaSource",sourceUpdater:this,action:kl(e),name:"endOfStream",doneFn:t})},i.removeAudio=function(e,t,n){void 0===n&&(n=hl),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Il({type:"audio",sourceUpdater:this,action:Tl(e,t),doneFn:n,name:"remove"}):n()},i.removeVideo=function(e,t,n){void 0===n&&(n=hl),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?Il({type:"video",sourceUpdater:this,action:Tl(e,t),doneFn:n,name:"remove"}):n()},i.updating=function(){return!(!gl("audio",this)&&!gl("video",this))},i.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Il({type:"audio",sourceUpdater:this,action:wl(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},i.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(Il({type:"video",sourceUpdater:this,action:wl(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},i.audioQueueCallback=function(e){this.audioBuffer&&Il({type:"audio",sourceUpdater:this,action:Sl(e),name:"callback"})},i.videoQueueCallback=function(e){this.videoBuffer&&Il({type:"video",sourceUpdater:this,action:Sl(e),name:"callback"})},i.dispose=function(){var e=this;this.trigger("dispose"),ml.forEach(function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"](function(){return yl(t,e)})}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},n}(Ks.EventTarget),Dl=function(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))},Ml=new Uint8Array("\n\n".split("").map(function(e){return e.charCodeAt(0)})),Rl=function(e){function t(){return e.call(this,"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")||this}return d(t,e),t}(xt(Error)),Nl=function(e){function n(t,n){var i;return void 0===n&&(n={}),(i=e.call(this,t,n)||this).mediaSource_=null,i.subtitlesTrack_=null,i.loaderType_="subtitle",i.featuresNativeTextTracks_=t.featuresNativeTextTracks,i.loadVttJs=t.loadVttJs,i.shouldSaveSegmentTimingInfo_=!1,i}d(n,e);var i=n.prototype;return i.createTransmuxer_=function(){return null},i.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Ks.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,n=e[e.length-1].startTime;return Ks.createTimeRanges([[t,n]])},i.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n=Zo(e),i=this.initSegments_[n];if(t&&!i&&e.bytes){var r=Ml.byteLength+e.bytes.byteLength,a=new Uint8Array(r);a.set(e.bytes),a.set(Ml,e.bytes.byteLength),this.initSegments_[n]=i={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a}}return i||e},i.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},i.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},i.track=function(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},i.remove=function(e,t){il(e,t,this.subtitlesTrack_)},i.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)}},i.timestampOffsetForSegment_=function(){return null},i.chooseNextRequest_=function(){return this.skipEmptySegments_(e.prototype.chooseNextRequest_.call(this))},i.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},i.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},i.segmentRequestFinished_=function(e,n,i){var r=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(n.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Ou&&this.handleTimeout_(),e.code===Lu?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);var a=this.pendingSegment_;this.saveBandwidthRelatedStats_(a.duration,n.stats),n.key&&this.segmentKey(n.key,!0),this.state="APPENDING",this.trigger("appending");var s=a.segment;if(s.map&&(s.map.bytes=n.map.bytes),a.bytes=n.bytes,"function"!=typeof t().WebVTT&&"function"==typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then(function(){return r.segmentRequestFinished_(e,n,i)},function(){return r.stopForError({message:"Error loading vtt.js"})});s.requested=!0;try{this.parseVTTCues_(a)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(a,this.syncController_.timelines[a.timeline],this.playlist_),a.cues.length?a.timingInfo={start:a.cues[0].startTime,end:a.cues[a.cues.length-1].endTime}:a.timingInfo={start:a.startOfSegment,end:a.startOfSegment+a.duration},a.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");a.byteLength=a.bytes.byteLength,this.mediaSecondsLoaded+=s.duration,a.cues.forEac
1h(function(e){r.subtitlesTrack_.addCue(r.featuresNativeTextTracks_?new(t().VTTCue)(e.startTime,e.endTime,e.text):e)}),function(e){var t=e.cues;if(t)for(var n=0;n<t.length;n++){for(var i=[],r=0,a=0;a<t.length;a++)t[n].startTime===t[a].startTime&&t[n].endTime===t[a].endTime&&t[n].text===t[a].text&&++r>1&&i.push(t[a]);i.length&&i.forEach(function(t){return e.removeCue(t)})}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},i.handleData_=function(){},i.updateTimingInfoEnd_=function(){},i.parseVTTCues_=function(e){var n,i=!1;if("function"!=typeof t().WebVTT)throw new Rl;"function"==typeof t().TextDecoder?n=new(t().TextDecoder)("utf8"):(n=t().WebVTT.StringDecoder(),i=!0);var r=new(t().WebVTT.Parser)(t(),t().vttjs,n);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},r.oncue=e.cues.push.bind(e.cues),r.ontimestampmap=function(t){e.timestampmap=t},r.onparsingerror=function(e){Ks.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){var a=e.segment.map.bytes;i&&(a=Dl(a)),r.parse(a)}var s=e.bytes;i&&(s=Dl(s)),r.parse(s),r.flush()},i.updateTimeMapping_=function(e,t,n){var i=e.segment;if(t)if(e.cues.length){var r=e.timestampmap,a=r.MPEGTS/At.ONE_SECOND_IN_TS-r.LOCAL+t.mapping;if(e.cues.forEach(function(e){e.startTime+=a,e.endTime+=a}),!n.syncInfo){var s=e.cues[0].startTime,o=e.cues[e.cues.length-1].startTime;n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(s,o-i.duration)}}}else i.empty=!0},n}(dl),Ul=function(e,t){for(var n=e.cues,i=0;i<n.length;i++){var r=n[i];if(t>=r.adStartTime&&t<=r.adEndTime)return r}return null},Bl=[{name:"VOD",run:function(e,t,n,i,r){if(n!==1/0){return{time:0,segmentIndex:0,partIndex:null}}return null}},{name:"ProgramDateTime",run:function(e,t,n,i,r){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var a=null,s=null,o=ho(t);r=r||0;for(var u=0;u<o.length;u++){var l=o[t.endList||0===r?u:o.length-(u+1)],c=l.segment,d=e.timelineToDatetimeMappings[c.timeline];if(d&&c.dateTimeObject){var h=c.dateTimeObject.getTime()/1e3+d;if(c.parts&&"number"==typeof l.partIndex)for(var p=0;p<l.partIndex;p++)h+=c.parts[p].duration;var f=Math.abs(r-h);if(null!==s&&(0===f||s<f))break;s=f,a={time:h,segmentIndex:l.segmentIndex,partIndex:l.partIndex}}}return a}},{name:"Segment",run:function(e,t,n,i,r){var a=null,s=null;r=r||0;for(var o=ho(t),u=0;u<o.length;u++){var l=o[t.endList||0===r?u:o.length-(u+1)],c=l.segment,d=l.part&&l.part.start||c&&c.start;if(c.timeline===i&&void 0!==d){var h=Math.abs(r-d);if(null!==s&&s<h)break;(!a||null===s||s>=h)&&(s=h,a={time:d,segmentIndex:l.segmentIndex,partIndex:l.partIndex})}}return a}},{name:"Discontinuity",run:function(e,t,n,i,r){var a=null;if(r=r||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(var s=null,o=0;o<t.discontinuityStarts.length;o++){var u=t.discontinuityStarts[o],l=t.discontinuitySequence+o+1,c=e.discontinuities[l];if(c){var d=Math.abs(r-c.time);if(null!==s&&s<d)break;(!a||null===s||s>=d)&&(s=d,a={time:c.time,segmentIndex:u,partIndex:null})}}return a}},{name:"Playlist",run:function(e,t,n,i,r){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}}],jl=function(e){function t(t){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=Zs("SyncController"),n}d(t,e);var n=t.prototype;return n.getSyncPoint=function(e,t,n,i){var r=this.runStrategies_(e,t,n,i);return r.length?this.selectSyncPoint_(r,{key:"time",value:i}):null},n.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!n.length)return null;var i=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+yo({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:i.segmentIndex,endIndex:0}))},n.runStrategies_=function(e,t,n,i){for(var r=[],a=0;a<Bl.length;a++){var s=Bl[a],o=s.run(this,e,t,n,i);o&&(o.strategy=s.name,r.push({strategy:s.name,syncPoint:o}))}return r},n.selectSyncPoint_=function(e,t){for(var n=e[0].syncPoint,i=Math.abs(e[0].syncPoint[t.key]-t.value),r=e[0].strategy,a=1;a<e.length;a++){var s=Math.abs(e[a].syncPoint[t.key]-t.value);s<i&&(i=s,n=e[a].syncPoint,r=e[a].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+r+"]: [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)Ks.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}
1,this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},n.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}},n.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,n=e.shouldSaveTimelineMapping,i=this.calculateSegmentTimeMapping_(t,t.timingInfo,n),r=t.segment;i&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:r.start}));var a=r.dateTimeObject;r.discontinuity&&n&&a&&(this.timelineToDatetimeMappings[r.timeline]=-a.getTime()/1e3)},n.timestampOffsetForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].time},n.mappingForTimeline=function(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping},n.calculateSegmentTimeMapping_=function(e,t,n){var i,r,a=e.segment,s=e.part,o=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+o.time+"] [mapping: "+o.mapping+"]")),i=e.startOfSegment,r=t.end+o.mapping;else{if(!o)return!1;i=t.start+o.mapping,r=t.end+o.mapping}return s&&(s.start=i,s.end=r),(!a.start||i<a.start)&&(a.start=i),a.end=r,!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],a=t.discontinuitySequence+i+1,s=r-e.mediaIndex,o=Math.abs(s);if(!this.discontinuities[a]||this.discontinuities[a].accuracy>o){var u=void 0;u=s<0?n.start-yo({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:r}):n.end+yo({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:r}),this.discontinuities[a]={time:u,accuracy:o}}}},n.dispose=function(){this.trigger("dispose"),this.off()},t}(Ks.EventTarget),Fl=function(e){function t(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}d(t,e);var n=t.prototype;return n.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},n.pendingTimelineChange=function(e){var t=e.type,n=e.from,i=e.to;return"number"==typeof n&&"number"==typeof i&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},n.lastTimelineChange=function(e){var t=e.type,n=e.from,i=e.to;return"number"==typeof n&&"number"==typeof i&&(this.lastTimelineChanges_[t]={type:t,from:n,to:i},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},n.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},t}(Ks.EventTarget),ql=yu(_u(function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function t(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var i=t(function(e){function t(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e.exports=function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e},e.exports.default=e.exports,e.exports.__esModule=!0}),r=t(function(e){function t(n,i){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,i)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}),a=t(function(e){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}),s=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,i=0;i<n;++i)t[i].call(this,arguments[1]);
1else for(var r=Array.prototype.slice.call(arguments,1),a=t.length,s=0;s<a;++s)t[s].apply(this,r)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",function(t){e.push(t)})},e}();var o,u=null,l=function(){function e(e){var t,n,i;u||(u=function(){var e,t,n,i,r,a,s,o,u=[[[],[],[],[],[]],[[],[],[],[],[]]],l=u[0],c=u[1],d=l[4],h=c[4],p=[],f=[];for(e=0;e<256;e++)f[(p[e]=e<<1^283*(e>>7))^e]=e;for(t=n=0;!d[t];t^=i||1,n=f[n]||1)for(a=(a=n^n<<1^n<<2^n<<3^n<<4)>>8^255&a^99,d[t]=a,h[a]=t,o=16843009*p[r=p[i=p[t]]]^65537*r^257*i^16843008*t,s=257*p[a]^16843008*a,e=0;e<4;e++)l[e][t]=s=s<<24^s>>>8,c[e][a]=o=o<<24^o>>>8;for(e=0;e<5;e++)l[e]=l[e].slice(0),c[e]=c[e].slice(0);return u}()),this._tables=[[u[0][0].slice(),u[0][1].slice(),u[0][2].slice(),u[0][3].slice(),u[0][4].slice()],[u[1][0].slice(),u[1][1].slice(),u[1][2].slice(),u[1][3].slice(),u[1][4].slice()]];var r=this._tables[0][4],a=this._tables[1],s=e.length,o=1;if(4!==s&&6!==s&&8!==s)throw new Error("Invalid aes key size");var l=e.slice(0),c=[];for(this._key=[l,c],t=s;t<4*s+28;t++)i=l[t-1],(t%s===0||8===s&&t%s===4)&&(i=r[i>>>24]<<24^r[i>>16&255]<<16^r[i>>8&255]<<8^r[255&i],t%s===0&&(i=i<<8^i>>>24^o<<24,o=o<<1^283*(o>>7))),l[t]=l[t-s]^i;for(n=0;t;n++,t--)i=l[3&n?t:t-4],c[n]=t<=4||n<4?i:a[0][r[i>>>24]]^a[1][r[i>>16&255]]^a[2][r[i>>8&255]]^a[3][r[255&i]]}return e.prototype.decrypt=function(e,t,n,i,r,a){var s,o,u,l,c=this._key[1],d=e^c[0],h=i^c[1],p=n^c[2],f=t^c[3],m=c.length/4-2,g=4,v=this._tables[1],y=v[0],_=v[1],b=v[2],T=v[3],w=v[4];for(l=0;l<m;l++)s=y[d>>>24]^_[h>>16&255]^b[p>>8&255]^T[255&f]^c[g],o=y[h>>>24]^_[p>>16&255]^b[f>>8&255]^T[255&d]^c[g+1],u=y[p>>>24]^_[f>>16&255]^b[d>>8&255]^T[255&h]^c[g+2],f=y[f>>>24]^_[d>>16&255]^b[h>>8&255]^T[255&p]^c[g+3],g+=4,d=s,h=o,p=u;for(l=0;l<4;l++)r[(3&-l)+a]=w[d>>>24]<<24^w[h>>16&255]<<16^w[p>>8&255]<<8^w[255&f]^c[g++],s=d,d=h,h=p,p=f,f=s},e}(),c=function(e){function t(){var t;return(t=e.call(this,s)||this).jobs=[],t.delay=1,t.timeout_=null,t}a(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}(s),d=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},h=function(){function e(t,n,i,r){var a=e.STEP,s=new Int32Array(t.buffer),o=new Uint8Array(t.byteLength),u=0;for(this.asyncStream_=new c,this.asyncStream_.push(this.decryptChunk_(s.subarray(u,u+a),n,i,o)),u=a;u<s.length;u+=a)i=new Uint32Array([d(s[u-4]),d(s[u-3]),d(s[u-2]),d(s[u-1])]),this.asyncStream_.push(this.decryptChunk_(s.subarray(u,u+a),n,i,o));this.asyncStream_.push(function(){var e;r(null,(e=o).subarray(0,e.byteLength-e[e.byteLength-1]))})}return e.prototype.decryptChunk_=function(e,t,n,i){return function(){var r=function(e,t,n){var i,r,a,s,o,u,c,h,p,f=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),m=new l(Array.prototype.slice.call(t)),g=new Uint8Array(e.byteLength),v=new Int32Array(g.buffer);for(i=n[0],r=n[1],a=n[2],s=n[3],p=0;p<f.length;p+=4)o=d(f[p]),u=d(f[p+1]),c=d(f[p+2]),h=d(f[p+3]),m.decrypt(o,u,c,h,v,p),v[p]=d(v[p]^i),v[p+1]=d(v[p+1]^r),v[p+2]=d(v[p+2]^a),v[p+3]=d(v[p+3]^s),i=o,r=u,a=c,s=h;return g}(e,t,n);i.set(r,e.byteOffset)}},i(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();o="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};var p=o.BigInt||Number;p("0x1"),p("0x100"),p("0x10000"),p("0x1000000"),p("0x100000000"),p("0x10000000000"),p("0x1000000000000"),p("0x100000000000000"),p("0x10000000000000000");var f=function(e){var t={};return Object.keys(e).forEach(function(n){var i,r=e[n];i=r,("function"===ArrayBuffer.isView?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer)?t[n]={bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:t[n]=r}),t};self.onmessage=function(e){var t=e.data,n=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),i=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),r=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new h(n,i,r,function(e,n){self.postMessage(f({source:t.source,decrypted:n}),[n.buffer])})}})),Vl=vu(ql),Hl=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Wl=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},Gl=function(e,t){t.activePlaylistLoader=e,e.load()},$l={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],i=t.mediaTypes[e],r=t.blacklistCurrentPlaylist;Wl(n,i);var a=i.activeTrack(),s=i.activeGroup(),o=(s.filter(function(e){return e.default})[0]||s[0]).id,u=i.tracks[o];if(a!==u){for(var l in Ks.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),i.tracks)i.tracks[l].enabled=i.tracks[l]===u;i.onTrackChanged()}else r({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],i=t.mediaTypes[e];Ks.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),Wl(n,i);var r=i.activeTrack();r&&(r.mode="disabled"),i.onTrackChanged()}}},zl={AUDIO:function(e,t,n){if(t){var i=n.tech,r=n.requestOptions,a=n.segmentLoaders[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,r),(!i.paused()||e.endList&&"none"!==i.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),i.paused()||a.load()}),t.on("error",$l[e](e,n))}},SUBTITLES:function(e,t,n){var i=n.tech,r=n.requestOptions,a=n.segmentLoaders[e],s=n.mediaTypes[e];t.on("loadedmetadata",function(){var e=t.media();a.playlist(e,r),a.track(s.activeTrack()),(!i.paused()||e.endList&&"none"!==i.preload())&&a.load()}),t.on("loadedplaylist",function(){a.playlist(t.media(),r),i.paused()||a.load()}),t.on("error",$l[e](e,n))}},Kl={AUDIO:function(e,t){var n=t.vhs,i=t.sourceType,r=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,o=t.mediaTypes[e],u=o.groups,l=o.tracks,c=o.logger_,d=t.masterPlaylistLoader,h=Ao(d.master);for(var p in s[e]&&0!==Object.keys(s[e]).length||(s[e]={main:{default:{default:!0}}},h&&(s[e].main.default.playlists=d.master.playlists)),s[e])for(var f in u[p]||(u[p]=[]),s[e][p]){var m=s[e][p][f],g=void 0;if(h?(c("AUDIO group '"+p+"' label '"+f+"' is a master playlist"),m.isMasterPlaylist=!0,g=null):g="vhs-json"===i&&m.playlists?new Ho(m.playlists[0],n,a):m.resolvedUri?new Ho(m.resolvedUri,n,a):m.playlists&&"dash"===i?new fu(m.playlists[0],n,a,d):null,m=Ks.mergeOptions({id:f,playlistLoader:g},m),zl[e](e,m.playlistLoader,t),u[p].push(m),void 0===l[f]){var v=new Ks.AudioTrack({id:f,kind:Hl(m),enabled:!1,language:m.language,default:m.default,label:f});l[f]=v}}r.on("error",$l[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,i=t.vhs,r=t.sourceType,a=t.segmentLoaders[e],s=t.requestOptions,o=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,d=t.masterPlaylistLoader;for(var h in o[e])for(var p in l[h]||(l[h]=[]),o[e][h])if(!o[e][h][p
1].forced){var f=o[e][h][p],m=void 0;if("hls"===r)m=new Ho(f.resolvedUri,i,s);else if("dash"===r){var g=f.playlists.filter(function(e){return e.excludeUntil!==1/0});if(!g.length)return;m=new fu(f.playlists[0],i,s,d)}else"vhs-json"===r&&(m=new Ho(f.playlists?f.playlists[0]:f.resolvedUri,i,s));if(f=Ks.mergeOptions({id:p,playlistLoader:m},f),zl[e](e,f.playlistLoader,t),l[h].push(f),void 0===c[p]){var v=n.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;c[p]=v}}a.on("error",$l[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,i=t.master.mediaGroups,r=t.mediaTypes[e],a=r.groups,s=r.tracks;for(var o in i[e])for(var u in a[o]||(a[o]=[]),i[e][o]){var l=i[e][o][u];if(/^(?:CC|SERVICE)/.test(l.instreamId)){var c=n.options_.vhs&&n.options_.vhs.captionServices||{},d={label:u,language:l.language,instreamId:l.instreamId,default:l.default&&l.autoselect};if(c[d.instreamId]&&(d=Ks.mergeOptions(d,c[d.instreamId])),void 0===d.default&&delete d.default,a[o].push(Ks.mergeOptions({id:u},l)),void 0===s[u]){var h=n.addRemoteTextTrack({id:d.instreamId,
1kind:"captions",default:d.default,language:d.language,label:d.label},!1).track;s[u]=h}}}}},Xl=function e(t,n){for(var i=0;i<t.length;i++){if(Eo(n,t[i]))return!0;if(t[i].playlists&&e(t[i].playlists,n))return!0}return!1},Yl={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var i in n)if(n[i].enabled)return n[i];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var i in n)if("showing"===n[i].mode||"hidden"===n[i].mode)return n[i];return null}}},Ql=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){Kl[t](t,e)});var t=e.mediaTypes,n=e.masterPlaylistLoader,i=e.tech,r=e.vhs,a=e.segmentLoaders,s=a.AUDIO,o=a.main;["AUDIO","SUBTITLES"].forEach(function(n){t[n].activeGroup=function(e,t){return function(n){var i=t.masterPlaylistLoader,r=t.mediaTypes[e].groups,a=i.media();if(!a)return null;var s=null;a.attributes[e]&&(s=r[a.attributes[e]]);var o=Object.keys(r);if(!s)if("AUDIO"===e&&o.length>1&&Ao(t.master))for(var u=0;u<o.length;u++){var l=r[o[u]];if(Xl(l,a)){s=l;break}}else r.main?s=r.main:1===o.length&&(s=r[o[0]]);return void 0===n?s:null!==n&&s&&s.filter(function(e){return e.id===n.id})[0]||null}}(n,e),t[n].activeTrack=Yl[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,i=n[e],r=n.main,a=t.mediaTypes[e],s=a.activeTrack(),o=a.getActiveGroup(),u=a.activePlaylistLoader,l=a.lastGroup_;o&&l&&o.id===l.id||(a.lastGroup_=o,a.lastTrack_=s,Wl(i,a),o&&!o.isMasterPlaylist&&(o.playlistLoader?(i.resyncLoader(),Gl(o.playlistLoader,a)):u&&r.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,i=t.segmentLoaders,r=i[e],a=i.main,s=t.mediaTypes[e],o=s.activeTrack(),u=s.getActiveGroup(),l=s.activePlaylistLoader,c=s.lastTrack_;if((!c||!o||c.id!==o.id)&&(s.lastGroup_=u,s.lastTrack_=o,Wl(r,s),u)){if(u.isMasterPlaylist){if(!o||!c||o.id===c.id)return;var d=t.vhs.masterPlaylistController_,h=d.selectPlaylist();if(d.media()===h)return;return s.logger_("track change. Switching master audio from "+c.id+" to "+o.id),n.pause(),a.resetEverything(),void d.fastQualityChange_(h)}if("AUDIO"===e){if(!u.playlistLoader)return a.setAudio(!0),void a.resetEverything();r.setAudio(!0),a.setAudio(!1)}l!==u.playlistLoader?(r.track&&r.track(o),r.resetEverything(),Gl(u.playlistLoader,s)):Gl(u.playlistLoader,s)}}}(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 u=t.AUDIO.activeGroup();if(u){var l=(u.filter(function(e){return e.default})[0]||u[0]).id;t.AUDIO.tracks[l].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),s.setAudio(!0)):o.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 c=function(){t.AUDIO.onTrackChanged(),i.trigger({type:"usage",name:"vhs-audio-change"}),i.trigger({type:"usage",name:"hls-audio-change"})};for(var d in i.audioTracks().addEventListener("change",c),i.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",function(){i.audioTracks().removeEventListener("change",c),i.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),i.clearTracks("audio"),t.AUDIO.tracks)i.audioTracks().addTrack(t.AUDIO.tracks[d])},Jl=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],Zl=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},ec=function(e){function n(n){var i;i=e.call(this)||this;var r=n.src,a=n.handleManifestRedirects,s=n.withCredentials,o=n.tech,u=n.bandwidth,c=n.externVhs,d=n.useCueTags,h=n.blacklistDuration,p=n.enableLowInitialPlaylist,f=n.sourceType,m=n.cacheEncryptionKeys,g=n.experimentalBufferBasedABR,v=n.experimentalLeastPixelDiffSelector,y=n.captionServices;if(!r)throw new Error("A non-empty playlist URL or JSON manifest string is required");var _=n.maxPlaylistRetries;null==_&&(_=1/0),pl=c,i.experimentalBufferBasedABR=Boolean(g),i.experimentalLeastPixelDiffSelector=Boolean(v),i.withCredentials=s,i.tech_=o,i.vhs_=o.vhs,i.sourceType_=f,i.useCueTags_=d,i.blacklistDuration=h,i.maxPlaylistRetries=_,i.enableLowInitialPlaylist=p,i.useCueTags_&&(i.cueTagsTrack_=i.tech_.addTextTrack("metadata","ad-cues"),i.cueTagsTrack_.inBandMetadataTrackDispatchType=""),i.requestOptions_={withCredentials:s,handleManifestRedirects:a,maxPlaylistRetries:_,timeout:null},i.on("error",i.pauseLoading),i.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:hl,activeTrack:hl,getActiveGroup:hl,onGroupChanged:hl,onTrackChanged:hl,lastTrack_:null,logger_:Zs("MediaGroups["+t+"]")}}),e}(),i.mediaSource=new(t().MediaSource),i.handleDurationChange_=i.handleDurationChange_.bind(l(i)),i.handleSourceOpen_=i.handleSourceOpen_.bind(l(i)),i.handleSourceEnded_=i.handleSourceEnded_.bind(l(i)),i.mediaSource.addEventListener("durationchange",i.handleDurationChange_),i.mediaSource.addEventListener("sourceopen",i.handleSourceOpen_),i.mediaSource.addEventListener("sourceended",i.handleSourceEnded_),i.seekable_=Ks.createTimeRanges(),i.hasPlayed_=!1,i.syncController_=new jl(n),i.segmentMetadataTrack_=o.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,i.decrypter_=new Vl,i.sourceUpdater_=new Ll(i.mediaSource),i.inbandTextTracks_={},i.timelineChangeController_=new Fl;var b={vhs:i.vhs_,parse708captions:n.parse708captions,useDtsForTimestampOffset:n.useDtsForTimestampOffset,captionServices:y,mediaSource:i.mediaSource,currentTime:i.tech_.currentTime.bind(i.tech_),seekable:function(){return i.seekable()},seeking:function(){return i.tech_.seeking()},duration:function(){return i.duration()},hasPlayed:function(){return i.hasPlayed_},goalBufferLength:function(){return i.goalBufferLength()},bandwidth:u,syncController:i.syncController_,decrypter:i.decrypter_,sourceType:i.sourceType_,inbandTextTracks:i.inbandTextTracks_,cacheEncryptionKeys:m,sourceUpdater:i.sourceUpdater_,timelineChangeController:i.timelineChangeController_,experimentalExactManifestTimings:n.experimentalExactManifestTimings};i.masterPlaylistLoader_="dash"===i.sourceType_?new fu(r,i.vhs_,i.requestOptions_):new Ho(r,i.vhs_,i.requestOptions_),i.setupMasterPlaylistLoaderListeners_(),i.mainSegmentLoader_=new dl(Ks.mergeOptions(b,{segmentMetadataTrack:i.segmentMetadataTrack_,loaderType:"main"}),n),i.audioSegmentLoader_=new dl(Ks.mergeOptions(b,{loaderType:"audio"}),n),i.subtitleSegmentLoader_=new Nl(Ks.mergeOptions(b,{loaderType:"vtt",featuresNativeTextTracks:i.tech_.featuresNativeTextTracks,loadVttJs:function(){return new Promise(function(e,t){function n(){o.off("vttjserror",i),e()}function i(){o.off("vttjsloaded",n),t()}o.one("vttjsloaded",n),o.one("vttjserror",i),o.addWebVttScript_()})}}),n),i.setupSegmentLoaderListeners_(),i.experimentalBufferBasedABR&&(i.masterPlaylistLoader_.one("loadedplaylist",function(){return i.startABRTimer_()}),i.tech_.on("pause",function(){return i.stopABRTimer_()}),i.tech_.on("play",function(){return i.startABRTimer_()})),Jl.forEach(function(e){i[e+"_"]=Zl.bind(l(i),e)}),i.logger_=Zs("MPC"),i.triggeredFmp4Usage=!1,"none"===i.tech_.preload()?(i.loadOnPlay_=function(){i.loadOnPlay_=null,i.masterPlaylistLoader_.load()},i.tech_.one("play",i.loadOnPlay_)):i.masterPlaylistLoader_.load(),i.timeToLoadedData__=-1,i.mainAppendsToLoadedData__=-1,i.audioAppendsToLoadedData__=-1;var T="none"===i.tech_.preload()?"play":"loadstart";return i.tech_.one(T,function(){var e=Date.now();i.tech_.one("loadeddata",function(){i.timeToLoadedData__=Date.now()-e,i.mainAppendsToLoadedData__=i.mainSegmentLoader_.mediaAppends,i.audioAppendsToLoadedData__=i.audioSegmentLoader_.mediaAppends})}),i}d(n,e);var i=n.prototype;return i.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},i.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},i.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t},i.timeToLoadedData_=function(){return this.timeToLoadedData__},i.checkABR_=function(e){void 0===e&&(e="abr");var t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)},i.switchMedia_=function(e,t,n){var i=this.media(),r=i&&(i.id||i.uri),a=e.id||e.uri;r&&r!==a&&(this.logger_("switch media "+r+" -> "+a+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,n)},i.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=t().setInterval(function(){return e.checkABR_()},250)},i.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(t().clearInterval(this.abrTimer_),this.abrTimer_=null)},i.getAudioTrackPlaylists_=function(){var e=this.master(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;var n,i=e.mediaGroups.AUDIO,r=Object.keys(i);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)n=this.mediaTypes_.AUDIO.activeTrack();else{var a=i.main||r.length&&i[r[0]];for(var s in a)if(a[s].default){n={label:s};break}}if(!n)return t;var o=[];for(var u in i)if(i[u][n.label]){var l=i[u][n.label];if(l.playlists&&l.playlists.length)o.push.apply(o,l.playlists);else if(l.uri)o.push(l);else if(e.playlists.length)for(var c=0;c<e.playlists.length;c++){var d=e.playlists[c];d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===u&&o.push(d)}}return o.length?o:t},i.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;ko(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()),Ql({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)}
1),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;ko(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.masterPlaylistLoader_.load(),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"})})},i.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())},i.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},i=!0,r=Object.keys(n.AUDIO);for(var a in n.AUDIO)for(var s in n.AUDIO[a]){n.AUDIO[a][s].uri||(i=!1)}i&&(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"})),pl.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),r.length&&Object.keys(n.AUDIO[r[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"}))},i.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,n=this.tech_.currentTime(),i=this.bufferLowWaterLine(),r=this.bufferHighWaterLine();return function(e){var t=e.currentPlaylist,n=e.buffered,i=e.currentTime,r=e.nextPlaylist,a=e.bufferLowWaterLine,s=e.bufferHighWaterLine,o=e.duration,u=e.experimentalBufferBasedABR,l=e.log;if(!r)return Ks.log.warn("We received no playlist to switch to. Please check your stream."),!1;var c="allowing switch "+(t&&t.id||"null")+" -> "+r.id;if(!t)return l(c+" as current playlist is not set"),!0;if(r.id===t.id)return!1;var d=Boolean(io(n,i).length);if(!t.endList)return d||"number"!=typeof t.partTargetDuration?(l(c+" as current playlist is live"),!0):(l("not "+c+" as current playlist is live llhls, but currentTime isn't in buffered."),!1);var h=uo(n,i),p=u?mu.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:mu.MAX_BUFFER_LOW_WATER_LINE;if(o<p)return l(c+" as duration < max low water line ("+o+" < "+p+")"),!0;var f=r.attributes.BANDWIDTH,m=t.attributes.BANDWIDTH;if(f<m&&(!u||h<s)){var g=c+" as next bandwidth < current bandwidth ("+f+" < "+m+")";return u&&(g+=" and forwardBuffer < bufferHighWaterLine ("+h+" < "+s+")"),l(g),!0}if((!u||f>m)&&h>=a){var v=c+" as forwardBuffer >= bufferLowWaterLine ("+h+" >= "+a+")";return u&&(v+=" and next bandwidth > current bandwidth ("+f+" > "+m+")"),l(v),!0}return l("not "+c+" as no switching criteria met"),!1}({buffered:this.tech_.buffered(),currentTime:n,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:i,bufferHighWaterLine:r,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},i.setupSegmentLoaderListeners_=function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){e.checkABR_("bandwidthupdate"),e.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",function(){e.experimentalBufferBasedABR&&e.mainSegmentLoader_.load()}),this.experimentalBufferBasedABR||this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){e.logger_("main segment loader ended"),e.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))});var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()})},i.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},i.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},i.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},i.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(){Ks.browser.IE_VERSION||Ks.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")},i.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}},i.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(Ks.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},i.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")},i.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}}},i.handleDurationChange_=function(){this.tech_.trigger("durationchange")}
1,i.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())},i.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=pl.Playlist.playlistEnd(e,t),i=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return n-i<=to;var a=r.end(r.length-1);return a-i<=to&&n-a<=to},i.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 i,r=this.masterPlaylistLoader_.master.playlists,a=r.filter(wo),s=1===a.length&&a[0]===n;if(1===r.length&&t!==1/0)return Ks.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(s);if(s){var o=!1;r.forEach(function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(o=!0,delete e.excludeUntil)}}),o&&(Ks.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}i=n.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*t,n.excludeUntil=i,e.reason&&(n.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var u=this.selectPlaylist();if(!u)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var l=e.internal?this.logger_:Ks.log.warn,c=e.message?" "+e.message:"";l((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+c+" Switching to playlist "+u.id+"."),u.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),u.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var d=u.targetDuration/2*1e3||5e3,h="number"==typeof u.lastRequest&&Date.now()-u.lastRequest<=d;return this.switchMedia_(u,"exclude",s||h)},i.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},i.delegateLoaders_=function(e,t){var n=this,i=[],r="all"===e;(r||"main"===e)&&i.push(this.masterPlaylistLoader_);var a=[];(r||"audio"===e)&&a.push("AUDIO"),(r||"subtitle"===e)&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach(function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)}),["main","audio","subtitle"].forEach(function(t){var r=n[t+"SegmentLoader_"];!r||e!==t&&"all"!==e||i.push(r)}),i.forEach(function(e){return t.forEach(function(t){"function"==typeof e[t]&&e[t]()})})},i.setCurrentTime=function(e){var t=io(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},i.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:pl.Playlist.duration(e):1/0:0},i.seekable=function(){return this.seekable_},i.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var i=this.masterPlaylistLoader_.master,r=pl.Playlist.seekable(t,n,pl.Playlist.liveEdgeDelay(i,t));if(0!==r.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=pl.Playlist.seekable(t,n,pl.Playlist.liveEdgeDelay(i,t))).length)return}var a,s;this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),s=this.seekable_.start(0)),e?e.start(0)>r.end(0)||r.start(0)>e.end(0)?this.seekable_=r:this.seekable_=Ks.createTimeRanges([[e.start(0)>r.start(0)?e.start(0):r.start(0),e.end(0)<r.end(0)?e.end(0):r.end(0)]]):this.seekable_=r,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===a&&this.seekable_.start(0)===s||(this.logger_("seekable updated ["+ao(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},i.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(),i=pl.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(i=Math.max(i,n.end(n.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}},i.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;
1for(var i in n)n[i].forEach(function(e){e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},i.master=function(){return this.masterPlaylistLoader_.master},i.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},i.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!n)},i.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},n=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();t.video=t.main;var i=Ku(this.master(),n),r={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(r.video=i.video||t.main.videoCodec||"avc1.4d400d"),t.main.isMuxed&&(r.video+=","+(i.audio||t.main.audioCodec||G)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||a)&&(r.audio=i.audio||t.main.audioCodec||t.audio.audioCodec||G,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),r.audio||r.video){var s,o={};if(["video","audio"].forEach(function(e){if(r.hasOwnProperty(e)&&(i=t[e].isFmp4,a=r[e],!(i?H(a):W(a)))){var n=t[e].isFmp4?"browser":"muxer";o[n]=o[n]||[],o[n].push(r[e]),"audio"===e&&(s=n)}var i,a}),a&&s&&n.attributes.AUDIO){var u=n.attributes.AUDIO;
1this.master().playlists.forEach(function(e){(e.attributes&&e.attributes.AUDIO)===u&&e!==n&&(e.excludeUntil=1/0)}),this.logger_("excluding audio group "+u+" as "+s+' does not support codec(s): "'+r.audio+'"')}if(!Object.keys(o).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var l=[];if(["video","audio"].forEach(function(t){var n=(F(e.sourceUpdater_.codecs[t]||"")[0]||{}).type,i=(F(r[t]||"")[0]||{}).type;n&&i&&n.toLowerCase()!==i.toLowerCase()&&l.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+r[t]+'"')}),l.length)return void this.blacklistCurrentPlaylist({playlist:n,message:"Codec switching not supported: "+l.join(", ")+".",blacklistDuration:1/0,internal:!0})}return r}var c=Object.keys(o).reduce(function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+o[t].join(",")+'"'},"")+".";this.blacklistCurrentPlaylist({playlist:n,internal:!0,message:c,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:n,message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},i.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)}}},i.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach(function(i){var r=t[i];if(-1===n.indexOf(r.id)){n.push(r.id);var a=Ku(e.master,r),s=[];!a.audio||W(a.audio)||H(a.audio)||s.push("audio codec "+a.audio),!a.video||W(a.video)||H(a.video)||s.push("video codec "+a.video),a.text&&"stpp.ttml.im1t"===a.text&&s.push("text codec "+a.text),s.length&&(r.excludeUntil=1/0,e.logger_("excluding "+r.id+" for unsupported: "+s.join(", ")))}})},i.excludeIncompatibleVariants_=function(e){var t=this,n=[],i=this.master().playlists,r=$u(F(e)),a=zu(r),s=r.video&&F(r.video)[0]||null,o=r.audio&&F(r.audio)[0]||null;
1Object.keys(i).forEach(function(e){var r=i[e];if(-1===n.indexOf(r.id)&&r.excludeUntil!==1/0){n.push(r.id);var u=[],l=Ku(t.masterPlaylistLoader_.master,r),c=zu(l);if(l.audio||l.video){if(c!==a&&u.push('codec count "'+c+'" !== "'+a+'"'),!t.sourceUpdater_.canChangeType()){var d=l.video&&F(l.video)[0]||null,h=l.audio&&F(l.audio)[0]||null;d&&s&&d.type.toLowerCase()!==s.type.toLowerCase()&&u.push('video codec "'+d.type+'" !== "'+s.type+'"'),h&&o&&h.type.toLowerCase()!==o.type.toLowerCase()&&u.push('audio codec "'+h.type+'" !== "'+o.type+'"')}u.length&&(r.excludeUntil=1/0,t.logger_("blacklisting "+r.id+": "+u.join(" && ")))}}})},i.updateAdCues_=function(e){var n=0,i=this.seekable();i.length&&(n=i.start(0)),function(e,n,i){if(void 0===i&&(i=0),e.segments)for(var r,a=i,s=0;s<e.segments.length;s++){var o=e.segments[s];if(r||(r=Ul(n,a+o.duration/2)),r){if("cueIn"in o){r.endTime=a,r.adEndTime=a,a+=o.duration,r=null;continue}if(a<r.endTime){a+=o.duration;continue}r.endTime+=o.duration}else if("cueOut"in o&&((r=new(t().VTTCue)(a,a+o.duration,o.cueOut)).adStartTime=a,r.adEndTime=a+parseFloat(o.cueOut),n.addCue(r)),"cueOutCont"in o){var u=o.cueOutCont.split("/").map(parseFloat),l=u[0],c=u[1];(r=new(t().VTTCue)(a,a+o.duration,"")).adStartTime=a-l,r.adEndTime=r.adStartTime+c,n.addCue(r)}a+=o.duration}}(e,this.cueTagsTrack_,n)},i.goalBufferLength=function(){var e=this.tech_.currentTime(),t=mu.GOAL_BUFFER_LENGTH,n=mu.GOAL_BUFFER_LENGTH_RATE,i=Math.max(t,mu.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,i)},i.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=mu.BUFFER_LOW_WATER_LINE,n=mu.BUFFER_LOW_WATER_LINE_RATE,i=Math.max(t,mu.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(t,mu.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?r:i)},i.bufferHighWaterLine=function(){return mu.BUFFER_HIGH_WATER_LINE},n}(Ks.EventTarget),tc=function(e,t,n){var i=e.masterPlaylistController_,r=i[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(i);if(t.attributes){var a=t.attributes.RESOLUTION;this.width=a&&a.width,this.height=a&&a.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}this.codecs=Ku(i.master(),t),this.playlist=t,this.id=n,this.enabled=function(e,t,n){return function(i){var r=e.master.playlists[t],a=To(r),s=wo(r);return void 0===i?s:(i?delete r.disabled:r.disabled=!0,i===s||a||(n(),i?e.trigger("renditionenabled"):e.trigger("renditiondisabled")),i)}}(e.playlists,t.id,r)},nc=["seeking","seeked","pause","playing","error"],ic=function(){function e(e){var n=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_=Zs("PlaybackWatcher"),this.logger_("initialize");var i=function(){return n.monitorCurrentTime_()},r=function(){return n.monitorCurrentTime_()},a=function(){return n.techWaiting_()},s=function(){return n.cancelTimer_()},o=this.masterPlaylistController_,u=["main","subtitle","audio"],l={};u.forEach(function(e){l[e]={reset:function(){return n.resetSegmentDownloads_(e)},updateend:function(){return n.checkSegmentDownloads_(e)}},o[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),o[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),n.tech_.on(["seeked","seeking"],l[e].reset)});var c=function(e){["main","audio"].forEach(function(t){o[t+"SegmentLoader_"][e]("appended",n.seekingAppendCheck_)})};this.seekingAppendCheck_=function(){n.fixesBadSeeks_()&&(n.consecutiveUpdates=0,n.lastRecordedTime=n.tech_.currentTime(),c("off"))},this.clearSeekingAppendCheck_=function(){return c("off")},this.watchForBadSeeking_=function(){n.clearSeekingAppendCheck_(),c("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",a),this.tech_.on(nc,s),this.tech_.on("canplay",r),this.tech_.one("play",i),this.dispose=function(){n.clearSeekingAppendCheck_(),n.logger_("dispose"),n.tech_.off("waiting",a),n.tech_.off(nc,s),n.tech_.off("canplay",r),n.te
1ch_.off("play",i),n.tech_.off("seeking",n.watchForBadSeeking_),n.tech_.off("seeked",n.clearSeekingAppendCheck_),u.forEach(function(e){o[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),o[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),n.tech_.off(["seeked","seeking"],l[e].reset)}),n.checkCurrentTimeTimeout_&&t().clearTimeout(n.checkCurrentTimeTimeout_),n.cancelTimer_()}}var n=e.prototype;return n.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&t().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=t().setTimeout(this.monitorCurrentTime_.bind(this),250)},n.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_()},n.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],i=n.buffered_(),r=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],i);this[e+"Buffered_"]=i,r?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:so(i)}),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)))},n.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+to>=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)}},n.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},n.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,n)){var i=t.start(0);e=i+(i===t.end(0)?0:to)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+ao(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;for(var r=this.masterPlaylistController_.sourceUpdater_,a=this.tech_.buffered(),s=r.audioBuffer?r.audioBuffered():null,o=r.videoBuffer?r.videoBuffered():null,u=this.media(),l=u.partTargetDuration?u.partTargetDuration:2*(u.targetDuration-eo),c=[s,o],d=0;d<c.length;d++){if(c[d])if(uo(c[d],n)<l)return!1}var h=ro(a,n);return 0!==h.length&&(e=h.start(0)+to,this.logger_("Buffered region starts ("+h.start(0)+")  just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},n.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=io(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}},n.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var i=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,r=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var a=ro(r,t);if(a.length>0){var s=a.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+s+", seeking to "+a.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*s,t),!0}return!1},n.afterSeekableWindow_=function(e,t,n,i){if(void 0===i&&(i=!1),!e.length)return!1;var r=e.end(e.length-1)+to;return!n.endList&&i&&(r=e.end(e.length-1)+3*n.targetDuration),t>r},n.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},n.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,i=e.currentTime;if(t){var r;if(t.length&&n.length){var a=io(t,i-3),s=io(t,i),o=io(n,i);o.length&&!s.length&&a.length&&(r={start:a.end(0),end:o.end(0)})}else{ro(t,i).length||(r=this.gapFromVideoUnderflow_(t,i))}return!!r&&(this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". Seeking to current time "+i),!0)}},n.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),i=ro(t,n);this.cancelTimer_(),0!==i.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",i.start(0)),this.tech_.setCurrentTime(i.start(0)+eo),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},n.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return Ks.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var i=e.end(n-1),r=e.start(n);t.push([i,r])}return Ks.createTimeRanges(t)}(e),i=0;i<n.length;i++){var r=n.start(i),a=n.end(i);if(t-r<4&&t-r>2)return{start:r,end:a}}return null},e}(),rc={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},ac=function e(t,n){var i=0,r=0,a=Ks.mergeOptions(rc,n);t.ready(function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})});var s=function(){r&&t.currentTime(r)},o=function(e){null!=e&&(r=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",s),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-i<1e3*a.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):a.getSource&&"function"==typeof a.getSource?(i=Date.now(),a.getSource.call(t,o)):void Ks.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function e(){t.off("loadedmetadata",s),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}},sc="2.16.3",oc={PlaylistLoader:Ho,Playlist:Po,utils:nu,STANDARD_PLAYLIST_SELECTOR:tl,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(Po.isEnabled);return Ju(t,function(e,t){return Zu(e,t)}),t.filter(function(t){return!!Ku(e.playlists.master,t).video})[0]||null},lastBandwidthSelector:tl,movingAverageBandwidthSelector:function(e){var n=-1,i=-1;
1if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var r=this.useDevicePixelRatio&&t().devicePixelRatio||1;return n<0&&(n=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(n=e*this.systemBandwidth+(1-e)*n,i=this.systemBandwidth),el(this.playlists.master,n,parseInt(Qu(this.tech_.el(),"width"),10)*r,parseInt(Qu(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},comparePlaylistBandwidth:Zu,comparePlaylistResolution:function(e,n){var i,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||t().Number.MAX_VALUE,n.attributes.RESOLUTION&&n.attributes.RESOLUTION.width&&(r=n.attributes.RESOLUTION.width),i===(r=r||t().Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&n.attributes.BANDWIDTH?e.attributes.BANDWIDTH-n.attributes.BANDWIDTH:i-r},xhr:zo()};Object.keys(mu).forEach(function(e){Object.defineProperty(oc,e,{get:function(){return Ks.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),mu[e]},set:function(t){Ks.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?Ks.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):mu[e]=t}})});var uc="videojs-vhs",lc=function(e,t){for(var n=t.media(),i=-1,r=0;r<e.length;r++)if(e[r].id===n.id){i=r;break}e.selectedIndex_=i,e.trigger({selectedIndex:i,type:"change"})};oc.canPlaySource=function(){return Ks.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var cc=function(e){var t=e.player,n=e.sourceKeySystems,i=e.audioMedia,r=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var a=function(e,t){return e.reduce(function(e,n){if(!n.contentProtection)return e;var i=t.reduce(function(e,t){var i=n.contentProtection[t];return i&&i.pssh&&(e[t]={pssh:i.pssh}),e},{});return Object.keys(i).length&&e.push(i),e},[])}(i?r.concat([i]):r,Object.keys(n)),s=[],o=[];return a.forEach(function(e){o.push(new Promise(function(e,n){t.tech_.one("keysessioncreated",e)})),s.push(new Promise(function(n,i){t.eme.initializeMediaKeys({keySystems:e},function(e){e?i(e):n()})}))}),Promise.race([Promise.all(s),Promise.race(o)])},dc=function(e){var t=e.player,n=function(e,t,n){if(!e)return e;var i={};t&&t.attributes&&t.attributes.CODECS&&(i=$u(F(t.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(i.audio=n.attributes.CODECS);var r=V(i.video),a=V(i.audio),s={};for(var o in e)s[o]={},a&&(s[o].audioContentType=a),r&&(s[o].videoContentType=r),t.contentProtection&&t.contentProtection[o]&&t.contentProtection[o].pssh&&(s[o].pssh=t.contentProtection[o].pssh),"string"==typeof e[o]&&(s[o].url=e[o]);return Ks.mergeOptions(e,s)}(e.sourceKeySystems,e.media,e.audioMedia);return!!n&&(t.currentSource().keySystems=n,!(n&&!t.eme)||(Ks.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},hc=function(){if(!t().localStorage)return null;var e=t().localStorage.getItem(uc);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};oc.supportsNativeHls=function(){if(!a()||!a().createElement)return!1;var e=a().createElement("video");if(!Ks.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(t){return/maybe|probably/i.test(e.canPlayType(t))})}(),oc.supportsNativeDash=!!(a()&&a().createElement&&Ks.getTech("Html5").isSupported())&&/maybe|probably/i.test(a().createElement("video").canPlayType("application/dash+xml")),oc.supportsTypeNatively=function(e){return"hls"===e?oc.supportsNativeHls:"dash"===e&&oc.supportsNativeDash},oc.isSupported=function(){return Ks.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var pc=function(e){function n(t,n,i){var r;if(r=e.call(this,n,Ks.mergeOptions(i.hls,i.vhs))||this,i.hls&&Object.keys(i.hls).length&&Ks.log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),"number"==typeof i.initialBandwidth&&(r.options_.bandwidth=i.initialBandwidth),r.logger_=Zs("VhsHandler"),n.options_&&n.options_.playerId){var s=Ks(n.options_.playerId);s.hasOwnProperty("hls")||Object.defineProperty(s,"hls",{get:function(){return Ks.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),l(r)},configurable:!0}),s.hasOwnProperty("vhs")||Object.defineProperty(s,"vhs",{get:function(){return Ks.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),l(r)},configurable:!0}),s.hasOwnProperty("dash")||Object.defineProperty(s,"dash",{get:function(){return Ks.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),l(r)},configurable:!0}),r.player_=s}if(r.tech_=n,r.source_=t,r.stats={},r.ignoreNextSeekingEvent_=!1,r.setOptions_(),r.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(r.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return r.on(a(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(e){var t=a().fullscreenElement||a().webkitFullscreenElement||a().mozFullScreenElement||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}d(n,e);var i=n.prototype;return i.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=hc();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=mu.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===mu.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach(function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},i.src=function(e,n){var i=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=oc,this.options_.sourceType=K(n),this.options_.seekTo=function(e){i.tech_.setCurrentTime(e)},this.options_.smoothQualityChange&&Ks.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new ec(this.options_);var a=Ks.mergeOptions({liveRangeSafeTimeDelta:to},this.options_,{seekable:function(){return i.seekable()},media:function(){return i.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new ic(a),this.masterPlaylistController_.on("error",function(){var e=Ks.players[i.tech_.options_.playerId],t=i.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)});var s=this.options_.experimentalBufferBasedABR?oc.movingAverageBandwidthSelector(.55):oc.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.masterPlaylistController_.selectInitialPlaylist=oc.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,n=t().navigator.connection||t().navigator.mozConnection||t().navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&n){var r=1e3*n.downlink*1e3;e=r>=i&&e>=i?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(){Ks.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 i.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return i.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return i.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return i.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return i.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return i.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return i.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return i.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return i.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return i.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return i.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return i.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return i.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return so(i.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return i.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return i.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return i.tech_.name_},enumerable:!0},duration:{get:function(){return i.tech_.duration()},enumerable:!0},master:{get:function(){return i.playlists.master},enumerable:!0},playerDimensions:{get:function(){return i.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return so(i.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return i.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){i.options_.useBandwidthFromLocalStorage&&function(e){if(!t().localStorage)return!1;var n=hc();n=n?Ks.mergeOptions(n,e):e;try{t().localStorage.setItem(uc,JSON.stringify(n))}catch(e){return!1}}({bandwidth:i.bandwidth,throughput:Math.round(i.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){var e;(e=i).representations=function(){var t=e.masterPlaylistController_.master(),n=Ao(t)?e.masterPlaylistController_.getAudioTrackPlaylists_():t.playlists;return n?n.filter(function(e){return!To(e)}).map(function(t,n){return new tc(e,t,t.id)}):[]}}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){i.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_=t().URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},i.createKeySessions_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),cc({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 ke
1ys for EME",code:3})})},i.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},i.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=dc({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});this.player_.tech_.on("keystatuschange",function(t){if("output-restricted"===t.status){var n=e.masterPlaylistController_.master();if(n&&n.playlists){var i,r=[];if(n.playlists.forEach(function(e){e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height>=720&&(!e.excludeUntil||e.excludeUntil<1/0)&&(e.excludeUntil=1/0,r.push(e))}),r.length)(i=Ks.log).warn.apply(i,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(r)),e.masterPlaylistController_.fastQualityChange_()}}}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),11!==Ks.browser.IE_VERSION&&n?this.createKeySessions_():this.masterPlaylistController_.sourceUpdater_.initializedEme()},i.setupQualityLevels_=function(){var e=this,t=Ks.players[this.tech_.options_.playerId];
1t&&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)}),lc(t,n.playlists)}),this.playlists.on("mediachange",function(){lc(e.qualityLevels_,e.playlists)}))},n.version=function(){return{"@videojs/http-streaming":sc,"mux.js":"6.0.1","mpd-parser":"0.22.1","m3u8-parser":"4.8.0","aes-decrypter":"3.1.3"}},i.version=function(){return this.constructor.version()},i.canChangeType=function(){return Ll.canChangeType()},i.play=function(){this.masterPlaylistController_.play()},i.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},i.duration=function(){return this.masterPlaylistController_.duration()},i.seekable=function(){return this.masterPlaylistController_.seekable()},i.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_&&t().URL.revokeObjectURL&&(t().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),e.prototype.dispose.call(this)},i.convertToProgramTime=function(e,t){return iu({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},i.seekToProgramTime=function(e,t,n,i){return void 0===n&&(n=!0),void 0===i&&(i=2),ru({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:i,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},n}(Ks.getComponent("Component")),fc={name:"videojs-http-streaming",VERSION:sc,canHandleSource:function(e,t){void 0===t&&(t={});var n=Ks.mergeOptions(Ks.options,t);return fc.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var i=Ks.mergeOptions(Ks.options,n);return t.vhs=new pc(e,t,i),Ks.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return Ks.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=zo(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){var n=K(e);if(!n)return"";var i=fc.getOverrideNative(t);return!oc.supportsTypeNatively(n)||i?"maybe":""},getOverrideNative:function(e){void 0===e&&(e={});var t=e,n=t.vhs,i=void 0===n?{}:n,r=t.hls,a=void 0===r?{}:r,s=!(Ks.browser.IS_ANY_SAFARI||Ks.browser.IS_IOS),o=i.overrideNative,u=void 0===o?s:o,l=a.overrideNative;return void 0!==l&&l||u}};(H("avc1.4d400d,mp4a.40.2")&&Ks.getTech("Html5").registerSourceHandler(fc,0),Ks.VhsHandler=pc,Object.defineProperty(Ks,"HlsHandler",{get:function(){return Ks.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),pc},configurable:!0}),Ks.VhsSourceHandler=fc,Object.defineProperty(Ks,"HlsSourceHandler",{get:function(){return Ks.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),fc},configurable:!0}),Ks.Vhs=oc,Object.defineProperty(Ks,"Hls",{get:function(){return Ks.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),oc},configurable:!0}),Ks.use||(Ks.registerComponent("Hls",oc),Ks.registerComponent("Vhs",oc)),Ks.options.vhs=Ks.options.vhs||{},Ks.options.hls=Ks.options.hls||{},Ks.getPlugin&&Ks.getPlugin("reloadSourceOnError"))||(Ks.registerPlugin||Ks.plugin)("reloadSourceOnError",function(e){ac(this,e)});const mc=Ks;function gc(e){return gc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gc(e)}function vc(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var u=i&&i.prototype instanceof o?i:o,l=Object.create(u.prototype);return yc(l,"_invoke",function(n,i,r){var a,o,u,l=0,c=r||[],d=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,o=0,u=e,h.n=n,s}};function p(n,i){for(o=n,u=i,t=0;!d&&l&&!r&&t<c.length;t++){var r,a=c[t],p=h.p,f=a[2];n>3?(r=f===i)&&(u=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=p&&((r=n<2&&p<a[1])?(o=0,h.v=i,h.n=a[1]):p<f&&(r=n<3||a[0]>i||i>f)&&(a[4]=n,a[5]=i,h.n=f,o=0))}if(r||n>1)return s;throw d=!0,i}return function(r,c,f){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,f),o=c,u=f;
1(t=o<2?e:u)||!d;){a||(o?o<3?(o>1&&(h.n=-1),p(o,u)):h.n=u:h.v=u);try{if(l=2,a){if(o||(r="next"),t=a[r]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,o<2&&(o=0)}else 1===o&&(t=a.return)&&t.call(a),o<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),o=1);a=e}else if((t=(d=h.n<0)?u:n.call(i,h))!==s)break}catch(t){a=e,o=1,u=t}finally{l=1}}return{value:t,done:d}}}(n,r,a),!0),l}var s={};function o(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(yc(t={},i,function(){return this}),t),d=l.prototype=o.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,yc(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=l,yc(d,"constructor",l),yc(l,"constructor",u),u.displayName="GeneratorFunction",yc(l,r,"GeneratorFunction"),yc(d),yc(d,r,"Generator"),yc(d,i,function(){return this}),yc(d,"toString",function(){return"[object Generator]"}),(vc=function(){return{w:a,m:h}})()}function yc(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}yc=function(e,t,n,i){function a(t,n){yc(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},yc(e,t,n,i)}function _c(e,t,n,i,r,a,s){try{var o=e[a](s),u=o.value}catch(e){return void n(e)}o.done?t(u):Promise.resolve(u).then(i,r)}function bc(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var a=e.apply(t,n);function s(e){_c(a,i,r,s,o,"next",e)}function o(e){_c(a,i,r,s,o,"throw",e)}s(void 0)})}}function Tc(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,kc(i.key),i)}}function wc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Sc(e,t,n){return(t=kc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kc(e){var t=function(e,t){if("object"!=gc(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=gc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==gc(t)?t:t+""}var Ec={streaming:{name:"Streaming (HLS + DASH)",js:["abs-video-streaming.min.js"],css:[],external:[],check:function(){return void 0!==window.videojs&&!!window.videojs.Vhs}},ads:{name:"Google IMA Ads",js:["abs-video-ads.min.js"],css:["abs-video-ads.min.css"],external:["https://imasdk.googleapis.com/js/sdkloader/ima3.js"],check:function(){return void 0!==window.google&&window.google.ima}}};Ec.hls=Ec.streaming,Ec.dash=Ec.streaming;var Cc={loads:{},getMetrics:function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wc(Object(n),!0).forEach(function(t){Sc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},this.loads)}},Ac=["abs-video-player-sdk.min.js","abs-video-core.min.js","abs-video-wrapper.min.js"];function Pc(){var e;if("undefined"==typeof document)return null;var t=null===(e=document.currentScript)||void 0===e?void 0:e.src;if(t)return new URL(".",t).href;var n=Array.from(document.scripts||[]).map(function(e){return e.src}).find(function(e){return Ac.some(function(t){return e.includes(t)})});return n?new URL(".",n).href:null}var xc=Pc();function Ic(e){var t=function(){if("undefined"!=typeof window){var e=window.ABS_VIDEO_PLAYER_CONFIG,t=(null==e?void 0:e.assetBaseUrl)||(null==e?void 0:e.assetBaseURL)||(null==e?void 0:e.baseUrl)||(null==e?void 0:e.baseURL);if("string"==typeof t&&t.trim())return(n=t.trim()).endsWith("/")?n:"".concat(n,"/")}var n;return xc||(xc=Pc()),xc||"/ocvp/video-player/"}(),n="undefined"!=typeof window?new URL(t,window.location.origin).href:t;return new URL(e,n).href}var Oc=function(){return function(e,t,n){return t&&Tc(e.prototype,t),n&&Tc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},null,[{key:"load",value:(n=bc(vc().m(function e(t){var n,i,r,a,s=this,o=arguments;
1return vc().w(function(e){for(;;)switch(e.n){case 0:if(n=o.length>1&&void 0!==o[1]?o[1]:{},i=Ec[t]){e.n=1;break}throw new Error("Unknown plugin: ".concat(t,". Available: ").concat(Object.keys(Ec).join(", ")));case 1:if(!this.loadedPlugins.has(t)){e.n=2;break}return console.log('[ABSVideo] Plugin "'.concat(t,'" already loaded')),e.a(2,Promise.resolve());case 2:if(!i.check||!i.check()){e.n=3;break}return this.loadedPlugins.add(t),console.log('[ABSVideo] Plugin "'.concat(t,'" already available in runtime')),e.a(2,Promise.resolve());case 3:if(!this.loadingPromises.has(t)){e.n=4;break}return e.a(2,this.loadingPromises.get(t));case 4:return r=performance.now(),console.log("[ABSVideo] Loading plugin: ".concat(i.name)),a=this._loadPlugin(t,i,n).then(function(){var e=performance.now()-r;Cc.loads[t]={duration:Math.round(e),timestamp:Date.now()},console.log('[ABSVideo] Plugin "'.concat(t,'" loaded in ').concat(Math.round(e),"ms")),s.loadedPlugins.add(t),s.loadingPromises.delete(t)}).catch(function(e){throw console.error('[ABSVideo] Failed to load plugin "'.concat(t,'":'),e),s.loadingPromises.delete(t),e}),this.loadingPromises.set(t,a),e.a(2,a)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"loadMultiple",value:(t=bc(vc().m(function e(t){var n,i,r=this;return vc().w(function(e){for(;;)switch(e.n){case 0:return n=performance.now(),e.n=1,Promise.all(t.map(function(e){return r.load(e)}));case 1:return i=performance.now()-n,console.log("[ABSVideo] All plugins loaded in ".concat(Math.round(i),"ms")),e.a(2,i)}},e)})),function(e){return t.apply(this,arguments)})},{key:"preload",value:function(e){var t=this,n=function(){e.forEach(function(e){t.loadedPlugins.has(e)||t.loadingPromises.has(e)||t.load(e).catch(function(){})})};"undefined"!=typeof requestIdleCallback?requestIdleCallback(n,{timeout:5e3}):setTimeout(n,100)}},{key:"isLoaded",value:function(e){return this.loadedPlugins.has(e)}},{key:"getMetrics",value:function(){return Cc.getMetrics()}},{key:"_loadPlugin",value:(e=bc(vc().m(function e(t,n,i){return vc().w(function(e){for(;;)switch(e.n){case 0:if(!(n.external.length>0)){e.n=1;break}return e.n=1,this._loadScripts(n.external);case 1:if(n.css.length>0&&this._loadStyles(n.css),!(n.js.length>0)){e.n=2;break}return e.n=2,this._loadScripts(n.js);case 2:if(!n.check||n.check()){e.n=3;break}throw new Error("Plugin ".concat(t," failed verification check"));case 3:return e.a(2)}},e,this)})),function(t,n,i){return e.apply(this,arguments)})},{key:"_loadScripts",value:function(e){var t=this;return e.reduce(function(e,n){return e.then(function(){return t._loadScript(n)})},Promise.resolve())}},{key:"_loadScript",value:function(e){var t=function(e){return/^https?:\/\//i.test(e)}(e)?e:Ic(e);return new Promise(function(e,n){if(document.querySelector('script[src="'.concat(t,'"]')))e();else{var i=document.createElement("script");i.src=t,i.async=!0,i.onload=e,i.onerror=function(){return n(new Error("Failed to load script: ".concat(t)))},document.head.appendChild(i)}})}},{key:"_loadStyles",value:function(e){e.forEach(function(e){var t=Ic(e);if(!document.querySelector('link[href="'.concat(t,'"]'))){var n=document.createElement("link");n.rel="stylesheet",n.href=t,document.head.appendChild(n)}})}}]);var e,t,n}();Sc(Oc,"loadedPlugins",new Set),Sc(Oc,"loadingPromises",new Map);function Lc(e){return Lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lc(e)}function Dc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Mc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dc(Object(n),!0).forEach(function(t){Rc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Rc(e,t,n){return(t=qc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nc(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var u=i&&i.prototype instanceof o?i:o,l=Object.create(u.prototype);return Uc(l,"_invoke",function(n,i,r){var a,o,u,l=0,c=r||[],d=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,o=0,u=e,h.n=n,s}};function p(n,i){for(o=n,u=i,t=0;!d&&l&&!r&&t<c.length;t++){var r,a=c[t],p=h.p,f=a[2];n>3?(r=f===i)&&(u=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=p&&((r=n<2&&p<a[1])?(o=0,h.v=i,h.n=a[1]):p<f&&(r=n<3||a[0]>i||i>f)&&(a[4]=n,a[5]=i,h.n=f,o=0))}if(r||n>1)return s;throw d=!0,i}return function(r,c,f){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,f),o=c,u=f;
1(t=o<2?e:u)||!d;){a||(o?o<3?(o>1&&(h.n=-1),p(o,u)):h.n=u:h.v=u);try{if(l=2,a){if(o||(r="next"),t=a[r]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,o<2&&(o=0)}else 1===o&&(t=a.return)&&t.call(a),o<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),o=1);a=e}else if((t=(d=h.n<0)?u:n.call(i,h))!==s)break}catch(t){a=e,o=1,u=t}finally{l=1}}return{value:t,done:d}}}(n,r,a),!0),l}var s={};function o(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(Uc(t={},i,function(){return this}),t),d=l.prototype=o.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Uc(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=l,Uc(d,"constructor",l),Uc(l,"constructor",u),u.displayName="GeneratorFunction",Uc(l,r,"GeneratorFunction"),Uc(d),Uc(d,r,"Generator"),Uc(d,i,function(){return this}),Uc(d,"toString",function(){return"[object Generator]"}),(Nc=function(){return{w:a,m:h}})()}function Uc(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}Uc=function(e,t,n,i){function a(t,n){Uc(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},Uc(e,t,n,i)}function Bc(e,t,n,i,r,a,s){try{var o=e[a](s),u=o.value}catch(e){return void n(e)}o.done?t(u):Promise.resolve(u).then(i,r)}function jc(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var a=e.apply(t,n);function s(e){Bc(a,i,r,s,o,"next",e)}function o(e){Bc(a,i,r,s,o,"throw",e)}s(void 0)})}}function Fc(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,qc(i.key),i)}}function qc(e){var t=function(e,t){if("object"!=Lc(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Lc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Lc(t)?t:t+""}var Vc=function(){return function(e,t,n){return t&&Fc(e.prototype,t),n&&Fc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.element="string"==typeof t?document.querySelector(t):t,this.options=this._mergeOptions(n),this.player=null,this.features={ads:!1,hls:!1,dash:!1},this._initPromise=this._init()},[{key:"_init",value:(i=jc(Nc().m(function e(){return Nc().w(function(e){for(;;)switch(e.n){case 0:if(!this._initPromise){e.n=1;break}return e.a(2,this._initPromise);case 1:return e.n=2,this._detectAndLoadFeatures();case 2:return this.player=mc(this.element,this.options),this._setupEventHandlers(),e.a(2,this)}},e,this)})),function(){return i.apply(this,arguments)})},{key:"_detectAndLoadFeatures",value:(n=jc(Nc().m(function e(){var t,n,i,r,a,s,o,u;return Nc().w(function(e){for(;;)switch(e.n){case 0:if(r=(null===(t=this.options.sources)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.src)||(null===(n=this.element)||void 0===n?void 0:n.src),a=(null===(i=this.options.sources)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.type)||"",s=String(this.options.videoType||"").toLowerCase(),o=Array.isArray(this.options.sources)&&this.options.sources.length>0,u=[],(null!=r&&r.includes(".m3u8")||a.includes("mpegurl"))&&(u.push("hls"),this.features.hls=!0),(null!=r&&r.includes(".mpd")||a.includes("dash"))&&(u.push("dash"),this.features.dash=!0),"sponsored"!==s&&!o||!this.options.ads&&!this.options.ima||(u.push("ads"),this.features.ads=!0),!(u.length>0&&!1!==this.options.lazyLoad)){e.n=1;break}return e.n=1,Oc.loadMultiple(u);case 1:return e.a(2)}},e,this)})),function(){return n.apply(this,arguments)})},{key:"_mergeOptions",value:function(e){return Mc({controls:!0,autoplay:!1,preload:"auto",fluid:!0,responsive:!0,playbackRates:[.5,1,1.5,2]},e)}},{key:"_setupEventHandlers",value:function(){var e=this;this.player&&(this.player.on("error",function(t){console.error("[ABSVideo] Player error:",e.player.error())}),this.player.on("ready",function(){console.log("[ABSVideo] Player ready")}))}},{key:"play",value:function(){var e;return null===(e=this.player)||void 0===e?void 0:e.play()}},{key:"pause",value:function(){var e;return null===(e=this.player)||void 0===e?void 0:e.pause()}},{key:"currentTime",value:function(e){var t,n;void 0!==e&&(null===(n=this.player)||void 0===n||n.currentTime(e));return null===(t=this.player)||void 0===t?void 0:t.currentTime()}},{key:"duration",value:function(){var e;return null===(e=this.player)||void 0===e?void 0:e.duration()}},{key:"volume",value:function(e){var t,n;void 0!==e&&(null===(n=this.player)||void 0===n||n.volume(e));return null===(t=this.player)||void 0===t?void 0:t.volume()}},{key:"muted",value:function(e){var t,n;void 0!==e&&(null===(n=this.player)||void 0===n||n.muted(e));return null===(t=this.player)||void 0===t?void 0:t.muted()}},{key:"src",value:(t=jc(Nc().m(function e(t){var n;return Nc().w(function(e){for(;;)switch(e.n){case 0:return this.options.sources=Array.isArray(t)?t:[t],e.n=1,this._detectAndLoadFeatures();case 1:null===(n=this.player)||void 0===n||n.src(t);case 2:return e.a(2)}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"requestFullscreen",value:function(){var e;return null===(e=this.player)||void 0===e?void 0:e.requestFullscreen()}},{key:"exitFullscreen",value:function(){var e;return null===(e=this.player)||void 0===e?void 0:e.exitFullscreen()}},{key:"isFullscreen",value:function(){var e;return null===(e=this.player)||void 0===e?void 0:e.isFullscreen()}},{key:"setupAds",value:(e=jc(Nc().m(function e(t){var n;return Nc().w(function(e){for(;;)switch(e.n){case 0:if(Oc.isLoaded("ads")){e.n=1;break}return e.n=1,Oc.load("ads");case 1:null!==(n=this.player)&&void 0!==n&&n.ima&&this.player.ima(t);case 2:return e.a(2)}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"on",value:function(e,t){var n;return null===(n=this.player)||void 0===n||n.on(e,t),this}},{key:"off",value:function(e,t){var n;return null===(n=this.player)||void 0===n||n.off(e,t),this}},{key:"getPlayer",value:function(){return this.player}},{key:"getActiveFeatures",value:function(){return Mc({},this.features)}},{key:"dispose",value:function(){var e;null===(e=this.player)||void 0===e||e.dispose(),this.player=null}}]);var e,t,n,i}();function Hc(e){return Hc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hc(e)}function Wc(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var u=i&&i.prototype instanceof o?i:o,l=Object.create(u.prototype);return Gc(l,"_invoke",function(n,i,r){var a,o,u,l=0,c=r||[],d=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,o=0,u=e,h.n=n,s}};function p(n,i){for(o=n,u=i,t=0;!d&&l&&!r&&t<c.length;t++){var r,a=c[t],p=h.p,f=a[2];n>3?(r=f===i)&&(u=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=p&&((r=n<2&&p<a[1])?(o=0,h.v=i,h.n=a[1]):p<f&&(r=n<3||a[0]>i||i>f)&&(a[4]=n,a[5]=i,h.n=f,o=0))}if(r||n>1)return s;throw d=!0,i}return function(r,c,f){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,f),o=c,u=f;
1(t=o<2?e:u)||!d;){a||(o?o<3?(o>1&&(h.n=-1),p(o,u)):h.n=u:h.v=u);try{if(l=2,a){if(o||(r="next"),t=a[r]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,o<2&&(o=0)}else 1===o&&(t=a.return)&&t.call(a),o<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),o=1);a=e}else if((t=(d=h.n<0)?u:n.call(i,h))!==s)break}catch(t){a=e,o=1,u=t}finally{l=1}}return{value:t,done:d}}}(n,r,a),!0),l}var s={};function o(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(Gc(t={},i,function(){return this}),t),d=l.prototype=o.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Gc(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=l,Gc(d,"constructor",l),Gc(l,"constructor",u),u.displayName="GeneratorFunction",Gc(l,r,"GeneratorFunction"),Gc(d),Gc(d,r,"Generator"),Gc(d,i,function(){return this}),Gc(d,"toString",function(){return"[object Generator]"}),(Wc=function(){return{w:a,m:h}})()}function Gc(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}Gc=function(e,t,n,i){function a(t,n){Gc(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},Gc(e,t,n,i)}function $c(e,t,n,i,r,a,s){try{var o=e[a](s),u=o.value}catch(e){return void n(e)}o.done?t(u):Promise.resolve(u).then(i,r)}function zc(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Xc(i.key),i)}}function Kc(e,t,n){return(t=Xc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xc(e){var t=function(e,t){if("object"!=Hc(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Hc(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hc(t)?t:t+""}var Yc=function(){return function(e,t,n){return t&&zc(e.prototype,t),n&&zc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},null,[{key:"createPlayer",value:function(e){return new Vc(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},{key:"getVideoJS",value:function(){return mc}},{key:"getLoader",value:function(){return Oc}},{key:"loadPlugin",value:(e=function(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var a=e.apply(t,n);function s(e){$c(a,i,r,s,o,"next",e)}function o(e){$c(a,i,r,s,o,"throw",e)}s(void 0)})}}(Wc().m(function e(t){return Wc().w(function(e){for(;;)if(0===e.n)return e.a(2,Oc.load(t))},e)})),function(t){return e.apply(this,arguments)})},{key:"isPluginLoaded",value:function(e){return Oc.isLoaded(e)}},{key:"getMetrics",value:function(){return Oc.getMetrics()}},{key:"getPaths",value:function(){return{core:"/ocvp/video-player/abs-video-core.min.js",coreCss:"/ocvp/video-player/abs-video-core.min.css",plugins:{streaming:"/ocvp/video-player/abs-video-streaming.min.js",ads:"/ocvp/video-player/abs-video-ads.min.js",adsCss:"/ocvp/video-player/abs-video-ads.min.css"},external:{ima:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}}}}]);var e}();Kc(Yc,"VERSION","1.0.0"),Kc(Yc,"TYPE","core");"undefined"!=typeof window&&(window.ABSVideoCore=Yc,window.videojs=mc);const Qc=Object.freeze({safeway:"red",vons:"red",randalls:"red",tomthumb:"red",acmemarkets:"red",carrsqc:"red",jewelosco:"red",balduccis:"red",albertsons:"blue",kingsfoodmarkets:"blue",shopunitedsupermarkets:"blue",shopalbertsonsmarket:"blue",shaws:"green",haggen:"green",andronicos:"green",starmarket:"green",shopamigos:"green",pavilions:"purple",shopmarketstreet:"redwood"}),Jc=globalThis,Zc=Jc.ShadowRoot&&(void 0===Jc.ShadyCSS||Jc.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ed=Symbol(),td=new WeakMap;
vendor: 1,707 bytes, line 1
1class nd{constructor(e,t,n){if(this._$cssResult$=!0,n!==ed)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Zc&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=td.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&td.set(t,e))}return e}toString(){return this.cssText}}const id=(e,t)=>{if(Zc)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const n of t){const t=document.createElement("style"),i=Jc.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}},rd=Zc?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return(e=>new nd("string"==typeof e?e:e+"",void 0,ed))(t)})(e):e,{is:ad,defineProperty:sd,getOwnPropertyDescriptor:od,getOwnPropertyNames:ud,getOwnPropertySymbols:ld,getPrototypeOf:cd}=Object,dd=globalThis,hd=dd.trustedTypes,pd=hd?hd.emptyScript:"",fd=dd.reactiveElementPolyfillSupport,md=(e,t)=>e,gd={toAttribute(e,t){switch(t){case Boolean:e=e?pd:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},vd=(e,t)=>!ad(e,t),yd={attribute:!0,type:String,converter:gd,reflect:!1,useDefault:!1,hasChanged:vd};Symbol.metadata??=Symbol("metadata"),dd.litPropertyMetadata??=new WeakMap;class _d extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}
vendor: 4,370 bytes, line 1
1static createProperty(e,t=yd){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),i=this.getPropertyDescriptor(e,n,t);void 0!==i&&sd(this.prototype,e,i)}}static getPropertyDescriptor(e,t,n){const{get:i,set:r}=od(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:i,set(t){const a=i?.call(this);r?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??yd}static _$Ei(){if(this.hasOwnProperty(md("elementProperties")))return;const e=cd(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(md("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(md("properties"))){const e=this.properties,t=[...ud(e),...ld(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const n=this._$Eu(e,t);void 0!==n&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(rd(e))}else void 0!==e&&t.push(rd(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return id(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){const n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(void 0!==i&&!0===n.reflect){const r=(void 0!==n.converter?.toAttribute?n.converter:gd).toAttribute(t,n.type);this._$Em=e,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(e,t){const n=this.constructor,i=n._$Eh.get(e);if(void 0!==i&&this._$Em!==i){const e=n.getPropertyOptions(i),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:gd;this._$Em=i;const a=r.fromAttribute(t,e.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(e,t,n,i=!1,r){if(void 0!==e){const a=this.constructor;if(!1===i&&(r=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??vd)(r,t)||n.useDefault&&n.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:i,wrapped:r},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==r||void 0!==a)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e){const{wrapped:e}=n,i=this[t];!0!==e||this._$AL.has(t)||void 0===i||this.C(t,void 0,n,i)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e
vendor: 5,427 bytes, line 1
1=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}}_d.elementStyles=[],_d.shadowRootOptions={mode:"open"},_d[md("elementProperties")]=new Map,_d[md("finalized")]=new Map,fd?.({ReactiveElement:_d}),(dd.reactiveElementVersions??=[]).push("2.1.2");const bd=globalThis,Td=e=>e,wd=bd.trustedTypes,Sd=wd?wd.createPolicy("lit-html",{createHTML:e=>e}):void 0,kd="$lit$",Ed=`lit$${Math.random().toFixed(9).slice(2)}$`,Cd="?"+Ed,Ad=`<${Cd}>`,Pd=document,xd=()=>Pd.createComment(""),Id=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Od=Array.isArray,Ld=e=>Od(e)||"function"==typeof e?.[Symbol.iterator],Dd="[ \t\n\f\r]",Md=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rd=/-->/g,Nd=/>/g,Ud=RegExp(`>|${Dd}(?:([^\\s"'>=/]+)(${Dd}*=${Dd}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Bd=/'/g,jd=/"/g,Fd=/^(?:script|style|textarea|title)$/i,qd=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),Vd=qd(1),Hd=(qd(2),qd(3),Symbol.for("lit-noChange")),Wd=Symbol.for("lit-nothing"),Gd=new WeakMap,$d=Pd.createTreeWalker(Pd,129);function zd(e,t){if(!Od(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Sd?Sd.createHTML(t):t}const Kd=(e,t)=>{const n=e.length-1,i=[];let r,a=2===t?"<svg>":3===t?"<math>":"",s=Md;for(let t=0;t<n;t++){const n=e[t];let o,u,l=-1,c=0;for(;c<n.length&&(s.lastIndex=c,u=s.exec(n),null!==u);)c=s.lastIndex,s===Md?"!--"===u[1]?s=Rd:void 0!==u[1]?s=Nd:void 0!==u[2]?(Fd.test(u[2])&&(r=RegExp("</"+u[2],"g")),s=Ud):void 0!==u[3]&&(s=Ud):s===Ud?">"===u[0]?(s=r??Md,l=-1):void 0===u[1]?l=-2:(l=s.lastIndex-u[2].length,o=u[1],s=void 0===u[3]?Ud:'"'===u[3]?jd:Bd):s===jd||s===Bd?s=Ud:s===Rd||s===Nd?s=Md:(s=Ud,r=void 0);const d=s===Ud&&e[t+1].startsWith("/>")?" ":"";a+=s===Md?n+Ad:l>=0?(i.push(o),n.slice(0,l)+kd+n.slice(l)+Ed+d):n+Ed+(-2===l?t:d)}return[zd(e,a+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),i]};class Xd{constructor({strings:e,_$litType$:t},n){let i;this.parts=[];let r=0,a=0;const s=e.length-1,o=this.parts,[u,l]=Kd(e,t);if(this.el=Xd.createElement(u,n),$d.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=$d.nextNode())&&o.length<s;){if(1===i.nodeType){if(i.hasAttributes())for(const e of i.getAttributeNames())if(e.endsWith(kd)){const t=l[a++],n=i.getAttribute(e).split(Ed),s=/([.?@])?(.*)/.exec(t);o.push({type:1,index:r,name:s[2],strings:n,ctor:"."===s[1]?eh:"?"===s[1]?th:"@"===s[1]?nh:Zd}),i.removeAttribute(e)}else e.startsWith(Ed)&&(o.push({type:6,index:r}),i.removeAttribute(e));if(Fd.test(i.tagName)){const e=i.textContent.split(Ed),t=e.length-1;if(t>0){i.textContent=wd?wd.emptyScript:"";for(let n=0;n<t;n++)i.append(e[n],xd()),$d.nextNode(),o.push({type:2,index:++r});i.append(e[t],xd())}}}else if(8===i.nodeType)if(i.data===Cd)o.push({type:2,index:r});else{let e=-1;for(;-1!==(e=i.data.indexOf(Ed,e+1));)o.push({type:7,index:r}),e+=Ed.length-1}r++}}static createElement(e,t){const n=Pd.createElement("template");return n.innerHTML=e,n}}function Yd(e,t,n=e,i){if(t===Hd)return t;let r=void 0!==i?n._$Co?.[i]:n._$Cl;const a=Id(t)?void 0:t._$litDirective$;return r?.constructor!==a&&(r?._$AO?.(!1),void 0===a?r=void 0:(r=new a(e),r._$AT(e,n,i)),void 0!==i?(n._$Co??=[])[i]=r:n._$Cl=r),void 0!==r&&(t=Yd(e,r._$AS(e,t.values),r,i)),t}class Qd{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,i=(e?.creationScope??Pd).importNode(t,!0);$d.currentNode=i;let r=$d.nextNode(),a=0,s=0,o=n[0];for(;void 0!==o;){if(a===o.index){let t;2===o.type?t=new Jd(r,r.nextSibling,this,e):1===o.type?t=new o.ctor(r,o.name,o.strings,this,e):6===o.type&&(t=new ih(r,this,e)),this._$AV.push(t),o=n[++s]}a!==o?.index&&(r=$d.nextNode(),a++)}return $d.currentNode=Pd,i}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class Jd{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,i){this.type=2,this._$AH=Wd,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Yd(this,e,t),Id(e)?e===Wd||null==e||""===e?(this._$AH!==Wd&&this._$AR(),this._$AH=Wd):e!==this._$AH&&e!==Hd&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):Ld(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Wd&&Id(this._$AH)?this._$AA.nextSibling.data=e:this.T(Pd.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,i="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=Xd.createElement(zd(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(t);
vendor: 1,641 bytes, line 1
1else{const e=new Qd(i,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=Gd.get(e.strings);return void 0===t&&Gd.set(e.strings,t=new Xd(e)),t}k(e){Od(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,i=0;for(const r of e)i===t.length?t.push(n=new Jd(this.O(xd()),this.O(xd()),this,this.options)):n=t[i],n._$AI(r),i++;i<t.length&&(this._$AR(n&&n._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=Td(e).nextSibling;Td(e).remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class Zd{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,i,r){this.type=1,this._$AH=Wd,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Wd}_$AI(e,t=this,n,i){const r=this.strings;let a=!1;if(void 0===r)e=Yd(this,e,t,0),a=!Id(e)||e!==this._$AH&&e!==Hd,a&&(this._$AH=e);else{const i=e;let s,o;for(e=r[0],s=0;s<r.length-1;s++)o=Yd(this,i[n+s],t,s),o===Hd&&(o=this._$AH[s]),a||=!Id(o)||o!==this._$AH[s],o===Wd?e=Wd:e!==Wd&&(e+=(o??"")+r[s+1]),this._$AH[s]=o}a&&!i&&this.j(e)}j(e){e===Wd?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class eh extends Zd{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Wd?void 0:e}}class th extends Zd{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Wd)}}class nh extends Zd{constructor(e,t,n,i,r){super(e,t,n,i,r),this.type=5}
1_$AI(e,t=this){if((e=Yd(this,e,t,0)??Wd)===Hd)return;const n=this._$AH,i=e===Wd&&n!==Wd||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==Wd&&(n===Wd||i);i&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class ih{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Yd(this,e)}}const rh={M:kd,P:Ed,A:Cd,C:1,L:Kd,R:Qd,D:Ld,V:Yd,I:Jd,H:Zd,N:th,U:nh,B:eh,F:ih},ah=bd.litHtmlPolyfillSupport;ah?.(Xd,Jd),(bd.litHtmlVersions??=[]).push("3.3.2");const sh=globalThis;class oh extends _d{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{const i=n?.renderBefore??t;let r=i._$litPart$;if(void 0===r){const e=n?.renderBefore??null;i._$litPart$=r=new Jd(t.insertBefore(xd(),e),e,void 0,n??{})}return r._$AI(e),r})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Hd}}oh._$litElement$=!0,oh.finalized=!0,sh.litElementHydrateSupport?.({LitElement:oh});const uh=sh.litElementPolyfillSupport;uh?.({LitElement:oh});(sh.litElementVersions??=[]).push("4.2.2");const lh=e=>e??Wd;var ch,dh,hh,ph;function fh(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var mh,gh,vh,yh,_h,bh,Th,wh={play:"pds_svg_play_outlined_16",pause:"pds_svg_pause_outlined_16",mute:"pds_svg_sound_off_outlined_16",unmute:"pds_svg_sound_on_outlined_16",cc:"pds_svg_closed_caption_on_outlined_16",ccDisabled:"pds_svg_closed_caption_off_outlined_16"},Sh=function(e){return Vd(ch||(ch=fh(['\n  <span\n    class="pds-video-player__icon ',' pds-icon-btn-transparent--video__icon"\n    aria-hidden="true"></span>\n'])),wh[e])},kh=function(e){var t="left"===e?"90deg":"-90deg";return Vd(dh||(dh=fh(['\n    <svg class="abs-vw__chevron" width="24" height="24" viewBox="-5 -8 24 24"\n         fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"\n         style="transform: rotate(','); display: block; flex-shrink: 0;">\n      <path fill-rule="evenodd" clip-rule="evenodd"\n        d="M0.292893 0.292893C0.683418 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L7 5.58579L12.2929 0.292893C12.6834 -0.0976311 13.3166 -0.0976311 13.7071 0.292893C14.0976 0.683418 14.0976 1.31658 13.7071 1.70711L7.70711 7.70711C7.31658 8.09763 6.68342 8.09763 6.29289 7.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683418 0.292893 0.292893Z"\n        fill="currentColor"/>\n    </svg>\n  '])),t)},Eh={play:Sh("play"),pause:Sh("pause"),mute:Sh("mute"),unmute:Sh("unmute"),cc:Sh("cc"),ccDisabled:Sh("ccDisabled"),prev:kh("left"),next:kh("right")},Ch={close:"pds_svg_close_outlined_24",rewind10:"pds_svg_rewind_10_outlined_24",forward10:"pds_svg_forward_10_outlined_24",play:"pds_svg_play_outlined_24",pause:"pds_svg_pause_outlined_24",soundOn:"pds_svg_sound_on_outlined_24",soundOff:"pds_svg_sound_off_outlined_24",ccOn:"pds_svg_closed_caption_on_outlined_24",ccOff:"pds_svg_closed_caption_off_outlined_24"},Ah=function(e,t){var n="next"===e,i=n?"Next video":"Previous video",r=n?"pds-fs-video-player__nav-next":"pds-fs-video-player__nav-prev";return Vd(hh||(hh=fh(['\n    <button\n      class="',' pds-icon-btn pds-icon-btn-size_medium pds-icon-btn-filled--neutral"\n      type="button"\n      aria-label="','"\n      @click=','>
1\n      <span class="pds-fs-video-player__nav-icon" aria-hidden="true"></span>\n    </button>\n  '])),r,i,t)},Ph=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.icon,n=e.label,i=e.onClick,r=e.size,a=void 0===r?"medium":r,s=e.variant,o=void 0===s?"transparent--inverse-neutral":s,u=e.pressed,l=e.disabled,c=void 0!==l&&l,d=e.className,h=[void 0===d?"":d,"pds-icon-btn","pds-icon-btn-size_".concat(a),"pds-icon-btn-".concat(o),"d-flex align-items-center justify-content-center"].filter(Boolean).join(" ");return Vd(ph||(ph=fh(['\n    <button\n      class="','"\n      type="button"\n      aria-label="','"\n      aria-pressed=',"\n      ?disabled=","\n      @click=",'>\n      <span class="'," pds-icon-btn-",'__icon" aria-hidden="true"></span>\n    </button>\n  '])),h,n,lh(u),c,i,Ch[t]||"",o)},xh="abs-video-playback-active",Ih=null;function Oh(){return Ih}function Lh(e){"undefined"!=typeof document&&e&&(Ih=e,document.dispatchEvent(new CustomEvent(xh,{detail:{id:e}})))}function Dh(e){if("undefined"==typeof document||"function"!=typeof e)return function(){};var t=function(t){var n;return e(null==t||null===(n=t.detail)||void 0===n?void 0:n.id)};return document.addEventListener(xh,t),function(){return document.removeEventListener(xh,t)}}var Mh=["loop","captionTracks","interactionTrackingUrls"];function Rh(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Nh(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Uh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a,s,o=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=a.call(n)).done)&&(o.push(i.value),o.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw r}}return o}}(e,t)||Wh(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bh(e){return Bh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bh(e)}function jh(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var u=i&&i.prototype instanceof o?i:o,l=Object.create(u.prototype);return Fh(l,"_invoke",function(n,i,r){var a,o,u,l=0,c=r||[],d=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,o=0,u=e,h.n=n,s}};function p(n,i){for(o=n,u=i,t=0;!d&&l&&!r&&t<c.length;t++){var r,a=c[t],p=h.p,f=a[2];n>3?(r=f===i)&&(u=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=p&&((r=n<2&&p<a[1])?(o=0,h.v=i,h.n=a[1]):p<f&&(r=n<3||a[0]>i||i>f)&&(a[4]=n,a[5]=i,h.n=f,o=0))}if(r||n>1)return s;throw d=!0,i}return function(r,c,f){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,f),o=c,u=f;(t=o<2?e:u)||!d;){a||(o?o<3?(o>1&&(h.n=-1),p(o,u)):h.n=u:h.v=u);try{if(l=2,a){if(o||(r="next"),t=a[r]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,o<2&&(o=0)}else 1===o&&(t=a.return)&&t.call(a),o<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),o=1);a=e}else if((t=(d=h.n<0)?u:n.call(i,h))!==s)break}catch(t){a=e,o=1,u=t}finally{l=1}}return{value:t,done:d}}}(n,r,a),!0),l}var s={};function o(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(Fh(t={},i,function(){return this}),t),d=l.prototype=o.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Fh(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=l,Fh(d,"constructor",l),Fh(l,"constructor",u),u.displayName="GeneratorFunction",Fh(l,r,"GeneratorFunction"),Fh(d),Fh(d,r,"Generator"),Fh(d,i,function(){return this}),Fh(d,"toString",function(){return"[object Generator]"}),(jh=function(){return{w:a,m:h}})()}function Fh(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}Fh=function(e,t,n,i){function a(t,n){Fh(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},Fh(e,t,n,i)}function qh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Vh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?qh(Object(n),!0).forEach(function(t){ep(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Hh(e){return function(e){if(Array.isArray(e))return Gh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Wh(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wh(e,t){if(e){if("string"==typeof e)return Gh(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gh(e,t):void 0}}function Gh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function $h(e,t,n,i,r,a,s){try{var o=e[a](s),u=o.value}catch(e){return void n(e)}o.done?t(u):Promise.resolve(u).then(i,r)}function zh(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var a=e.apply(t,n);function s(e){$h(a,i,r,s,o,"next",e)}function o(e){$h(a,i,r,s,o,"throw",e)}s(void 0)})}}function Kh(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,tp(i.key),i)}}function Xh(e,t,n){return t=Jh(t),function(e,t){if(t&&("object"==Bh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Yh()?Reflect.construct(t,n||[],Jh(e).constructor):t.apply(e,n))}function Yh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Yh=function(){return!!e})()}function Qh(){return Qh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Jh(e)););return e}(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Qh.apply(null,arguments)}function Jh(e){return Jh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jh(e)}function Zh(e,t){return Zh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Zh(e,t)}function ep(e,t,n){return(t=tp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tp(e){var t=function(e,t){if("object"!=Bh(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Bh(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Bh(t)?t:t+""}var np,ip=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ep(e=Xh(this,t),"content",{}),e._uid="abs-vw-".concat(Math.random().toString(36).slice(2)),e._player=null,e._adManager=null,e._adDuration=0,e._captionCues=[],e._captionTimer=null,e._captionLang="en",e._controlsDismissed=!1,e._visibilityObserver=null,e._visibilityThreshold=.65,e._visibilityRatio=0,e._visibilityPlaybackStarted=!1,e._userPausedPlayback=!1,e._startSponsoredAdBreak=null,e._sponsoredAdBreakStarted=!1,e._directLoopPlaybackActive=!1,e._unsubscribePlaybackActive=null,e._onDocumentVisibilityChange=e._handleDocumentVisibilityChange.bind(e),e._loopImpressionGuardEnabled=!1,e._firedVastTrackingEvents=new Set,e._vastTrackingBound=!1,e._vastInteractionTrackingUrls=e._createVastTrackingUrlMap(),e._vastTrackingPixels=new Set,e._userMuteInteractionOccurred=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}
1),t&&Zh(e,t)}(t,e),function(e,t,n){return t&&Kh(e.prototype,t),n&&Kh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createRenderRoot",value:function(){return this}},{key:"firstUpdated",value:function(){this.initPlayer(this.renderRoot.querySelector("video"),this.content)}},{key:"initPlayer",value:(s=zh(jh().m(function e(t,n){var i,r,a,s,o,u,l,c,d,h,p,f,m;return jh().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:return i="sponsored"===String(n.videoType||"").toLowerCase(),r=this._getSources(n),e.n=2,this._getAdsConfig(n);case 2:return a=e.v,s=this._getTextTracks(n),o=(null==a?void 0:a.captionTracks)||[],u=[].concat(Hh(s),Hh(o)),l=!!a,c=i&&0===r.length,d=String(n.designType||"inline").toLowerCase(),h=i&&"inline"===d,p=this._getInitialControlState(n,u),this._isPlaying=!h&&p.isPlaying,this._isMuted=p.isMuted,this._captionsActive=h?!1!==p.captionsActive&&!0===p.hasCaptions:p.captionsActive,this._captionText=!1===this._captionsActive?"":p.captionText,this._captionLang=this._getCaptionLang(u[0]),this._hasCaptions=p.hasCaptions,this._controlsDismissed=!1,this.requestUpdate(),f=Vh(Vh({controls:p.controls,autoplay:!h&&n.autoplay,muted:n.muted,loop:n.loop,preload:n.preload,fluid:!0,responsive:!0,videoType:n.videoType||""},r.length>0?{sources:r}:{}),{},{ima:l}),this._player=new Vc(t,f),e.n=3,this._player._init();case 3:l&&(m=Vh({id:t.id},a),this._setupIma(m,{sponsoredOnly:c||h,loopAds:!h&&!0===a.loop})),this._bindAdEvents(),this._bindCustomControls(u,o),this._bindClipEnd(n),this._setupPlaybackCoordination(),this._setupVisibilityPlayback(n),this.dispatchEvent(new CustomEvent("abs-video-ready",{bubbles:!0,composed:!0,detail:{player:this._player}}));case 4:return e.a(2)}},e,this)})),function(e,t){return s.apply(this,arguments)})},{key:"_getSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Array.isArray(e.sources)&&e.sources.length>0?e.sources.filter(function(e){return null==e?void 0:e.src}).map(function(t){return{src:t.src,type:t.type||e.type||"video/mp4"}}):e.src?[{src:e.src,type:e.type||"video/mp4"}]:[]}},{key:"_hasConfigKey",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return!!e&&"object"===Bh(e)&&Object.prototype.hasOwnProperty.call(e,t)}},{key:"_getConfigValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return this._hasConfigKey(e,t)?e[t]:void 0}},{key:"_getInitialControlState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this._getConfigValue(e,"hasCaptions");return{controls:this._getConfigValue(e,"controls"),isPlaying:this._getConfigValue(e,"autoplay"),isMuted:this._getConfigValue(e,"muted"),captionsActive:this._getConfigValue(e,"captionsActive"),captionText:this._getConfigValue(e,"captionText"),hasCaptions:void 0!==n?n:t.length>0||void 0}}},{key:"_controlsEnabled",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.content;return!0===this._getConfigValue(e,"controls")}},{key:"_visibilityPlaybackEnabled",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.content,t=this._getConfigValue(e,"visibilityPlayback"),n=this._getConfigValue(e,"playWhenVisible"),i=this._getConfigValue(e,"pauseWhenOutOfView");return!1!==t&&!1!==n&&(!0===t||!0===n||!0===i||this._isSponsoredInlineEmbed(e))}},{key:"_pauseWhenOutOfView",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.content,t=this._getConfigValue(e,"pauseWhenOutOfView");return void 0===t?this._visibilityPlaybackEnabled(e):!0===t}},{key:"_isSponsoredInlineEmbed",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.content,t="sponsored"===String((null==e?void 0:e.videoType)||"").toLowerCase(),n=String((null==e?void 0:e.designType)||"inline").toLowerCase();return t&&"inline"===n}},{key:"_getVisibilityThreshold",value:function(){var e,t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.content,r=Number(null!==(e=null!==(t=null!==(n=this._getConfigValue(i,"visibilityThreshold"))&&void 0!==n?n:this._getConfigValue(i,"visibleThreshold"))&&void 0!==t?t:this._getConfigValue(i,"intersectionThreshold"))&&void 0!==e?e:.65);return Number.isFinite(r)?Math.min(1,Math.max(.01,r)):.65}},{key:"_getAdsConfig",value:(a=zh(jh().m(function e(){var t,n,i,r,a,s,o,u,l=arguments;return jh().w(function(e){for(;;)switch(e.n){case 0:if(i=l.length>0&&void 0!==l[0]?l[0]:{},"sponsored"===String(i.videoType||"").toLowerCase()){e.n=1;break}return e.a(2,null);case 1:return r=Array.isArray(i.sponsoredContent)?i.sponsoredContent[0]:null,e.n=2,this._resolveVastConfig(i.vastXml);case 2:if(!(a=e.v)){e.n=3;break}return e.a(2,Vh(Vh({},a),{},{loop:null!==(s=null!==(o=null==r?void 0:r.loop)&&void 0!==o?o:i.loop)&&void 0!==s&&s}));case 3:if(r){e.n=4;break}return e.a(2,null);case 4:return e.n=5,this._resolveVastConfig(r.vastXml);case 5:if(u=e.v){e.n=6;break}return e.a(2,null);case 6:return e.a(2,Vh(Vh({},u),{},{loop:null!==(t=null!==(n=r.loop)&&void 0!==n?n:i.loop)&&void 0!==t&&t}))}},e,this)})),function(){return a.apply(this,arguments)})},{key:"_resolveVastConfig",value:(r=zh(jh().m(function e(t){var n,i,r,a;return jh().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=String(t||"").trim()){e.n=1;break}return e.a(2,null);case 1:if(!n.startsWith("<")){e.n=2;break}return e.a(2,{adsResponse:this._stripMuteTrackingFromVast(n),captionTracks:this._extractVastCaptionTracks(n),interactionTrackingUrls:this._extractVastTrackingUrls(n,["mute","unmute","pause","resume"])});case 2:return e.p=2,e.n=3,fetch(n,{credentials:"same-origin"});case 3:if((i=e.v).ok){e.n=4;break}throw new Error("Failed to fetch VAST XML: ".concat(i.status));case 4:return e.n=5,i.text();case 5:if((r=e.v)&&r.trim().startsWith("<")){e.n=6;break}
1throw new Error("VAST response is not valid XML text");case 6:return e.a(2,{adsResponse:this._stripMuteTrackingFromVast(r),captionTracks:this._extractVastCaptionTracks(r),interactionTrackingUrls:this._extractVastTrackingUrls(r,["mute","unmute","pause","resume"])});case 7:return e.p=7,a=e.v,console.error("[ABSVideo] Unable to resolve vastXml into adsResponse:",a),e.a(2,null)}},e,this,[[2,7]])})),function(e){return r.apply(this,arguments)})},{key:"_getTextTracks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[].concat(Hh(Array.isArray(e.textTracks)?e.textTracks:[]),Hh(Array.isArray(e.captions)?e.captions:[]),Hh(Array.isArray(e.tracks)?e.tracks:[]),Hh(Array.isArray(t)?t:[])).map(function(e){return{src:(null==e?void 0:e.src)||(null==e?void 0:e.url)||"",kind:(null==e?void 0:e.kind)||"captions",srclang:(null==e?void 0:e.srclang)||(null==e?void 0:e.lang)||(null==e?void 0:e.language)||"en",label:(null==e?void 0:e.label)||(null==e?void 0:e.language)||"CC",default:!0===(null==e?void 0:e.default)}}).filter(function(e){return e.src&&["captions","subtitles"].includes(e.kind)})}},{key:"_extractVastCaptionTracks",value:function(e){if(!e||"undefined"==typeof DOMParser)return[];try{var t=(new DOMParser).parseFromString(e,"text/xml");return Array.from(t.querySelectorAll("ClosedCaptionFile")).map(function(e,t){return{src:(e.textContent||"").trim(),kind:"captions",srclang:e.getAttribute("language")||"en",label:e.getAttribute("language")||"CC",default:0===t}}).filter(function(e){return e.src})}catch(e){return console.warn("[ABSVideo] Unable to parse VAST captions:",e),[]}}},{key:"_createVastTrackingUrlMap",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:["mute","unmute","pause","resume"]).reduce(function(e,t){return e[t]=[],e},{})}},{key:"_extractVastTrackingUrls",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this._createVastTrackingUrlMap(t);if(!e||"undefined"==typeof DOMParser)return n;try{var i=(new DOMParser).parseFromString(e,"text/xml"),r=new Set(t);Array.from(i.querySelectorAll("Tracking")).forEach(function(e){var t=e.getAttribute("event"),i=(e.textContent||"").trim();r.has(t)&&i&&n[t].push(i)})}catch(e){}return n}},{key:"_stripMuteTrackingFromVast",value:function(e){if(!e||"undefined"==typeof DOMParser)return e;try{var t=(new DOMParser).parseFromString(e,"text/xml"),n=t.querySelectorAll('Tracking[event="mute"]');return 0===n.length?e:(n.forEach(function(e){return e.remove()}),(new XMLSerializer).serializeToString(t))}catch(t){return e}}},{key:"_stripVastTrackingUrls",value:function(e){if(!e||"undefined"==typeof DOMParser)return"";try{var t=(new DOMParser).parseFromString(e,"text/xml");return["Impression","Error","Tracking","ClickTracking","CustomClick","AdVerifications"].forEach(function(e){t.querySelectorAll(e).forEach(function(e){return e.remove()})}),(new XMLSerializer).serializeToString(t)}catch(e){return""}}},{key:"_extractVastMediaUrl",value:function(e){if(!e||"undefined"==typeof DOMParser)return null;try{var t=(new DOMParser).parseFromString(e,"text/xml"),n=Array.from(t.querySelectorAll("MediaFile")),i=n.find(function(e){return"progressive"===e.getAttribute("delivery")})||n[0];if(!i)return null;var r=(i.textContent||"").trim();return r?{src:r,type:i.getAttribute("type")||"video/mp4"}:null}catch(e){return null}}},{key:"_bindAdEvents",value:function(){var e,t=this,n=null===(e=this._player)||void 0===e?void 0:e.player;if(n){var i=new Set(["adstart","ads-ad-started"]);["ads-request","ads-loader","ads-manager","adsready","readyforpreroll","adstart","ads-ad-started","adskip","adend","adtimeout","adserror","adslog","contentresumed","nopreroll","nopostroll"].forEach(function(e){n.on(e,function(n){t._loopImpressionGuardEnabled&&i.has(e)&&t._impressionEventsFired.has(e)||(t._dispatchAdEvent(e,n),t._loopImpressionGuardEnabled&&i.has(e)&&t._impressionEventsFired.add(e))})})}}},{key:"_bindCustomControls",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=null===(e=this._player)||void 0===e?void 0:e.player;if(r){var a=function(){var e;t._isPlaying=!(null!==(e=r.paused)&&void 0!==e&&e.call(r)),o()},s=function(){t._syncCaptionTextFromCues(),t._syncCaptionTextFromTracks()},o=function(){var e,n;t._isMuted=!(null===(e=r.muted)||void 0===e||!e.call(r))||0===(null===(n=r.volume)||void 0===n?void 0:n.call(r)),t.requestUpdate()};r.on("play",function(){a(),t._startCaptionTimer()}),r.on("pause",a),r.on("loadedmetadata",s),r.on("loadeddata",s),r.on("seeked",s),r.on("timeupdate",s),r.on("volumechange",o),r.on("ads-ad-started",function(){t._isPlaying=!0,t._sponsoredAdBreakStarted=!0,t._startCaptionTimer()}),r.on("adend",function(){t._isPlaying=!1,t._captionText="",t._stopCaptionTimer()}),r.on("contentresumed",function(){var e;t._isPlaying=!(null!==(e=r.paused)&&void 0!==e&&e.call(r)),t._captionText="",t._stopCaptionTimer()}),r.on("adtimeout",function(){t._captionText="",t._stopCaptionTimer()}),r.on("adserror",function(e){var n,i,r,a;t._captionText="",t._stopCaptionTimer();var s=null==e||null===(n=e.data)||void 0===n?void 0:n.AdError;
1t.dispatchEvent(new CustomEvent("abs-video-error",{bubbles:!0,composed:!0,detail:{errorId:null!=s&&null!==(i=s.getErrorCode)&&void 0!==i&&i.call(s)?"VP_".concat(s.getErrorCode()):"no-value",errorName:(null==s||null===(r=s.getType)||void 0===r?void 0:r.call(s))||"no-value",errorMessage:(null==s||null===(a=s.getMessage)||void 0===a?void 0:a.call(s))||"no-value"}}))}),r.on("error",function(){var e,n,i=null===(e=t._player)||void 0===e||null===(e=e.player)||void 0===e||null===(n=e.error)||void 0===n?void 0:n.call(e);t.dispatchEvent(new CustomEvent("abs-video-error",{bubbles:!0,composed:!0,detail:{errorId:null!=i&&i.code?"VP_".concat(i.code):"no-value",errorName:(null==i?void 0:i.type)||"PLAYER_ERROR",errorMessage:(null==i?void 0:i.message)||"no-value"}}))}),r.on("ads-manager",function(e){t._adManager=(null==e?void 0:e.adsManager)||t._getAdsManager(),t._bindAdsManagerCaptionEvents(t._adManager),t._bindAdsManagerTrackingEvents(t._adManager)}),this._setupCaptionControls(n,i)}}},{key:"_bindAdsManagerCaptionEvents",value:function(e){var t,n=this,i=null===(t=window.google)||void 0===t||null===(t=t.ima)||void 0===t||null===(t=t.AdEvent)||void 0===t?void 0:t.Type;e&&i&&(e.addEventListener(i.STARTED,function(e){var t,i;n._adDuration=(null==e||null===(t=e.getAd)||void 0===t||null===(t=t.call(e))||void 0===t||null===(i=t.getDuration)||void 0===i?void 0:i.call(t))||0,n._isPlaying=!0,n._startCaptionTimer()}),e.addEventListener(i.PAUSED,function(){n._isPlaying=!1,n._stopCaptionTimer()}),e.addEventListener(i.RESUMED,function(){n._isPlaying=!0,n._startCaptionTimer()}),e.addEventListener(i.COMPLETE,function(){n._captionText="",n._stopCaptionTimer()}))}},{key:"_dispatchAdEvent",value:function(e,t){this.dispatchEvent(new CustomEvent("abs-video-ad-event",{bubbles:!0,composed:!0,detail:{type:e,event:t}}))}},{key:"_getAdsManagerVolume",value:function(e,t){var n,i;if("function"==typeof(null==e?void 0:e.getVolume))return e.getVolume();var r=null==t||null===(n=t.getAdData)||void 0===n?void 0:n.call(t),a=null!==(i=null==r?void 0:r.volume)&&void 0!==i?i:null==r?void 0:r.adVolume;return"number"==typeof a?a:null}},{key:"_sendVastTrackingBeacon",value:function(e){var t=this;if(e)try{if("undefined"!=typeof Image){var n=new Image;this._vastTrackingPixels.add(n);var i=function(){return t._vastTrackingPixels.delete(n)};return n.onload=i,n.onerror=i,void(n.src=e)}var r,a;if("function"==typeof fetch)null===(r=(a=fetch(e,{mode:"no-cors",keepalive:!0})).catch)||void 0===r||r.call(a,function(){})}catch(e){}}},{key:"_trackDirectLoopInteraction",value:function(e){var t,n=this;this._directLoopPlaybackActive&&(((null===(t=this._vastInteractionTrackingUrls)||void 0===t?void 0:t[e])||[]).forEach(function(e){return n._sendVastTrackingBeacon(e)}),this._dispatchAdEvent(e,{source:"direct-loop-control"}))}},{key:"_fireVastMuteTrackingBeacons",value:function(){var e,t=this;((null===(e=this._vastInteractionTrackingUrls)||void 0===e?void 0:e.mute)||[]).forEach(function(e){return t._sendVastTrackingBeacon(e)})}},{key:"_bindAdsManagerTrackingEvents",value:function(e){var t,n=this,i=null===(t=window.google)||void 0===t||null===(t=t.ima)||void 0===t||null===(t=t.AdEvent)||void 0===t?void 0:t.Type;e&&i&&!this._vastTrackingBound&&(this._vastTrackingBound=!0,[i.STARTED,i.FIRST_QUARTILE,i.MIDPOINT,i.THIRD_QUARTILE,i.COMPLETE].filter(Boolean).forEach(function(t){e.addEventListener(t,function(e){n._firedVastTrackingEvents.has(t)||(n._firedVastTrackingEvents.add(t),n._dispatchAdEvent(t,e))})}),[[i.PAUSED,"pause"],[i.RESUMED,"resume"]].filter(function(e){var t=Uh(e,1)[0];return Boolean(t)}).forEach(function(t){var i=Uh(t,2),r=i[0],a=i[1];e.addEventListener(r,function(e){n._dispatchAdEvent(a,e)})}),i.VOLUME_MUTED&&e.addEventListener(i.VOLUME_MUTED,function(e){n._userMuteInteractionOccurred&&n._dispatchAdEvent("mute",e)}),i.VOLUME_CHANGED&&e.addEventListener(i.VOLUME_CHANGED,function(t){n._getAdsManagerVolume(e,t)>0&&n._dispatchAdEvent("unmute",t)}))}},{key:"_setupCaptionControls",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=null===(e=this._player)||void 0===e?void 0:e.player;r&&0!==n.length&&(i.forEach(function(e){try{var t;null===(t=r.addRemoteTextTrack)||void 0===t||t.call(r,{src:e.src,kind:e.kind,srclang:e.srclang,label:e.label,default:e.default},!1)}catch(e){}}
1),this._getPlayerTextTracks().forEach(function(e){var n;null===(n=e.addEventListener)||void 0===n||n.call(e,"cuechange",function(){return t._syncCaptionTextFromTracks()})}),this._loadCaptionCues(n.find(function(e){return e.default})||n[0]),this._setCaptionMode(this._captionsActive))}},{key:"_getCaptionLang",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(null==e?void 0:e.srclang)||(null==e?void 0:e.lang)||(null==e?void 0:e.language)||"en"}},{key:"_getPlayerTextTracks",value:function(){var e,t,n=null===(e=this._player)||void 0===e||null===(e=e.player)||void 0===e||null===(t=e.textTracks)||void 0===t?void 0:t.call(e);return n?Array.from({length:n.length},function(e,t){return n[t]}).filter(function(e){return["captions","subtitles"].includes(e.kind)}):[]}},{key:"_setCaptionMode",value:function(e){this._getPlayerTextTracks().forEach(function(t,n){t.mode=e&&0===n?"hidden":"disabled"}),e?(this._syncCaptionTextFromTracks(),this._startCaptionTimer()):(this._captionText="",this._stopCaptionTimer()),this.requestUpdate()}},{key:"_loadCaptionCues",value:(i=zh(jh().m(function e(t){var n,i;return jh().w(function(e){for(;;)switch(e.p=e.n){case 0:if(null!=t&&t.src){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,fetch(t.src,{credentials:"same-origin"});case 2:if((n=e.v).ok){e.n=3;break}return e.a(2);case 3:return e.n=4,n.text();case 4:i=e.v,this._captionCues=this._parseVttCues(i),this._captionLang=this._getCaptionLang(t),this._startCaptionTimer(),e.n=6;break;case 5:e.p=5,e.v,this._captionCues=[];case 6:return e.a(2)}},e,this,[[1,5]])})),function(e){return i.apply(this,arguments)})},{key:"_parseVttCues",value:function(e){var t=this;return String(e||"").replace(/\r/g,"").split("\n\n").map(function(e){var n=e.split("\n").filter(Boolean),i=n.findIndex(function(e){return e.includes("--\x3e")});if(i<0)return null;var r=Uh(n[i].split("--\x3e"),2),a=r[0],s=r[1],o=n.slice(i+1).join(" ").trim();return o?{start:t._parseVttTime(a),end:t._parseVttTime(s),text:o}:null}).filter(Boolean)}},{key:"_parseVttTime",value:function(e){var t=String(e||"").trim().split(/\s+/)[0].split(":").map(Number),n=t.pop()||0,i=t.pop()||0;return 3600*(t.pop()||0)+60*i+n}},{key:"_syncCaptionTextFromTracks",value:function(){if(this._captionsActive){var e=this._getPlayerTextTracks().find(function(e){return"disabled"!==e.mode}),t=null==e?void 0:e.activeCues;t&&0!==t.length&&(this._captionLang=this._getCaptionLang(e),this._captionText=Array.from(t).map(function(e){return e.text}).filter(Boolean).join(" "),this.requestUpdate())}}},{key:"_startCaptionTimer",value:function(){var e=this;this._captionsActive&&!this._captionTimer&&0!==this._captionCues.length&&(this._syncCaptionTextFromCues(),this._captionTimer=setInterval(function(){return e._syncCaptionTextFromCues()},250))}},{key:"_syncCaptionTextFromCues",value:function(){if(this._captionsActive&&0!==this._captionCues.length){var e=this._getCaptionCurrentTime(),t=this._captionCues.find(function(t){return e>=t.start&&e<=t.end}),n=(null==t?void 0:t.text)||"";this._captionText!==n&&(this._captionText=n,this.requestUpdate())}}},{key:"_stopCaptionTimer",value:function(){this._captionTimer&&(clearInterval(this._captionTimer),this._captionTimer=null)}},{key:"_getCaptionCurrentTime",value:function(){var e,t;if(this._directLoopPlaybackActive)return this._getPlayerCurrentTime();var n=null===(e=this._adManager)||void 0===e||null===(t=e.getRemainingTime)||void 0===t?void 0:t.call(e);return Number.isFinite(n)&&this._adDuration>0?Math.max(0,this._adDuration-n):this._getPlayerCurrentTime()}},{key:"_getPlayerCurrentTime",value:function(){var e,t,n=null===(e=this._player)||void 0===e||null===(e=e.player)||void 0===e||null===(t=e.currentTime)||void 0===t?void 0:t.call(e);return Number.isFinite(n)?n:0}},{key:"_getAdsManager",value:function(){var e;return"function"==typeof(null===(e=this._player)||void 0===e||null===(e=e.player)||void 0===e||null===(e=e.ima)||void 0===e?void 0:e.getAdsManager)?this._player.player.ima.getAdsManager():null}},{key:"_getActiveAdsManager",value:function(){if(!this._adManager)return null;var e=this._getAdsManager()||this._adManager;return e&&(this._adManager=e),e}},{key:"_getVideoElement",value:function(){var e,t,n,i,r=null===(e=this._player)||void 0===e||null===(e=e.player)||void 0===e||null===(t=e.el)||void 0===t?void 0:t.call(e);return(null==r||null===(n=r.querySelector)||void 0===n?void 0:n.call(r,"video"))||(null===(i=this.querySelector)||void 0===i?void 0:i.call(this,"video"))||null}},{key:"_isNativePlaybackPaused",value:function(){var e,t,n=this._getVideoElement();if("boolean"==typeof(null==n?void 0:n.paused))return n.paused;var i=null===(e=this._player)||void 0===e||null===(e=e.player)||void 0===e||null===(t=e.paused)||void 0===t?void 0:t.call(e);return"boolean"==typeof i?i:!this._isPlaying}},{key:"_canUseNativeMediaElement",value:function(){return!("undefined"!=typeof navigator&&/jsdom/i.test(navigator.userAgent||""))}},{key:"_pauseAdPlayback",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getActiveAdsManager();return"function"==typeof(null==t?void 0:t.pause)?(t.pause(),!0):"function"==typeof(null===(e=this._player)||void 0===e||null===(e=e.player)||void 0===e||null===(e=e.ima)||void 0===e?void 0:e.pauseAd)&&(this._player.player.ima.pauseAd(),!0)}},{key:"_resumeAdPlayback",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._getActiveAdsManager();return"function"==typeof(null==t?void 0:t.resume)?(t.resume(),!0):"function"==typeof(null===(e=this._player)||void 0===e||null===(e=e.player)||void 0===e||null===(e=e.ima)||void 0===e?void 0:e.resumeAd)&&(this._player.player.ima.resumeAd(),!0)}}
1,{key:"_pauseNativePlayback",value:function(){var e;if("function"==typeof(null===(e=this._player)||void 0===e||null===(e=e.player)||void 0===e?void 0:e.pause))return this._player.player.pause(),!0;if(!this._canUseNativeMediaElement())return!1;try{var t,n;return null===(t=this._getVideoElement())||void 0===t||null===(n=t.pause)||void 0===n||n.call(t),!0}catch(e){return!1}}},{key:"_playNativePlayback",value:function(){var e;if("function"==typeof(null===(e=this._player)||void 0===e||null===(e=e.player)||void 0===e?void 0:e.play)){var t,n=this._player.player.play();return null==n||null===(t=n.catch)||void 0===t||t.call(n,function(){}),n}if(this._canUseNativeMediaElement())try{var i,r,a,s=null===(i=this._getVideoElement())||void 0===i||null===(r=i.play)||void 0===r?void 0:r.call(i);return null==s||null===(a=s.catch)||void 0===a||a.call(s,function(){}),s}catch(e){return}}},{key:"_bindClipEnd",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Number(null==t?void 0:t.clipEnd);if(Number.isFinite(n)&&!(n<=0)){var i=null===(e=this._player)||void 0===e?void 0:e.player;if(i){var r=function(){var e;if(!((Number(null===(e=i.currentTime)||void 0===e?void 0:e.call(i))||0)+.15<n)){try{var t;null===(t=i.currentTime)||void 0===t||t.call(i,0)}catch(e){}try{var r,a=null===(r=i.play)||void 0===r?void 0:r.call(i);a&&"function"==typeof a.catch&&a.catch(function(){})}catch(e){}}};i.on("timeupdate",r),i.on("ended",r)}}}},{key:"_setupPlaybackCoordination",value:function(){var e=this;!1!==this._getConfigValue(this.content,"coordinatePlayback")&&(this._unsubscribePlaybackActive&&this._unsubscribePlaybackActive(),this._unsubscribePlaybackActive=Dh(function(t){t&&t!==e._getCoordinationId()&&e._pausePlayback({updateVisibilityState:!1})}))}},{key:"_getCoordinationId",value:function(){var e;return(null===(e=this.content)||void 0===e?void 0:e.coordinationId)||this._uid}},{key:"_setupVisibilityPlayback",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.content;if(this._teardownVisibilityPlayback(),this._visibilityPlaybackEnabled(t)&&"undefined"!=typeof IntersectionObserver){this._visibilityThreshold=this._getVisibilityThreshold(t),this._visibilityRatio=0,this._visibilityPlaybackStarted=!1,this._userPausedPlayback=!1;var n=this.querySelector(".pds-video-player__media")||this,i=Array.from(new Set([0,.25,.5,this._visibilityThreshold,.75,1])).sort(function(e,t){return e-t});this._visibilityObserver=new IntersectionObserver(function(t){return t.forEach(function(t){return e._handleVisibilityEntry(t)})},{threshold:i}),this._visibilityObserver.observe(n),document.addEventListener("visibilitychange",this._onDocumentVisibilityChange)}}},{key:"_teardownVisibilityPlayback",value:function(){var e,t;null===(e=this._visibilityObserver)||void 0===e||null===(t=e.disconnect)||void 0===t||t.call(e),this._visibilityObserver=null,document.removeEventListener("visibilitychange",this._onDocumentVisibilityChange)}},{key:"_handleVisibilityEntry",value:function(e){this._visibilityRatio=null!=e&&e.isIntersecting&&e.intersectionRatio||0,this._visibilityRatio>=this._visibilityThreshold&&!document.hidden?this._playFromVisibility():this._pauseWhenOutOfView()&&this._pausePlayback({updateVisibilityState:!0})}},{key:"_handleDocumentVisibilityChange",value:function(){document.hidden?this._pausePlayback({updateVisibilityState:!0}):this._visibilityRatio>=this._visibilityThreshold&&this._playFromVisibility()}},{key:"_playFromVisibility",value:function(){var e,t=this;if(this._visibilityPlaybackEnabled()&&!this._userPausedPlayback&&!document.hidden&&!this._prefersReducedMotion()){var n=this._directLoopPlaybackActive?null:this._getActiveAdsManager();if(n&&!this._isPlaying&&this._sponsoredAdBreakStarted)return Lh(this._getCoordinationId()),this._resumeAdPlayback(n),this._isPlaying=!0,this._visibilityPlaybackStarted=!0,this._startCaptionTimer(),void this.requestUpdate();if(!this._directLoopPlaybackActive&&"function"==typeof this._startSponsoredAdBreak&&!this._isPlaying)return Lh(this._getCoordinationId()),this._startSponsoredAdBreak(),this._isPlaying=!0,this._visibilityPlaybackStarted=!0,this._startCaptionTimer(),void this.requestUpdate();if(this._directLoopPlaybackActive){if(this._isPlaying)return}else if(!this._isNativePlaybackPaused())return;Lh(this._getCoordinationId());var i=this._playNativePlayback();this._isPlaying=!0,this._visibilityPlaybackStarted=!0,this.requestUpdate(),null==i||null===(e=i.catch)||void 0===e||e.call(i,function(){t._isPlaying=!1,t._visibilityPlaybackStarted=!1,t.requestUpdate()})}}},{key:"_pausePlayback",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).updateVisibilityState,t=void 0!==e&&e,n=!1===this._isNativePlaybackPaused();if(this._isPlaying||this._visibilityPlaybackStarted||n){var i=this._directLoopPlaybackActive?null:this._getActiveAdsManager();i&&this._isPlaying?this._pauseAdPlayback(i):this._pauseNativePlayback(),this._isPlaying=!1,this._stopCaptionTimer(),t&&(this._visibilityPlaybackStarted=!1),this.requestUpdate()}}},{key:"_prefersReducedMotion",value:function(){return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}},{key:"_handlePlayPauseClick",value:function(e){this._stopControlEvent(e);var t=this._directLoopPlaybackActive?null:this._getActiveAdsManager(),n=t||this._directLoopPlaybackActive?!this._isPlaying:this._isNativePlaybackPaused();this._userPausedPlayback=!n,n&&(Lh(this._getCoordinationId()),this.dispatchEvent(new CustomEvent("abs-video-play",{bubbles:!0,composed:!0,detail:{}}))),t&&this._isPlaying?(this._pauseAdPlayback(t),this._isPlaying=!1,this._stopCaptionTimer(),this._trackDirectLoopInteraction("pause")):t?(this._resumeAdPlayback(t),this._isPlaying=!0,this._startCaptionTimer(),this._trackDirectLoopInteraction("resume")):n?(this._playNativePlayback(),this._isPlaying=!0,this._trackDirectLoopInteraction("resume")):(this._pauseNativePlayback(),this._isPlaying=!1,this._trackDirectLoopInteraction("pause")),this.requestUpdate()}},{key:"_handleMuteClick",value:function(e){var t,n,i,r,a;this._stopControlEvent(e);var s=!this._isMuted,o=null===(t=this._player)||void 0===t?void 0:t.player;null==o||null===(n=o.muted)||void 0===n||n.call(o,s),null==o||null===(i=o.volume)||void 0===i||i.call(o,s?0:1),null===(r=this._adManager)||void 0===r||null===(a=r.setVolume)||void 0===a||a.call(r,s?0:1),this._isMuted=s,this._userMuteInteractionOccurred=!0,this._trackDirectLoopInteraction(s?"mute":"unmute"),s&&!this._directLoopPlaybackActive&&this._fireVastMuteTrackingBeacons(),this.requestUpdate()}},{key:"_handleCaptionsClick",value:function(e){this._stopControlEvent(e),this._hasCaptions&&(this._captionsActive=!this._captionsActive,this._setCaptionMode(this._captionsActive))}},{key:"_handleFrameClick",value:function(e){this._isCustomControlEvent(e)||this._handlePlayPauseClick(e)}},{key:"_handleFrameKeydown",value:function(e){if("Escape"===(null==e?void 0:e.key))return this._controlsDismissed=!0,void this.requestUpdate();this._isCustomControlEvent(e)||"Enter"!==(null==e?void 0:e.key)&&" "!==(null==e?void 0:e.key)||this._handlePlayPauseClick(e)}},{key:"_revealControls",value:function(){this._controlsDismissed&&(this._controlsDismissed=!1,this.requestUpdate())}},{key:"_stopControlEvent",value:function(e){var t,n,i;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),null==e||null===(n=e.stopPropagation)||void 0===n||n.call(e),null==e||null===(i=e.stopImmediatePropagation)||void 0===i||i.call(e)}},{key:"_isCustomControlEvent",value:function(e){var t,n;return!(null==e||null===(t=e.target)||void 0===t||null===(n=t.closest)||void 0===n||!n.call(t,".pds-video-player__control"))}},{key:"_getAriaLabel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[e.ariaLabel,e.accessibilityLabel,e.title,e.name].find(function(e){return"string"==typeof e&&e.trim()});return t?t.trim():"Video player"}},{key:"_getFrameAriaLabel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.isSponsored,n=void 0!==t&&t,i=e.isPlaying,r=void 0!==i&&i,a=this._getAriaLabel(this.content),s=r?"Pause Video":"Play Video";return"".concat(n?"Sponsored. ":"").concat(a,". ").concat(s,".")}},{key:"_setupIma",value:(n=zh(jh().m(function e(t){var n,i,r,a,s,o,u,l,c,d,h,p,f,m=this,g=arguments;return jh().w(function(e){for(;;)switch(e.p=e.n){case 0:return i=(n=g.length>1&&void 0!==g[1]?g[1]:{}).sponsoredOnly,r=void 0!==i&&i,a=n.loopAds,s=void 0!==a&&a,o=this._player.player,u=!0===s||!0===(null==t?void 0:t.loop),this._startSponsoredAdBreak=null,l=function(){return new Promise(function(e,t){var n=0;!function i(){return n++,"function"==typeof o.ima?e():n>20?t(new Error("IMA plugin not loaded")):void setTimeout(i,50)}()})},e.p=1,e.n=2,l();case 2:t.loop,t.captionTracks,c=t.interactionTrackingUrls,d=Nh(t,Mh),this._vastInteractionTrackingUrls=c||this._createVastTrackingUrlMap(),h=Vh(Vh({},d),{},{disableAdControls:!0,showCountdown:!1,adsRenderingSettings:{uiElements:[]}}),p=r?Vh(Vh({},h),{},{requestMode:"onPlay",autoPlayAdBreaks:!1,adWillAutoPlay:!0,adsWillAutoplay:!0,adWillPlayMuted:!0,adsWillPlayMuted:!0}):h,o.ima(p),o.ready(function(){if(r&&!o.currentSrc()&&(o.trigger("loadstart"),o.trigger("loadedmetadata"),o.trigger("loadeddata")),r){m._loopImpressionGuardEnabled=u,m._impressionEventsFired=new Set;var e=!1,t=null,n=!1,i=!1,a=!1,s=!1,l=function(){var e;return"function"==typeof(null===(e=o.ima)||void 0===e?void 0:e.getAdsManager)?o.ima.getAdsManager():null},c=u?m._extractVastMediaUrl(d.adsResponse||""):null,h=!1,p=u?m._stripVastTrackingUrls(d.adsResponse||""):"",f=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:600;u&&(t&&(clearTimeout(t),t=null),t=setTimeout(function(){if(!function(){if(h)return!0;
1if(null==c||!c.src)return!1;h=!0,m._directLoopPlaybackActive=!0;try{var e,t,n;o.controls(!1),m._adManager=null,m._adDuration=0,m._captionText="",o.src([{src:c.src,type:c.type}]),o.loop(!0),null===(e=o.play())||void 0===e||null===(t=e.catch)||void 0===t||t.call(e,function(){var e;m._isPlaying=!1,m._stopCaptionTimer(),null===(e=m.requestUpdate)||void 0===e||e.call(m)}),m._isPlaying=!0,m._startCaptionTimer(),m._syncCaptionTextFromCues(),null===(n=m.requestUpdate)||void 0===n||n.call(m)}catch(e){return console.error("[ABSVideo] Direct ad loop failed:",e),h=!1,m._directLoopPlaybackActive=!1,!1}return!0}()){m._directLoopPlaybackActive=!1,e=!1,s=!1;try{!function(){try{var e,t,n;if("function"==typeof(null===(e=o.ima)||void 0===e||null===(e=e.controller)||void 0===e?void 0:e.reset))return void o.ima.controller.reset();null===(t=l())||void 0===t||null===(n=t.destroy)||void 0===n||n.call(t)}catch(e){console.warn("[ABSVideo] Sponsored ads manager reset failed:",e)}}(),p?o.ima.requestAds({adsResponse:p}):o.ima.requestAds(),setTimeout(function(){l()&&(s=!0,g())},250)}catch(e){console.error("[ABSVideo] Sponsored requestAds failed:",e)}}},n))},g=function(){if(!e&&s&&(a||!m._visibilityPlaybackEnabled()||!(document.hidden||m._visibilityRatio<m._visibilityThreshold)))try{var t,n,i,r;e=!0,null===(t=(n=o.ima).initializeAdDisplayContainer)||void 0===t||t.call(n),null===(i=(r=o.ima).playAdBreak)||void 0===i||i.call(r)}catch(t){e=!1,console.error("[ABSVideo] Sponsored ad break start failed:",t)}},v=function(e){if(!m._isCustomControlEvent(e)){e&&(i=!1,a=!0),n=!0;try{var t,r;null===(t=(r=o.ima).initializeAdDisplayContainer)||void 0===t||t.call(r)}catch(e){}g()}};m._startSponsoredAdBreak=function(){i=!0,v()},m._visibilityRatio>=m._visibilityThreshold&&!document.hidden&&m._playFromVisibility();var y=o.el();y&&(y.addEventListener("click",v,{capture:!0}),y.addEventListener("touchend",v,{capture:!0}),y.querySelectorAll(".vjs-big-play-button, .vjs-play-control").forEach(function(e){e.addEventListener("click",v,{capture:!0}),e.addEventListener("touchend",v,{capture:!0}),e.addEventListener("keydown",function(e){"Enter"!==e.key&&" "!==e.key||v()},{capture:!0})})),o.one("play",v),o.ima.requestAds(),o.on("adsready",function(){s=!0,(n||i||o.autoplay()||u)&&g()}),o.on("ads-ad-started",function(){e=!0}),o.on("ads-manager",function(e){var t,n=(null==e?void 0:e.adsManager)||l(),i=null===(t=window.google)||void 0===t||null===(t=t.ima)||void 0===t||null===(t=t.AdEvent)||void 0===t?void 0:t.Type;n&&i&&(n.addEventListener(i.COMPLETE,function(){f(500)}),n.addEventListener(i.ALL_ADS_COMPLETED,function(){f(500)}))}),o.on("adend",function(){f(500)}),o.on("contentresumed",function(){f(500)}),o.on("adtimeout",function(){f(1200)}),o.on("adserror",function(){f(1500)}),setTimeout(function(){!s&&l()&&(s=!0,(n||i||o.autoplay()||u)&&g())},350)}else o.ima.requestAds()}),e.n=4;break;case 3:e.p=3,f=e.v,console.error("[ABSVideo] IMA plugin failed to load:",f);case 4:return e.a(2)}},e,this,[[1,3]])})),function(e){return n.apply(this,arguments)})},{key:"disconnectedCallback",value:function(){!function(e,t,n,i){var r=Qh(Jh(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,"disconnectedCallback",this,3)([]),this._teardownVisibilityPlayback(),this._unsubscribePlaybackActive&&(this._unsubscribePlaybackActive(),this._unsubscribePlaybackActive=null),this._stopCaptionTimer();try{var e;null===(e=this._player)||void 0===e||null===(e=e.player)||void 0===e||e.dispose()}catch(e){}}},{key:"render",value:function(){var e,t,n,i,r,a,s=this._getTextTracks(this.content),o=this._controlsEnabled(this.content),u=this._getSources(this.content),l=!!(null!==(e=this._isPlaying)&&void 0!==e?e:this.content.autoplay),c=!!(null!==(t=this._isMuted)&&void 0!==t?t:this.content.muted),d=!(null===(n=this._hasCaptions)||void 0===n||!n),h=!!(null!==(i=this._captionsActive)&&void 0!==i?i:d),p=null!==(r=null!==(a=this._captionText)&&void 0!==a?a:this.content.captionText)&&void 0!==r?r:"",f=l?"pause":"play",m=c?"muted":"unmuted",g="sponsored"===String(this.content.videoType||"").toLowerCase(),v=["pds-video-player--playback-".concat(f),"pds-video-player--audio-".concat(m),g?"pds-video-player--sponsored":"",g&&o?"pds-video-player--controls-hover":"",g&&this._controlsDismissed?"pds-video-player--controls-dismissed":"",o?"pds-video-player--controls-visible":""].filter(
1Boolean).join(" "),y=this._getAriaLabel(this.content),_=this._getFrameAriaLabel({isSponsored:g,isPlaying:l}),b="".concat(this._uid,"-sponsored-label");return Vd(mh||(mh=Rh(['\n      <div class="','">\n        <div\n          class="pds-video-player__media abs-vw__player-wrap"\n          role="button"\n          tabindex="','"\n          aria-label="','"\n          aria-describedby=',"\n          @click=","\n          @keydown=","\n          @focusin=","\n          @mousemove=",">\n        ",'\n        <video\n          id="','"\n          class="pds-video-player__video video-js vjs-default-skin"\n          poster=',"\n          ?muted=","\n          ?loop=","\n          preload=",'\n          playsinline\n          disablepictureinpicture\n          tabindex="-1"\n          aria-label="','">\n          ',"\n          ","\n        </video>\n\n        ","\n\n        ","\n\n        ","\n        </div>\n      </div>\n    "])),v,this.noInteraction?"-1":"0",_,lh(g?b:void 0),this._handleFrameClick,this._handleFrameKeydown,this._revealControls,this._revealControls,g?Vd(gh||(gh=Rh(['\n          <span id="','" class="abs-vw__sr-only">Sponsored</span>\n        '])),b):"",this._uid,lh(this.content.poster||void 0),c,!0===this.content.loop,lh(this.content.preload),y,u.map(function(e){return Vd(vh||(vh=Rh(['\n            <source src="','" type="','">\n          '])),e.src,e.type)}),s.map(function(e){return Vd(yh||(yh=Rh(['\n            <track\n              src="','"\n              kind="','"\n              srclang="','"\n              lang="','"\n              label="','"\n              ?default=',">\n          "])),e.src,e.kind,e.srclang,e.srclang,e.label,e.default)}),o?Vd(_h||(_h=Rh(['\n          <div class="pds-video-player__top-controls" aria-label="Video settings">\n          <button\n            class="pds-video-player__icon-control pds-video-player__control pds-video-player__control--',' pds-icon-btn pds-icon-btn-size_small pds-icon-btn-transparent--video d-flex align-items-center justify-content-center"\n            type="button"\n            aria-label="','"\n            @click=',">\n            ",'\n          </button>\n\n          <button\n            class="pds-video-player__icon-control pds-video-player__control pds-video-player__control--',' pds-icon-btn pds-icon-btn-size_small pds-icon-btn-transparent--video d-flex align-items-center justify-content-center"\n            type="button"\n            aria-label="Closed captions"\n            aria-pressed="','"\n            ?disabled=',"\n            @click=",">\n            ","\n          </button>\n          </div>\n        "])),"muted"===m?"mute":"unmute","muted"===m?"Unmute":"Mute",this._handleMuteClick,"muted"===m?Eh.mute:Eh.unmute,h?"cc-on":"cc-off",h?"true":"false",!d,this._handleCaptionsClick,h?Eh.cc:Eh.ccDisabled):"",h&&p?Vd(bh||(bh=Rh(['\n          <div class="pds-video-player__caption text-s" aria-live="polite" lang="','">\n            ',"\n          </div>\n        "])),this._captionLang||"en",p):"",o?Vd(Th||(Th=Rh(['\n          <div class="pds-video-player__bottom-controls" aria-label="Playback controls">\n            <button\n              class="pds-video-player__playback-control pds-video-player__control pds-video-player__control--',' pds-icon-btn pds-icon-btn-size_small pds-icon-btn-transparent--video d-flex align-items-center justify-content-center"\n              type="button"\n              aria-label="','"\n              @click=',">\n              ","\n            </button>\n          </div>\n        "])),f,l?"Pause":"Play",this._handlePlayPauseClick,l?Eh.pause:Eh.play):"")}}]);var n,i,r,a,s}(oh);function rp(e){return rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rp(e)}function ap(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,dp(i.key),i)}}
1function sp(e,t,n){return t=up(t),function(e,t){if(t&&("object"==rp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,op()?Reflect.construct(t,n||[],up(e).constructor):t.apply(e,n))}function op(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(op=function(){return!!e})()}function up(e){return up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},up(e)}function lp(e,t){return lp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lp(e,t)}function cp(e,t,n){return(t=dp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dp(e){var t=function(e,t){if("object"!=rp(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=rp(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rp(t)?t:t+""}ep(ip,"properties",{content:{type:Object},noInteraction:{type:Boolean},_isPlaying:{state:!0},_isMuted:{state:!0},_captionsActive:{state:!0},_captionText:{state:!0},_captionLang:{state:!0},_hasCaptions:{state:!0},_controlsDismissed:{state:!0}}),customElements.get("abs-video-player")||customElements.define("abs-video-player",ip);var hp=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return cp(e=sp(this,t,[].concat(i)),"content",{}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lp(e,t)}(t,e),function(e,t,n){return t&&ap(e.prototype,t),n&&ap(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createRenderRoot",value:function(){return this}},{key:"render",value:function(){return Vd(np||(np=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n      <div class="abs-vw__story">\n        <abs-video-player .content=','></abs-video-player>\n\n        <div class="abs-vw__story-content">\n          <slot name="story-content"></slot>\n        </div>\n      </div>\n    '])),this.content)}}])}(oh);cp(hp,"properties",{content:{type:Object}}),customElements.get("abs-video-story-block")||customElements.define("abs-video-story-block",hp);class pp{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const{I:fp}=rh,mp={},gp=(e=>(...t)=>({_$litDirective$:e,values:t}))(class extends pp{constructor(){super(...arguments),this.key=Wd}render(e,t){return this.key=e,t}update(e,[t,n]){return t!==this.key&&(((e,t=mp)=>{e._$AH=t})(e),this.key=t),n}});var vp=["videos","playback","carousel","grid","header"];function yp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function _p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yp(Object(n),!0).forEach(function(t){bp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bp(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Tp(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Tp(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Tp(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tp(e){return Tp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tp(e)}var wp,Sp,kp,Ep,Cp,Ap,Pp,xp,Ip,Op,Lp=new Set(["http:","https:"]);function Dp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e||"object"!==Tp(e))return!1;var t=String(e.videoType||"").toLowerCase(),n=Array.isArray(e.sponsoredContent)?e.sponsoredContent:[];return"sponsored"===t&&n.length>0}function Mp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return!("string"!=typeof(null==e?void 0:e.src)||!e.src.trim())||Array.isArray(null==e?void 0:e.sources)&&e.sources.some(function(e){return"string"==typeof(null==e?void 0:e.src)&&e.src.trim()})}(e)||Dp(e)}function Rp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"object"!==Tp(e))return[];e.videos,e.playback,e.carousel,e.grid,e.header;var n=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,vp),i=e.playback&&"object"===Tp(e.playback)?e.playback:{};return(Array.isArray(e.videos)&&e.videos.length>0?e.videos:[n]).filter(function(e){return e&&"object"===Tp(e)}).map(function(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Array.isArray(e.sources)?e.sources:[],i=Array.isArray(t.sources)?t.sources:[];return n.find(function(e){return null==e?void 0:e.src})||i.find(function(e){return null==e?void 0:e.src})||null}(e,n),r=Array.isArray(e.sources)?e.sources:Array.isArray(n.sources)?n.sources:[];return _p(_p(_p(_p({},n),i),e),{},{src:(null==t?void 0:t.src)||e.src||n.src||"",type:(null==t?void 0:t.type)||e.type||n.type||"",sources:r})}).filter(Mp).slice(0,function(){var e=Number((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).maxVideos);return Number.isFinite(e)&&e>0?Math.min(e,12):12}(t))}function Np(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>
11&&void 0!==arguments[1]?arguments[1]:0,n=[e.title,e.caption,e.name,e.headline].find(function(e){return"string"==typeof e&&e.trim()});return n?n.trim():"Video ".concat(t+1)}function Up(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[e.views,e.subtitle,e.description].find(function(e){return"string"==typeof e&&e.trim()})||""}function Bp(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[e.poster,e.thumbnail,e.thumbnailUrl,e.imageUrl].find(function(e){return"string"==typeof e&&e.trim()})||""}function jp(e){if("string"!=typeof e||!e.trim())return"";var t=e.trim();if(t.startsWith("/")||t.startsWith("#"))return t;try{var n="undefined"==typeof window?"https://example.com":window.location.origin,i=new URL(t,n);return Lp.has(i.protocol)?t:""}catch(e){return""}}function Fp(e){return Fp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fp(e)}function qp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Vp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a,s,o=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=a.call(n)).done)&&(o.push(i.value),o.length!==t);u=!0);}catch(e){l=!0,r=e}finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw r}}return o}}(e,t)||Yp(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hp(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function a(n,i,r,a){var u=i&&i.prototype instanceof o?i:o,l=Object.create(u.prototype);return Wp(l,"_invoke",function(n,i,r){var a,o,u,l=0,c=r||[],d=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,o=0,u=e,h.n=n,s}};function p(n,i){for(o=n,u=i,t=0;!d&&l&&!r&&t<c.length;t++){var r,a=c[t],p=h.p,f=a[2];n>3?(r=f===i)&&(u=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=p&&((r=n<2&&p<a[1])?(o=0,h.v=i,h.n=a[1]):p<f&&(r=n<3||a[0]>i||i>f)&&(a[4]=n,a[5]=i,h.n=f,o=0))}if(r||n>1)return s;throw d=!0,i}return function(r,c,f){if(l>1)throw TypeError("Generator is already running");for(d&&1===c&&p(c,f),o=c,u=f;(t=o<2?e:u)||!d;){a||(o?o<3?(o>1&&(h.n=-1),p(o,u)):h.n=u:h.v=u);try{if(l=2,a){if(o||(r="next"),t=a[r]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,o<2&&(o=0)}else 1===o&&(t=a.return)&&t.call(a),o<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),o=1);a=e}else if((t=(d=h.n<0)?u:n.call(i,h))!==s)break}catch(t){a=e,o=1,u=t}finally{l=1}}return{value:t,done:d}}}(n,r,a),!0),l}var s={};function o(){}function u(){}function l(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(Wp(t={},i,function(){return this}),t),d=l.prototype=o.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Wp(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=l,Wp(d,"constructor",l),Wp(l,"constructor",u),u.displayName="GeneratorFunction",Wp(l,r,"GeneratorFunction"),Wp(d),Wp(d,r,"Generator"),Wp(d,i,function(){return this}),Wp(d,"toString",function(){return"[object Generator]"}),(Hp=function(){return{w:a,m:h}})()}function Wp(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}Wp=function(e,t,n,i){function a(t,n){Wp(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},Wp(e,t,n,i)}function Gp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function $p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Gp(Object(n),!0).forEach(function(t){af(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zp(e,t,n,i,r,a,s){try{var o=e[a](s),u=o.value}catch(e){return void n(e)}o.done?t(u):Promise.resolve(u).then(i,r)}function Kp(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var a=e.apply(t,n);function s(e){zp(a,i,r,s,o,"next",e)}function o(e){zp(a,i,r,s,o,"throw",e)}s(void 0)})}}function Xp(e){return function(e){if(Array.isArray(e))return Qp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Yp(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yp(e,t){if(e){if("string"==typeof e)return Qp(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qp(e,t):void 0}}function Qp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function Jp(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,sf(i.key),i)}}function Zp(e,t,n){return t=nf(t),function(e,t){if(t&&("object"==Fp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ef()?Reflect.construct(t,n||[],nf(e).constructor):t.apply(e,n))}function ef(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ef=function(){return!!e})()}function tf(){return tf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=nf(e)););return e}(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},tf.apply(null,arguments)}function nf(e){return nf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nf(e)}function rf(e,t){return rf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rf(e,t)}function af(e,t,n){return(t=sf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sf(e){var t=function(e,t){if("object"!=Fp(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Fp(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Fp(t)?t:t+""}var of,uf,lf,cf,df,hf,pf,ff,mf,gf,vf,yf,_f,bf,Tf,wf=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),af(e=Zp(this,t),"content",{}),af(e,"hasPrev",!1),af(e,"hasNext",!1),e._uid="abs-fs-".concat(Math.random().toString(36).slice(2)),e._api=null,e._playing=!1,e._muted=!1,e._captions=!1,e._hasCaptions=!1,e._captionText="",e._current=0,e._duration=0,e._buffered=0,e._controlsVisible=!0,e._announcement="",e._captionLang="en",e._inactivityTimer=null,e._previouslyFocused=null,e._captionCues=[],e._captionTimer=null,e._onPointerActivity=e._onPointerActivity.bind(e),e._handleFocusIn=e._handleFocusIn.bind(e),e._handleFocusOut=e._handleFocusOut.bind(e),e._handleKeydown=e._handleKeydown.bind(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rf(e,t)}(t,e),function(e,t,n){return t&&Jp(e.prototype,t),n&&Jp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createRenderRoot",value:function(){return this}},{key:"_setupInactivityDetection",value:function(){this.addEventListener("mousemove",this._onPointerActivity),this.addEventListener("touchstart",this._onPointerActivity,{passive:!0}),this.addEventListener("click",this._onPointerActivity),this.addEventListener("focusin",this._handleFocusIn),this.addEventListener("focusout",this._handleFocusOut),this.addEventListener("keydown",this._handleKeydown),this._startInactivityTimer()}},{key:"_teardownInactivityDetection",value:function(){this.removeEventListener("mousemove",this._onPointerActivity),this.removeEventListener("touchstart",this._onPointerActivity),this.removeEventListener("click",this._onPointerActivity),this.removeEventListener("focusin",this._handleFocusIn),this.removeEventListener("focusout",this._handleFocusOut),this.removeEventListener("keydown",this._handleKeydown)}},{key:"_onPointerActivity",value:function(){this._showControls(),this.contains(document.activeElement)&&document.activeElement!==this||this._startInactivityTimer()}},{key:"_showControls",value:function(){this._controlsVisible||(this._controlsVisible=!0)}},{key:"_hideControls",value:function(){this._controlsVisible&&(this._controlsVisible=!1)}},{key:"_startInactivityTimer",value:function(){var e=this;this._clearInactivityTimer(),this._playing&&(this._inactivityTimer=setTimeout(function(){e._hideControls()},t.INACTIVITY_TIMEOUT_MS))}},{key:"_clearInactivityTimer",value:function(){this._inactivityTimer&&(clearTimeout(this._inactivityTimer),this._inactivityTimer=null)}},{key:"_handleFocusIn",value:function(e){this._clearInactivityTimer();var t=this.querySelector(".pds-fs-video-player__show-controls");t&&e.target===t||this._showControls()}},{key:"_handleFocusOut",value:function(e){this.contains(e.relatedTarget)||this._startInactivityTimer()}},{key:"_getFocusableElements",value:function(){return this._controlsVisible?Array.from(this.querySelectorAll([".pds-fs-video-player__nav-prev",".pds-fs-video-player__close",".pds-fs-video-player__controls button:not([disabled])",".pds-fs-video-player__track",".abs-fs-video-player__shoppable-product",".pds-fs-video-player__nav-next"].join(","))):[this.querySelector(".pds-fs-video-player__show-controls")].filter(
1Boolean)}},{key:"_handleKeydown",value:function(e){var t,n,i=this._getFocusableElements(),r=i[0],a=i[i.length-1];if("Tab"===e.key&&(e.shiftKey&&document.activeElement===r?(e.preventDefault(),null==a||a.focus()):e.shiftKey||document.activeElement!==a||(e.preventDefault(),null==r||r.focus())),"Escape"===e.key&&(e.preventDefault(),this._close()),!["INPUT","TEXTAREA","SELECT"].includes(e.target.tagName)){" "===e.key&&"BUTTON"!==e.target.tagName&&(e.preventDefault(),this._togglePlay()),"m"!==e.key&&"M"!==e.key||(e.preventDefault(),this._toggleMute()),"c"!==e.key&&"C"!==e.key||(e.preventDefault(),this._toggleCaptions());var s="slider"===(null===(t=e.target)||void 0===t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"role"));"ArrowRight"!==e.key||s||(e.preventDefault(),this._seekBy(5)),"ArrowLeft"!==e.key||s||(e.preventDefault(),this._seekBy(-5)),"Home"!==e.key||s||(e.preventDefault(),this._seekTo(0)),"End"!==e.key||s||(e.preventDefault(),this._seekTo(this._duration)),"ArrowUp"===e.key&&(e.preventDefault(),this._adjustVolume(.1)),"ArrowDown"===e.key&&(e.preventDefault(),this._adjustVolume(-.1))}}},{key:"_announce",value:function(e){var t=this;this._announcement=e,setTimeout(function(){t._announcement=""},1e3)}},{key:"firstUpdated",value:function(){var e=this;this._previouslyFocused=document.activeElement,this._initPlayer(this.querySelector("video")),this._setupInactivityDetection(),requestAnimationFrame(function(){var t,n=e.querySelector(".pds-fs-video-player__close");null==n||n.focus();var i=null===(t=e.content)||void 0===t?void 0:t.title;e._announce(i?"".concat(i,". Video player."):"Video player.")})}},{key:"disconnectedCallback",value:function(){!function(e,t,n,i){var r=tf(nf(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,"disconnectedCallback",this,3)([]),this._clearInactivityTimer(),this._teardownInactivityDetection(),this._stopCaptionTimer();try{var e,n;null===(e=this._api)||void 0===e||null===(n=e.dispose)||void 0===n||n.call(e)}catch(e){}this._api=null}},{key:"_sources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.content;return Array.isArray(e.sources)&&e.sources.length>0?e.sources.filter(function(e){return null==e?void 0:e.src}).map(function(t){return{src:t.src,type:t.type||e.type||"video/mp4"}}):e.src?[{src:e.src,type:e.type||"video/mp4"}]:[]}},{key:"_tracks",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.content;return[].concat(Xp(Array.isArray(e.textTracks)?e.textTracks:[]),Xp(Array.isArray(e.captions)?e.captions:[]),Xp(Array.isArray(e.tracks)?e.tracks:[])).map(function(e){return{src:(null==e?void 0:e.src)||(null==e?void 0:e.url)||"",kind:(null==e?void 0:e.kind)||"captions",srclang:(null==e?void 0:e.srclang)||(null==e?void 0:e.lang)||(null==e?void 0:e.language)||"en",label:(null==e?void 0:e.label)||(null==e?void 0:e.language)||"CC",default:!0===(null==e?void 0:e.default)}}).filter(function(e){return e.src&&["captions","subtitles"].includes(e.kind)})}},{key:"_initPlayer",value:(i=Kp(Hp().m(function e(t){var n,i,r,a,s,o,u;return Hp().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:return o=this._sources(),this._muted=!0===this.content.muted,this._captions=!1!==this.content.captionsActive,this._api=new Vc(t,$p({controls:!1,autoplay:this.content.autoplay,muted:this.content.muted,loop:!0===this.content.loop,preload:this.content.preload||"metadata",fluid:!0,responsive:!0},o.length>0?{sources:o}:{})),e.n=2,null===(n=(i=this._api)._init)||void 0===n?void 0:n.call(i);case 2:if(u=null===(r=(a=this._api).getPlayer)||void 0===r?void 0:r.call(a)){e.n=3;break}return e.a(2);case 3:this._bindEvents(u),this._setupCaptions(u),this._playing=!(null!==(s=u.paused)&&void 0!==s&&s.call(u)),!0===this.content.autoplay&&this._playOnOpen(u);case 4:return e.a(2)}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"_playOnOpen",value:function(e){var t,n=this,i=null==e||null===(t=e.play)||void 0===t?void 0:t.call(e);return i&&"function"==typeof i.catch?(this._playing=!0,this._startInactivityTimer(),i.catch(function(){n._playing=!1,n._clearInactivityTimer(),n._showControls()}),i):(this._playing=!0,this._startInactivityTimer(),i)}},{key:"_bindEvents",value:function(e){var t,n,i,r,a,s,o,u,l=this;e&&(null===(t=e.on)||void 0===t||t.call(e,"play",function(){l._playing=!0,l._startInactivityTimer()}),null===(n=e.on)||void 0===n||n.call(e,"pause",function(){l._playing=!1,l._clearInactivityTimer(),l._showControls()}),null===(i=e.on)||void 0===i||i.call(e,"volumechange",function(){var t,n;l._muted=!(null===(t=e.muted)||void 0===t||!t.call(e))||0===(null===(n=e.volume)||void 0===n?void 0:n.call(e))}),null===(r=e.on)||void 0===r||r.call(e,"loadedmetadata",function(){var t;l._duration=(null===(t=e.duration)||void 0===t?void 0:t.call(e))||0}),null===(a=e.on)||void 0===a||a.call(e,"durationchange",function(){var t;l._duration=(null===(t=e.duration)||void 0===t?void 0:t.call(e))||0}),null===(s=e.on)||void 0===s||s.call(e,"timeupdate",function(){var t,n;l._current=(null===(t=e.currentTime)||void 0===t?void 0:t.call(e))||0,l._buffered=(null===(n=e.bufferedPercent)||void 0===n?void 0:n.call(e))||0,l._syncCaption(e)}),null===(o=e.on)||void 0===o||o.call(e,"progress",function(){var t;l._buffered=(null===(t=e.bufferedPercent)||void 0===t?void 0:t.call(e))||0}),null===(u=e.on)||void 0===u||u.call(e,"ended",function(){l._onVideoEnded()}))}},{key:"_setupCaptions",value:function(e){var t=this,n=this._tracks(),i=this._playerCaptionTracks(e);this._hasCaptions=i.length>0||n.length>
10,i.forEach(function(n){var i;null===(i=n.addEventListener)||void 0===i||i.call(n,"cuechange",function(){return t._syncCaption(e)})}),this._applyCaptionMode(e);var r=n[0];null!=r&&r.src&&this._loadCaptionCues(r)}},{key:"_playerCaptionTracks",value:function(e){var t,n=null==e||null===(t=e.textTracks)||void 0===t?void 0:t.call(e);return n?Array.from({length:n.length},function(e,t){return n[t]}).filter(function(e){return["captions","subtitles"].includes(e.kind)}):[]}},{key:"_applyCaptionMode",value:function(e){var t=this;this._playerCaptionTracks(e).forEach(function(e,n){e.mode=t._captions&&0===n?"hidden":"disabled"}),this._captions?this._syncCaption(e):this._captionText=""}},{key:"_syncCaption",value:function(e){if(this._captions&&!(this._captionCues.length>0)){var t=this._playerCaptionTracks(e).find(function(e){return"disabled"!==e.mode}),n=null==t?void 0:t.activeCues;this._captionText=n&&n.length?Array.from(n).map(function(e){return e.text}).filter(Boolean).join(" "):"",this._captionLang=(null==t?void 0:t.language)||(null==t?void 0:t.srclang)||"en"}}},{key:"_togglePlay",value:function(){var e,t,n,i,r,a=null===(e=this._api)||void 0===e||null===(t=e.getPlayer)||void 0===t?void 0:t.call(e);if(a){var s=null===(n=a.paused)||void 0===n?void 0:n.call(a);s?null===(i=a.play)||void 0===i||i.call(a):null===(r=a.pause)||void 0===r||r.call(a),this._announce(s?"Playing":"Paused")}}},{key:"_seekBy",value:function(e){var t,n,i,r,a,s=null===(t=this._api)||void 0===t||null===(n=t.getPlayer)||void 0===n?void 0:n.call(t);if(s){var o=(null===(i=s.duration)||void 0===i?void 0:i.call(s))||0,u=Math.min(Math.max(0,((null===(r=s.currentTime)||void 0===r?void 0:r.call(s))||0)+e),o||1/0);null===(a=s.currentTime)||void 0===a||a.call(s,u),this._current=u}}},{key:"_seekTo",value:function(e){var t,n,i,r,a=null===(t=this._api)||void 0===t||null===(n=t.getPlayer)||void 0===n?void 0:n.call(t);if(a){var s=(null===(i=a.duration)||void 0===i?void 0:i.call(a))||0,o=Math.min(Math.max(0,Number(e)||0),s||1/0);null===(r=a.currentTime)||void 0===r||r.call(a,o),this._current=o}}},{key:"_toggleMute",value:function(){var e,t,n,i,r,a=null===(e=this._api)||void 0===e||null===(t=e.getPlayer)||void 0===t?void 0:t.call(e);if(a){var s=!(null!==(n=a.muted)&&void 0!==n&&n.call(a)||0===(null===(i=a.volume)||void 0===i?void 0:i.call(a)));null===(r=a.muted)||void 0===r||r.call(a,s),this._muted=s,this._announce(s?"Muted":"Unmuted")}}},{key:"_adjustVolume",value:function(e){var t,n,i,r,a,s,o=null===(t=this._api)||void 0===t||null===(n=t.getPlayer)||void 0===n?void 0:n.call(t);if(o){var u,l=null!==(i=null===(r=o.volume)||void 0===r?void 0:r.call(o))&&void 0!==i?i:1,c=Math.min(1,Math.max(0,l+e));if(null===(a=o.volume)||void 0===a||a.call(o,c),0===c)null===(u=o.muted)||void 0===u||u.call(o,!0),this._muted=!0;else if(null!==(s=o.muted)&&void 0!==s&&s.call(o)){var d;null===(d=o.muted)||void 0===d||d.call(o,!1),this._muted=!1}var h=Math.round(100*c);this._announce("Volume ".concat(h,"%"))}}},{key:"_toggleCaptions",value:function(){var e,t;this._captions=!this._captions,this._applyCaptionMode(null===(e=this._api)||void 0===e||null===(t=e.getPlayer)||void 0===t?void 0:t.call(e)),this._captions?this._startCaptionTimer():(this._stopCaptionTimer(),this._captionText=""),this._announce(this._captions?"Closed captions on":"Closed captions off")}},{key:"_loadCaptionCues",value:(n=Kp(Hp().m(function e(t){var n,i;return Hp().w(function(e){for(;;)switch(e.p=e.n){case 0:if(null!=t&&t.src){e.n=1;break}return e.a(2);case 1:return e.p=1,e.n=2,fetch(t.src,{credentials:"same-origin"});case 2:if((n=e.v).ok){e.n=3;break}return e.a(2);case 3:return e.n=4,n.text();case 4:i=e.v,this._captionCues=this._parseVttCues(i),this._captionLang=t.srclang||t.lang||t.language||"en",this._startCaptionTimer(),e.n=6;break;case 5:e.p=5,e.v,this._captionCues=[];case 6:return e.a(2)}},e,this,[[1,5]])})),function(e){return n.apply(this,arguments)})},{key:"_parseVttCues",value:function(e){var t=this;return String(e||"").replace(/\r/g,"").split("\n\n").map(function(e){var n=e.split("\n").filter(Boolean),i=n.findIndex(function(e){return e.includes("--\x3e")});if(i<0)return null;var r=Vp(n[i].split("--\x3e"),2),a=r[0],s=r[1],o=n.slice(i+1).join(" ").trim();return o?{start:t._parseVttTime(a),end:t._parseVttTime(s),text:o}:null}
1).filter(Boolean)}},{key:"_parseVttTime",value:function(e){var t=String(e||"").trim().split(/\s+/)[0].split(":").map(Number),n=t.pop()||0,i=t.pop()||0;return 3600*(t.pop()||0)+60*i+n}},{key:"_startCaptionTimer",value:function(){var e=this;this._captions&&!this._captionTimer&&0!==this._captionCues.length&&(this._syncCaptionFromCues(),this._captionTimer=setInterval(function(){return e._syncCaptionFromCues()},250))}},{key:"_stopCaptionTimer",value:function(){this._captionTimer&&(clearInterval(this._captionTimer),this._captionTimer=null)}},{key:"_syncCaptionFromCues",value:function(){var e,t,n;if(this._captions&&0!==this._captionCues.length){var i=null===(e=this._api)||void 0===e||null===(t=e.getPlayer)||void 0===t?void 0:t.call(e),r=(null==i||null===(n=i.currentTime)||void 0===n?void 0:n.call(i))||0,a=this._captionCues.find(function(e){return r>=e.start&&r<=e.end}),s=(null==a?void 0:a.text)||"";this._captionText!==s&&(this._captionText=s)}}},{key:"_seekToTrack",value:function(e){var t,n,i,r,a=null===(t=this._api)||void 0===t||null===(n=t.getPlayer)||void 0===n?void 0:n.call(t),s=e.currentTarget,o=(null==a||null===(i=a.duration)||void 0===i?void 0:i.call(a))||0;if(a&&o&&null!=s&&s.getBoundingClientRect){var u=s.getBoundingClientRect(),l=(u.width?Math.min(Math.max(0,(e.clientX-u.left)/u.width),1):0)*o;null===(r=a.currentTime)||void 0===r||r.call(a,l),this._current=l}}},{key:"_onTrackKeydown",value:function(e){"ArrowRight"===e.key?(this._seekBy(5),e.preventDefault()):"ArrowLeft"===e.key?(this._seekBy(-5),e.preventDefault()):"Home"===e.key?(this._seekTo(0),e.preventDefault()):"End"===e.key&&(this._seekTo(this._duration),e.preventDefault())}},{key:"_navigatePrev",value:function(){this.dispatchEvent(new CustomEvent("fs-prev",{bubbles:!0,composed:!0}))}},{key:"_navigateNext",value:function(){this.dispatchEvent(new CustomEvent("fs-next",{bubbles:!0,composed:!0}))}},{key:"_onVideoEnded",value:function(){this.hasNext?this._navigateNext():this._close()}},{key:"_close",value:function(){var e,t;this.dispatchEvent(new CustomEvent("fs-close",{bubbles:!0,composed:!0})),null===(e=this._previouslyFocused)||void 0===e||null===(t=e.focus)||void 0===t||t.call(e)}},{key:"_handleShowControls",value:function(){var e=this;this._showControls(),this.updateComplete.then(function(){var t=e.querySelector(".pds-fs-video-player__controls button:nth-child(2)");null==t||t.focus()})}},{key:"_fmt",value:function(e){var t=Math.max(0,Math.floor(Number(e)||0)),n=Math.floor(t/60),i=t%60;return"".concat(n,":").concat(i<10?"0":"").concat(i)}},{key:"_shoppableProduct",value:function(){return null}},{key:"render",value:function(){var e,t=this,n=this._sources(),i=this._tracks(),r=this.content.title||"",a=!0===this.content.sponsored||"sponsored"===this.content.videoType,s="horizontal"===this.content.sourceOrientation?"horizontal":"vertical",o=this._playing?"pause":"play",u=this._muted?"muted":"unmuted",l=this._captions?"on":"off",c=this._duration?Math.min(100,this._current/this._duration*100):0,d=Math.min(100,100*this._buffered),h=this._fmt(this._current),p=this._fmt(this._duration),f="-".concat(this._fmt(Math.max(0,this._duration-this._current))),m="".concat(h," of ").concat(p),g=r?"".concat(r,". Video player."):"Video player.",v=["pds-fs-video-player","pds-fs-video-player--responsive","pds-fs-video-player--source-".concat(s),"pds-fs-video-player--playback-".concat(o),"pds-fs-video-player--audio-".concat(u),"pds-fs-video-player--captions-".concat(l),this._controlsVisible?"pds-fs-video-player--controls-visible":""].filter(Boolean).join(" ");return Vd(wp||(wp=qp(['\n      <div class="','" role="dialog" aria-modal="true" aria-label="','" tabindex="-1">\n        \x3c!-- Screen reader announcer (visually hidden) --\x3e\n        <div class="abs-vw__sr-only" aria-live="polite" aria-atomic="true">','</div>\n        <div class="pds-fs-video-player__media">\n          <div class="pds-fs-video-player__stage">\n            ','\n          </div>\n\n          <div class="pds-fs-video-player__scrim" aria-hidden="true"></div>\n\n          ',"\n          ",'\n\n          <div class="pds-fs-video-player__top">\n            <div class="pds-fs-video-player__meta">\n              ',"\n              ","\n            </div>\n            ","\n          </div>\n\n          ","\n\n          \x3c!-- Show controls button for keyboard users when controls are hidden --\x3e\n          ","\n\n          ",'\n\n          <div class="pds-fs-video-player__controls" aria-label="Playback controls">\n            ',"\n\n            ","\n\n            ",'\n\n            <sp
1an class="pds-fs-video-player__time pds-fs-video-player__time--combined">',"/",'</span>\n\n            <div class="pds-fs-video-player__progress">\n              <span class="pds-fs-video-player__time pds-fs-video-player__time--current">','</span>\n              <div\n                class="pds-fs-video-player__track"\n                role="slider"\n                tabindex="0"\n                aria-label="Seek"\n                aria-valuemin="0"\n                aria-valuemax="100"\n                aria-valuenow="','"\n                aria-valuetext="','"\n                @click=',"\n                @keydown=",'>\n                <div class="pds-fs-video-player__track-buffered" style="width: ','%;"></div>\n                <div class="pds-fs-video-player__track-filled" style="width: ','%;"></div>\n              </div>\n              <span class="pds-fs-video-player__time pds-fs-video-player__time--remaining">',"</span>\n            </div>\n\n            ","\n\n            ","\n          </div>\n        </div>\n      </div>\n    "])),v,g,this._announcement,n.length>0?Vd(Sp||(Sp=qp(['\n              <video\n                id="','"\n                class="pds-fs-video-player__video video-js"\n                poster=',"\n                ?muted=","\n                ?loop=",'\n                preload="metadata"\n                playsinline\n                disablepictureinpicture>\n                ',"\n                ","\n              </video>\n            "])),this._uid,lh(this.content.poster||void 0),this._muted,!0===this.content.loop,n.map(function(e){return Vd(kp||(kp=qp(['<source src="','" type="','">'])),e.src,e.type)}),i.map(function(e){return Vd(Ep||(Ep=qp(['\n                  <track src="','" kind="','" srclang="','"\n                    label="','" ?default=',">\n                "])),e.src,e.kind,e.srclang,e.label,e.default)})):Vd(Cp||(Cp=qp(['<div class="pds-fs-video-player__placeholder" aria-hidden="true"></div>']))),this.hasPrev?Ah("prev",this._navigatePrev.bind(this)):"",this.hasNext?Ah("next",this._navigateNext.bind(this)):"",r?Vd(Ap||(Ap=qp(['<span class="pds-fs-video-player__title">',"</span>"])),r):"",a?Vd(Pp||(Pp=qp(['<span class="pds-fs-video-player__sponsored">Sponsored</span>']))):"",Ph({icon:"close",label:"Close video",variant:"filled--neutral",className:"pds-fs-video-player__close",onClick:this._close.bind(this)}),this._hasCaptions&&this._captions?Vd(xp||(xp=qp(['\n            <div class="pds-fs-video-player__caption" aria-live="polite" lang="','">',"</div>\n          "])),this._captionLang,this._captionText):"",this._controlsVisible?"":Vd(Ip||(Ip=qp(['\n            <button\n              class="pds-fs-video-player__show-controls abs-vw__sr-only"\n              type="button"\n              @click=',">\n              Show controls\n            </button>\n          "])),this._handleShowControls),(e=t._shoppableProduct())?Vd(Op||(Op=qp(['\n              <a\n                class="abs-fs-video-player__shoppable-product"\n                href="/shop/pd/product/','"\n                aria-label="Shop ','"\n                tabindex="0">\n                <img\n                  class="abs-fs-video-player__shoppable-product-img"\n                  src="','"\n                  alt="','"\n                  aria-hidden="true">\n              </a>\n            '])),e.pid,e.name||"product",e.imageUrl,e.name||""):"",Ph({icon:"rewind10",label:"Rewind 10 seconds",onClick:function(){return t._seekBy(-10)}}),Ph({icon:this._playing?"pause":"play",label:this._playing?"Pause":"Play",onClick:this._togglePlay.bind(this)}),Ph({icon:"forward10",label:"Forward 10 seconds",onClick:function(){return t._seekBy(10)}}),h,p,h,Math.round(c),m,this._seekToTrack,this._onTrackKeydown,d,c,f,Ph({icon:this._muted?"soundOff":"soundOn",label:this._muted?"Unmute":"Mute",onClick:this._toggleMute.bind(this)}),Ph({icon:this._captions?"ccOn":"ccOff",label:this._captions?"Closed captions on":"Closed captions off",onClick:this._toggleCaptions.bind(this)}))}}]);var n,i}(oh);function Sf(e){return Sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sf(e)}function kf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ef(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,a,s,o=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=a.call(n)).done)&&(o.push(i.value),o.length!==t);u=!0);}catch(e){l=!0,r=e}
1finally{try{if(!u&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw r}}return o}}(e,t)||xf(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function Af(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cf(Object(n),!0).forEach(function(t){Uf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pf(e){return function(e){if(Array.isArray(e))return If(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xf(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xf(e,t){if(e){if("string"==typeof e)return If(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?If(e,t):void 0}}function If(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function Of(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Bf(i.key),i)}}function Lf(e,t,n){return t=Rf(t),function(e,t){if(t&&("object"==Sf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Df()?Reflect.construct(t,n||[],Rf(e).constructor):t.apply(e,n))}function Df(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Df=function(){return!!e})()}function Mf(){return Mf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Rf(e)););return e}(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Mf.apply(null,arguments)}function Rf(e){return Rf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rf(e)}function Nf(e,t){return Nf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nf(e,t)}function Uf(e,t,n){return(t=Bf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bf(e){var t=function(e,t){if("object"!=Sf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Sf(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Sf(t)?t:t+""}af(wf,"properties",{content:{type:Object},hasPrev:{type:Boolean},hasNext:{type:Boolean},_playing:{state:!0},_muted:{state:!0},_captions:{state:!0},_hasCaptions:{state:!0},_captionText:{state:!0},_current:{state:!0},_duration:{state:!0},_buffered:{state:!0},_controlsVisible:{state:!0},_announcement:{state:!0},_captionLang:{state:!0}}),af(wf,"INACTIVITY_TIMEOUT_MS",3e3),customElements.get("abs-fullscreen-video-player")||customElements.define("abs-fullscreen-video-player",wf);var jf,Ff,qf,Vf,Hf,Wf,Gf,$f,zf,Kf,Xf,Yf,Qf,Jf,Zf=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Uf(e=Lf(this,t),"content",{}),e._uid="abs-vc-".concat(Math.random().toString(36).slice(2)),e._hoverIndex=null,e._autoPreviewIndex=0,e._autoPreviewObserver=null,e._visibleCards=new Set,e._fullscreenIndex=null,e._fullscreenTriggerIndex=null,e._fullscreenTriggerEl=null,e._canScrollPrev=!1,e._canScrollNext=!1,e._previewMuted=!0,e._previewCaptionsActive=!1,e._scrollingByKeyboard=!1,e._unsubscribe=null,e._onScroll=e._onScroll.bind(e),e._onKeydown=e._onKeydown.bind(e),e._onRailKeydown=e._onRailKeydown.bind(e),e._onFullscreenChange=e._onFullscreenChange.bind(e),e._handlePreviewMuteClick=e._handlePreviewMuteClick.bind(e),e._handlePreviewCaptionsClick=e._handlePreviewCaptionsClick.bind(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nf(e,t)}(t,e),function(e,t,n){return t&&Of(e.prototype,t),n&&Of(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createRenderRoot",value:function(){return this}},{key:"_config",get:function(){return this.content&&this.content.carousel||{}}},{key:"_playback",get:function(){return this.content&&this.content.playback||{}}},{key:"_orientation",get:function(){var e;return"horizontal"===String((null===(e=this.content)||void 0===e?void 0:e.orientation)||"vertical").toLowerCase()?"horizontal":"vertical"}},{key:"_items",value:function(){return Rp(this.content,this._config)}},{key:"_showViewCount",value:function(){return!1!==this._config.showViewCount}},{key:"_cardId",value:function(e){return"".concat(this._uid,"-").concat(e)}},{key:"_ownsId",value:function(e){return"string"==typeof e&&e.startsWith(this._uid)}},{key:"_itemTitle",value:function(e){return null!=e&&e.title||null!=e&&e.caption||null!=e&&e.name||null!=e&&e.headline?Np(e,0):""}},{key:"_itemMeta",value:function(e){return Up(e)||"0 views"}},{key:"_poster",value:function(e){return jp(Bp(e))}},{key:"_videoHasCaptions",value:function(e){return!!e&&[].concat(Pf(Array.isArray(e.textTracks)?e.textTracks:[]),Pf(Array.isArray(e.captions)?e.captions:[])).some(function(e){var t=(null==e?void 0:e.src)||(null==e?void 0:e.url)||"",n=(null==e?void 0:e.kind)||"captions";return t&&["captions","subtitles"].includes(n)})}},{key:"_buildItemContent",value:function(e,n,i){var r=Af(Af({},this._playback),e),a=!1!==r.captionsActive,s=this._cardId(i);if("preview"===n){var o,u=this._buildPreviewSources(r),l=(null===(o=u[0])||void 0===o?void 0:o.src)||"";return Af(Af(Af({},r),u.length>0?{sources:u,src:l}:{}),{},{coordinationId:s,autoplay:!0,muted:this._previewMuted,loop:!0,controls:!0,preload:"metadata",clipEnd:t.PREVIEW_END_SECONDS,captionsActive:a})}return Af(Af({},r),{},{coordinationId:s,title:this._itemTitle(e)||Np(e,i),sourceOrientation:this._orientation,autoplay:!0,muted:!1,loop:!1,controls:!0,captionsActive:a})}},{key:"_buildPreviewSources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(Array.isArray(t.sources)&&t.sources.length>0?t.sources:t.src?[{src:t.src,type:t.type}]:[]).filter(function(e){return e&&e.src}).map(function(t){return Af(Af({},t),{},{src:e._appendPreviewFragment(t.src)})})}},{key:"_appendPreviewFragment",value:function(e){return"string"==typeof e&&e?e.includes("#")?e:"".concat(e,"#t=0,").concat(t.PREVIEW_END_SECONDS):e}},{key:"_setupAutoPreviewObserver",value:function(){var e=this;"undefined"!=typeof IntersectionObserver&&this._trackEl&&(this._autoPreviewObserver=new IntersectionObserver(function(t){return e._handleAutoPreviewEntries(t)},{root:this._trackEl,threshold:[0,.99,1]}),this.querySelectorAll(".pds-video-carousel__card").forEach(function(t){e._autoPreviewObserver.observe(t)}))}},{key:"_handleAutoPreviewEntries",value:function(e){var t,n,i=this,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=xf(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}(e);try{for(r.s();!(n=r.n()).done;){var a=n.value;a.intersectionRatio>=.99?this._visibleCards.add(a.target):this._visibleCards.delete(a.target)}}catch(e){r.e(e)}finally{r.f()}var s=this.querySelectorAll(".pds-video-carousel__card"),o=null!==(t=Array.from(s).find(function(e){return i._visibleCards.has(e)}))&&void 0!==t?t:null,u=o?Number(o.dataset.index):null;this._setAutoPreviewIndex(u)}},{key:"_setAutoPreviewIndex",value:function(e){if(!this._scrollingByKeyboard&&this._autoPreviewIndex!==e){if(null==this._hoverIndex&&null!=e){var t=Oh();if(t&&!this._ownsId(t))return}null!==this._hoverIndex&&this._hoverIndex===this._autoPreviewIndex&&(this._hoverIndex=null),this._autoPreviewIndex=e,null==this._hoverIndex&&null!=e?this._startPreview(e):null==e&&null==this._hoverIndex&&this._stopPreview(this._hoverIndex)}}},{key:"_cardMode",value:function(e){return null!=this._fullscreenIndex?"default":this._hoverIndex===e||null==this._hoverIndex&&this._autoPreviewIndex===e?"preview":"default"}},{key:"_startPreview",value:function(e){if(null==this._fullscreenIndex&&this._hoverIndex!==e){var t=this._autoPreviewIndex===e;this._hoverIndex=e;var n=this._items()[e];this._previewMuted=!0,t||(this._previewCaptionsActive=this._videoHasCaptions(n)),Lh(this._cardId(e))}}},{key:"_stopPreview",value:function(e){this._hoverIndex===e&&(this._hoverIndex=null)}},{key:"_openFullscreen",value:function(e,t){this._hoverIndex=null,this._fullscreenIndex=e,this._fullscreenTriggerIndex=e,this._fullscreenTriggerEl=(null==t?void 0:t.currentTarget)||this._thumbnailForIndex(e),Lh(this._cardId(e))}},{key:"_closeFullscreen",value:function(){var e,t=this,n=null!==(e=this._fullscreenTriggerIndex)&&void 0!==e?e:this._fullscreenIndex,i=this._fullscreenTriggerEl;this._fullscreenIndex=null,this._fullscreenTriggerIndex=null,this._fullscreenTriggerEl=null,this.updateComplete.then(function(){var e,r=null!=i&&i.isConnected?i:t._thumbnailForIndex(n);null==r||null===(e=r.focus)||void 0===e||e.call(r)})}},{key:"_thumbnailForIndex",value:function(e){return null==e?null:this.querySelector('.pds-video-carousel__card[data-index="'.concat(e,'"] .abs-vw__carousel-thumb'))}},{key:"firstUpdated",value:function(){var e=this;this._trackEl=this.querySelector(".pds-video-carousel__track"),this._trackEl&&(this._trackEl.addEventListener("scroll",this._onScroll,{passive:!0}),this._updateArrowState(),this._setupAutoPreviewObserver()),this._unsubscribe=Dh(function(t){return e._onExternalActive(t)}),null!=this._autoPreviewIndex&&Promise.resolve().then(function(){Oh()||Lh(e._cardId(e._autoPreviewIndex))})}},{key:"updated",value:function(e){var t=this;if(e.has("content")){var n;this._trackEl=this.querySelector(".pds-video-carousel__track"),this._updateArrowState();var i=this._items()[null!==(n=this._autoPreviewIndex)&&void 0!==n?n:0];this._previewCaptionsActive=this._videoHasCaptions(i),this._autoPreviewObserver&&(this._autoPreviewObserver.disconnect(),this._visibleCards.clear(),this._autoPreviewIndex=0,this._setupAutoPreviewObserver(),Promise.resolve().then(function(){var e=Oh();e&&!t._ownsId(e)||Lh(t._cardId(t._autoPreviewIndex))}))}e.has("_fullscreenIndex")&&this._syncFullscreen()}},{key:"disconnectedCallback",value:function(){!function(e,t,n,i){var r=Mf(Rf(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,"disconnectedCallback",this,3)([]),this._trackEl&&this._trackEl.removeEventListener("scroll",this._onScroll),this._autoPreviewObserver&&(this._autoPreviewObserver.disconnect(),this._autoPreviewObserver=null),this._unsubscribe&&(this._unsubscribe(),this._unsubscribe=null),document.removeEventListener("keydown",this._onKeydown),document.removeEventListener("fullscreenchange",this._onFullscreenChange)}},{key:"_syncFullscreen",value:function(){if(null!=this._fullscreenIndex){var e,t;document.addEventListener("keydown",this._onKeydown),document.addEventListener("fullscreenchange",this._onFullscreenChange);var n=this.querySelector(".abs-vw__fs");null==n||null===(e=n.requestFullscreen)||void 0===e||e.call(n).catch(function(){});var i=this.querySelector(".abs-vw__fs-close");null==i||null===(t=i.focus)||void 0===t||t.call(i)}else{var r,a;if(document.removeEventListener("keydown",this._onKeydown),document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.fullscreenElement)null===(r=(a=document).exitFullscreen)||void 0===r||r.call(a).catch(function(){})}}},{key:"_onFullscreenChange",value:function(){document.fullscreenElement||null==this._fullscreenIndex||this._closeFullscreen()}},{key:"_onKeydown",value:function(e){"Escape"===e.key&&this._closeFullscreen()}},{key:"_onScroll",value:function(){this._updateArrowState()}},{key:"_updateArrowState",value:function(){var e=this._trackEl;if(e){var t=e.scrollWidth-e.clientWidth;this._canScrollPrev=e.scrollLeft>2,this._canScrollNext=e.scrollLeft<t-2}}},{key:"_scrollBy",value:function(e){var t=this._trackEl;if(t){var n=t.querySelector(".pds-video-carousel__card"),i=((n?n.getBoundingClientRect().width:t.clientWidth)+8)*this._perView();t.scrollBy({left:e*i,behavior:"smooth"})}}},{key:"_perView",value:function(){return"vertical"===this._orientation?6:4}},{key:"_handlePrev",value:function(e){var t=this._computeFocusTargetIndex("prev");this._hoverIndex=null,this._scrollBy(-1),this._isKeyboardActivation(e)&&(this._scrollingByKeyboard=!0,this._focusAfterScroll(t))}},{key:"_handleNext",value:function(e){var t=this._computeFocusTargetIndex("next");this._hoverIndex=null,this._scrollBy(1),this._isKeyboardActivation(e)&&(this._scrollingByKeyboard=!0,this._focusAfterScroll(t))}},{key:"_isKeyboardActivation",value:function(e){return!(!e||"number"!=typeof e.detail||0!==e.detail)}},{key:"_computeFocusTargetIndex",value:function(e){var t=this.querySelectorAll(".pds-video-carousel__card").length;if(0===t)return 0;var n=Ef(this._visibleIndexRange(),2),i=n[0],r=n[1],a=this._perView();return"next"===e?Math.min(t-1,r+1):Math.max(0,i-a)}},{key:"_focusAfterScroll",value:function(e){var t=this;if(this._trackEl){var n=!1,i=function(){var i;if(!n){n=!0,t._scrollingByKeyboard=!1;var r=t._thumbnailForIndex(e);null==r||null===(i=r.focus)||void 0===i||i.call(r,{preventScroll:!0})}};this._trackEl.addEventListener("scrollend",i,{once:!0}),setTimeout(i,600)}}},{key:"_onRailKeydown",value:function(e){if("Tab"===e.key&&this._trackEl){var t=e.target,n=t&&t.closest?t.closest(".pds-video-carousel__card"):null;if(n){var i=Array.from(this.querySelectorAll(".pds-video-carousel__card")).indexOf(n),r=Ef(this._visibleIndexRange(),2),a=r[0],s=r[1],o=this._focusablesIn(n);if(0!==o.length){if(!e.shiftKey){if(i!==s)return;if(o[o.length-1]!==t)return;if(!this._canScrollNext)return;var u=this.querySelector(".pds-video-carousel__nav-btn--next");if(!u||u.disabled)return;if(null===u.offsetParent)return;return e.preventDefault(),void u.focus()}if(i===a&&o[0]===t&&this._canScrollPrev){var l=this.querySelector(".pds-video-carousel__nav-btn--prev");l&&!l.disabled&&null!==l.offsetParent&&(e.preventDefault(),l.focus())}}}}}},{key:"_focusablesIn",value:function(e){return Array.from(e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not
1([tabindex="-1"])')).filter(function(e){return!e.disabled})}},{key:"_visibleIndexRange",value:function(){var e=this._trackEl;if(!e)return[0,0];var t=Array.from(this.querySelectorAll(".pds-video-carousel__card"));if(0===t.length)return[0,0];var n=e.getBoundingClientRect(),i=-1,r=-1;if(n.width>0&&t.forEach(function(e,t){var a=e.getBoundingClientRect();a.left>=n.left-4&&a.right<=n.right+4&&(-1===i&&(i=t),r=t)}),-1===i){var a=this._perView();return[0,Math.min(t.length,a)-1]}return[i,r]}},{key:"_stopControlEvent",value:function(e){e.preventDefault(),e.stopPropagation()}},{key:"_onExternalActive",value:function(e){this._ownsId(e)||(this._hoverIndex=null,this._autoPreviewIndex=null)}},{key:"_renderSectionHeader",value:function(){var e,t,n,i,r=((null===(e=this.content)||void 0===e?void 0:e.title)||"").trim();if(!r)return"";var a=(null===(t=this.content)||void 0===t?void 0:t.subtitle)||"",s=(null===(n=this.content)||void 0===n?void 0:n.ctaText)||"",o=(null===(i=this.content)||void 0===i?void 0:i.ctaLink)||"",u=function(){if(!o)return"";if(o.startsWith("/"))return o;try{var e=new URL(o).protocol;return"https:"===e||"http:"===e?o:""}catch(e){return""}}();return Vd(of||(of=kf(['\n      <div class="pds-video-carousel__section-header">\n        <div class="pds-video-carousel__section-title-group">\n          <div class="pds-video-carousel__section-title-row">\n            <h2 class="pds-video-carousel__section-title">',"</h2>\n            ","\n          </div>\n          ","\n        </div>\n      </div>\n    "])),r,s&&u?Vd(uf||(uf=kf(['\n              <a class="pds-video-carousel__section-viewall" href="','">',"</a>\n            "])),u,s):"",a?Vd(lf||(lf=kf(['<p class="pds-video-carousel__section-subtitle">',"</p>"])),a):"")}},{key:"render",value:function(){var e,t=this,n=this._items();if(0===n.length)return Vd(cf||(cf=kf([""])));var i=this._config.ariaLabel||(null===(e=this.content)||void 0===e?void 0:e.title)||"Video carousel";return Vd(df||(df=kf(['\n      <div class="pds-video-carousel pds-video-carousel--','" role="region" aria-label="','">\n        ','\n        <div class="pds-video-carousel__rail" @keydown=','>\n          <div class="pds-video-carousel__nav-wrapper">\n            <button\n              class="pds-video-carousel__nav-btn pds-video-carousel__nav-btn--prev"\n              type="button"\n              aria-label="View previous items"\n              ?disabled=',"\n              @click=",'>\n              <span class="pds-video-carousel__nav-icon" aria-hidden="true"></span>\n            </button>\n          </div>\n\n          <div class="pds-video-carousel__track" role="list">\n            ','\n          </div>\n\n          <div class="pds-video-carousel__nav-wrapper">\n            <button\n              class="pds-video-carousel__nav-btn pds-video-carousel__nav-btn--next"\n              type="button"\n              aria-label="View next items"\n              ?disabled=',"\n              @click=",'>\n              <span class="pds-video-carousel__nav-icon" aria-hidden="true"></span>\n            </button>\n          </div>\n        </div>\n\n        ',"\n      </div>\n    "])),this._orientation,i,this._renderSectionHeader(),this._onRailKeydown,!this._canScrollPrev,this._handlePrev,n.map(function(e,i){return t._renderCard(e,i,n.length)}),!this._canScrollNext,this._handleNext,null!=this._fullscreenIndex?this._renderFullscreen(n):"")}},{key:"_renderCard",value:function(e,t,n){var i=this,r=this._cardMode(t),a=this._itemTitle(e)||Np(e,t),s=this._itemMeta(e),o=this._poster(e),u="preview"===r,l="horizontal"===this._orientation?"pds-video-carousel__card-title text-l-sb":"pds-video-carousel__card-title text-m-sb";return Vd(hf||(hf=kf(['\n      <div\n        class="pds-video-carousel__card','"\n        role="listitem"\n        data-index="','"\n        @mouseenter=',"\n        @mouseleave=","\n        @focusin=","\n        @focusout=",'>\n        <div class="pds-video-carousel__media">\n          <div class="pds-video-carousel__placeholder" aria-hidden="true"></div>\n          ',"\n          ","\n          ","\n          ",'\n        </div>\n\n        <div class="pds-video-carousel__info" aria-hidden="true">\n          ',"\n          ","\n        </div>\n      </div>\n    "])),u?" pds-video-carousel__card--active":"",t,function(){return i._startPreview(t)},function(){return i._stopPreview(t)},function(){return i._startPreview(t)},function(e){return i._onCardFocusOut(e,t)},this._renderThumbnail(e,t,a,o),"preview"===r?Vd(pf||(pf=kf(['\n            <div class="abs-vw__carousel-preview" aria-hidden="true">\n              <abs-video-player .content='," ?noInteraction="," @abs-video-ready=","></abs-video-player>\n            </div>\n          "])),this._buildItemContent(e,"preview",t),!0,function(e){return i._onPreviewReady(e,t)}):"",u?this._renderPdsControls():"",a?Vd(ff||(ff=kf(['\n            <div class="pds-video-carousel__scrim" aria-hidden="true">\n              <p class="pds-video-carousel__scrim-title text-m-sb">',"</p>\n            </div>\n          "])),a):"",a?Vd(mf||(mf=kf(['<p class="','">',"</p>"])),l,a):"",this._showViewCount()?Vd(gf||(gf=kf(['\n            <p class="pds-video-carousel__card-views text-m-sb">',"</p>\n          "])),s):"")}},{key:"_renderPdsControls",value:function(){var e=this._previewMuted?"pds_svg_sound_off_outlined_16":"pds_svg_sound_on_outlined_16",t=this._previewCaptionsActive?"pds_svg_closed_caption_on_outlined_16":"pds_svg_closed_caption_off_outlined_16";return Vd(vf||(vf=kf(['\n      <div class="pds-video-carousel__controls">\n        <button\n          class="pds-icon-btn pds-icon-btn-size_small pds-icon-btn-trans
1parent--video d-flex align-items-center justify-content-center"\n          type="button"\n          aria-label="','"\n          @click=','>\n          <span\n            class="',' pds-icon-btn-transparent--video__icon pds-video-carousel__control-icon"\n            aria-hidden="true"></span>\n        </button>\n        <button\n          class="pds-icon-btn pds-icon-btn-size_small pds-icon-btn-transparent--video d-flex align-items-center justify-content-center"\n          type="button"\n          aria-label="','"\n          @click=','>\n          <span\n            class="',' pds-icon-btn-transparent--video__icon pds-video-carousel__control-icon"\n            aria-hidden="true"></span>\n        </button>\n      </div>\n    '])),this._previewMuted?"Unmute video":"Mute video",this._handlePreviewMuteClick,e,this._previewCaptionsActive?"Turn off captions":"Turn on captions",this._handlePreviewCaptionsClick,t)}},{key:"_onPreviewReady",value:function(e,t){this._hoverIndex!==t&&this._autoPreviewIndex!==t||(this._previewCaptionsActive=!0===e.target._hasCaptions)}},{key:"_handlePreviewMuteClick",value:function(e){var t;e.stopPropagation(),this._previewMuted=!this._previewMuted;var n=e.currentTarget.closest('[role="listitem"]'),i=null==n||null===(t=n.querySelector("abs-video-player"))||void 0===t||null===(t=t._player)||void 0===t?void 0:t.player;i&&(i.muted(this._previewMuted),i.volume(this._previewMuted?0:1))}},{key:"_handlePreviewCaptionsClick",value:function(e){e.stopPropagation(),this._previewCaptionsActive=!this._previewCaptionsActive;var t,n,i=e.currentTarget.closest('[role="listitem"]'),r=null==i?void 0:i.querySelector("abs-video-player");r&&(r._captionsActive=this._previewCaptionsActive,null===(t=r._setCaptionMode)||void 0===t||t.call(r,this._previewCaptionsActive),null===(n=r.requestUpdate)||void 0===n||n.call(r))}},{key:"_renderThumbnail",value:function(e,t,n,i){var r=this,a=n?"Play ".concat(n):"Play video ".concat(t+1),s="".concat(a,", opens in video player");return Vd(yf||(yf=kf(['\n      <button\n        type="button"\n        class="abs-vw__carousel-thumb"\n        aria-label="','"\n        aria-haspopup="dialog"\n        @click=',">\n        ",'\n        <span class="abs-vw__carousel-play" aria-hidden="true">\n          <span class="pds_svg_play_outlined_24 pds-icon-btn-transparent--video__icon" aria-hidden="true"></span>\n        </span>\n      </button>\n    '])),s,function(e){return r._openFullscreen(t,e)},i?Vd(_f||(_f=kf(['\n          <img class="abs-vw__carousel-poster" src="','" alt="" aria-hidden="true">\n        '])),i):"")}},{key:"_onCardFocusOut",value:function(e,t){e.currentTarget.contains(e.relatedTarget)||this._stopPreview(t)}},{key:"_navigateFullscreen",value:function(e){var t,n=this._items(),i=(null!==(t=this._fullscreenIndex)&&void 0!==t?t:0)+e;i<0||i>=n.length||(this._fullscreenIndex=i)}},{key:"_renderFullscreen",value:function(e){var t=this,n=this._fullscreenIndex,i=e[n];if(!i)return"";var r=this._itemTitle(i)||Np(i,n),a=n>0,s=n<e.length-1;return Vd(bf||(bf=kf(['\n      <div class="abs-vw__fs" role="dialog" aria-modal="true" aria-label="','">\n        ',"\n      </div>\n    "])),r||"Video player",gp(n,Vd(Tf||(Tf=kf(["\n          <abs-fullscreen-video-player\n            .content=","\n            .hasPrev=","\n            .hasNext=","\n            @fs-close=","\n            @fs-prev=","\n            @fs-next=","></abs-fullscreen-video-player>\n        "])),this._buildItemContent(i,"active",n),a,s,this._closeFullscreen,function(){return t._navigateFullscreen(-1)},function(){return t._navigateFullscreen(1)})))}}])}(oh);function em(e){return em="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},em(e)}function tm(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function nm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function im(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?nm(Object(n),!0).forEach(function(t){hm(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rm(e){return function(e){if(Array.isArray(e))return am(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return am(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?am(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function am(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function sm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,pm(i.key),i)}}function om(e,t,n){return t=cm(t),function(e,t){if(t&&("object"==em(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,um()?Reflect.construct(t,n||[],cm(e).constructor):t.apply(e,n))}function um(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(um=function(){return!!e})()}function lm(){return lm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=cm(e)););return e}(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},lm.apply(null,arguments)}function cm(e){return cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cm(e)}function dm(e,t){return dm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dm(e,t)}function hm(e,t,n){return(t=pm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pm(e){var t=function(e,t){if("object"!=em(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=em(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==em(t)?t:t+""}Uf(Zf,"properties",{content:{type:Object},_hoverIndex:{state:!0},_autoPreviewIndex:{state:!0},_fullscreenIndex:{state:!0},_canScrollPrev:{state:!0},_canScrollNext:{state:!0},_previewMuted:{state:!0},_previewCaptionsActive:{state:!0}}),Uf(Zf,"PREVIEW_END_SECONDS",10),customElements.get("abs-video-carousel")||customElements.define("abs-video-carousel",Zf);var fm,mm,gm,vm,ym,_m,bm=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),hm(e=om(this,t),"content",{}),e._uid="abs-vg-".concat(Math.random().toString(36).slice(2)),e._autoPreviewIndex=0,e._hoverIndex=null,e._fullscreenIndex=null,e._fullscreenTriggerIndex=null,e._fullscreenTriggerEl=null,e._previewMuted=!0,e._previewCaptionsActive=!1,e._unsubscribe=null,e._onKeydown=e._onKeydown.bind(e),e._onFullscreenChange=e._onFullscreenChange.bind(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dm(e,t)}(t,e),function(e,t,n){return t&&sm(e.prototype,t),n&&sm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createRenderRoot",value:function(){return this}},{key:"_config",get:function(){return this.content&&this.content.grid||{}}},{key:"_playback",get:function(){return this.content&&this.content.playback||{}}},{key:"_orientation",get:function(){var e;return"vertical"===String((null===(e=this.content)||void 0===e?void 0:e.orientation)||"horizontal").toLowerCase()?"vertical":"horizontal"}},{key:"_items",value:function(){return Rp(this.content,this._config)}},{key:"_showViewCount",value:function(){return!1!==this._config.showViewCount}},{key:"_cardId",value:function(e){return"".concat(this._uid,"-").concat(e)}},{key:"_ownsId",value:function(e){return"string"==typeof e&&e.startsWith(this._uid)}},{key:"_itemTitle",value:function(e){return null!=e&&e.title||null!=e&&e.caption||null!=e&&e.name||null!=e&&e.headline?Np(e,0):""}},{key:"_itemMeta",value:function(e){return Up(e)||"0 views"}},{key:"_poster",value:function(e){return jp(Bp(e))}},{key:"_videoHasCaptions",value:function(e){return!!e&&[].concat(rm(Array.isArray(e.textTracks)?e.textTracks:[]),rm(Array.isArray(e.captions)?e.captions:[])).some(function(e){var t=(null==e?void 0:e.src)||(null==e?void 0:e.url)||"",n=(null==e?void 0:e.kind)||"captions";return t&&["captions","subtitles"].includes(n)})}},{key:"_cardMode",value:function(e){return null!=this._fullscreenIndex?"default":this._hoverIndex===e||null==this._hoverIndex&&this._autoPreviewIndex===e?"preview":"default"}},{key:"_startPreview",value:function(e){if(null==this._fullscreenIndex&&this._hoverIndex!==e){var t=this._autoPreviewIndex===e;this._hoverIndex=e;var n=this._items()[e];this._previewMuted=!0,t||(this._previewCaptionsActive=this._videoHasCaptions(n)),Lh(this._cardId(e))}}},{key:"_stopPreview",value:function(e){if(this._hoverIndex===e){this._hoverIndex=null;var t=Oh();t&&!this._ownsId(t)||(this._autoPreviewIndex=0)}}},{key:"_onCardFocusOut",value:function(e,t){e.currentTarget.contains(e.relatedTarget)||this._stopPreview(t)}},{key:"_openFullscreen",value:function(e,t){this._hoverIndex=null,this._fullscreenIndex=e,this._fullscreenTriggerIndex=e,this._fullscreenTriggerEl=(null==t?void 0:t.currentTarget)||this._thumbnailForIndex(e),Lh(this._cardId(e))}},{key:"_navigateFullscreen",value:function(e){var t,n=this._items(),i=(null!==(t=this._fullscreenIndex)&&void 0!==t?t:0)+e;i<0||i>=n.length||(this._fullscreenIndex=i)}},{key:"_closeFullscreen",value:function(){var e,t=this,n=null!==(e=this._fullscreenTriggerIndex)&&void 0!==e?e:this._fullscreenIndex,i=this._fullscreenTriggerEl;this._fullscreenIndex=null,this._fullscreenTriggerIndex=null,this._fullscreenTriggerEl=null,this.updateComplete.then(function(){var e,r=null!=i&&i.isConnected?i:t._thumbnailForIndex(n);null==r||null===(e=r.focus)||void 0===e||e.call(r)})}},{key:"_thumbnailForIndex",value:function(e){return null==e?null:this.querySelector('.pds-video-grid__card[data-index="'.concat(e,'"] .abs-vw__grid-thumb'))}},{key:"_syncFullscreen",value:function(){if(null!=this._fullscreenIndex){var e,t;document.addEventListener("keydown",this._onKeydown),document.addEventListener("fullscreenchange",this._onFullscreenChange);var n=this.querySelector(".abs-vw__fs");null==n||null===(e=n.requestFullscreen)||void 0===e||e.call(n).catch(function(){});var i=this.querySelector(".abs-vw__fs-close");null==i||null===(t=i.focus)||void 0===t||t.call(i)}else{var r,a;if(document.removeEventListener("keydown",this._onKeydown),document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.fullscreenElement)null===(r=(a=document).exitFullscreen)||void 0===r||r.call(a).catch(function(){})}}},{key:"_onFullscreenChange",value:function(){document.fullscreenElement||null==this._fullscreenIndex||this._closeFullscreen()}},{key:"_onKeydown",value:function(e){"Escape"===e.key&&this._closeFullscreen()}},{key:"_onExternalActive",value:function(e){this._ownsId(e)||(this._autoPreviewIndex=null,this._hoverIndex=null)}},{key:"_buildPreviewSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(Array.isArray(e.sources)&&e.sources.length>0?e.sources:e.src?[{src:e.src,type:e.type}]:[]).filter(function(e){return e&&e.src}).map(function(e){return im(im({},e),{},{src:e.src.includes("#")?e.src:"".concat(e.src,"#t=0,").concat(t.PREVIEW_END_SECONDS)})})}},{key:"_buildItemContent",value:function(e,n,i){var r=im(im({},this._playback),e),a=!1!==r.captionsActive,s=this._cardId(i);if("preview"===n){var o,u=this._buildPreviewSources(r),l=(null===(o=u[0])||void 0===o?void 0:o.src)||"";return im(im(im({},r),u.length>0?{sources:u,src:l}:{}),{},{coordinationId:s,autoplay:!0,muted:this._previewMuted,loop:!0,controls:!0,preload:"metadata",clipEnd:t.PREVIEW_END_SECONDS,captionsActive:a})}return im(im({},r),{},{coordinationId:s,title:this._itemTitle(e)||Np(e,i),sourceOrientation:this._orientation,autoplay:!0,muted:!1,loop:!1,controls:!0,captionsActive:a})}},{key:"firstUpdated",value:function(){var e=this;this._unsubscribe=Dh(function(t){return e._onExternalActive(t)}),null!=this._autoPreviewIndex&&Promise.resolve().then(function(){Oh()||Lh(e._cardId(e._autoPreviewIndex))})}},{key:"updated",value:function(e){if(e.has("content")){var t,n=this._items()[null!==(t=this._autoPreviewIndex)&&void 0!==t?t:0];this._previewCaptionsActive=this._videoHasCaptions(n)}e.has("_fullscreenIndex")&&this._syncFullscreen()}},{key:"disconnectedCallback",value:function(){!function(e,t,n,i){var r=lm(cm(1&
1i?e.prototype:e),t,n);return 2&i&&"function"==typeof r?function(e){return r.apply(n,e)}:r}(t,"disconnectedCallback",this,3)([]),this._unsubscribe&&(this._unsubscribe(),this._unsubscribe=null),document.removeEventListener("keydown",this._onKeydown),document.removeEventListener("fullscreenchange",this._onFullscreenChange)}},{key:"_onPreviewReady",value:function(e,t){this._hoverIndex!==t&&this._autoPreviewIndex!==t||(this._previewCaptionsActive=!0===e.target._hasCaptions)}},{key:"_handlePreviewMuteClick",value:function(e){var t;e.stopPropagation(),this._previewMuted=!this._previewMuted;var n=e.currentTarget.closest('[role="listitem"]'),i=null==n||null===(t=n.querySelector("abs-video-player"))||void 0===t||null===(t=t._player)||void 0===t?void 0:t.player;i&&(i.muted(this._previewMuted),i.volume(this._previewMuted?0:1))}},{key:"_handlePreviewCaptionsClick",value:function(e){e.stopPropagation(),this._previewCaptionsActive=!this._previewCaptionsActive;var t,n,i=e.currentTarget.closest('[role="listitem"]'),r=null==i?void 0:i.querySelector("abs-video-player");r&&(r._captionsActive=this._previewCaptionsActive,null===(t=r._setCaptionMode)||void 0===t||t.call(r,this._previewCaptionsActive),null===(n=r.requestUpdate)||void 0===n||n.call(r))}},{key:"_renderSectionHeader",value:function(){var e,t,n=((null===(e=this.content)||void 0===e?void 0:e.title)||"").trim();if(!n)return"";var i=(null===(t=this.content)||void 0===t?void 0:t.subtitle)||"";return Vd(jf||(jf=tm(['\n      <div class="pds-video-grid__section-header">\n        <div class="pds-video-grid__section-title-group">\n          <h2 class="pds-video-grid__section-title">',"</h2>\n          ","\n        </div>\n      </div>\n    "])),n,i?Vd(Ff||(Ff=tm(['<p class="pds-video-grid__section-subtitle">',"</p>"])),i):"")}},{key:"render",value:function(){var e,t=this,n=this._items();if(0===n.length)return Vd(qf||(qf=tm([""])));var i=this._config.ariaLabel||(null===(e=this.content)||void 0===e?void 0:e.title)||"Video grid";return Vd(Vf||(Vf=tm(['\n      <div\n        class="pds-video-grid pds-video-grid--','"\n        role="region"\n        aria-label="','">\n\n        ','\n\n        <div class="pds-video-grid__track" role="list">\n          ',"\n        </div>\n\n        ","\n      </div>\n    "])),this._orientation,i,this._renderSectionHeader(),n.map(function(e,n){return t._renderCard(e,n)}),null!=this._fullscreenIndex?this._renderFullscreen(n):"")}},{key:"_renderCard",value:function(e,t){var n=this,i=this._cardMode(t),r=this._itemTitle(e)||Np(e,t),a=this._itemMeta(e),s=this._poster(e),o="preview"===i,u="horizontal"===this._orientation?"pds-video-grid__card-title text-l-sb":"pds-video-grid__card-title text-m-sb";return Vd(Hf||(Hf=tm(['\n      <div\n        class="pds-video-grid__card','"\n        role="listitem"\n        data-index="','"\n        @mouseenter=',"\n        @mouseleave=","\n        @focusin=","\n        @focusout=",'>\n\n        <div class="pds-video-grid__media">\n          <div class="pds-video-grid__placeholder" aria-hidden="true"></div>\n\n          ',"\n\n          ","\n\n          ","\n\n          ",'\n        </div>\n\n        <div class="pds-video-grid__info">\n          ',"\n          ","\n        </div>\n\n      </div>\n    "])),o?" pds-video-grid__card--active":"",t,function(){return n._startPreview(t)},function(){return n._stopPreview(t)},function(){return n._startPreview(t)},function(e){return n._onCardFocusOut(e,t)},this._renderThumbnail(e,t,r,s),o?Vd(Wf||(Wf=tm(['\n            <div class="abs-vw__grid-preview" aria-hidden="true">\n              <abs-video-player .content='," ?noInteraction="," @abs-video-ready=","></abs-video-player>\n            </div>\n          "])),this._buildItemContent(e,"preview",t),!0,function(e){return n._onPreviewReady(e,t)}):"",o?this._renderPreviewControls():"",r?Vd(Gf||(Gf=tm(['\n            <div class="pds-video-grid__scrim" aria-hidden="true">\n              <p class="pds-video-grid__scrim-title text-m-sb">',"</p>\n            </div>\n          "])),r):"",r?Vd($f||($f=tm(['<p class="','">',"</p>"])),u,r):"",this._showViewCount()?Vd(zf||(zf=tm(['\n            <p class="pds-video-grid__card-views text-m-sb">',"</p>\n          "])),a):"")}},{key:"_renderThumbnail",value:function(e,t,n,i){var r=this,a=n?"Play ".concat(n):"Play video ".concat(t+1);return Vd(Kf||(Kf=tm(['\n      <button\n        type="button"\n        class="abs-vw__grid-thumb"\n        aria-label="',', opens in video player"\n        aria-haspopup="dialog"\n        @click=',">
1\n        ",'\n        <span class="abs-vw__carousel-play" aria-hidden="true">\n          <span class="pds_svg_play_outlined_24 pds-icon-btn-transparent--video__icon" aria-hidden="true"></span>\n        </span>\n      </button>\n    '])),a,function(e){return r._openFullscreen(t,e)},i?Vd(Xf||(Xf=tm(['\n          <img class="abs-vw__grid-poster" src="','" alt="" aria-hidden="true">\n        '])),i):"")}},{key:"_renderPreviewControls",value:function(){var e=this._previewMuted?"pds_svg_sound_off_outlined_16":"pds_svg_sound_on_outlined_16",t=this._previewCaptionsActive?"pds_svg_closed_caption_on_outlined_16":"pds_svg_closed_caption_off_outlined_16";return Vd(Yf||(Yf=tm(['\n      <div class="pds-video-carousel__controls">\n        <button\n          class="pds-icon-btn pds-icon-btn-size_small pds-icon-btn-transparent--video d-flex align-items-center justify-content-center"\n          type="button"\n          aria-label="','"\n          @click=','>\n          <span\n            class="',' pds-icon-btn-transparent--video__icon pds-video-carousel__control-icon"\n            aria-hidden="true"></span>\n        </button>\n        <button\n          class="pds-icon-btn pds-icon-btn-size_small pds-icon-btn-transparent--video d-flex align-items-center justify-content-center"\n          type="button"\n          aria-label="','"\n          @click=','>\n          <span\n            class="',' pds-icon-btn-transparent--video__icon pds-video-carousel__control-icon"\n            aria-hidden="true"></span>\n        </button>\n      </div>\n    '])),this._previewMuted?"Unmute video":"Mute video",this._handlePreviewMuteClick,e,this._previewCaptionsActive?"Turn off captions":"Turn on captions",this._handlePreviewCaptionsClick,t)}},{key:"_renderFullscreen",value:function(e){var t=this,n=this._fullscreenIndex,i=e[n];if(!i)return"";var r=this._itemTitle(i)||Np(i,n),a=n>0,s=n<e.length-1;return Vd(Qf||(Qf=tm(['\n      <div class="abs-vw__fs" role="dialog" aria-modal="true" aria-label="','">\n        ',"\n      </div>\n    "])),r||"Video player",gp(n,Vd(Jf||(Jf=tm(["\n          <abs-fullscreen-video-player\n            .content=","\n            .hasPrev=","\n            .hasNext=","\n            @fs-close=","\n            @fs-prev=","\n            @fs-next=","></abs-fullscreen-video-player>\n        "])),this._buildItemContent(i,"active",n),a,s,this._closeFullscreen,function(){return t._navigateFullscreen(-1)},function(){return t._navigateFullscreen(1)})))}}])}(oh);function Tm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function wm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Tm(Object(n),!0).forEach(function(t){Im(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Sm(e){return Sm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sm(e)}function km(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Em(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Om(i.key),i)}}function Cm(e,t,n){return t=Pm(t),function(e,t){if(t&&("object"==Sm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Am()?Reflect.construct(t,n||[],Pm(e).constructor):t.apply(e,n))}function Am(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Am=function(){return!!e})()}function Pm(e){return Pm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pm(e)}function xm(e,t){return xm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xm(e,t)}function Im(e,t,n){return(t=Om(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}
1function Om(e){var t=function(e,t){if("object"!=Sm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=Sm(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Sm(t)?t:t+""}hm(bm,"properties",{content:{type:Object},_autoPreviewIndex:{state:!0},_hoverIndex:{state:!0},_fullscreenIndex:{state:!0},_previewMuted:{state:!0},_previewCaptionsActive:{state:!0}}),hm(bm,"PREVIEW_END_SECONDS",10),customElements.get("abs-video-grid")||customElements.define("abs-video-grid",bm);var Lm=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=Cm(this,t)).content=null,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xm(e,t)}(t,e),function(e,t,n){return t&&Em(e.prototype,t),n&&Em(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"createRenderRoot",value:function(){return this}},{key:"render",value:function(){var e=this._normalizeContent(this.content),t=this._normalizeDesignType(null==e?void 0:e.designType),n="carousel"===t&&Rp(e,null==e?void 0:e.carousel).length>0,i="grid"===t&&Rp(e,null==e?void 0:e.grid).length>0;return e&&(e.src||n||i||this._isSponsoredOnlyContent(e))?Vd(mm||(mm=km(['\n      <div\n        class="abs-vw abs-vw--','"\n        data-design-type="','">\n        ',"\n      </div>\n    "])),t,t,this._renderLayout(t,e)):Vd(fm||(fm=km([""])))}},{key:"_renderLayout",value:function(e,t){switch(e){case"story-block":return Vd(gm||(gm=km(["\n          <abs-video-story-block\n            .content=",">\n          </abs-video-story-block>\n        "])),t);case"carousel":return Vd(vm||(vm=km(["\n          <abs-video-carousel\n            .content=",">\n          </abs-video-carousel>\n        "])),t);case"grid":return Vd(ym||(ym=km(["\n          <abs-video-grid\n            .content=",">\n          </abs-video-grid>\n        "])),t);default:return Vd(_m||(_m=km(["\n          <abs-video-player\n            .content=",">\n          </abs-video-player>\n        "])),t)}}},{key:"_normalizeContent",value:function(e){if(!e||"object"!==Sm(e))return null;if(Array.isArray(e.videos)&&e.videos.length>0){var t=e.videos[0]||{},n=e.playback||{},i=Array.isArray(t.sources)&&t.sources.length>0?t.sources[0]:null;return wm(wm(wm(wm({},e),n),t),{},{title:e.title||"",subtitle:e.subtitle||"",ctaText:e.ctaText||"",ctaLink:e.ctaLink||"",src:(null==i?void 0:i.src)||t.src||"",type:(null==i?void 0:i.type)||t.type||"",sources:Array.isArray(t.sources)?t.sources:[]})}return e}},{key:"_normalizeDesignType",value:function(e){return function(e){var t=String(e||"inline").trim().toLowerCase();return"carosel"===t?"carousel":t}(e)}},{key:"_isSponsoredOnlyContent",value:function(e){return Dp(e)}}])}(oh);Im(Lm,"properties",{content:{type:Object,attribute:"data-content",converter:{fromAttribute:function(e){try{return JSON.parse(e)}catch(e){return console.warn("[abs-video-wrapper] Invalid JSON in data-content",e),null}}}}}),customElements.get("abs-video-wrapper")||customElements.define("abs-video-wrapper",Lm);var Dm="abs-video-player-theme-styles";function Mm(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"!=typeof window&&window.location.hostname||"",n="string"==typeof t?null===(e=t.split(".")[1])||void 0===e?void 0:e.toLowerCase():"";return Qc[n]||"neutral"}!function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Mm();if("undefined"==typeof document)return t;var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Mm();return Ic("theme/".concat("ecom-video-player-styles_").concat(e,".css"))}(t),i=document.getElementById(Dm);(null===(e=i)||void 0===e?void 0:e.getAttribute("data-theme"))===t||(i||((i=document.createElement("link")).id=Dm,i.rel="stylesheet",document.head.appendChild(i)),i.setAttribute("data-theme",t),i.href=n)}();const Rm=Lm})(),i=i.default})());

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.