@vouchfor/embeds 0.0.0-experiment.79ff9cf → 0.0.0-experiment.88ebbc0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embeds.iife.js","sources":["../../../../node_modules/@lit/reactive-element/css-tag.js","../../../../node_modules/@lit/reactive-element/reactive-element.js","../../node_modules/lit-html/lit-html.js","../../../../node_modules/lit-html/lit-html.js","../../../../node_modules/lit-element/lit-element.js","../../../../node_modules/@lit/reactive-element/decorators/custom-element.js","../../../../node_modules/@lit/reactive-element/decorators/property.js","../../../../node_modules/@lit/reactive-element/decorators/state.js","../../../../node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","../../node_modules/lit-html/directives/if-defined.js","../../node_modules/lit-html/directive-helpers.js","../../node_modules/lit-html/directive.js","../../node_modules/lit-html/async-directive.js","../../node_modules/lit-html/directives/ref.js","../../src/utils/events.ts","../../src/components/Embed/controllers/event-forwarder.ts","../../../../node_modules/@lit/task/node_modules/@lit/reactive-element/css-tag.js","../../../../node_modules/@lit/task/node_modules/@lit/reactive-element/reactive-element.js","../../../../node_modules/@lit/task/task.js","../../src/utils/env.ts","../../src/components/Embed/controllers/fetcher.ts","../../node_modules/uuid/dist/esm-browser/rng.js","../../node_modules/uuid/dist/esm-browser/stringify.js","../../node_modules/uuid/dist/esm-browser/native.js","../../node_modules/uuid/dist/esm-browser/v4.js","../../src/components/Embed/controllers/tracking.ts","../../../../node_modules/squirrelly/dist/squirrelly.es.js","../../../../node_modules/cross-fetch/dist/browser-ponyfill.js","../../../canvas-video/dist/canvas-video.js","../../../../node_modules/lit-html/directive.js","../../../../node_modules/lit-html/directives/class-map.js","../../../../node_modules/lit-html/directives/if-defined.js","../../../../node_modules/lit-html/directive-helpers.js","../../../../node_modules/lit-html/async-directive.js","../../../../node_modules/lit-html/directives/ref.js","../../../../node_modules/flat/index.js","../../../../node_modules/lit-html/directives/repeat.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/enums.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/math.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/userAgent.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/within.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getVariation.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/flip.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/hide.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/offset.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/debounce.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/createPopper.js","../../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/popper.js","../../../../node_modules/tippy.js/dist/tippy.esm.js","../../../media-player/dist/media-player.js","../../src/components/Embed/index.ts","../../../../node_modules/path-browserify/index.js","../../../../node_modules/skia-canvas/lib/io.js","../../../../node_modules/skia-canvas/lib/browser.js"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=window,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class o{constructor(t,e,n){if(this._$cssResult$=!0,n!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=n.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new o(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,s,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[n+1]),t[0]);return new o(n,t,s)},S=(s,n)=>{e?s.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement(\"style\"),o=t.litNonce;void 0!==o&&n.setAttribute(\"nonce\",o),n.textContent=e.cssText,s.appendChild(n)}))},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{o as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as i}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var s;const e=window,r=e.trustedTypes,h=r?r.emptyScript:\"\",o=e.reactiveElementPolyfillSupport,n={toAttribute(t,i){switch(i){case Boolean:t=t?h:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},a=(t,i)=>i!==t&&(i==i||t==t),l={attribute:!0,type:String,converter:n,reflect:!1,hasChanged:a},d=\"finalized\";class u extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Ep(s,i);void 0!==e&&(this._$Ev.set(e,s),t.push(e))})),t}static createProperty(t,i=l){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=\"symbol\"==typeof t?Symbol():\"__\"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l}static finalize(){if(this.hasOwnProperty(d))return!1;this[d]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty(\"properties\")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(t(i))}else void 0!==i&&s.push(t(i));return s}static _$Ep(t,i){const s=i.attribute;return!1===s?void 0:\"string\"==typeof s?s:\"string\"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return i(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$EO(t,i,s=l){var e;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const h=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:n).toAttribute(i,s.type);this._$El=t,null==h?this.removeAttribute(r):this.setAttribute(r,h),this._$El=null}}_$AK(t,i){var s;const e=this.constructor,r=e._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=e.getPropertyOptions(r),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:n;this._$El=r,this[r]=h.fromAttribute(i,t.type),this._$El=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||a)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}u[d]=!0,u.elementProperties=new Map,u.elementStyles=[],u.shadowRootOptions={mode:\"open\"},null==o||o({ReactiveElement:u}),(null!==(s=e.reactiveElementVersions)&&void 0!==s?s:e.reactiveElementVersions=[]).push(\"1.6.2\");export{u as ReactiveElement,n as defaultConverter,a as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t;const i=window,s=i.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,o=\"$lit$\",n=`lit$${(Math.random()+\"\").slice(9)}$`,l=\"?\"+n,h=`<${l}>`,r=document,u=()=>r.createComment(\"\"),d=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,c=Array.isArray,v=t=>c(t)||\"function\"==typeof(null==t?void 0:t[Symbol.iterator]),a=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\\\s\"'>=/]+)(${a}*=${a}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),b=w(2),T=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1);function P(t,i){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,e=[];let l,r=2===i?\"<svg>\":\"\",u=f;for(let i=0;i<s;i++){const s=t[i];let d,c,v=-1,a=0;for(;a<s.length&&(u.lastIndex=a,c=u.exec(s),null!==c);)a=u.lastIndex,u===f?\"!--\"===c[1]?u=_:void 0!==c[1]?u=m:void 0!==c[2]?(y.test(c[2])&&(l=RegExp(\"</\"+c[2],\"g\")),u=p):void 0!==c[3]&&(u=p):u===p?\">\"===c[0]?(u=null!=l?l:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,d=c[1],u=void 0===c[3]?p:'\"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,l=void 0);const w=u===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";r+=u===f?s+h:v>=0?(e.push(d),s.slice(0,v)+o+s.slice(v)+n+w):s+n+(-2===v?(e.push(void 0),i):w)}return[P(t,r+(t[s]||\"<?>\")+(2===i?\"</svg>\":\"\")),e]};class N{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,d=0;const c=t.length-1,v=this.parts,[a,f]=V(t,i);if(this.el=N.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(h=C.nextNode())&&v.length<c;){if(1===h.nodeType){if(h.hasAttributes()){const t=[];for(const i of h.getAttributeNames())if(i.endsWith(o)||i.startsWith(n)){const s=f[d++];if(t.push(i),void 0!==s){const t=h.getAttribute(s.toLowerCase()+o).split(n),i=/([.?@])?(.*)/.exec(s);v.push({type:1,index:r,name:i[2],strings:t,ctor:\".\"===i[1]?H:\"?\"===i[1]?L:\"@\"===i[1]?z:k})}else v.push({type:6,index:r})}for(const i of t)h.removeAttribute(i)}if(y.test(h.tagName)){const t=h.textContent.split(n),i=t.length-1;if(i>0){h.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)h.append(t[s],u()),C.nextNode(),v.push({type:2,index:++r});h.append(t[i],u())}}}else if(8===h.nodeType)if(h.data===l)v.push({type:2,index:r});else{let t=-1;for(;-1!==(t=h.data.indexOf(n,t+1));)v.push({type:7,index:r}),t+=n.length-1}r++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function S(t,i,s=t,e){var o,n,l,h;if(i===T)return i;let r=void 0!==e?null===(o=s._$Co)||void 0===o?void 0:o[e]:s._$Cl;const u=d(i)?void 0:i._$litDirective$;return(null==r?void 0:r.constructor)!==u&&(null===(n=null==r?void 0:r._$AO)||void 0===n||n.call(r,!1),void 0===u?r=void 0:(r=new u(t),r._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Co)&&void 0!==l?l:h._$Co=[])[e]=r:s._$Cl=r),void 0!==r&&(i=S(t,r._$AS(t,i.values),r,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:r).importNode(s,!0);C.currentNode=o;let n=C.nextNode(),l=0,h=0,u=e[0];for(;void 0!==u;){if(l===u.index){let i;2===u.type?i=new R(n,n.nextSibling,this,t):1===u.type?i=new u.ctor(n,u.name,u.strings,this,t):6===u.type&&(i=new Z(n,this,t)),this._$AV.push(i),u=e[++h]}l!==(null==u?void 0:u.index)&&(n=C.nextNode(),l++)}return C.currentNode=r,o}v(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class R{constructor(t,i,s,e){var o;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cp=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),d(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):v(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==A&&d(this._$AH)?this._$AA.nextSibling.data=t:this.$(r.createTextNode(t)),this._$AH=t}g(t){var i;const{values:s,_$litType$:e}=t,o=\"number\"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=N.createElement(P(e.h,e.h[0]),this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.v(s);else{const t=new M(o,this),i=t.u(this.options);t.v(s),this.$(i),this._$AH=t}}_$AC(t){let i=E.get(t.strings);return void 0===i&&E.set(t.strings,i=new N(t)),i}T(t){c(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new R(this.k(u()),this.k(u()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class k{constructor(t,i,s,e,o){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=S(this,t,i,0),n=!d(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=S(this,e[s+l],i,l),h===T&&(h=this._$AH[l]),n||(n=!d(h)||h!==this._$AH[l]),h===A?t=A:t!==A&&(t+=(null!=h?h:\"\")+o[l+1]),this._$AH[l]=h}n&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:\"\")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}const I=s?s.emptyScript:\"\";class L extends k{constructor(){super(...arguments),this.type=4}j(t){t&&t!==A?this.element.setAttribute(this.name,I):this.element.removeAttribute(this.name)}}class z extends k{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=S(this,t,i,0))&&void 0!==s?s:A)===T)return;const e=this._$AH,o=t===A&&e!==A||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==A&&(e===A||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;\"function\"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const j={O:o,P:n,A:l,C:1,M:V,L:M,R:v,D:S,I:R,V:k,H:L,N:z,U:H,F:Z},B=i.litHtmlPolyfillSupport;null==B||B(N,R),(null!==(t=i.litHtmlVersions)&&void 0!==t?t:i.litHtmlVersions=[]).push(\"2.8.0\");const D=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new R(i.insertBefore(u(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l};export{j as _$LH,x as html,T as noChange,A as nothing,D as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t;const i=window,s=i.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,o=\"$lit$\",n=`lit$${(Math.random()+\"\").slice(9)}$`,l=\"?\"+n,h=`<${l}>`,r=document,d=()=>r.createComment(\"\"),u=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,c=Array.isArray,v=t=>c(t)||\"function\"==typeof(null==t?void 0:t[Symbol.iterator]),a=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\\\s\"'>=/]+)(${a}*=${a}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),b=w(2),T=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1),P=(t,i)=>{const s=t.length-1,l=[];let r,d=2===i?\"<svg>\":\"\",u=f;for(let i=0;i<s;i++){const s=t[i];let e,c,v=-1,a=0;for(;a<s.length&&(u.lastIndex=a,c=u.exec(s),null!==c);)a=u.lastIndex,u===f?\"!--\"===c[1]?u=_:void 0!==c[1]?u=m:void 0!==c[2]?(y.test(c[2])&&(r=RegExp(\"</\"+c[2],\"g\")),u=p):void 0!==c[3]&&(u=p):u===p?\">\"===c[0]?(u=null!=r?r:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,e=c[1],u=void 0===c[3]?p:'\"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,r=void 0);const w=u===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";d+=u===f?s+h:v>=0?(l.push(e),s.slice(0,v)+o+s.slice(v)+n+w):s+n+(-2===v?(l.push(void 0),i):w)}const c=d+(t[s]||\"<?>\")+(2===i?\"</svg>\":\"\");if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return[void 0!==e?e.createHTML(c):c,l]};class V{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,u=0;const c=t.length-1,v=this.parts,[a,f]=P(t,i);if(this.el=V.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(h=C.nextNode())&&v.length<c;){if(1===h.nodeType){if(h.hasAttributes()){const t=[];for(const i of h.getAttributeNames())if(i.endsWith(o)||i.startsWith(n)){const s=f[u++];if(t.push(i),void 0!==s){const t=h.getAttribute(s.toLowerCase()+o).split(n),i=/([.?@])?(.*)/.exec(s);v.push({type:1,index:r,name:i[2],strings:t,ctor:\".\"===i[1]?k:\"?\"===i[1]?I:\"@\"===i[1]?L:R})}else v.push({type:6,index:r})}for(const i of t)h.removeAttribute(i)}if(y.test(h.tagName)){const t=h.textContent.split(n),i=t.length-1;if(i>0){h.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)h.append(t[s],d()),C.nextNode(),v.push({type:2,index:++r});h.append(t[i],d())}}}else if(8===h.nodeType)if(h.data===l)v.push({type:2,index:r});else{let t=-1;for(;-1!==(t=h.data.indexOf(n,t+1));)v.push({type:7,index:r}),t+=n.length-1}r++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function N(t,i,s=t,e){var o,n,l,h;if(i===T)return i;let r=void 0!==e?null===(o=s._$Co)||void 0===o?void 0:o[e]:s._$Cl;const d=u(i)?void 0:i._$litDirective$;return(null==r?void 0:r.constructor)!==d&&(null===(n=null==r?void 0:r._$AO)||void 0===n||n.call(r,!1),void 0===d?r=void 0:(r=new d(t),r._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Co)&&void 0!==l?l:h._$Co=[])[e]=r:s._$Cl=r),void 0!==r&&(i=N(t,r._$AS(t,i.values),r,e)),i}class S{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:r).importNode(s,!0);C.currentNode=o;let n=C.nextNode(),l=0,h=0,d=e[0];for(;void 0!==d;){if(l===d.index){let i;2===d.type?i=new M(n,n.nextSibling,this,t):1===d.type?i=new d.ctor(n,d.name,d.strings,this,t):6===d.type&&(i=new z(n,this,t)),this._$AV.push(i),d=e[++h]}l!==(null==d?void 0:d.index)&&(n=C.nextNode(),l++)}return C.currentNode=r,o}v(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class M{constructor(t,i,s,e){var o;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cp=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=N(this,t,i),u(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):v(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==A&&u(this._$AH)?this._$AA.nextSibling.data=t:this.$(r.createTextNode(t)),this._$AH=t}g(t){var i;const{values:s,_$litType$:e}=t,o=\"number\"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=V.createElement(e.h,this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.v(s);else{const t=new S(o,this),i=t.u(this.options);t.v(s),this.$(i),this._$AH=t}}_$AC(t){let i=E.get(t.strings);return void 0===i&&E.set(t.strings,i=new V(t)),i}T(t){c(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new M(this.k(d()),this.k(d()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class R{constructor(t,i,s,e,o){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=N(this,t,i,0),n=!u(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=N(this,e[s+l],i,l),h===T&&(h=this._$AH[l]),n||(n=!u(h)||h!==this._$AH[l]),h===A?t=A:t!==A&&(t+=(null!=h?h:\"\")+o[l+1]),this._$AH[l]=h}n&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:\"\")}}class k extends R{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}const H=s?s.emptyScript:\"\";class I extends R{constructor(){super(...arguments),this.type=4}j(t){t&&t!==A?this.element.setAttribute(this.name,H):this.element.removeAttribute(this.name)}}class L extends R{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=N(this,t,i,0))&&void 0!==s?s:A)===T)return;const e=this._$AH,o=t===A&&e!==A||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==A&&(e===A||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;\"function\"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t)}}const Z={O:o,P:n,A:l,C:1,M:P,L:S,D:v,R:N,I:M,V:R,H:I,N:L,U:k,F:z},j=i.litHtmlPolyfillSupport;null==j||j(V,M),(null!==(t=i.litHtmlVersions)&&void 0!==t?t:i.litHtmlVersions=[]).push(\"2.7.4\");const B=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new M(i.insertBefore(d(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l};export{Z as _$LH,x as html,T as noChange,A as nothing,B as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var l,o;const r=t;class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return i}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});const h={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push(\"3.3.2\");export{s as LitElement,r as UpdatingElement,h as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=e=>n=>\"function\"==typeof n?((e,n)=>(customElements.define(e,n),n))(e,n):((e,n)=>{const{kind:t,elements:s}=n;return{kind:t,elements:s,finisher(n){customElements.define(e,n)}}})(e,n);export{e as customElement};\n//# sourceMappingURL=custom-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst i=(i,e)=>\"method\"===e.kind&&e.descriptor&&!(\"value\"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i)}}:{kind:\"field\",key:Symbol(),placement:\"own\",descriptor:{},originalKey:e.key,initializer(){\"function\"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,i)}},e=(i,e,n)=>{e.constructor.createProperty(n,i)};function n(n){return(t,o)=>void 0!==o?e(n,t,o):i(n,t)}export{n as property};\n//# sourceMappingURL=property.js.map\n","import{property as r}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function t(t){return r({...t,state:!0})}export{t as state};\n//# sourceMappingURL=state.js.map\n","import{decorateProperty as o}from\"./base.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var n;const e=null!=(null===(n=window.HTMLSlotElement)||void 0===n?void 0:n.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE));function l(n){const{slot:l,selector:t}=null!=n?n:{};return o({descriptor:o=>({get(){var o;const r=\"slot\"+(l?`[name=${l}]`:\":not([name])\"),i=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(r),s=null!=i?e(i,n):[];return t?s.filter((o=>o.matches(t))):s},enumerable:!0,configurable:!0})})}export{l as queryAssignedElements};\n//# sourceMappingURL=query-assigned-elements.js.map\n","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const l=l=>null!=l?l:t;export{l as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","import{_$LH as o}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{I:l}=o,i=o=>null===o||\"object\"!=typeof o&&\"function\"!=typeof o,n={HTML:1,SVG:2},t=(o,l)=>void 0===l?void 0!==(null==o?void 0:o._$litType$):(null==o?void 0:o._$litType$)===l,v=o=>{var l;return null!=(null===(l=null==o?void 0:o._$litType$)||void 0===l?void 0:l.h)},d=o=>void 0!==(null==o?void 0:o._$litDirective$),u=o=>null==o?void 0:o._$litDirective$,e=o=>void 0===o.strings,r=()=>document.createComment(\"\"),c=(o,i,n)=>{var t;const v=o._$AA.parentNode,d=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=v.insertBefore(r(),d),t=v.insertBefore(r(),d);n=new l(i,t,o,o.options)}else{const l=n._$AB.nextSibling,i=n._$AM,u=i!==o;if(u){let l;null===(t=n._$AQ)||void 0===t||t.call(n,o),n._$AM=o,void 0!==n._$AP&&(l=o._$AU)!==i._$AU&&n._$AP(l)}if(l!==d||u){let o=n._$AA;for(;o!==l;){const l=o.nextSibling;v.insertBefore(o,d),o=l}}}return n},f=(o,l,i=o)=>(o._$AI(l,i),o),s={},a=(o,l=s)=>o._$AH=l,m=o=>o._$AH,p=o=>{var l;null===(l=o._$AP)||void 0===l||l.call(o,!1,!0);let i=o._$AA;const n=o._$AB.nextSibling;for(;i!==n;){const o=i.nextSibling;i.remove(),i=o}},h=o=>{o._$AR()};export{n as TemplateResultType,h as clearPart,m as getCommittedValue,u as getDirectiveClass,c as insertPart,v as isCompiledTemplateResult,d as isDirectiveResult,i as isPrimitive,e as isSingleExpression,t as isTemplateResult,p as removePart,f as setChildPartValue,a as setCommittedValue};\n//# sourceMappingURL=directive-helpers.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{isSingleExpression as i}from\"./directive-helpers.js\";import{Directive as t,PartType as e}from\"./directive.js\";export{Directive,PartType,directive}from\"./directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=(i,t)=>{var e,o;const r=i._$AN;if(void 0===r)return!1;for(const i of r)null===(o=(e=i)._$AO)||void 0===o||o.call(e,t,!1),s(i,t);return!0},o=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t}while(0===(null==e?void 0:e.size))},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),l(t)}};function n(i){void 0!==this._$AN?(o(this),this._$AM=i,r(this)):this._$AM=i}function h(i,t=!1,e=0){const r=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(t)if(Array.isArray(r))for(let i=e;i<r.length;i++)s(r[i],!1),o(r[i]);else null!=r&&(s(r,!1),o(r));else s(this,i)}const l=i=>{var t,s,o,r;i.type==e.CHILD&&(null!==(t=(o=i)._$AP)&&void 0!==t||(o._$AP=h),null!==(s=(r=i)._$AQ)&&void 0!==s||(r._$AQ=n))};class c extends t{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU}_$AO(i,t=!0){var e,r;i!==this.isConnected&&(this.isConnected=i,i?null===(e=this.reconnected)||void 0===e||e.call(this):null===(r=this.disconnected)||void 0===r||r.call(this)),t&&(s(this,i),o(this))}setValue(t){if(i(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}export{c as AsyncDirective};\n//# sourceMappingURL=async-directive.js.map\n","import{nothing as i}from\"../lit-html.js\";import{AsyncDirective as t}from\"../async-directive.js\";import{directive as s}from\"../directive.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=()=>new o;class o{}const h=new WeakMap,n=s(class extends t{render(t){return i}update(t,[s]){var e;const o=s!==this.G;return o&&void 0!==this.G&&this.ot(void 0),(o||this.rt!==this.lt)&&(this.G=s,this.dt=null===(e=t.options)||void 0===e?void 0:e.host,this.ot(this.lt=t.element)),i}ot(i){var t;if(\"function\"==typeof this.G){const s=null!==(t=this.dt)&&void 0!==t?t:globalThis;let e=h.get(s);void 0===e&&(e=new WeakMap,h.set(s,e)),void 0!==e.get(this.G)&&this.G.call(this.dt,void 0),e.set(this.G,i),void 0!==i&&this.G.call(this.dt,i)}else this.G.value=i}get rt(){var i,t,s;return\"function\"==typeof this.G?null===(t=h.get(null!==(i=this.dt)&&void 0!==i?i:globalThis))||void 0===t?void 0:t.get(this.G):null===(s=this.G)||void 0===s?void 0:s.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});export{e as createRef,n as ref};\n//# sourceMappingURL=ref.js.map\n","function forwardEvent(type: string, fromElement: HTMLElement, toElement: HTMLElement) {\n function forwarder(event: Event) {\n toElement.dispatchEvent(new CustomEvent(event.type, event));\n }\n\n fromElement.addEventListener(type, forwarder);\n\n return () => {\n fromElement.removeEventListener(type, forwarder);\n };\n}\n\nexport { forwardEvent };\n","import { createRef, ref } from 'lit/directives/ref.js';\n\nimport type { Embed } from '..';\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport type { Ref } from 'lit/directives/ref.js';\n\nimport { forwardEvent } from '~/utils/events';\n\ntype EmbedHost = ReactiveControllerHost & Embed;\n\nclass EventForwardController implements ReactiveController {\n host: EmbedHost;\n\n private _events: string[] = [];\n private _cleanup: (() => void)[] = [];\n private _forwardElementRef: Ref<HTMLElement> = createRef();\n\n constructor(host: EmbedHost, events: string[]) {\n this.host = host;\n this._events = events;\n host.addController(this);\n }\n\n register() {\n return ref(this._forwardElementRef);\n }\n\n hostConnected() {\n // Guaranteed to have the element ref in the RAF callback because of how the lit lifecycle works\n requestAnimationFrame(() => {\n this._events.forEach((event) => {\n if (this._forwardElementRef.value) {\n this._cleanup.push(forwardEvent(event, this._forwardElementRef.value, this.host));\n }\n });\n });\n }\n\n hostDisconnected() {\n this._cleanup.forEach((fn) => {\n fn();\n });\n this._cleanup = [];\n }\n}\n\nexport { EventForwardController };\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:r,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...h(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$Eg=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$ES??=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$ES?.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$ES?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$ES?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EO(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null}}requestUpdate(t,s,i,e=!1,r){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(e?r:this[t],s))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$Eg=this._$EP())}C(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.C(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$ES?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$ET()}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$ES?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EO(t,this[t]))),this._$ET()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:\"open\"},b[d(\"elementProperties\")]=new Map,b[d(\"finalized\")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push(\"2.0.0\");export{b as ReactiveElement,u as defaultConverter,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","import{notEqual as t}from\"@lit/reactive-element\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},i=Symbol();class h{get taskComplete(){return this.t||(1===this.status?this.t=new Promise(((t,s)=>{this.i=t,this.o=s})):3===this.status?this.t=Promise.reject(this.h):this.t=Promise.resolve(this.l)),this.t}constructor(t,s,i){this.u=0,this.status=0,(this.p=t).addController(this);const h=\"object\"==typeof s?s:{task:s,args:i};this._=h.task,this.v=h.args,this.j=h.argsEqual??r,this.m=h.onComplete,this.g=h.onError,this.autoRun=h.autoRun??!0,\"initialValue\"in h&&(this.l=h.initialValue,this.status=2,this.k=this.A?.())}hostUpdate(){!0===this.autoRun&&this.O()}hostUpdated(){\"afterUpdate\"===this.autoRun&&this.O()}A(){if(void 0===this.v)return;const t=this.v();if(!Array.isArray(t))throw Error(\"The args function must return an array\");return t}async O(){const t=this.A(),s=this.k;this.k=t,t===s||void 0===t||void 0!==s&&this.j(s,t)||await this.run(t)}async run(t){let s,h;t??=this.A(),this.k=t,1===this.status?this.T?.abort():(this.t=void 0,this.i=void 0,this.o=void 0),this.status=1,\"afterUpdate\"===this.autoRun?queueMicrotask((()=>this.p.requestUpdate())):this.p.requestUpdate();const r=++this.u;this.T=new AbortController;let e=!1;try{s=await this._(t,{signal:this.T.signal})}catch(t){e=!0,h=t}if(this.u===r){if(s===i)this.status=0;else{if(!1===e){try{this.m?.(s)}catch{}this.status=2,this.i?.(s)}else{try{this.g?.(h)}catch{}this.status=3,this.o?.(h)}this.l=s,this.h=h}this.p.requestUpdate()}}abort(t){1===this.status&&this.T?.abort(t)}get value(){return this.l}get error(){return this.h}render(t){switch(this.status){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error(\"Unexpected status: \"+this.status)}}}const r=(s,i)=>s===i||s.length===i.length&&s.every(((s,h)=>!t(s,i[h])));export{h as Task,s as TaskStatus,i as initialState,r as shallowArrayEquals};\n//# sourceMappingURL=task.js.map\n","type Environment = 'dev' | 'staging' | 'prod';\n\ntype GetEnvUrlsReturn = {\n marketingUrl: string;\n videoUrl: string;\n publicApiUrl: string;\n embedApiUrl: string;\n publicRecorderUrl: string;\n};\n\nconst marketingUrl = 'https://vouchfor.com';\n\nconst devVideoUrl = 'https://d2rxhdlm2q91uk.cloudfront.net';\nconst stagingVideoUrl = 'https://d1ix11aj5kfygl.cloudfront.net';\nconst prodVideoUrl = 'https://d157jlwnudd93d.cloudfront.net';\n\nconst devPublicApiUrl = 'https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev';\nconst stagingPublicApiUrl = 'https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging';\nconst prodPublicApiUrl = 'https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod';\n\nconst devEmbedApiUrl = 'https://embed-dev.vouchfor.com/v2';\nconst stagingEmbedApiUrl = 'https://embed-staging.vouchfor.com/v2';\nconst prodEmbedApiUrl = 'https://embed.vouchfor.com/v2';\n\nconst devPublicRecorderUrl = 'https://dev.vouchfor.com';\nconst stagingPublicRecorderUrl = 'https://staging.vouchfor.com';\nconst prodPublicRecorderUrl = 'https://app.vouchfor.com';\n\n// We are handling the case where env is an unknown string so the ts error is a lie\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nfunction getEnvUrls(env: Environment): GetEnvUrlsReturn {\n if (!['dev', 'staging', 'prod'].includes(env)) {\n throw new Error(`Unknown environment: ${env}`);\n }\n\n if (env === 'dev') {\n return {\n marketingUrl,\n videoUrl: devVideoUrl,\n publicApiUrl: devPublicApiUrl,\n embedApiUrl: devEmbedApiUrl,\n publicRecorderUrl: devPublicRecorderUrl\n };\n }\n\n if (env === 'staging') {\n return {\n marketingUrl,\n videoUrl: stagingVideoUrl,\n publicApiUrl: stagingPublicApiUrl,\n embedApiUrl: stagingEmbedApiUrl,\n publicRecorderUrl: stagingPublicRecorderUrl\n };\n }\n\n if (env === 'prod') {\n return {\n marketingUrl,\n videoUrl: prodVideoUrl,\n publicApiUrl: prodPublicApiUrl,\n embedApiUrl: prodEmbedApiUrl,\n publicRecorderUrl: prodPublicRecorderUrl\n };\n }\n}\n\nexport {\n marketingUrl,\n devEmbedApiUrl,\n stagingEmbedApiUrl,\n prodEmbedApiUrl,\n devPublicRecorderUrl,\n stagingPublicRecorderUrl,\n prodPublicRecorderUrl,\n getEnvUrls\n};\nexport type { Environment };\n","import { Task } from '@lit/task';\n\nimport type { Embed, EmbedProps } from '..';\nimport type { ReactiveControllerHost } from 'lit';\nimport type { Environment } from '~/utils/env';\n\nimport { getEnvUrls } from '~/utils/env';\n\ntype EmbedHost = ReactiveControllerHost & Embed;\n\ntype TaskDeps = [\n EmbedProps['env'],\n EmbedProps['apiKey'],\n EmbedProps['data'],\n EmbedProps['vouchId'],\n EmbedProps['templateId']\n];\n\nclass FetcherController {\n host: EmbedHost;\n\n private _fetching = false;\n\n set fetching(value) {\n if (this._fetching !== value) {\n this._fetching = value;\n this.host.requestUpdate();\n }\n }\n get fetching() {\n return this._fetching;\n }\n\n private async getVouch(env: Environment, apiKey: string, vouchId: string) {\n const { embedApiUrl } = getEnvUrls(env);\n\n return fetch(`${embedApiUrl}/vouches/${vouchId}`, {\n method: 'GET',\n headers: [['X-Api-Key', apiKey]]\n }).then((response) => response.json());\n }\n\n private async getTemplate(env: Environment, apiKey: string, templateId: string) {\n const { embedApiUrl } = getEnvUrls(env);\n\n return fetch(`${embedApiUrl}/templates/${templateId}`, {\n method: 'GET',\n headers: [['X-Api-Key', apiKey]]\n }).then((response) => response.json());\n }\n\n constructor(host: EmbedHost) {\n this.host = host;\n new Task<TaskDeps, void>(\n this.host,\n async ([env, apiKey, data, vouchId, templateId]: TaskDeps) => {\n try {\n host.vouch = undefined;\n host.template = undefined;\n\n if (data) {\n let template;\n if (templateId) {\n this.fetching = true;\n template = await this.getTemplate(env, apiKey, templateId);\n }\n host.vouch = data;\n host.template = template ?? data?.settings?.template?.instance;\n } else if (vouchId) {\n this.fetching = true;\n\n const [vouch, template] = await Promise.all([\n this.getVouch(env, apiKey, vouchId),\n templateId ? this.getTemplate(env, apiKey, templateId) : null\n ]);\n host.vouch = vouch;\n host.template = template ?? vouch?.settings?.template?.instance;\n }\n } finally {\n this.fetching = false;\n }\n },\n () => [host.env, host.apiKey, host.data, host.vouchId, host.templateId]\n );\n }\n}\n\nexport { FetcherController };\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","import { v4 as uuidv4 } from 'uuid';\n\nimport type { Embed } from '..';\nimport type { VideoEventDetail } from '@vouchfor/media-player';\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\n\nimport { getEnvUrls } from '~/utils/env';\n\nconst STREAMED_THROTTLE = 2000;\n\ntype EmbedHost = ReactiveControllerHost & Embed;\n\ntype TrackingEvent = 'VOUCH_LOADED' | 'VOUCH_RESPONSE_VIEWED' | 'VIDEO_PLAYED' | 'VIDEO_STREAMED';\ntype TrackingPayload = {\n vouchId: string;\n answerId?: string;\n streamStart?: number;\n streamEnd?: number;\n};\n\ntype TimeMap = {\n [key: string]: number;\n};\n\ntype BooleanMap = {\n [key: string]: boolean;\n};\n\nclass TrackingController implements ReactiveController {\n host: EmbedHost;\n\n private _tabId: string | undefined = undefined;\n private _clientId: string | undefined = undefined;\n private _visitorId: string | undefined = undefined;\n\n private _hasPlayed = false;\n private _hasLoaded: BooleanMap = {};\n private _answersViewed: BooleanMap = {};\n private _streamedTime: TimeMap = {};\n private _streamedPrevTimestamp: TimeMap = {};\n\n constructor(host: EmbedHost) {\n this.host = host;\n host.addController(this);\n }\n\n private _findVouchId() {\n if (this.host.data) {\n if ('uuid' in this.host.data) {\n return this.host.data.uuid;\n }\n return this.host.data.id;\n }\n }\n\n private _createVisitor = (visitorId: string) => {\n const { publicApiUrl } = getEnvUrls(this.host.env);\n window.localStorage?.setItem?.('vouch-uid-visitor', visitorId);\n navigator.sendBeacon(`${publicApiUrl}/api/visitor`, JSON.stringify({ visitorId }));\n return visitorId;\n };\n\n private _getUids() {\n if (typeof window === 'undefined') {\n return {\n client: null,\n tab: null,\n request: uuidv4()\n };\n }\n\n // Persisted for a user for the same device + browser, so we can e.g. search for all logs related to that browser\n const visitorId =\n this._visitorId || window.localStorage?.getItem?.('vouch-uid-visitor') || this._createVisitor(uuidv4());\n // Persisted for a user for the same device + browser, so we can e.g. search for all logs related to that browser\n const clientId = this._clientId || window.localStorage?.getItem?.('vouch-uid-client') || uuidv4();\n // Persisted in session storage, so we can search for everything the user has done in a specific tab\n const tabId = this._tabId || window.sessionStorage?.getItem?.('vouch-uid-tab') || uuidv4();\n // Not persisted, allows us to search for any logs related to a single FE request\n // E.g. BE should pass this request ID through all other services to be able to group logs\n const requestId = uuidv4();\n\n // Cache and persist uids\n if (visitorId !== this._visitorId) {\n this._visitorId = visitorId;\n window.localStorage?.setItem?.('vouch-uid-visitor', visitorId);\n }\n\n if (clientId !== this._clientId) {\n this._clientId = clientId;\n window.localStorage?.setItem?.('vouch-uid-client', clientId);\n }\n\n if (tabId !== this._tabId) {\n this._tabId = tabId;\n window.sessionStorage?.setItem?.('vouch-uid-tab', tabId);\n }\n\n return {\n client: clientId,\n tab: tabId,\n request: requestId,\n visitor: visitorId\n };\n }\n\n private _getReportingMetadata = () => {\n const [country, region] = Intl.DateTimeFormat().resolvedOptions().timeZone?.split?.('/') ?? [];\n\n const utmParams: any = {};\n [...new URLSearchParams(location.search).entries()].forEach(([key, value]) => {\n if (/utm/.test(key)) {\n const param = key.toLowerCase().replace(/[-_][a-z0-9]/g, (group) => group.slice(-1).toUpperCase());\n utmParams[param] = value;\n }\n });\n\n return {\n source: 'media_player',\n time: new Date(),\n region,\n country,\n screenHeight: window.screen.height,\n screenWidth: window.screen.width,\n referrer: document.referrer,\n currentUrl: location.href,\n ...utmParams\n };\n };\n\n private _sendTrackingEvent = (event: TrackingEvent, payload: TrackingPayload) => {\n const { publicApiUrl } = getEnvUrls(this.host.env);\n const { client, tab, request, visitor } = this._getUids();\n\n // Don't send tracking if we don't have a source\n navigator.sendBeacon(\n `${publicApiUrl}/api/events`,\n JSON.stringify({\n event,\n payload,\n context: {\n 'x-uid-client': client,\n 'x-uid-tab': tab,\n 'x-uid-request': request,\n 'x-uid-visitor': visitor,\n 'x-reporting-metadata': this._getReportingMetadata()\n }\n })\n );\n };\n\n private _handleVouchLoaded = ({ detail: vouchId }: CustomEvent<string>) => {\n if (!vouchId) {\n return;\n }\n\n // Only send loaded event once per session\n if (!this._hasLoaded[vouchId]) {\n this._sendTrackingEvent('VOUCH_LOADED', {\n vouchId\n });\n this._hasLoaded[vouchId] = true;\n }\n };\n\n private _handlePlay = () => {\n const vouchId = this._findVouchId();\n\n if (!vouchId) {\n return;\n }\n\n // Only send the video played event once per session\n if (!this._hasPlayed) {\n this._sendTrackingEvent('VIDEO_PLAYED', {\n vouchId,\n streamStart: this.host.currentTime\n });\n this._hasPlayed = true;\n }\n };\n\n private _handleVideoPlay = ({ detail: { id, node } }: CustomEvent<VideoEventDetail>) => {\n const vouchId = this._findVouchId();\n if (!vouchId) {\n return;\n }\n // Only increment play count once per session\n if (!this._answersViewed[id]) {\n this._sendTrackingEvent('VOUCH_RESPONSE_VIEWED', {\n vouchId,\n answerId: id\n });\n this._answersViewed[id] = true;\n }\n this._streamedTime[id] = node.currentTime;\n this._streamedPrevTimestamp[id] = Date.now();\n };\n\n private _handleVideoTimeUpdate = ({ detail: { id, node } }: CustomEvent<VideoEventDetail>) => {\n const vouchId = this._findVouchId();\n if (!vouchId) {\n return;\n }\n const currentTimestamp = Date.now();\n if (\n !this.host.paused &&\n // Only fire the video seeked event when this video is the active one\n id === this.host.scene?.video?.id &&\n // Throttle the frequency that we send streamed events while playing\n currentTimestamp - this._streamedPrevTimestamp[id] > STREAMED_THROTTLE\n ) {\n this._sendTrackingEvent('VIDEO_STREAMED', {\n vouchId,\n answerId: id,\n streamStart: this._streamedTime[id],\n streamEnd: node.currentTime\n });\n this._streamedTime[id] = node.currentTime;\n this._streamedPrevTimestamp[id] = currentTimestamp;\n }\n };\n\n private _handleVideoPause = ({ detail: { id, node } }: CustomEvent<VideoEventDetail>) => {\n const vouchId = this._findVouchId();\n if (!vouchId) {\n return;\n }\n // Send a video streamed event any time the video pauses then reset the streamed state\n // We do this to capture the last bit of time that the video was played between the previous\n // stream event and the video being paused manually or stopping because it ended\n this._sendTrackingEvent('VIDEO_STREAMED', {\n vouchId,\n answerId: id,\n streamStart: this._streamedTime[id],\n streamEnd: node.currentTime\n });\n delete this._streamedTime[id];\n delete this._streamedPrevTimestamp[id];\n };\n\n hostConnected() {\n requestAnimationFrame(() => {\n this.host.addEventListener('vouch:loaded', this._handleVouchLoaded);\n this.host.mediaPlayer?.addEventListener('play', this._handlePlay);\n this.host.mediaPlayer?.addEventListener('video:play', this._handleVideoPlay);\n this.host.mediaPlayer?.addEventListener('video:pause', this._handleVideoPause);\n this.host.mediaPlayer?.addEventListener('video:timeupdate', this._handleVideoTimeUpdate);\n });\n }\n\n hostDisconnected() {\n this.host.removeEventListener('vouch:loaded', this._handleVouchLoaded);\n this.host.mediaPlayer?.removeEventListener('play', this._handlePlay);\n this.host.mediaPlayer?.removeEventListener('video:play', this._handleVideoPlay);\n this.host.mediaPlayer?.removeEventListener('video:pause', this._handleVideoPause);\n this.host.mediaPlayer?.removeEventListener('video:timeupdate', this._handleVideoTimeUpdate);\n }\n}\n\nexport { TrackingController };\n","// TODO: allow '-' to trim up until newline. Use [^\\S\\n\\r] instead of \\s\r\n// TODO: only include trimLeft polyfill if not in ES6\r\n/* END TYPES */\r\nvar promiseImpl = new Function('return this')().Promise;\r\nvar asyncFunc = false;\r\ntry {\r\n asyncFunc = new Function('return (async function(){}).constructor')();\r\n}\r\ncatch (e) {\r\n // We shouldn't actually ever have any other errors, but...\r\n if (!(e instanceof SyntaxError)) {\r\n throw e;\r\n }\r\n}\r\nfunction hasOwnProp(obj, prop) {\r\n return Object.prototype.hasOwnProperty.call(obj, prop);\r\n}\r\nfunction copyProps(toObj, fromObj, notConfig) {\r\n for (var key in fromObj) {\r\n if (hasOwnProp(fromObj, key)) {\r\n if (fromObj[key] != null &&\r\n typeof fromObj[key] == 'object' &&\r\n (key === 'storage' || key === 'prefixes') &&\r\n !notConfig // not called from Cache.load\r\n ) {\r\n // plugins or storage\r\n // Note: this doesn't merge from initial config!\r\n // Deep clone instead of assigning\r\n // TODO: run checks on this\r\n toObj[key] = copyProps(/*toObj[key] ||*/ {}, fromObj[key]);\r\n }\r\n else {\r\n toObj[key] = fromObj[key];\r\n }\r\n }\r\n }\r\n return toObj;\r\n}\r\nfunction trimWS(str, env, wsLeft, wsRight) {\r\n var leftTrim;\r\n var rightTrim;\r\n if (typeof env.autoTrim === 'string') {\r\n leftTrim = rightTrim = env.autoTrim;\r\n // Don't need to check if env.autoTrim is false\r\n // Because leftTrim, rightTrim are initialized as falsy\r\n }\r\n else if (Array.isArray(env.autoTrim)) {\r\n // kinda confusing\r\n // but _}} will trim the left side of the following string\r\n leftTrim = env.autoTrim[1];\r\n rightTrim = env.autoTrim[0];\r\n }\r\n if (wsLeft || wsLeft === false) {\r\n leftTrim = wsLeft;\r\n }\r\n if (wsRight || wsRight === false) {\r\n rightTrim = wsRight;\r\n }\r\n if (leftTrim === 'slurp' && rightTrim === 'slurp') {\r\n return str.trim();\r\n }\r\n if (leftTrim === '_' || leftTrim === 'slurp') {\r\n // console.log('trimming left' + leftTrim)\r\n // full slurp\r\n // eslint-disable-next-line no-extra-boolean-cast\r\n if (!!String.prototype.trimLeft) {\r\n str = str.trimLeft();\r\n }\r\n else {\r\n str = str.replace(/^[\\s\\uFEFF\\xA0]+/, '');\r\n }\r\n }\r\n else if (leftTrim === '-' || leftTrim === 'nl') {\r\n // console.log('trimming left nl' + leftTrim)\r\n // nl trim\r\n str = str.replace(/^(?:\\n|\\r|\\r\\n)/, '');\r\n }\r\n if (rightTrim === '_' || rightTrim === 'slurp') {\r\n // console.log('trimming right' + rightTrim)\r\n // full slurp\r\n // eslint-disable-next-line no-extra-boolean-cast\r\n if (!!String.prototype.trimRight) {\r\n str = str.trimRight();\r\n }\r\n else {\r\n str = str.replace(/[\\s\\uFEFF\\xA0]+$/, '');\r\n }\r\n }\r\n else if (rightTrim === '-' || rightTrim === 'nl') {\r\n // console.log('trimming right nl' + rightTrim)\r\n // nl trim\r\n str = str.replace(/(?:\\n|\\r|\\r\\n)$/, ''); // TODO: make sure this gets \\r\\n\r\n }\r\n return str;\r\n}\n\n/* END TYPES */\r\nvar Cacher = /** @class */ (function () {\r\n function Cacher(cache) {\r\n this.cache = cache;\r\n }\r\n Cacher.prototype.define = function (key, val) {\r\n this.cache[key] = val;\r\n };\r\n Cacher.prototype.get = function (key) {\r\n // string | array.\r\n // TODO: allow array of keys to look down\r\n // TODO: create plugin to allow referencing helpers, filters with dot notation\r\n return this.cache[key];\r\n };\r\n Cacher.prototype.remove = function (key) {\r\n delete this.cache[key];\r\n };\r\n Cacher.prototype.reset = function () {\r\n this.cache = {};\r\n };\r\n Cacher.prototype.load = function (cacheObj) {\r\n // TODO: this will err with deep objects and `storage` or `plugins` keys.\r\n // Update Feb 26: EDITED so it shouldn't err\r\n copyProps(this.cache, cacheObj, true);\r\n };\r\n return Cacher;\r\n}());\n\nfunction setPrototypeOf(obj, proto) {\r\n if (Object.setPrototypeOf) {\r\n Object.setPrototypeOf(obj, proto);\r\n }\r\n else {\r\n obj.__proto__ = proto;\r\n }\r\n}\r\nfunction SqrlErr(message) {\r\n var err = new Error(message);\r\n setPrototypeOf(err, SqrlErr.prototype);\r\n return err;\r\n}\r\nSqrlErr.prototype = Object.create(Error.prototype, {\r\n name: { value: 'Squirrelly Error', enumerable: false }\r\n});\r\n// TODO: Class transpilation adds a lot to the bundle size\r\nfunction ParseErr(message, str, indx) {\r\n var whitespace = str.slice(0, indx).split(/\\n/);\r\n var lineNo = whitespace.length;\r\n var colNo = whitespace[lineNo - 1].length + 1;\r\n message +=\r\n ' at line ' +\r\n lineNo +\r\n ' col ' +\r\n colNo +\r\n ':\\n\\n' +\r\n ' ' +\r\n str.split(/\\n/)[lineNo - 1] +\r\n '\\n' +\r\n ' ' +\r\n Array(colNo).join(' ') +\r\n '^';\r\n throw SqrlErr(message);\r\n}\n\n/* END TYPES */\r\nvar asyncRegExp = /^async +/;\r\nvar templateLitReg = /`(?:\\\\[\\s\\S]|\\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\\${)[^\\\\`])*`/g;\r\nvar singleQuoteReg = /'(?:\\\\[\\s\\w\"'\\\\`]|[^\\n\\r'\\\\])*?'/g;\r\nvar doubleQuoteReg = /\"(?:\\\\[\\s\\w\"'\\\\`]|[^\\n\\r\"\\\\])*?\"/g;\r\nvar specialCharsReg = /[.*+\\-?^${}()|[\\]\\\\]/g;\r\nfunction escapeRegExp(string) {\r\n // From MDN\r\n return specialCharsReg.test(string)\r\n ? string.replace(specialCharsReg, '\\\\$&') // $& means the whole matched string\r\n : string;\r\n}\r\nfunction parse(str, env) {\r\n /* Adding for EJS compatibility */\r\n if (env.rmWhitespace) {\r\n // Code taken directly from EJS\r\n // Have to use two separate replaces here as `^` and `$` operators don't\r\n // work well with `\\r` and empty lines don't work well with the `m` flag.\r\n // Essentially, this replaces the whitespace at the beginning and end of\r\n // each line and removes multiple newlines.\r\n str = str.replace(/[\\r\\n]+/g, '\\n').replace(/^\\s+|\\s+$/gm, '');\r\n }\r\n /* End rmWhitespace option */\r\n templateLitReg.lastIndex = 0;\r\n singleQuoteReg.lastIndex = 0;\r\n doubleQuoteReg.lastIndex = 0;\r\n var envPrefixes = env.prefixes;\r\n var prefixes = [\r\n envPrefixes.h,\r\n envPrefixes.b,\r\n envPrefixes.i,\r\n envPrefixes.r,\r\n envPrefixes.c,\r\n envPrefixes.e\r\n ].reduce(function (accumulator, prefix) {\r\n if (accumulator && prefix) {\r\n return accumulator + '|' + escapeRegExp(prefix);\r\n }\r\n else if (prefix) {\r\n // accumulator is empty\r\n return escapeRegExp(prefix);\r\n }\r\n else {\r\n // prefix and accumulator are both empty strings\r\n return accumulator;\r\n }\r\n }, '');\r\n var parseCloseReg = new RegExp('([|()]|=>)|' + // powerchars\r\n '(\\'|\"|`|\\\\/\\\\*)|\\\\s*((\\\\/)?(-|_)?' + // comments, strings\r\n escapeRegExp(env.tags[1]) +\r\n ')', 'g');\r\n var tagOpenReg = new RegExp('([^]*?)' + escapeRegExp(env.tags[0]) + '(-|_)?\\\\s*(' + prefixes + ')?\\\\s*', 'g');\r\n var startInd = 0;\r\n var trimNextLeftWs = false;\r\n function parseTag(tagOpenIndex, currentType) {\r\n var currentObj = { f: [] };\r\n var numParens = 0;\r\n var currentAttribute = 'c'; // default - Valid values: 'c'=content, 'f'=filter, 'fp'=filter params, 'p'=param, 'n'=name\r\n if (currentType === 'h' || currentType === 'b' || currentType === 'c') {\r\n currentAttribute = 'n';\r\n }\r\n else if (currentType === 'r') {\r\n currentObj.raw = true;\r\n currentType = 'i';\r\n }\r\n function addAttrValue(indx) {\r\n var valUnprocessed = str.slice(startInd, indx);\r\n // console.log(valUnprocessed)\r\n var val = valUnprocessed.trim();\r\n if (currentAttribute === 'f') {\r\n if (val === 'safe') {\r\n currentObj.raw = true;\r\n }\r\n else {\r\n if (env.async && asyncRegExp.test(val)) {\r\n val = val.replace(asyncRegExp, '');\r\n currentObj.f.push([val, '', true]);\r\n }\r\n else {\r\n currentObj.f.push([val, '']);\r\n }\r\n }\r\n }\r\n else if (currentAttribute === 'fp') {\r\n currentObj.f[currentObj.f.length - 1][1] += val;\r\n }\r\n else if (currentAttribute === 'err') {\r\n if (val) {\r\n var found = valUnprocessed.search(/\\S/);\r\n ParseErr('invalid syntax', str, startInd + found);\r\n }\r\n }\r\n else {\r\n // if (currentObj[currentAttribute]) { // TODO make sure no errs\r\n // currentObj[currentAttribute] += val\r\n // } else {\r\n currentObj[currentAttribute] = val;\r\n // }\r\n }\r\n startInd = indx + 1;\r\n }\r\n parseCloseReg.lastIndex = startInd;\r\n var m;\r\n // tslint:disable-next-line:no-conditional-assignment\r\n while ((m = parseCloseReg.exec(str)) !== null) {\r\n var char = m[1];\r\n var punctuator = m[2];\r\n var tagClose = m[3];\r\n var slash = m[4];\r\n var wsControl = m[5];\r\n var i = m.index;\r\n if (char) {\r\n // Power character\r\n if (char === '(') {\r\n if (numParens === 0) {\r\n if (currentAttribute === 'n') {\r\n addAttrValue(i);\r\n currentAttribute = 'p';\r\n }\r\n else if (currentAttribute === 'f') {\r\n addAttrValue(i);\r\n currentAttribute = 'fp';\r\n }\r\n }\r\n numParens++;\r\n }\r\n else if (char === ')') {\r\n numParens--;\r\n if (numParens === 0 && currentAttribute !== 'c') {\r\n // Then it's closing a filter, block, or helper\r\n addAttrValue(i);\r\n currentAttribute = 'err'; // Reset the current attribute\r\n }\r\n }\r\n else if (numParens === 0 && char === '|') {\r\n addAttrValue(i); // this should actually always be whitespace or empty\r\n currentAttribute = 'f';\r\n }\r\n else if (char === '=>') {\r\n addAttrValue(i);\r\n startInd += 1; // this is 2 chars\r\n currentAttribute = 'res';\r\n }\r\n }\r\n else if (punctuator) {\r\n if (punctuator === '/*') {\r\n var commentCloseInd = str.indexOf('*/', parseCloseReg.lastIndex);\r\n if (commentCloseInd === -1) {\r\n ParseErr('unclosed comment', str, m.index);\r\n }\r\n parseCloseReg.lastIndex = commentCloseInd + 2; // since */ is 2 characters, and we're using indexOf rather than a RegExp\r\n }\r\n else if (punctuator === \"'\") {\r\n singleQuoteReg.lastIndex = m.index;\r\n var singleQuoteMatch = singleQuoteReg.exec(str);\r\n if (singleQuoteMatch) {\r\n parseCloseReg.lastIndex = singleQuoteReg.lastIndex;\r\n }\r\n else {\r\n ParseErr('unclosed string', str, m.index);\r\n }\r\n }\r\n else if (punctuator === '\"') {\r\n doubleQuoteReg.lastIndex = m.index;\r\n var doubleQuoteMatch = doubleQuoteReg.exec(str);\r\n if (doubleQuoteMatch) {\r\n parseCloseReg.lastIndex = doubleQuoteReg.lastIndex;\r\n }\r\n else {\r\n ParseErr('unclosed string', str, m.index);\r\n }\r\n }\r\n else if (punctuator === '`') {\r\n templateLitReg.lastIndex = m.index;\r\n var templateLitMatch = templateLitReg.exec(str);\r\n if (templateLitMatch) {\r\n parseCloseReg.lastIndex = templateLitReg.lastIndex;\r\n }\r\n else {\r\n ParseErr('unclosed string', str, m.index);\r\n }\r\n }\r\n }\r\n else if (tagClose) {\r\n addAttrValue(i);\r\n startInd = i + m[0].length;\r\n tagOpenReg.lastIndex = startInd;\r\n // console.log('tagClose: ' + startInd)\r\n trimNextLeftWs = wsControl;\r\n if (slash && currentType === 'h') {\r\n currentType = 's';\r\n } // TODO throw err\r\n currentObj.t = currentType;\r\n return currentObj;\r\n }\r\n }\r\n ParseErr('unclosed tag', str, tagOpenIndex);\r\n return currentObj; // To prevent TypeScript from erroring\r\n }\r\n function parseContext(parentObj, firstParse) {\r\n parentObj.b = []; // assume there will be blocks // TODO: perf optimize this\r\n parentObj.d = [];\r\n var lastBlock = false;\r\n var buffer = [];\r\n function pushString(strng, shouldTrimRightOfString) {\r\n if (strng) {\r\n // if string is truthy it must be of type 'string'\r\n // TODO: benchmark replace( /(\\\\|')/g, '\\\\$1')\r\n strng = trimWS(strng, env, trimNextLeftWs, // this will only be false on the first str, the next ones will be null or undefined\r\n shouldTrimRightOfString);\r\n if (strng) {\r\n // replace \\ with \\\\, ' with \\'\r\n strng = strng.replace(/\\\\|'/g, '\\\\$&').replace(/\\r\\n|\\n|\\r/g, '\\\\n');\r\n // we're going to convert all CRLF to LF so it doesn't take more than one replace\r\n buffer.push(strng);\r\n }\r\n }\r\n }\r\n // Random TODO: parentObj.b doesn't need to have t: #\r\n var tagOpenMatch;\r\n // tslint:disable-next-line:no-conditional-assignment\r\n while ((tagOpenMatch = tagOpenReg.exec(str)) !== null) {\r\n var precedingString = tagOpenMatch[1];\r\n var shouldTrimRightPrecedingString = tagOpenMatch[2];\r\n var prefix = tagOpenMatch[3] || '';\r\n var prefixType;\r\n for (var key in envPrefixes) {\r\n if (envPrefixes[key] === prefix) {\r\n prefixType = key;\r\n break;\r\n }\r\n }\r\n pushString(precedingString, shouldTrimRightPrecedingString);\r\n startInd = tagOpenMatch.index + tagOpenMatch[0].length;\r\n if (!prefixType) {\r\n ParseErr('unrecognized tag type: ' + prefix, str, startInd);\r\n }\r\n var currentObj = parseTag(tagOpenMatch.index, prefixType);\r\n // ===== NOW ADD THE OBJECT TO OUR BUFFER =====\r\n var currentType = currentObj.t;\r\n if (currentType === 'h') {\r\n var hName = currentObj.n || '';\r\n if (env.async && asyncRegExp.test(hName)) {\r\n currentObj.a = true;\r\n currentObj.n = hName.replace(asyncRegExp, '');\r\n }\r\n currentObj = parseContext(currentObj); // currentObj is the parent object\r\n buffer.push(currentObj);\r\n }\r\n else if (currentType === 'c') {\r\n // tag close\r\n if (parentObj.n === currentObj.n) {\r\n if (lastBlock) {\r\n // If there's a previous block\r\n lastBlock.d = buffer;\r\n parentObj.b.push(lastBlock);\r\n }\r\n else {\r\n parentObj.d = buffer;\r\n }\r\n // console.log('parentObj: ' + JSON.stringify(parentObj))\r\n return parentObj;\r\n }\r\n else {\r\n ParseErr(\"Helper start and end don't match\", str, tagOpenMatch.index + tagOpenMatch[0].length);\r\n }\r\n }\r\n else if (currentType === 'b') {\r\n // block\r\n // TODO: make sure async stuff inside blocks are recognized\r\n if (lastBlock) {\r\n // If there's a previous block\r\n lastBlock.d = buffer;\r\n parentObj.b.push(lastBlock);\r\n }\r\n else {\r\n parentObj.d = buffer;\r\n }\r\n var blockName = currentObj.n || '';\r\n if (env.async && asyncRegExp.test(blockName)) {\r\n currentObj.a = true;\r\n currentObj.n = blockName.replace(asyncRegExp, '');\r\n }\r\n lastBlock = currentObj; // Set the 'lastBlock' object to the value of the current block\r\n buffer = [];\r\n }\r\n else if (currentType === 's') {\r\n var selfClosingHName = currentObj.n || '';\r\n if (env.async && asyncRegExp.test(selfClosingHName)) {\r\n currentObj.a = true;\r\n currentObj.n = selfClosingHName.replace(asyncRegExp, '');\r\n }\r\n buffer.push(currentObj);\r\n }\r\n else {\r\n buffer.push(currentObj);\r\n }\r\n // ===== DONE ADDING OBJECT TO BUFFER =====\r\n }\r\n if (firstParse) {\r\n pushString(str.slice(startInd, str.length), false);\r\n parentObj.d = buffer;\r\n }\r\n else {\r\n throw SqrlErr('unclosed helper \"' + parentObj.n + '\"');\r\n // It should have returned by now\r\n }\r\n return parentObj;\r\n }\r\n var parseResult = parseContext({ f: [] }, true);\r\n // console.log(JSON.stringify(parseResult))\r\n if (env.plugins) {\r\n for (var i = 0; i < env.plugins.length; i++) {\r\n var plugin = env.plugins[i];\r\n if (plugin.processAST) {\r\n parseResult.d = plugin.processAST(parseResult.d, env);\r\n }\r\n }\r\n }\r\n return parseResult.d; // Parse the very outside context\r\n}\n\n// import SqrlErr from './err'\r\n/* END TYPES */\r\nfunction compileToString(str, env) {\r\n var buffer = parse(str, env);\r\n var res = \"var tR='';\" +\r\n (env.useWith ? 'with(' + env.varName + '||{}){' : '') +\r\n compileScope(buffer, env) +\r\n 'if(cb){cb(null,tR)} return tR' +\r\n (env.useWith ? '}' : '');\r\n if (env.plugins) {\r\n for (var i = 0; i < env.plugins.length; i++) {\r\n var plugin = env.plugins[i];\r\n if (plugin.processFnString) {\r\n res = plugin.processFnString(res, env);\r\n }\r\n }\r\n }\r\n return res;\r\n // TODO: is `return cb()` necessary, or could we just do `cb()`\r\n}\r\nfunction filter(str, filters) {\r\n for (var i = 0; i < filters.length; i++) {\r\n var name = filters[i][0];\r\n var params = filters[i][1];\r\n var isFilterAsync = filters[i][2];\r\n // if (isFilterAsync && !env.async) {\r\n // throw SqrlErr(\"Async filter '\" + name + \"' in non-async env\")\r\n // }\r\n // Let the JS compiler do this, compile() will catch it\r\n str = (isFilterAsync ? 'await ' : '') + \"c.l('F','\" + name + \"')(\" + str;\r\n if (params) {\r\n str += ',' + params;\r\n }\r\n str += ')';\r\n }\r\n return str;\r\n}\r\n// TODO: Use type intersections for TemplateObject, etc.\r\n// so I don't have to make properties mandatory\r\nfunction compileHelper(env, res, descendants, params, isAsync, name) {\r\n var ret = '{exec:' +\r\n (isAsync ? 'async ' : '') +\r\n compileScopeIntoFunction(descendants, res, env) +\r\n ',params:[' +\r\n params +\r\n ']';\r\n if (name) {\r\n ret += \",name:'\" + name + \"'\";\r\n }\r\n if (isAsync) {\r\n ret += ',async:true';\r\n }\r\n ret += '}';\r\n return ret;\r\n}\r\nfunction compileBlocks(blocks, env) {\r\n var ret = '[';\r\n for (var i = 0; i < blocks.length; i++) {\r\n var block = blocks[i];\r\n ret += compileHelper(env, block.res || '', block.d, block.p || '', block.a, block.n);\r\n if (i < blocks.length) {\r\n ret += ',';\r\n }\r\n }\r\n ret += ']';\r\n return ret;\r\n}\r\nfunction compileScopeIntoFunction(buff, res, env) {\r\n return 'function(' + res + \"){var tR='';\" + compileScope(buff, env) + 'return tR}';\r\n}\r\nfunction compileScope(buff, env) {\r\n var i = 0;\r\n var buffLength = buff.length;\r\n var returnStr = '';\r\n for (i; i < buffLength; i++) {\r\n var currentBlock = buff[i];\r\n if (typeof currentBlock === 'string') {\r\n var str = currentBlock;\r\n // we know string exists\r\n returnStr += \"tR+='\" + str + \"';\";\r\n }\r\n else {\r\n var type = currentBlock.t; // h, s, e, i\r\n var content = currentBlock.c || '';\r\n var filters = currentBlock.f;\r\n var name = currentBlock.n || '';\r\n var params = currentBlock.p || '';\r\n var res = currentBlock.res || '';\r\n var blocks = currentBlock.b;\r\n var isAsync = !!currentBlock.a; // !! is to booleanize it\r\n // if (isAsync && !env.async) {\r\n // throw SqrlErr(\"Async block or helper '\" + name + \"' in non-async env\")\r\n // }\r\n // Let compiler do this\r\n if (type === 'i') {\r\n if (env.defaultFilter) {\r\n content = \"c.l('F','\" + env.defaultFilter + \"')(\" + content + ')';\r\n }\r\n var filtered = filter(content, filters);\r\n if (!currentBlock.raw && env.autoEscape) {\r\n filtered = \"c.l('F','e')(\" + filtered + ')';\r\n }\r\n returnStr += 'tR+=' + filtered + ';';\r\n // reference\r\n }\r\n else if (type === 'h') {\r\n // helper\r\n if (env.storage.nativeHelpers.get(name)) {\r\n returnStr += env.storage.nativeHelpers.get(name)(currentBlock, env);\r\n }\r\n else {\r\n var helperReturn = (isAsync ? 'await ' : '') +\r\n \"c.l('H','\" +\r\n name +\r\n \"')(\" +\r\n compileHelper(env, res, currentBlock.d, params, isAsync);\r\n if (blocks) {\r\n helperReturn += ',' + compileBlocks(blocks, env);\r\n }\r\n else {\r\n helperReturn += ',[]';\r\n }\r\n helperReturn += ',c)';\r\n returnStr += 'tR+=' + filter(helperReturn, filters) + ';';\r\n }\r\n }\r\n else if (type === 's') {\r\n // self-closing helper\r\n returnStr +=\r\n 'tR+=' +\r\n filter((isAsync ? 'await ' : '') + \"c.l('H','\" + name + \"')({params:[\" + params + ']},[],c)', filters) +\r\n ';';\r\n }\r\n else if (type === 'e') {\r\n // execute\r\n returnStr += content + '\\n';\r\n }\r\n }\r\n }\r\n return returnStr;\r\n}\n\nfunction errWithBlocksOrFilters(name, blocks, // false means don't check\r\nfilters, native) {\r\n if (blocks && blocks.length > 0) {\r\n throw SqrlErr((native ? 'Native' : '') + \"Helper '\" + name + \"' doesn't accept blocks\");\r\n }\r\n if (filters && filters.length > 0) {\r\n throw SqrlErr((native ? 'Native' : '') + \"Helper '\" + name + \"' doesn't accept filters\");\r\n }\r\n}\r\n/* ASYNC LOOP FNs */\r\nfunction asyncArrLoop(arr, index, fn, res, cb) {\r\n fn(arr[index], index).then(function (val) {\r\n res += val;\r\n if (index === arr.length - 1) {\r\n cb(res);\r\n }\r\n else {\r\n asyncArrLoop(arr, index + 1, fn, res, cb);\r\n }\r\n });\r\n}\r\nfunction asyncObjLoop(obj, keys, index, fn, res, cb) {\r\n fn(keys[index], obj[keys[index]]).then(function (val) {\r\n res += val;\r\n if (index === keys.length - 1) {\r\n cb(res);\r\n }\r\n else {\r\n asyncObjLoop(obj, keys, index + 1, fn, res, cb);\r\n }\r\n });\r\n}\r\nvar escMap = {\r\n '&': '&amp;',\r\n '<': '&lt;',\r\n '>': '&gt;',\r\n '\"': '&quot;',\r\n \"'\": '&#39;',\r\n};\r\nfunction replaceChar(s) {\r\n return escMap[s];\r\n}\r\nfunction XMLEscape(str) {\r\n // To deal with XSS. Based on Escape implementations of Mustache.JS and Marko, then customized.\r\n var newStr = String(str);\r\n if (/[&<>\"']/.test(newStr)) {\r\n return newStr.replace(/[&<>\"']/g, replaceChar);\r\n }\r\n else {\r\n return newStr;\r\n }\r\n}\n\n/* END TYPES */\r\nvar templates = new Cacher({});\r\n/* ASYNC LOOP FNs */\r\nvar helpers = new Cacher({\r\n each: function (content, blocks) {\r\n var res = '';\r\n var arr = content.params[0];\r\n errWithBlocksOrFilters('each', blocks, false);\r\n if (content.async) {\r\n return new Promise(function (resolve) {\r\n asyncArrLoop(arr, 0, content.exec, res, resolve);\r\n });\r\n }\r\n else {\r\n for (var i = 0; i < arr.length; i++) {\r\n res += content.exec(arr[i], i);\r\n }\r\n return res;\r\n }\r\n },\r\n foreach: function (content, blocks) {\r\n var obj = content.params[0];\r\n errWithBlocksOrFilters('foreach', blocks, false);\r\n if (content.async) {\r\n return new Promise(function (resolve) {\r\n asyncObjLoop(obj, Object.keys(obj), 0, content.exec, '', resolve);\r\n });\r\n }\r\n else {\r\n var res = '';\r\n for (var key in obj) {\r\n if (!hasOwnProp(obj, key))\r\n continue;\r\n res += content.exec(key, obj[key]); // todo: check on order\r\n }\r\n return res;\r\n }\r\n },\r\n include: function (content, blocks, config) {\r\n errWithBlocksOrFilters('include', blocks, false);\r\n var template = config.storage.templates.get(content.params[0]);\r\n if (!template) {\r\n throw SqrlErr('Could not fetch template \"' + content.params[0] + '\"');\r\n }\r\n return template(content.params[1], config);\r\n },\r\n extends: function (content, blocks, config) {\r\n var data = content.params[1] || {};\r\n data.content = content.exec();\r\n for (var i = 0; i < blocks.length; i++) {\r\n var currentBlock = blocks[i];\r\n data[currentBlock.name] = currentBlock.exec();\r\n }\r\n var template = config.storage.templates.get(content.params[0]);\r\n if (!template) {\r\n throw SqrlErr('Could not fetch template \"' + content.params[0] + '\"');\r\n }\r\n return template(data, config);\r\n },\r\n useScope: function (content, blocks) {\r\n errWithBlocksOrFilters('useScope', blocks, false);\r\n return content.exec(content.params[0]);\r\n }\r\n});\r\nvar nativeHelpers = new Cacher({\r\n if: function (buffer, env) {\r\n errWithBlocksOrFilters('if', false, buffer.f, true);\r\n var returnStr = 'if(' + buffer.p + '){' + compileScope(buffer.d, env) + '}';\r\n if (buffer.b) {\r\n for (var i = 0; i < buffer.b.length; i++) {\r\n var currentBlock = buffer.b[i];\r\n if (currentBlock.n === 'else') {\r\n returnStr += 'else{' + compileScope(currentBlock.d, env) + '}';\r\n }\r\n else if (currentBlock.n === 'elif') {\r\n returnStr += 'else if(' + currentBlock.p + '){' + compileScope(currentBlock.d, env) + '}';\r\n }\r\n }\r\n }\r\n return returnStr;\r\n },\r\n try: function (buffer, env) {\r\n errWithBlocksOrFilters('try', false, buffer.f, true);\r\n if (!buffer.b || buffer.b.length !== 1 || buffer.b[0].n !== 'catch') {\r\n throw SqrlErr(\"native helper 'try' only accepts 1 block, 'catch'\");\r\n }\r\n var returnStr = 'try{' + compileScope(buffer.d, env) + '}';\r\n var currentBlock = buffer.b[0];\r\n returnStr +=\r\n 'catch' +\r\n (currentBlock.res ? '(' + currentBlock.res + ')' : '') +\r\n '{' +\r\n compileScope(currentBlock.d, env) +\r\n '}';\r\n return returnStr;\r\n },\r\n block: function (buffer, env) {\r\n errWithBlocksOrFilters('block', buffer.b, buffer.f, true);\r\n var returnStr = 'if(!' +\r\n env.varName +\r\n '[' +\r\n buffer.p +\r\n ']){tR+=(' +\r\n compileScopeIntoFunction(buffer.d, '', env) +\r\n ')()}else{tR+=' +\r\n env.varName +\r\n '[' +\r\n buffer.p +\r\n ']}';\r\n return returnStr;\r\n }\r\n});\r\nvar filters = new Cacher({ e: XMLEscape });\n\n/* END TYPES */\r\nvar defaultConfig = {\r\n varName: 'it',\r\n autoTrim: [false, 'nl'],\r\n autoEscape: true,\r\n defaultFilter: false,\r\n tags: ['{{', '}}'],\r\n l: function (container, name) {\r\n if (container === 'H') {\r\n var hRet = this.storage.helpers.get(name);\r\n if (hRet) {\r\n return hRet;\r\n }\r\n else {\r\n throw SqrlErr(\"Can't find helper '\" + name + \"'\");\r\n }\r\n }\r\n else if (container === 'F') {\r\n var fRet = this.storage.filters.get(name);\r\n if (fRet) {\r\n return fRet;\r\n }\r\n else {\r\n throw SqrlErr(\"Can't find filter '\" + name + \"'\");\r\n }\r\n }\r\n },\r\n async: false,\r\n storage: {\r\n helpers: helpers,\r\n nativeHelpers: nativeHelpers,\r\n filters: filters,\r\n templates: templates\r\n },\r\n prefixes: {\r\n h: '@',\r\n b: '#',\r\n i: '',\r\n r: '*',\r\n c: '/',\r\n e: '!'\r\n },\r\n cache: false,\r\n plugins: [],\r\n useWith: false\r\n};\r\ndefaultConfig.l.bind(defaultConfig);\r\nfunction getConfig(override, baseConfig) {\r\n // TODO: run more tests on this\r\n var res = {}; // Linked\r\n copyProps(res, defaultConfig); // Creates deep clone of res, 1 layer deep\r\n if (baseConfig) {\r\n copyProps(res, baseConfig);\r\n }\r\n if (override) {\r\n copyProps(res, override);\r\n }\r\n res.l.bind(res);\r\n return res;\r\n}\n\n/* END TYPES */\r\nfunction compile(str, env) {\r\n var options = getConfig(env || {});\r\n var ctor = Function; // constructor\r\n /* ASYNC HANDLING */\r\n // The below code is modified from mde/ejs. All credit should go to them.\r\n if (options.async) {\r\n // Have to use generated function for this, since in envs without support,\r\n // it breaks in parsing\r\n if (asyncFunc) {\r\n ctor = asyncFunc;\r\n }\r\n else {\r\n throw SqrlErr(\"This environment doesn't support async/await\");\r\n }\r\n }\r\n /* END ASYNC HANDLING */\r\n try {\r\n return new ctor(options.varName, 'c', // SqrlConfig\r\n 'cb', // optional callback\r\n compileToString(str, options)); // eslint-disable-line no-new-func\r\n }\r\n catch (e) {\r\n if (e instanceof SyntaxError) {\r\n throw SqrlErr('Bad template syntax\\n\\n' +\r\n e.message +\r\n '\\n' +\r\n Array(e.message.length + 1).join('=') +\r\n '\\n' +\r\n compileToString(str, options));\r\n }\r\n else {\r\n throw e;\r\n }\r\n }\r\n}\n\nvar fs = require('fs');\r\nvar path = require('path');\r\nvar _BOM = /^\\uFEFF/;\r\n/* END TYPES */\r\n/**\r\n * Get the path to the included file from the parent file path and the\r\n * specified path.\r\n *\r\n * @param {String} name specified path\r\n * @param {String} parentfile parent file path\r\n * @param {Boolean} [isDir=false] whether parent file path is a directory\r\n * @return {String}\r\n */\r\nfunction getWholeFilePath(name, parentfile, isDirectory) {\r\n var includePath = path.resolve(isDirectory ? parentfile : path.dirname(parentfile), // returns directory the parent file is in\r\n name // file\r\n );\r\n var ext = path.extname(name);\r\n if (!ext) {\r\n includePath += '.sqrl';\r\n }\r\n return includePath;\r\n}\r\n/**\r\n * Get the path to the included file by Options\r\n *\r\n * @param {String} path specified path\r\n * @param {Options} options compilation options\r\n * @return {String}\r\n */\r\nfunction getPath(path, options) {\r\n var includePath;\r\n var filePath;\r\n var views = options.views;\r\n var match = /^[A-Za-z]+:\\\\|^\\//.exec(path);\r\n // Abs path\r\n if (match && match.length) {\r\n includePath = getWholeFilePath(path.replace(/^\\/*/, ''), options.root || '/', true);\r\n }\r\n else {\r\n // Relative paths\r\n // Look relative to a passed filename first\r\n if (options.filename) {\r\n filePath = getWholeFilePath(path, options.filename);\r\n if (fs.existsSync(filePath)) {\r\n includePath = filePath;\r\n }\r\n }\r\n // Then look in any views directories\r\n if (!includePath) {\r\n if (Array.isArray(views) &&\r\n views.some(function (v) {\r\n filePath = getWholeFilePath(path, v, true);\r\n return fs.existsSync(filePath);\r\n })) {\r\n includePath = filePath;\r\n }\r\n }\r\n if (!includePath) {\r\n throw SqrlErr('Could not find the include file \"' + path + '\"');\r\n }\r\n }\r\n return includePath;\r\n}\r\nfunction readFile(filePath) {\r\n return fs\r\n .readFileSync(filePath)\r\n .toString()\r\n .replace(_BOM, ''); // TODO: is replacing BOM's necessary?\r\n}\r\nfunction loadFile(filePath, options) {\r\n var config = getConfig(options);\r\n var template = readFile(filePath);\r\n try {\r\n var compiledTemplate = compile(template, config);\r\n config.storage.templates.define(config.filename, compiledTemplate);\r\n return compiledTemplate;\r\n }\r\n catch (e) {\r\n throw SqrlErr('Loading file: ' + filePath + ' failed');\r\n }\r\n}\n\n// express is set like: app.engine('html', require('squirrelly').renderFile)\r\n/* END TYPES */\r\n/**\r\n * Get the template from a string or a file, either compiled on-the-fly or\r\n * read from cache (if enabled), and cache the template if needed.\r\n *\r\n * If `options.cache` is true, this function reads the file from\r\n * `options.filename` so it must be set prior to calling this function.\r\n *\r\n * @param {Options} options compilation options\r\n * @return {(TemplateFunction|ClientFunction)}\r\n * Depending on the value of `options.client`, either type might be returned.\r\n * @static\r\n */\r\nfunction handleCache(options) {\r\n var filename = options.filename;\r\n if (options.cache) {\r\n var func = options.storage.templates.get(filename);\r\n if (func) {\r\n return func;\r\n }\r\n else {\r\n return loadFile(filename, options);\r\n }\r\n }\r\n return compile(readFile(filename), options);\r\n}\r\n/**\r\n * Try calling handleCache with the given options and data and call the\r\n * callback with the result. If an error occurs, call the callback with\r\n * the error. Used by renderFile().\r\n *\r\n * @param {Options} options compilation options\r\n * @param {Object} data template data\r\n * @param {RenderFileCallback} cb callback\r\n * @static\r\n */\r\nfunction tryHandleCache(options, data, cb) {\r\n var result;\r\n if (!cb) {\r\n // No callback, try returning a promise\r\n if (typeof promiseImpl === 'function') {\r\n return new promiseImpl(function (resolve, reject) {\r\n try {\r\n result = handleCache(options)(data, options);\r\n resolve(result);\r\n }\r\n catch (err) {\r\n reject(err);\r\n }\r\n });\r\n }\r\n else {\r\n throw SqrlErr(\"Please provide a callback function, this env doesn't support Promises\");\r\n }\r\n }\r\n else {\r\n try {\r\n handleCache(options)(data, options, cb);\r\n }\r\n catch (err) {\r\n return cb(err);\r\n }\r\n }\r\n}\r\n/**\r\n * Get the template function.\r\n *\r\n * If `options.cache` is `true`, then the template is cached.\r\n *\r\n * @param {String} path path for the specified file\r\n * @param {Options} options compilation options\r\n * @return {(TemplateFunction|ClientFunction)}\r\n * Depending on the value of `options.client`, either type might be returned\r\n * @static\r\n */\r\nfunction includeFile(path, options) {\r\n // the below creates a new options object, using the parent filepath of the old options object and the path\r\n var newFileOptions = getConfig({ filename: getPath(path, options) }, options);\r\n // TODO: make sure properties are currectly copied over\r\n return handleCache(newFileOptions);\r\n}\r\nfunction renderFile(filename, data, cb) {\r\n data = data || {};\r\n var Config = getConfig(data);\r\n // TODO: make sure above doesn't error. We do set filename down below\r\n Config.filename = filename; // Make sure filename is right\r\n return tryHandleCache(Config, data, cb);\r\n}\n\n/* END TYPES */\r\nfunction includeFileHelper(content, blocks, config) {\r\n if (blocks && blocks.length > 0) {\r\n throw SqrlErr(\"Helper 'includeFile' doesn't accept blocks\");\r\n }\r\n return includeFile(content.params[0], config)(content.params[1], config);\r\n}\r\nfunction extendsFileHelper(content, blocks, config) {\r\n var data = content.params[1] || {};\r\n data.content = content.exec();\r\n for (var i = 0; i < blocks.length; i++) {\r\n var currentBlock = blocks[i];\r\n data[currentBlock.name] = currentBlock.exec();\r\n }\r\n return includeFile(content.params[0], config)(data, config);\r\n}\n\n/* END TYPES */\r\nfunction handleCache$1(template, options) {\r\n var templateFunc;\r\n if (options.cache && options.name && options.storage.templates.get(options.name)) {\r\n return options.storage.templates.get(options.name);\r\n }\r\n if (typeof template === 'function') {\r\n templateFunc = template;\r\n }\r\n else {\r\n templateFunc = compile(template, options);\r\n }\r\n if (options.cache && options.name) {\r\n options.storage.templates.define(options.name, templateFunc);\r\n }\r\n return templateFunc;\r\n}\r\nfunction render(template, data, env, cb) {\r\n var options = getConfig(env || {});\r\n if (options.async) {\r\n var result;\r\n if (!cb) {\r\n // No callback, try returning a promise\r\n if (typeof promiseImpl === 'function') {\r\n return new promiseImpl(function (resolve, reject) {\r\n try {\r\n result = handleCache$1(template, options)(data, options);\r\n resolve(result);\r\n }\r\n catch (err) {\r\n reject(err);\r\n }\r\n });\r\n }\r\n else {\r\n throw SqrlErr(\"Please provide a callback function, this env doesn't support Promises\");\r\n }\r\n }\r\n else {\r\n try {\r\n handleCache$1(template, options)(data, options, cb);\r\n }\r\n catch (err) {\r\n return cb(err);\r\n }\r\n }\r\n }\r\n else {\r\n return handleCache$1(template, options)(data, options);\r\n }\r\n}\n\n/* Export file stuff */\r\n/* END TYPES */\r\nhelpers.define('includeFile', includeFileHelper);\r\nhelpers.define('extendsFile', extendsFileHelper);\n\nexport { renderFile as __express, compile, compileScope, compileScopeIntoFunction, compileToString, defaultConfig, filters, getConfig, helpers, loadFile, nativeHelpers, parse, render, renderFile, templates };\n//# sourceMappingURL=squirrelly.es.js.map\n","// Save global object in a variable\nvar __global__ =\n(typeof globalThis !== 'undefined' && globalThis) ||\n(typeof self !== 'undefined' && self) ||\n(typeof global !== 'undefined' && global);\n// Create an object that extends from __global__ without the fetch function\nvar __globalThis__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = __global__.DOMException\n}\nF.prototype = __global__; // Needed for feature detection on whatwg-fetch's code\nreturn new F();\n})();\n// Wraps whatwg-fetch with a function scope to hijack the global object\n// \"globalThis\" that's going to be patched\n(function(globalThis) {\n\nvar irrelevant = (function (exports) {\n\n var global =\n (typeof globalThis !== 'undefined' && globalThis) ||\n (typeof self !== 'undefined' && self) ||\n (typeof global !== 'undefined' && global);\n\n var support = {\n searchParams: 'URLSearchParams' in global,\n iterable: 'Symbol' in global && 'iterator' in Symbol,\n blob:\n 'FileReader' in global &&\n 'Blob' in global &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in global,\n arrayBuffer: 'ArrayBuffer' in global\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {\n throw new TypeError('Invalid character in header field name: \"' + name + '\"')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n /*\n fetch-mock wraps the Response object in an ES6 Proxy to\n provide useful test harness features such as flush. However, on\n ES5 browsers without fetch or Proxy support pollyfills must be used;\n the proxy-pollyfill is unable to proxy an attribute unless it exists\n on the object before the Proxy is created. This change ensures\n Response.bodyUsed exists on the instance, while maintaining the\n semantic of setting Request.bodyUsed in the constructor before\n _initBody is called.\n */\n this.bodyUsed = this.bodyUsed;\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n var isConsumed = consumed(this);\n if (isConsumed) {\n return isConsumed\n }\n if (ArrayBuffer.isView(this._bodyArrayBuffer)) {\n return Promise.resolve(\n this._bodyArrayBuffer.buffer.slice(\n this._bodyArrayBuffer.byteOffset,\n this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength\n )\n )\n } else {\n return Promise.resolve(this._bodyArrayBuffer)\n }\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n if (!(this instanceof Request)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.')\n }\n\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n\n if (this.method === 'GET' || this.method === 'HEAD') {\n if (options.cache === 'no-store' || options.cache === 'no-cache') {\n // Search for a '_' parameter in the query string\n var reParamSearch = /([?&])_=[^&]*/;\n if (reParamSearch.test(this.url)) {\n // If it already exists then set the value with the current time\n this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());\n } else {\n // Otherwise add a new '_' parameter to the end with the current time\n var reQueryString = /\\?/;\n this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();\n }\n }\n }\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill\n // https://github.com/github/fetch/issues/748\n // https://github.com/zloirock/core-js/issues/751\n preProcessedHeaders\n .split('\\r')\n .map(function(header) {\n return header.indexOf('\\n') === 0 ? header.substr(1, header.length) : header\n })\n .forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!(this instanceof Response)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.')\n }\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = options.statusText === undefined ? '' : '' + options.statusText;\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = global.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n setTimeout(function() {\n resolve(new Response(body, options));\n }, 0);\n };\n\n xhr.onerror = function() {\n setTimeout(function() {\n reject(new TypeError('Network request failed'));\n }, 0);\n };\n\n xhr.ontimeout = function() {\n setTimeout(function() {\n reject(new TypeError('Network request failed'));\n }, 0);\n };\n\n xhr.onabort = function() {\n setTimeout(function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n }, 0);\n };\n\n function fixUrl(url) {\n try {\n return url === '' && global.location.href ? global.location.href : url\n } catch (e) {\n return url\n }\n }\n\n xhr.open(request.method, fixUrl(request.url), true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr) {\n if (support.blob) {\n xhr.responseType = 'blob';\n } else if (\n support.arrayBuffer &&\n request.headers.get('Content-Type') &&\n request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1\n ) {\n xhr.responseType = 'arraybuffer';\n }\n }\n\n if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers)) {\n Object.getOwnPropertyNames(init.headers).forEach(function(name) {\n xhr.setRequestHeader(name, normalizeValue(init.headers[name]));\n });\n } else {\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n }\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!global.fetch) {\n global.fetch = fetch;\n global.Headers = Headers;\n global.Request = Request;\n global.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n return exports;\n\n})({});\n})(__globalThis__);\n// This is a ponyfill, so...\n__globalThis__.fetch.ponyfill = true;\ndelete __globalThis__.fetch.polyfill;\n// Choose between native implementation (__global__) or custom implementation (__globalThis__)\nvar ctx = __global__.fetch ? __global__ : __globalThis__;\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n","import { filters as pt, helpers as Mt, render as Ht, getConfig as Ft } from \"squirrelly\";\nimport Et from \"cross-fetch\";\nfunction ne({ canvas: t, scenes: n, currentTime: r }) {\n if (n && t) {\n const s = n.scenes.filter(({ start: e, duration: l }) => r >= e && r <= e + l);\n if (s.length <= 0)\n return;\n const i = t.getContext(\"2d\");\n if (i) {\n const e = n.transitionDuration, l = Math.max(...n.scenes.map(({ start: f, duration: o }) => f + o));\n i.globalCompositeOperation = \"lighter\", i.clearRect(0, 0, t.width, t.height), s.forEach(({ start: f, duration: o, draw: a, transitionCanvas: c }) => {\n i.globalAlpha = 1, c.width = c.height = 0, c.width = t.width, c.height = t.height;\n const p = c.getContext(\"2d\");\n if (p) {\n const u = f + o, d = f === 0, h = u === l;\n a({\n currentTime: r,\n canvas: c,\n context: p\n }), !d && r >= f && r <= f + e / 2 ? i.globalAlpha = Math.max(0, Math.min(1, (r - f) / (e / 2))) : !h && r >= u - e / 2 && r <= u && (i.globalAlpha = Math.max(0, Math.min(1, (u - r) / (e / 2)))), i.drawImage(c, 0, 0, t.width, t.height);\n }\n });\n }\n }\n}\nfunction It(t) {\n if (typeof t == \"string\") {\n const [n, r] = t.split(\":\");\n return Math.min(parseFloat(n), parseFloat(r));\n }\n return t;\n}\nfunction Lt(t) {\n if (typeof t == \"string\") {\n const [n, r] = t.split(\":\"), s = parseFloat(n), i = parseFloat(r);\n return s / i;\n }\n return t;\n}\nfunction Z({ resolution: t, aspectRatio: n }) {\n const r = It(t), s = Lt(n), i = s >= 1, e = Math.min(\n i ? r * s : r / s,\n r\n ), l = Math.max(\n i ? r * s : r / s,\n r\n );\n return {\n resolution: r,\n aspectRatio: s,\n height: i ? e : l,\n width: i ? l : e\n };\n}\nfunction At({\n format: t,\n resolution: n,\n aspectRatio: r,\n videoResolution: s,\n videoAspectRatio: i\n}) {\n const { height: e, width: l } = Z({ resolution: n, aspectRatio: r }), { height: f, width: o } = Z({\n resolution: s,\n aspectRatio: i\n }), a = r > i;\n let c = 1;\n if (t === \"letterbox\" || t === \"letterbox-video\")\n c = a ? e / f : l / o;\n else if (t === \"squarebox\") {\n const m = Math.min(e, l);\n c = o >= f ? m / f : m / o;\n } else\n (t === \"crop\" || t === \"crop-top\") && (c = a ? l / o : e / f);\n const p = l / c, u = e / c, d = (o - p) / 2;\n let h = (f - u) / 2;\n return t === \"crop-top\" && (h = Math.min(0, h)), {\n sx: d,\n sy: h,\n sWidth: p,\n sHeight: u,\n scale: c\n };\n}\nfunction et({ source: t, sx: n, sy: r, sw: s, sh: i, dx: e, dy: l, dw: f, dh: o }) {\n const a = (t == null ? void 0 : t.naturalWidth) ?? (t == null ? void 0 : t.videoWidth) ?? (t == null ? void 0 : t.width), c = (t == null ? void 0 : t.naturalHeight) ?? (t == null ? void 0 : t.videoHeight) ?? (t == null ? void 0 : t.height);\n n = n ?? 0, r = r ?? 0, s = s ?? a, i = i ?? c, s < 0 && (n += s, s = Math.abs(s)), i < 0 && (r += i, i = Math.abs(i)), f < 0 && (e += f, f = Math.abs(f)), o < 0 && (l += o, o = Math.abs(o));\n const p = Math.max(n, 0), u = Math.min(n + s, a), d = Math.max(r, 0), h = Math.min(r + i, c), m = f / s, g = o / i;\n return [\n t,\n p,\n d,\n u - p,\n h - d,\n n < 0 ? e - n * m : e,\n r < 0 ? l - r * g : l,\n (u - p) * m,\n (h - d) * g\n ];\n}\nfunction dt({\n context: t,\n source: n,\n format: r = \"letterbox\",\n videoResolution: s,\n videoAspectRatio: i,\n posX: e,\n posY: l,\n width: f,\n height: o,\n offscreenCanvas: a\n}) {\n const { sx: c, sy: p, sWidth: u, sHeight: d, scale: h } = At({\n resolution: Math.min(f, o),\n aspectRatio: f / o,\n format: r,\n videoResolution: s,\n videoAspectRatio: i\n }), m = a && typeof t.filter < \"u\";\n if (r === \"letterbox\" || r === \"squarebox\" || r === \"letterbox-video\" && !m) {\n if (c < 0) {\n const S = Math.abs(c) * h;\n t.fillStyle = \"black\", t.beginPath(), t.rect(e, l, S, o), t.rect(e + f - S, l, S, o), t.fill(), t.closePath();\n }\n if (p < 0) {\n const S = Math.abs(p) * h;\n t.fillStyle = \"black\", t.beginPath(), t.rect(e, l, f, S), t.rect(e, l + o - S, f, S), t.fill(), t.closePath();\n }\n }\n if (r === \"letterbox-video\" && m) {\n const { width: S, height: v } = Z({\n resolution: s,\n aspectRatio: i\n });\n a.width = S, a.height = v;\n const P = a.getContext(\"2d\", { alpha: !1 });\n if (P == null || P.drawImage(n, 0, 0, S, v), P) {\n t.save(), t.globalCompositeOperation = \"destination-out\", t.fillRect(e, l, f, o);\n const E = et({\n source: a,\n sx: c,\n sy: p,\n sw: u,\n sh: d,\n dx: e,\n dy: l,\n dw: f,\n dh: o\n });\n t.globalCompositeOperation = \"source-over\", t.drawImage(...E), P.save();\n const R = 1.3, F = -(S * R - S) / 2, b = -(v * R - v) / 2;\n if (P.filter = \"blur(40px) brightness(20%)\", P.translate(F, b), P.scale(R, R), P.drawImage(a, 0, 0, S, v), P.restore(), t.globalCompositeOperation = \"destination-over\", c < 0) {\n const y = f / i, M = o / y, w = et({\n source: a,\n sy: (1 - M) * v / 2,\n sh: M * v,\n dx: e,\n dy: l,\n dw: f,\n dh: o\n });\n t.drawImage(...w);\n }\n if (p < 0) {\n const y = o * i, M = f / y, w = et({\n source: a,\n sx: (1 - M) * S / 2,\n sw: M * S,\n dx: e,\n dy: l,\n dw: f,\n dh: o\n });\n t.drawImage(...w);\n }\n t.restore();\n }\n } else {\n const S = et({\n source: n,\n sx: c,\n sy: p,\n sw: u,\n sh: d,\n dx: e,\n dy: l,\n dw: f,\n dh: o\n });\n t.drawImage(...S);\n }\n const g = c * -1 * h, W = p * -1 * h, H = f - g * 2, O = o - W * 2;\n return {\n dx: g,\n dy: W,\n dw: H,\n dh: O\n };\n}\nconst kt = /\\d{0,2}:?\\d{2}:\\d{2}\\.\\d{3}\\s-->\\s\\d{0,2}:?\\d{2}:\\d{2}\\.\\d{3}\\s{1,2}.*/g, Dt = /\\d{0,2}:?\\d{2}:\\d{2}\\.\\d{3}/g;\nfunction jt(t) {\n if (!t)\n return [];\n const n = t.match(kt);\n return n ? n == null ? void 0 : n.map((r) => {\n const [s, i] = r.replace(`\\r\n`, `\n`).split(`\n`), [e, l] = s.match(Dt) || [];\n return { start: e, end: l, text: i };\n }) : [];\n}\nfunction wt(t) {\n const [n, r, s] = t.split(\":\");\n return s ? parseInt(n) * 60 * 60 + parseInt(r) * 60 + parseFloat(s) : parseInt(n) * 60 + parseInt(r);\n}\nfunction xt({ canvas: t, dx: n, dy: r, dw: s, dh: i, relativeTime: e, vttCaptions: l }) {\n if (l) {\n const o = jt(l).find(({ start: a, end: c }) => a && c && e >= wt(a) && e < wt(c));\n if (o) {\n const a = t.getContext(\"2d\");\n if (a) {\n const c = Math.min(s, i);\n let p = [\"\"];\n const u = s * 0.9, d = c * 0.05;\n a.font = `${d}px Roobert, Dejavu Sans, sans-serif`, a.textBaseline = \"middle\", o.text.split(\" \").forEach((m) => {\n const g = p.length - 1, W = a.measureText(p[g]).width, H = a.measureText(` ${m}`).width;\n W + H < u ? p[g] = `${p[g]} ${m}` : p = [...p, m];\n }), p.forEach((m, g) => {\n const W = m.trim(), H = a.measureText(W), O = n + (s - H.width) / 2, S = r + (i * 0.85 - (d + c * 0.04) * (p.length - 1 - g)), v = d * 0.8, P = d / 1.5, E = n + (s - H.width - P) / 2, R = S - v, F = H.width + P, b = v * 2, y = a.globalAlpha;\n a.save(), a.globalAlpha = 0.8 * y, a.fillStyle = \"#000000\", a.beginPath(), a.roundRect(E, R, F, b, c * 0.01), a.fill(), a.closePath(), a.globalAlpha = y, a.fillStyle = \"#FFFFFF\", a.fillText(W, O, S), a.restore();\n });\n }\n }\n }\n}\nconst J = 1.8;\nfunction tt(t) {\n return typeof t == \"number\" ? {\n top: t,\n right: t,\n bottom: t,\n left: t\n } : {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...t\n };\n}\nfunction zt(t, n = 1) {\n return typeof t == \"number\" ? {\n topLeft: t * n,\n topRight: t * n,\n bottomRight: t * n,\n bottomLeft: t * n\n } : {\n topLeft: ((t == null ? void 0 : t.topLeft) ?? 0) * n,\n topRight: ((t == null ? void 0 : t.topRight) ?? 0) * n,\n bottomRight: ((t == null ? void 0 : t.bottomRight) ?? 0) * n,\n bottomLeft: ((t == null ? void 0 : t.bottomLeft) ?? 0) * n\n };\n}\nfunction st(t, n) {\n return typeof t == \"number\" ? t : typeof t == \"function\" ? t(n) : null;\n}\nfunction it(t, n) {\n const { w: r, gap: s = 0, padding: i = 0, direction: e = \"column\", elements: l } = t, { right: f, left: o } = tt(i);\n if (r) {\n const a = st(r, n);\n if (a)\n return a;\n }\n if (l) {\n const a = l.length;\n if (e === \"row\")\n return f + o + s * (a - 1) + l.reduce((c, p) => c += it(p, n), 0);\n if (e === \"column\") {\n let c = 0;\n return l.forEach((p) => {\n const u = f + o + it(p, n);\n u > c && (c = u);\n }), c;\n }\n }\n return 0;\n}\nfunction Tt(t, n, r) {\n const {\n w: s = 0,\n gap: i = 0,\n padding: e = 0,\n direction: l = \"column\"\n } = t, { right: f, left: o } = tt(e), a = n.length, c = n.reduce((u, d) => {\n const { w: h } = d;\n if (h) {\n const m = st(h, r);\n if (m)\n return u += m;\n }\n return h === \"auto\" ? u += it(d, r) : u;\n }, 0), p = n.filter(({ w: u }) => u === \"fill\").length;\n return n.reduce((u, d) => {\n const { w: h } = d, m = s - f - o, g = Math.min(m, it(d, r));\n if (h === \"fill\") {\n if (l === \"row\") {\n const W = (s - c - f - o - i * (a - 1)) / p;\n return u = [...u, W];\n }\n if (l === \"column\")\n return u = [...u, m];\n }\n return u = [...u, g];\n }, []);\n}\nfunction ot(t, n) {\n const { h: r, gap: s = 0, padding: i = 0, direction: e = \"column\", elements: l } = t, { top: f, bottom: o } = tt(i);\n if (r) {\n const a = st(r, n);\n if (a)\n return a;\n }\n if (l) {\n const a = l.length;\n if (e === \"row\") {\n let c = 0;\n return l.forEach((p) => {\n const u = f + o + ot(p, n);\n u > c && (c = u);\n }), c;\n }\n if (e === \"column\")\n return f + o + s * (a - 1) + l.reduce((c, p) => c += ot(p, n), 0);\n }\n return 0;\n}\nfunction Ct(t, n, r) {\n const {\n h: s = 0,\n gap: i = 0,\n padding: e = 0,\n direction: l = \"column\"\n } = t, { top: f, bottom: o } = tt(e), a = n.length, c = n.reduce((u, d) => {\n const { h } = d;\n if (h) {\n const m = st(h, r);\n if (m)\n return u += m;\n }\n return h === \"auto\" ? u += ot(d, r) : u;\n }, 0), p = n.filter(({ h: u }) => u === \"fill\").length;\n return n.reduce((u, d) => {\n const { h } = d, m = s - f - o, g = Math.min(m, ot(d, r));\n if (h === \"fill\") {\n if (l === \"row\")\n return u = [...u, m];\n if (l === \"column\") {\n const W = (s - c - f - o - i * (a - 1)) / p;\n return u = [...u, W];\n }\n }\n return u = [...u, g];\n }, []);\n}\nfunction St({\n canvas: t,\n offscreenCanvas: n,\n debug: r = !1,\n origin: { x: s = 0, y: i = 0, w: e = t.width, h: l = t.height } = {},\n parent: f,\n elements: o = []\n}) {\n const a = Math.min(e, l) / 1080, p = {\n ...{\n x: 0,\n y: 0,\n w: e / a,\n h: l / a,\n gap: 0,\n padding: 0,\n direction: \"column\",\n align: \"start\",\n justify: \"start\"\n },\n ...f\n }, {\n x: u,\n y: d,\n w: h,\n h: m,\n gap: g,\n padding: W,\n direction: H,\n align: O,\n justify: S\n } = p, { top: v, right: P, bottom: E, left: R } = tt(W);\n o.map((F, b) => {\n const y = t.getContext(\"2d\", { alpha: !1 });\n if (y) {\n const M = o.length, { x: w, y: T, radius: j, elements: G = [], draw: L } = F, { topLeft: x, topRight: q, bottomRight: $, bottomLeft: B } = zt(j, a), N = Tt(p, o, { context: y }), [_, X, at] = N.reduce(\n (D, K, U) => (U < b && (D[0] = D[0] += K), U > b && (D[1] = D[1] += K), D[2] = D[2] += K, D),\n [0, 0, 0]\n ), z = N[b], ht = Ct(p, o, { context: y, width: z }), [Y, Q, lt] = ht.reduce(\n (D, K, U) => (U < b && (D[0] = D[0] += K), U > b && (D[1] = D[1] += K), D[2] = D[2] += K, D),\n [0, 0, 0]\n ), C = ht[b], Wt = {\n \"row|start|start\": R + _ + g * b,\n \"row|center|start\": R + _ + g * b,\n \"row|end|start\": R + _ + g * b,\n \"row|start|center\": h / 2 - at / 2 - g * (M - 1) / 2 + _ + g * b,\n \"row|center|center\": h / 2 - at / 2 - g * (M - 1) / 2 + _ + g * b,\n \"row|end|center\": h / 2 - at / 2 - g * (M - 1) / 2 + _ + g * b,\n \"row|start|end\": h - P - z - X - g * (M - b),\n \"row|center|end\": h - P - z - X - g * (M - b),\n \"row|end|end\": h - P - z - X - g * (M - b),\n \"column|start|start\": R,\n \"column|center|start\": h / 2 - z / 2,\n \"column|end|start\": h - P - z - X,\n \"column|start|center\": R,\n \"column|center|center\": h / 2 - z / 2,\n \"column|end|center\": h - P - z - X,\n \"column|start|end\": R,\n \"column|center|end\": h / 2 - z / 2,\n \"column|end|end\": h - P - z - X\n }, vt = {\n \"row|start|start\": v,\n \"row|center|start\": m / 2 - C / 2,\n \"row|end|start\": m - E - C - Q,\n \"row|start|center\": v,\n \"row|center|center\": m / 2 - C / 2,\n \"row|end|center\": m - E - C - Q,\n \"row|start|end\": v,\n \"row|center|end\": m / 2 - C / 2,\n \"row|end|end\": m - E - C - Q,\n \"column|start|start\": v + Y + g * b,\n \"column|center|start\": v + Y + g * b,\n \"column|end|start\": v + Y + g * b,\n \"column|start|center\": m / 2 - lt / 2 - g * (M - 1) / 2 + Y + g * b,\n \"column|center|center\": m / 2 - lt / 2 - g * (M - 1) + Y + g * b,\n \"column|end|center\": m / 2 - lt / 2 - g * (M - 1) + Y + g * b,\n \"column|start|end\": m - E - C - Q - g * (M - b),\n \"column|center|end\": m - E - C - Q - g * (M - b),\n \"column|end|end\": m - E - C - Q - g * (M - b)\n }, mt = u + (w ?? Wt[`${H}|${O}|${S}`]), gt = d + (T ?? vt[`${H}|${O}|${S}`]), A = s + mt * a, k = i + gt * a, V = z * a, I = C * a;\n L && (y.save(), j && (y.beginPath(), y.moveTo(A + Math.min(I / J, x), k), y.lineTo(A + V - Math.min(I / J, q), k), y.quadraticCurveTo(\n A + V,\n k,\n A + V,\n k + Math.min(I / J, q)\n ), y.lineTo(A + V, k + I - Math.min(I / J, $)), y.quadraticCurveTo(\n A + V,\n k + I,\n A + V - Math.min(I / J, $),\n k + I\n ), y.lineTo(A + Math.min(I / J, B), k + I), y.quadraticCurveTo(\n A,\n k + I,\n A,\n k + I - Math.min(I / J, B)\n ), y.lineTo(A, k + Math.min(I / J, x)), y.quadraticCurveTo(A, k, A + Math.min(I / J, x), k), y.closePath(), r && (y.strokeStyle = \"blue\", y.stroke()), y.clip()), L({ scale: a, canvas: t, context: y, offscreenCanvas: n, dx: A, dy: k, dw: V, dh: I }), r && (y.strokeStyle = \"red\", y.strokeRect(A, k, V, I)), y.restore()), St({\n canvas: t,\n offscreenCanvas: n,\n debug: r,\n origin: {\n x: s,\n y: i,\n w: e,\n h: l\n },\n parent: {\n ...F,\n x: mt,\n y: gt,\n w: z,\n h: C\n },\n elements: G\n });\n }\n });\n}\nfunction qt(t) {\n return St(t);\n}\nfunction nt({ context: t, node: n, maxW: r = 1 / 0 }) {\n const s = (n.value ?? \"\").split(\" \");\n return s.slice(1).reduce(\n (i, e) => {\n const f = `${i[i.length - 1].text} ${e}`.trim(), o = t.measureText(f);\n return o.width > r ? i = [...i, { text: e, metrics: t.measureText(e) }] : i[i.length - 1] = {\n text: f,\n metrics: o\n }, i;\n },\n [{ text: s[0], metrics: t.measureText(s[0]) }]\n );\n}\nfunction Pt(t) {\n const { visible: n = !0, node: r } = t, s = [...(r == null ? void 0 : r.elements) ?? [], ...(t == null ? void 0 : t.elements) ?? []];\n return n ? r && r.type !== \"box\" && r.type !== \"gradient\" ? !!r.value : s == null ? void 0 : s.some((i) => Pt(i)) : !1;\n}\nfunction Ot({ debug: t, elements: n, currentTime: r, relativeTime: s }) {\n return n.map((i) => {\n const { node: e } = i;\n if (Pt(i))\n return {\n ...i,\n ...(e == null ? void 0 : e.type) === \"text\" && e.value ? {\n w: e.fill ? \"fill\" : ({ context: l }) => e && e.type === \"text\" && e.value ? (l.font = e.font, l.textBaseline = \"top\", Math.ceil(l.measureText(e.value).width)) : 0,\n h: e.fill ? \"fill\" : ({ width: l, context: f }) => {\n var o, a;\n if (e && e.type === \"text\") {\n const c = /(?<value>\\d+\\.?\\d*)(?=px)/, p = parseFloat(((a = (o = e.font.match(c)) == null ? void 0 : o.groups) == null ? void 0 : a.value) ?? \"0\");\n return e.wrap ? nt({ context: f, node: e, maxW: l }).length * p : p;\n }\n return 0;\n }\n } : {},\n ...(e == null ? void 0 : e.type) === \"image\" && e.image && e.size ? {\n w: () => {\n var p, u, d, h, m, g;\n const l = ((p = e.image) == null ? void 0 : p.naturalWidth) ?? ((u = e.image) == null ? void 0 : u.width), f = ((d = e.image) == null ? void 0 : d.naturalHeight) ?? ((h = e.image) == null ? void 0 : h.height), o = l / f, a = (m = e.size) == null ? void 0 : m.w, c = ((g = e.size) == null ? void 0 : g.h) ?? 0;\n return a ?? (o >= 1 ? c : c * o);\n },\n h: () => {\n var p, u, d, h, m, g;\n const l = ((p = e.image) == null ? void 0 : p.naturalWidth) ?? ((u = e.image) == null ? void 0 : u.width), f = ((d = e.image) == null ? void 0 : d.naturalHeight) ?? ((h = e.image) == null ? void 0 : h.height), o = l / f, a = ((m = e.size) == null ? void 0 : m.w) ?? 0;\n return ((g = e.size) == null ? void 0 : g.h) ?? (o < 1 ? a : a * o);\n }\n } : {},\n elements: i.elements ? Ot({ debug: t, elements: i.elements, currentTime: r, relativeTime: s }) : void 0,\n draw: ({ canvas: l, offscreenCanvas: f, context: o, dx: a, dy: c, dw: p, dh: u, scale: d }) => {\n var h, m, g, W, H, O, S, v, P, E, R;\n if (e) {\n const { type: F, from: b = 0, to: y = 1 / 0 } = e;\n if (s >= b && s <= y) {\n if (o.save(), s && y - 1 / 3 <= s && (o.globalAlpha = 1 - (1 / 3 / 2 - (y - s)) / (1 / 3 / 2)), F === \"box\" && (o.fillStyle = e.background, o.fillRect(a, c, p, u)), F === \"text\" && e.value) {\n const M = /(?<value>\\d+\\.?\\d*)(?=px)/;\n let w = 0;\n const T = parseFloat(((m = (h = e.font.match(M)) == null ? void 0 : h.groups) == null ? void 0 : m.value) ?? \"0\") * d;\n if (e.fill) {\n const { minSize: j, maxSize: G } = e.fill;\n w = j * d, o.font = e.font.replace(M, w.toString());\n const L = 10 * d;\n let x = 0, q = nt({ context: o, node: e, maxW: p });\n for (\n ;\n // Don't iterate if the next fontsize up would overflow the container\n w + L < G * d && (q.length + 1) * (w + L) < u;\n )\n if (w += L, o.font = e.font.replace(M, w.toString()), q = nt({ context: o, node: e, maxW: p }), x = q.reduce(($, B) => (B.metrics.width > $ && ($ = B.metrics.width), $), 0), x > p) {\n w -= L;\n break;\n }\n o.font = e.font.replace(M, w.toString());\n } else\n w = T, o.font = e.font.replace(M, T.toString());\n o.textBaseline = \"top\", o.fillStyle = e.color, e.wrap ? nt({ context: o, node: e, maxW: p }).forEach((G, L) => {\n o.fillText(G.text, a, c + w * L);\n }) : o.fillText(e.value, a, c);\n }\n if (F === \"image\" && e.image && o.drawImage(e.image, a, c, p, u), F === \"video\" && ((g = e.video) != null && g.node || (W = e.video) != null && W.getSource)) {\n const M = e.format ?? \"letterbox\", w = ((O = (H = e.video) == null ? void 0 : H.getSource) == null ? void 0 : O.call(H, s)) ?? e.video.node, T = (w == null ? void 0 : w.videoWidth) ?? (w == null ? void 0 : w.naturalWidth) ?? (w == null ? void 0 : w.width), j = (w == null ? void 0 : w.videoHeight) ?? (w == null ? void 0 : w.naturalHeight) ?? (w == null ? void 0 : w.height);\n if (T && j) {\n const { resolution: L, aspectRatio: x } = Z({\n resolution: Math.min(T, j),\n aspectRatio: T / j\n }), {\n dx: q,\n dy: $,\n dw: B,\n dh: N\n } = dt({\n offscreenCanvas: f,\n context: o,\n source: w,\n format: M,\n videoResolution: L,\n videoAspectRatio: x,\n posX: a,\n posY: c,\n width: p,\n height: u\n });\n e.elements && ct({\n debug: t,\n canvas: l,\n offscreenCanvas: f,\n currentTime: r,\n relativeTime: s,\n origin: {\n x: Math.max(a, a + q),\n y: Math.max(c, c + $),\n w: Math.min(p, B),\n h: Math.min(u, N)\n },\n elements: e.elements\n });\n }\n const G = 1 / 3;\n if (e.poster && r >= 0 && r <= G) {\n o.save(), o.globalAlpha = 1 - r / G;\n const L = ((S = e.poster) == null ? void 0 : S.naturalWidth) ?? ((v = e.poster) == null ? void 0 : v.width), x = ((P = e.poster) == null ? void 0 : P.naturalHeight) ?? ((E = e.poster) == null ? void 0 : E.height);\n if (L && x) {\n const { resolution: q, aspectRatio: $ } = Z({\n resolution: Math.min(L, x),\n aspectRatio: L / x\n }), {\n dx: B,\n dy: N,\n dw: _,\n dh: X\n } = dt({\n offscreenCanvas: f,\n context: o,\n source: e.poster,\n format: M,\n videoResolution: q,\n videoAspectRatio: $,\n posX: a,\n posY: c,\n width: p,\n height: u\n });\n e.elements && ct({\n debug: t,\n canvas: l,\n offscreenCanvas: f,\n currentTime: r,\n relativeTime: s,\n origin: {\n x: Math.max(a, a + B),\n y: Math.max(c, c + N),\n w: Math.min(p, _),\n h: Math.min(u, X)\n },\n elements: e.elements\n });\n }\n o.restore();\n }\n }\n if (F === \"gradient\" && e.value) {\n const M = o.createLinearGradient(a + p, c, a + p, c + u);\n (R = e.value) == null || R.forEach((w) => {\n M.addColorStop(w.percent, w.color);\n }), o.fillStyle = M, o.fillRect(a, c, p, u);\n }\n o.restore();\n }\n }\n }\n };\n }).filter(Boolean);\n}\nfunction ct({ debug: t, elements: n, currentTime: r, relativeTime: s, ...i }) {\n return qt({\n ...i,\n debug: t,\n elements: Ot({ debug: t, elements: n, currentTime: r, relativeTime: s })\n });\n}\nconst $t = (t, n, r, s) => {\n if (r === \"length\" || r === \"prototype\" || r === \"arguments\" || r === \"caller\")\n return;\n const i = Object.getOwnPropertyDescriptor(t, r), e = Object.getOwnPropertyDescriptor(n, r);\n !Bt(i, e) && s || Object.defineProperty(t, r, e);\n}, Bt = function(t, n) {\n return t === void 0 || t.configurable || t.writable === n.writable && t.enumerable === n.enumerable && t.configurable === n.configurable && (t.writable || t.value === n.value);\n}, Jt = (t, n) => {\n const r = Object.getPrototypeOf(n);\n r !== Object.getPrototypeOf(t) && Object.setPrototypeOf(t, r);\n}, Gt = (t, n) => `/* Wrapped ${t}*/\n${n}`, _t = Object.getOwnPropertyDescriptor(Function.prototype, \"toString\"), Xt = Object.getOwnPropertyDescriptor(Function.prototype.toString, \"name\"), Vt = (t, n, r) => {\n const s = r === \"\" ? \"\" : `with ${r.trim()}() `, i = Gt.bind(null, s, n.toString());\n Object.defineProperty(i, \"name\", Xt), Object.defineProperty(t, \"toString\", { ..._t, value: i });\n};\nfunction Kt(t, n, { ignoreNonConfigurable: r = !1 } = {}) {\n const { name: s } = t;\n for (const i of Reflect.ownKeys(n))\n $t(t, n, i, r);\n return Jt(t, n), Vt(t, n, s), t;\n}\nconst Nt = /* @__PURE__ */ new WeakMap();\nfunction Rt(t, { cacheKey: n = ([s]) => s, cache: r = /* @__PURE__ */ new Map() } = {}) {\n const s = /* @__PURE__ */ new Map(), i = function(...e) {\n const l = n(e);\n if (s.has(l))\n return s.get(l);\n const f = (async () => {\n try {\n if (r && await r.has(l))\n return await r.get(l);\n const a = await t.apply(this, e);\n try {\n return a;\n } finally {\n r && await r.set(l, a);\n }\n } finally {\n s.delete(l);\n }\n })();\n return s.set(l, f), f;\n };\n return Kt(i, t, {\n ignoreNonConfigurable: !0\n }), Nt.set(i, r), i;\n}\nconst Yt = {\n template: {\n layouts: [\n {\n name: \"basic\",\n tree: `[\n {\n \"w\": \"fill\",\n \"h\": \"fill\",\n \"node\": {\n \"type\": \"video\",\n \"format\": {{@ parse(it.videoFormat) /}},\n \"value\": {\n \"id\": {{@ parse(it.id) /}},\n \"src\": {{@async resolve-source({ sources: [it.mp4, it.input] }) /}},\n \"playlist\": {{@async resolve-source({ sources: [it.playlist] }) /}},\n \"poster\": {{@ parse(it.poster) /}},\n \"captions\": {{@ parse(it.captions) /}},\n \"duration\": {{@ parse(it.duration) /}},\n \"startOffset\": {{@ parse(it.startOffset) /}},\n \"endOffset\": {{@ parse(it.endOffset) /}}\n }\n }\n }\n ]`\n }\n ],\n content: [\n {\n scenes: [\n {\n layout: \"basic\",\n data: `{\n \"id\": \"{{ it.root?.answer?.id }}-intro\",\n \"mp4\": {{@ parse(it.root?.answer?.media?.video) /}},\n \"input\": {{@ parse(it.root?.answer?.media?.input) /}},\n \"playlist\": {{@ parse(it.root?.answer?.media?.playlist) /}},\n \"poster\": {{@ parse(it.root?.answer?.media?.preview) /}},\n \"captions\": {{@ parse(it.root?.answer?.captions?.current) /}},\n \"duration\": {{@ parse(it.root?.answer?.metadata?.duration) /}},\n \"startOffset\": {{@ parse(it.root?.answer?.settings?.startOffset) /}},\n \"endOffset\": {{@ parse(it.root?.answer?.settings?.endOffset) /}}\n }`\n }\n ],\n root: \"{{ it.intro?.questions?.items | stringify }}\"\n },\n {\n scenes: [\n {\n layout: \"basic\",\n data: `{\n \"id\": {{@ parse(it.root?.answer?.id) /}},\n \"mp4\": {{@ parse(it.root?.answer?.media?.video) /}},\n \"input\": {{@ parse(it.root?.answer?.media?.input) /}},\n \"playlist\": {{@ parse(it.root?.answer?.media?.playlist) /}},\n \"poster\": {{@ parse(it.root?.answer?.media?.preview) /}},\n \"captions\": {{@ parse(it.root?.answer?.captions?.current) /}},\n \"duration\": {{@ parse(it.root?.answer?.metadata?.duration) /}},\n \"startOffset\": {{@ parse(it.root?.answer?.settings?.startOffset) /}},\n \"endOffset\": {{@ parse(it.root?.answer?.settings?.endOffset) /}}\n }`\n }\n ],\n root: \"{{ it.questions?.items | stringify }}\"\n },\n {\n scenes: [\n {\n layout: \"basic\",\n data: `{\n \"id\": \"{{ it.root?.answer?.id }}-outro\",\n \"mp4\": {{@ parse(it.root?.answer?.media?.video) /}},\n \"input\": {{@ parse(it.root?.answer?.media?.input) /}},\n \"playlist\": {{@ parse(it.root?.answer?.media?.playlist) /}},\n \"poster\": {{@ parse(it.root?.answer?.media?.preview) /}},\n \"captions\": {{@ parse(it.root?.answer?.captions?.current) /}},\n \"duration\": {{@ parse(it.root?.answer?.metadata?.duration) /}},\n \"startOffset\": {{@ parse(it.root?.answer?.settings?.startOffset) /}},\n \"endOffset\": {{@ parse(it.root?.answer?.settings?.endOffset) /}}\n }`\n }\n ],\n root: \"{{ it.outro?.questions?.items | stringify }}\"\n }\n ]\n },\n meta: {\n transitionDuration: 1 / 3\n }\n};\nasync function Qt() {\n if (typeof window > \"u\") {\n const t = await import(\"skia-canvas\");\n return new t.Image();\n }\n return new Image();\n}\nconst yt = Rt(async function(n) {\n return n ? new Promise((r, s) => {\n Qt().then((i) => {\n i.onload = () => {\n r(i);\n }, i.onerror = (e) => {\n s(e);\n }, i.src = n;\n });\n }) : null;\n});\nasync function ft({ element: t }, n, r) {\n var e, l, f;\n let s = { ...t };\n const { node: i } = t;\n if ((i == null ? void 0 : i.type) === \"video\" && ((e = i == null ? void 0 : i.value) != null && e.src || (l = i == null ? void 0 : i.value) != null && l.playlist)) {\n const o = await n(i.value);\n let a;\n try {\n a = await yt(i.value.poster);\n } catch {\n a = null;\n }\n s = {\n ...s,\n node: {\n ...i,\n video: o,\n poster: a,\n meta: await r(i.value, o.node)\n }\n };\n }\n if ((i == null ? void 0 : i.type) === \"image\" && i.value) {\n let o;\n try {\n o = await yt(i.value);\n } catch {\n o = null;\n }\n s = {\n ...s,\n node: {\n ...i,\n image: o\n }\n };\n }\n return s.node && ((f = t.node) != null && f.elements) && (s.node.elements = await Promise.all(\n t.node.elements.map((o) => ft({ element: o }, n, r))\n )), t.elements && (s.elements = await Promise.all(\n t.elements.map((o) => ft({ element: o }, n, r))\n )), s;\n}\nasync function bt() {\n if (typeof window > \"u\") {\n const t = await import(\"skia-canvas\"), n = new t.Canvas();\n return n.gpu = !1, n;\n }\n return document.createElement(\"canvas\");\n}\nasync function Ut(t) {\n var n;\n try {\n if ((n = await Et(t, { method: \"HEAD\" })) != null && n.ok)\n return t;\n } catch {\n return;\n }\n}\nasync function Zt({ sources: t }) {\n let n = null;\n if (t) {\n const r = t.filter(Boolean).map((s) => Ut(s));\n n = (await Promise.all(r)).find(Boolean);\n }\n return n;\n}\npt.define(\"stringify\", (t) => JSON.stringify(t));\npt.define(\"nullify\", (t) => typeof t > \"u\" ? null : t);\npt.define(\"filter\", (t, n) => {\n if (!n)\n return t;\n if (!Array.isArray(t))\n throw new Error(\"Data for filter must be an array\");\n return t.filter((r, s) => n.includes(s));\n});\nMt.define(\"parse\", (t) => {\n const n = t.params[0];\n return typeof n == \"string\" ? `\"${n.replace(/\\n/g, \"\\\\n\").replace(/\\r/g, \"\\\\r\")}\"` : typeof n > \"u\" ? null : n;\n});\nMt.define(\n \"resolve-source\",\n Rt(\n async (t) => {\n const { sources: n } = t.params[0] ?? {}, r = n == null ? void 0 : n.filter(Boolean), s = r == null ? void 0 : r.find((l) => l.includes(\"blob:\")), i = r == null ? void 0 : r.find((l) => !l.includes(\"http\")), e = s ?? i ?? await Zt({ sources: n });\n return e ? `\"${e}\"` : \"null\";\n },\n {\n cacheKey: ([t]) => JSON.stringify(t.params[0] ?? {})\n }\n )\n);\nconst rt = (t, n, r) => Ht(\n t,\n n,\n Ft({\n autoEscape: !1,\n // Because we're always parsing our templates as JSON, all undefined values must be cast to null\n // since `undefined` is not valid JSON\n defaultFilter: \"nullify\",\n async: !0,\n asyncHelpers: [\"resolve-source\"],\n ...r\n })\n);\nfunction ut(t = []) {\n var n;\n for (const r of t)\n return ((n = r == null ? void 0 : r.node) == null ? void 0 : n.type) === \"video\" ? r.node : ut(r == null ? void 0 : r.elements);\n}\nasync function re({ data: t, template: n = Yt, burnCaptions: r = !1 }, s, i) {\n var c, p, u;\n const e = (await Promise.all(\n n.template.content.map(async ({ scenes: d, root: h }) => {\n const m = {\n ...n.options,\n ...t,\n intro: n.intro,\n outro: n.outro\n };\n async function g(W) {\n return Promise.all(\n d.map(async ({ layout: H, duration: O, data: S, options: v }) => {\n var M, w, T;\n const P = S ? JSON.parse(await rt(S, { ...m, root: W })) : {}, E = v ? JSON.parse(await rt(v, m)) : {}, R = (M = n.template.layouts.find((j) => j.name === H)) == null ? void 0 : M.tree, F = JSON.parse(\n await rt(R, {\n ...P,\n ...E\n })\n ), b = await Promise.all(\n F.flatMap((j) => ft({ element: j }, s, i))\n ), y = ut(b);\n return {\n duration: O ?? ((w = y == null ? void 0 : y.meta) == null ? void 0 : w.duration) ?? 0,\n captions: (T = y == null ? void 0 : y.meta) == null ? void 0 : T.captions,\n elements: b\n };\n })\n );\n }\n if (h) {\n const W = JSON.parse(await rt(h, m));\n return Array.isArray(W) ? (await Promise.all(W.map(async (H) => g(H)))).flatMap((H) => H) : g(W);\n }\n return g(t);\n })\n )).flatMap((d) => d).filter((d) => d.duration > 0), l = ((c = n.meta) == null ? void 0 : c.frameRate) ?? 30, f = ((p = n.meta) == null ? void 0 : p.resolution) ?? 720, o = ((u = n.meta) == null ? void 0 : u.transitionDuration) ?? 1 / 3, a = await Promise.all(\n e.map(async ({ duration: d, captions: h, elements: m }, g) => {\n var P, E;\n const W = await bt(), H = await bt(), O = ut(m), S = e.reduce((R, F, b) => (b < g && (R += F.duration - o / 2), R), 0);\n return {\n draw: ({ canvas: R, currentTime: F }) => {\n const b = Math.max(0, F - S);\n ct({\n canvas: R,\n elements: m,\n currentTime: F,\n relativeTime: b,\n offscreenCanvas: W\n }), h && r && xt({\n canvas: R,\n dx: 0,\n dy: 0,\n dw: R.width,\n dh: R.height,\n vttCaptions: h,\n relativeTime: b + ((O == null ? void 0 : O.meta.start) ?? 0)\n });\n },\n duration: d,\n transitionCanvas: H,\n start: S,\n video: O == null ? void 0 : O.video,\n videoMeta: O == null ? void 0 : O.meta,\n audio: {\n duration: d,\n src: (P = O == null ? void 0 : O.value) == null ? void 0 : P.src,\n start: (E = O == null ? void 0 : O.meta) == null ? void 0 : E.start\n }\n };\n })\n );\n return {\n scenes: a,\n frameRate: l,\n resolution: f,\n transitionDuration: o,\n fonts: n.template.fonts ?? [],\n duration: Math.max(0, ...a.map(({ start: d, duration: h }) => d + h))\n };\n}\nexport {\n ne as crossFade,\n xt as drawCaptions,\n ct as drawElements,\n dt as drawVideoFormat,\n Z as getSizeDetails,\n Lt as normaliseAspectRatio,\n It as normaliseResolution,\n wt as parseTimestamp,\n re as templateToScenes,\n jt as vttToLines\n};\n//# sourceMappingURL=canvas-video.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{noChange as t}from\"../lit-html.js\";import{directive as i,Directive as s,PartType as r}from\"../directive.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=i(class extends s{constructor(t){var i;if(super(t),t.type!==r.ATTRIBUTE||\"class\"!==t.name||(null===(i=t.strings)||void 0===i?void 0:i.length)>2)throw Error(\"`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.\")}render(t){return\" \"+Object.keys(t).filter((i=>t[i])).join(\" \")+\" \"}update(i,[s]){var r,o;if(void 0===this.it){this.it=new Set,void 0!==i.strings&&(this.nt=new Set(i.strings.join(\" \").split(/\\s/).filter((t=>\"\"!==t))));for(const t in s)s[t]&&!(null===(r=this.nt)||void 0===r?void 0:r.has(t))&&this.it.add(t);return this.render(s)}const e=i.element.classList;this.it.forEach((t=>{t in s||(e.remove(t),this.it.delete(t))}));for(const t in s){const i=!!s[t];i===this.it.has(t)||(null===(o=this.nt)||void 0===o?void 0:o.has(t))||(i?(e.add(t),this.it.add(t)):(e.remove(t),this.it.delete(t)))}return t}});export{o as classMap};\n//# sourceMappingURL=class-map.js.map\n","import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const l=l=>null!=l?l:t;export{l as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","import{_$LH as o}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{I:l}=o,t=o=>null===o||\"object\"!=typeof o&&\"function\"!=typeof o,i={HTML:1,SVG:2},n=(o,l)=>void 0===l?void 0!==(null==o?void 0:o._$litType$):(null==o?void 0:o._$litType$)===l,d=o=>void 0!==(null==o?void 0:o._$litDirective$),v=o=>null==o?void 0:o._$litDirective$,e=o=>void 0===o.strings,c=()=>document.createComment(\"\"),r=(o,t,i)=>{var n;const d=o._$AA.parentNode,v=void 0===t?o._$AB:t._$AA;if(void 0===i){const t=d.insertBefore(c(),v),n=d.insertBefore(c(),v);i=new l(t,n,o,o.options)}else{const l=i._$AB.nextSibling,t=i._$AM,e=t!==o;if(e){let l;null===(n=i._$AQ)||void 0===n||n.call(i,o),i._$AM=o,void 0!==i._$AP&&(l=o._$AU)!==t._$AU&&i._$AP(l)}if(l!==v||e){let o=i._$AA;for(;o!==l;){const l=o.nextSibling;d.insertBefore(o,v),o=l}}}return i},u=(o,l,t=o)=>(o._$AI(l,t),o),f={},s=(o,l=f)=>o._$AH=l,m=o=>o._$AH,p=o=>{var l;null===(l=o._$AP)||void 0===l||l.call(o,!1,!0);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o}},a=o=>{o._$AR()};export{i as TemplateResultType,a as clearPart,m as getCommittedValue,v as getDirectiveClass,r as insertPart,d as isDirectiveResult,t as isPrimitive,e as isSingleExpression,n as isTemplateResult,p as removePart,u as setChildPartValue,s as setCommittedValue};\n//# sourceMappingURL=directive-helpers.js.map\n","import{isSingleExpression as i}from\"./directive-helpers.js\";import{Directive as t,PartType as e}from\"./directive.js\";export{Directive,PartType,directive}from\"./directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=(i,t)=>{var e,o;const r=i._$AN;if(void 0===r)return!1;for(const i of r)null===(o=(e=i)._$AO)||void 0===o||o.call(e,t,!1),s(i,t);return!0},o=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t}while(0===(null==e?void 0:e.size))},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),l(t)}};function n(i){void 0!==this._$AN?(o(this),this._$AM=i,r(this)):this._$AM=i}function h(i,t=!1,e=0){const r=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(t)if(Array.isArray(r))for(let i=e;i<r.length;i++)s(r[i],!1),o(r[i]);else null!=r&&(s(r,!1),o(r));else s(this,i)}const l=i=>{var t,s,o,r;i.type==e.CHILD&&(null!==(t=(o=i)._$AP)&&void 0!==t||(o._$AP=h),null!==(s=(r=i)._$AQ)&&void 0!==s||(r._$AQ=n))};class c extends t{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU}_$AO(i,t=!0){var e,r;i!==this.isConnected&&(this.isConnected=i,i?null===(e=this.reconnected)||void 0===e||e.call(this):null===(r=this.disconnected)||void 0===r||r.call(this)),t&&(s(this,i),o(this))}setValue(t){if(i(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}export{c as AsyncDirective};\n//# sourceMappingURL=async-directive.js.map\n","import{nothing as i}from\"../lit-html.js\";import{AsyncDirective as t}from\"../async-directive.js\";import{directive as s}from\"../directive.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const e=()=>new o;class o{}const h=new WeakMap,n=s(class extends t{render(t){return i}update(t,[s]){var e;const o=s!==this.G;return o&&void 0!==this.G&&this.ot(void 0),(o||this.rt!==this.lt)&&(this.G=s,this.ct=null===(e=t.options)||void 0===e?void 0:e.host,this.ot(this.lt=t.element)),i}ot(i){var t;if(\"function\"==typeof this.G){const s=null!==(t=this.ct)&&void 0!==t?t:globalThis;let e=h.get(s);void 0===e&&(e=new WeakMap,h.set(s,e)),void 0!==e.get(this.G)&&this.G.call(this.ct,void 0),e.set(this.G,i),void 0!==i&&this.G.call(this.ct,i)}else this.G.value=i}get rt(){var i,t,s;return\"function\"==typeof this.G?null===(t=h.get(null!==(i=this.ct)&&void 0!==i?i:globalThis))||void 0===t?void 0:t.get(this.G):null===(s=this.G)||void 0===s?void 0:s.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});export{e as createRef,n as ref};\n//# sourceMappingURL=ref.js.map\n","module.exports = flatten\nflatten.flatten = flatten\nflatten.unflatten = unflatten\n\nfunction isBuffer (obj) {\n return obj &&\n obj.constructor &&\n (typeof obj.constructor.isBuffer === 'function') &&\n obj.constructor.isBuffer(obj)\n}\n\nfunction keyIdentity (key) {\n return key\n}\n\nfunction flatten (target, opts) {\n opts = opts || {}\n\n const delimiter = opts.delimiter || '.'\n const maxDepth = opts.maxDepth\n const transformKey = opts.transformKey || keyIdentity\n const output = {}\n\n function step (object, prev, currentDepth) {\n currentDepth = currentDepth || 1\n Object.keys(object).forEach(function (key) {\n const value = object[key]\n const isarray = opts.safe && Array.isArray(value)\n const type = Object.prototype.toString.call(value)\n const isbuffer = isBuffer(value)\n const isobject = (\n type === '[object Object]' ||\n type === '[object Array]'\n )\n\n const newKey = prev\n ? prev + delimiter + transformKey(key)\n : transformKey(key)\n\n if (!isarray && !isbuffer && isobject && Object.keys(value).length &&\n (!opts.maxDepth || currentDepth < maxDepth)) {\n return step(value, newKey, currentDepth + 1)\n }\n\n output[newKey] = value\n })\n }\n\n step(target)\n\n return output\n}\n\nfunction unflatten (target, opts) {\n opts = opts || {}\n\n const delimiter = opts.delimiter || '.'\n const overwrite = opts.overwrite || false\n const transformKey = opts.transformKey || keyIdentity\n const result = {}\n\n const isbuffer = isBuffer(target)\n if (isbuffer || Object.prototype.toString.call(target) !== '[object Object]') {\n return target\n }\n\n // safely ensure that the key is\n // an integer.\n function getkey (key) {\n const parsedKey = Number(key)\n\n return (\n isNaN(parsedKey) ||\n key.indexOf('.') !== -1 ||\n opts.object\n ) ? key\n : parsedKey\n }\n\n function addKeys (keyPrefix, recipient, target) {\n return Object.keys(target).reduce(function (result, key) {\n result[keyPrefix + delimiter + key] = target[key]\n\n return result\n }, recipient)\n }\n\n function isEmpty (val) {\n const type = Object.prototype.toString.call(val)\n const isArray = type === '[object Array]'\n const isObject = type === '[object Object]'\n\n if (!val) {\n return true\n } else if (isArray) {\n return !val.length\n } else if (isObject) {\n return !Object.keys(val).length\n }\n }\n\n target = Object.keys(target).reduce(function (result, key) {\n const type = Object.prototype.toString.call(target[key])\n const isObject = (type === '[object Object]' || type === '[object Array]')\n if (!isObject || isEmpty(target[key])) {\n result[key] = target[key]\n return result\n } else {\n return addKeys(\n key,\n result,\n flatten(target[key], opts)\n )\n }\n }, {})\n\n Object.keys(target).forEach(function (key) {\n const split = key.split(delimiter).map(transformKey)\n let key1 = getkey(split.shift())\n let key2 = getkey(split[0])\n let recipient = result\n\n while (key2 !== undefined) {\n if (key1 === '__proto__') {\n return\n }\n\n const type = Object.prototype.toString.call(recipient[key1])\n const isobject = (\n type === '[object Object]' ||\n type === '[object Array]'\n )\n\n // do not write over falsey, non-undefined values if overwrite is false\n if (!overwrite && !isobject && typeof recipient[key1] !== 'undefined') {\n return\n }\n\n if ((overwrite && !isobject) || (!overwrite && recipient[key1] == null)) {\n recipient[key1] = (\n typeof key2 === 'number' &&\n !opts.object ? [] : {}\n )\n }\n\n recipient = recipient[key1]\n if (split.length > 0) {\n key1 = getkey(split.shift())\n key2 = getkey(split[0])\n }\n }\n\n // unflatten again for 'messy objects'\n recipient[key1] = unflatten(target[key], opts)\n })\n\n return result\n}\n","import{noChange as e}from\"../lit-html.js\";import{directive as s,Directive as t,PartType as r}from\"../directive.js\";import{getCommittedValue as l,setChildPartValue as o,insertPart as i,removePart as n,setCommittedValue as f}from\"../directive-helpers.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst u=(e,s,t)=>{const r=new Map;for(let l=s;l<=t;l++)r.set(e[l],l);return r},c=s(class extends t{constructor(e){if(super(e),e.type!==r.CHILD)throw Error(\"repeat() can only be used in text expressions\")}dt(e,s,t){let r;void 0===t?t=s:void 0!==s&&(r=s);const l=[],o=[];let i=0;for(const s of e)l[i]=r?r(s,i):i,o[i]=t(s,i),i++;return{values:o,keys:l}}render(e,s,t){return this.dt(e,s,t).values}update(s,[t,r,c]){var d;const a=l(s),{values:p,keys:v}=this.dt(t,r,c);if(!Array.isArray(a))return this.ht=v,p;const h=null!==(d=this.ht)&&void 0!==d?d:this.ht=[],m=[];let y,x,j=0,k=a.length-1,w=0,A=p.length-1;for(;j<=k&&w<=A;)if(null===a[j])j++;else if(null===a[k])k--;else if(h[j]===v[w])m[w]=o(a[j],p[w]),j++,w++;else if(h[k]===v[A])m[A]=o(a[k],p[A]),k--,A--;else if(h[j]===v[A])m[A]=o(a[j],p[A]),i(s,m[A+1],a[j]),j++,A--;else if(h[k]===v[w])m[w]=o(a[k],p[w]),i(s,a[j],a[k]),k--,w++;else if(void 0===y&&(y=u(v,w,A),x=u(h,j,k)),y.has(h[j]))if(y.has(h[k])){const e=x.get(v[w]),t=void 0!==e?a[e]:null;if(null===t){const e=i(s,a[j]);o(e,p[w]),m[w]=e}else m[w]=o(t,p[w]),i(s,a[j],t),a[e]=null;w++}else n(a[k]),k--;else n(a[j]),j++;for(;w<=A;){const e=i(s,m[A+1]);o(e,p[w]),m[w++]=e}for(;j<=k;){const e=a[j++];null!==e&&n(e)}return this.ht=v,f(s,m),e}});export{c as repeat};\n//# sourceMappingURL=repeat.js.map\n","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","/**!\n* tippy.js v6.3.7\n* (c) 2017-2021 atomiks\n* MIT License\n*/\nimport { createPopper, applyStyles } from '@popperjs/core';\n\nvar ROUND_ARROW = '<svg width=\"16\" height=\"6\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z\"></svg>';\nvar BOX_CLASS = \"tippy-box\";\nvar CONTENT_CLASS = \"tippy-content\";\nvar BACKDROP_CLASS = \"tippy-backdrop\";\nvar ARROW_CLASS = \"tippy-arrow\";\nvar SVG_ARROW_CLASS = \"tippy-svg-arrow\";\nvar TOUCH_OPTIONS = {\n passive: true,\n capture: true\n};\nvar TIPPY_DEFAULT_APPEND_TO = function TIPPY_DEFAULT_APPEND_TO() {\n return document.body;\n};\n\nfunction hasOwnProperty(obj, key) {\n return {}.hasOwnProperty.call(obj, key);\n}\nfunction getValueAtIndexOrReturn(value, index, defaultValue) {\n if (Array.isArray(value)) {\n var v = value[index];\n return v == null ? Array.isArray(defaultValue) ? defaultValue[index] : defaultValue : v;\n }\n\n return value;\n}\nfunction isType(value, type) {\n var str = {}.toString.call(value);\n return str.indexOf('[object') === 0 && str.indexOf(type + \"]\") > -1;\n}\nfunction invokeWithArgsOrReturn(value, args) {\n return typeof value === 'function' ? value.apply(void 0, args) : value;\n}\nfunction debounce(fn, ms) {\n // Avoid wrapping in `setTimeout` if ms is 0 anyway\n if (ms === 0) {\n return fn;\n }\n\n var timeout;\n return function (arg) {\n clearTimeout(timeout);\n timeout = setTimeout(function () {\n fn(arg);\n }, ms);\n };\n}\nfunction removeProperties(obj, keys) {\n var clone = Object.assign({}, obj);\n keys.forEach(function (key) {\n delete clone[key];\n });\n return clone;\n}\nfunction splitBySpaces(value) {\n return value.split(/\\s+/).filter(Boolean);\n}\nfunction normalizeToArray(value) {\n return [].concat(value);\n}\nfunction pushIfUnique(arr, value) {\n if (arr.indexOf(value) === -1) {\n arr.push(value);\n }\n}\nfunction unique(arr) {\n return arr.filter(function (item, index) {\n return arr.indexOf(item) === index;\n });\n}\nfunction getBasePlacement(placement) {\n return placement.split('-')[0];\n}\nfunction arrayFrom(value) {\n return [].slice.call(value);\n}\nfunction removeUndefinedProps(obj) {\n return Object.keys(obj).reduce(function (acc, key) {\n if (obj[key] !== undefined) {\n acc[key] = obj[key];\n }\n\n return acc;\n }, {});\n}\n\nfunction div() {\n return document.createElement('div');\n}\nfunction isElement(value) {\n return ['Element', 'Fragment'].some(function (type) {\n return isType(value, type);\n });\n}\nfunction isNodeList(value) {\n return isType(value, 'NodeList');\n}\nfunction isMouseEvent(value) {\n return isType(value, 'MouseEvent');\n}\nfunction isReferenceElement(value) {\n return !!(value && value._tippy && value._tippy.reference === value);\n}\nfunction getArrayOfElements(value) {\n if (isElement(value)) {\n return [value];\n }\n\n if (isNodeList(value)) {\n return arrayFrom(value);\n }\n\n if (Array.isArray(value)) {\n return value;\n }\n\n return arrayFrom(document.querySelectorAll(value));\n}\nfunction setTransitionDuration(els, value) {\n els.forEach(function (el) {\n if (el) {\n el.style.transitionDuration = value + \"ms\";\n }\n });\n}\nfunction setVisibilityState(els, state) {\n els.forEach(function (el) {\n if (el) {\n el.setAttribute('data-state', state);\n }\n });\n}\nfunction getOwnerDocument(elementOrElements) {\n var _element$ownerDocumen;\n\n var _normalizeToArray = normalizeToArray(elementOrElements),\n element = _normalizeToArray[0]; // Elements created via a <template> have an ownerDocument with no reference to the body\n\n\n return element != null && (_element$ownerDocumen = element.ownerDocument) != null && _element$ownerDocumen.body ? element.ownerDocument : document;\n}\nfunction isCursorOutsideInteractiveBorder(popperTreeData, event) {\n var clientX = event.clientX,\n clientY = event.clientY;\n return popperTreeData.every(function (_ref) {\n var popperRect = _ref.popperRect,\n popperState = _ref.popperState,\n props = _ref.props;\n var interactiveBorder = props.interactiveBorder;\n var basePlacement = getBasePlacement(popperState.placement);\n var offsetData = popperState.modifiersData.offset;\n\n if (!offsetData) {\n return true;\n }\n\n var topDistance = basePlacement === 'bottom' ? offsetData.top.y : 0;\n var bottomDistance = basePlacement === 'top' ? offsetData.bottom.y : 0;\n var leftDistance = basePlacement === 'right' ? offsetData.left.x : 0;\n var rightDistance = basePlacement === 'left' ? offsetData.right.x : 0;\n var exceedsTop = popperRect.top - clientY + topDistance > interactiveBorder;\n var exceedsBottom = clientY - popperRect.bottom - bottomDistance > interactiveBorder;\n var exceedsLeft = popperRect.left - clientX + leftDistance > interactiveBorder;\n var exceedsRight = clientX - popperRect.right - rightDistance > interactiveBorder;\n return exceedsTop || exceedsBottom || exceedsLeft || exceedsRight;\n });\n}\nfunction updateTransitionEndListener(box, action, listener) {\n var method = action + \"EventListener\"; // some browsers apparently support `transition` (unprefixed) but only fire\n // `webkitTransitionEnd`...\n\n ['transitionend', 'webkitTransitionEnd'].forEach(function (event) {\n box[method](event, listener);\n });\n}\n/**\n * Compared to xxx.contains, this function works for dom structures with shadow\n * dom\n */\n\nfunction actualContains(parent, child) {\n var target = child;\n\n while (target) {\n var _target$getRootNode;\n\n if (parent.contains(target)) {\n return true;\n }\n\n target = target.getRootNode == null ? void 0 : (_target$getRootNode = target.getRootNode()) == null ? void 0 : _target$getRootNode.host;\n }\n\n return false;\n}\n\nvar currentInput = {\n isTouch: false\n};\nvar lastMouseMoveTime = 0;\n/**\n * When a `touchstart` event is fired, it's assumed the user is using touch\n * input. We'll bind a `mousemove` event listener to listen for mouse input in\n * the future. This way, the `isTouch` property is fully dynamic and will handle\n * hybrid devices that use a mix of touch + mouse input.\n */\n\nfunction onDocumentTouchStart() {\n if (currentInput.isTouch) {\n return;\n }\n\n currentInput.isTouch = true;\n\n if (window.performance) {\n document.addEventListener('mousemove', onDocumentMouseMove);\n }\n}\n/**\n * When two `mousemove` event are fired consecutively within 20ms, it's assumed\n * the user is using mouse input again. `mousemove` can fire on touch devices as\n * well, but very rarely that quickly.\n */\n\nfunction onDocumentMouseMove() {\n var now = performance.now();\n\n if (now - lastMouseMoveTime < 20) {\n currentInput.isTouch = false;\n document.removeEventListener('mousemove', onDocumentMouseMove);\n }\n\n lastMouseMoveTime = now;\n}\n/**\n * When an element is in focus and has a tippy, leaving the tab/window and\n * returning causes it to show again. For mouse users this is unexpected, but\n * for keyboard use it makes sense.\n * TODO: find a better technique to solve this problem\n */\n\nfunction onWindowBlur() {\n var activeElement = document.activeElement;\n\n if (isReferenceElement(activeElement)) {\n var instance = activeElement._tippy;\n\n if (activeElement.blur && !instance.state.isVisible) {\n activeElement.blur();\n }\n }\n}\nfunction bindGlobalEventListeners() {\n document.addEventListener('touchstart', onDocumentTouchStart, TOUCH_OPTIONS);\n window.addEventListener('blur', onWindowBlur);\n}\n\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\nvar isIE11 = isBrowser ? // @ts-ignore\n!!window.msCrypto : false;\n\nfunction createMemoryLeakWarning(method) {\n var txt = method === 'destroy' ? 'n already-' : ' ';\n return [method + \"() was called on a\" + txt + \"destroyed instance. This is a no-op but\", 'indicates a potential memory leak.'].join(' ');\n}\nfunction clean(value) {\n var spacesAndTabs = /[ \\t]{2,}/g;\n var lineStartWithSpaces = /^[ \\t]*/gm;\n return value.replace(spacesAndTabs, ' ').replace(lineStartWithSpaces, '').trim();\n}\n\nfunction getDevMessage(message) {\n return clean(\"\\n %ctippy.js\\n\\n %c\" + clean(message) + \"\\n\\n %c\\uD83D\\uDC77\\u200D This is a development-only message. It will be removed in production.\\n \");\n}\n\nfunction getFormattedMessage(message) {\n return [getDevMessage(message), // title\n 'color: #00C584; font-size: 1.3em; font-weight: bold;', // message\n 'line-height: 1.5', // footer\n 'color: #a6a095;'];\n} // Assume warnings and errors never have the same message\n\nvar visitedMessages;\n\nif (process.env.NODE_ENV !== \"production\") {\n resetVisitedMessages();\n}\n\nfunction resetVisitedMessages() {\n visitedMessages = new Set();\n}\nfunction warnWhen(condition, message) {\n if (condition && !visitedMessages.has(message)) {\n var _console;\n\n visitedMessages.add(message);\n\n (_console = console).warn.apply(_console, getFormattedMessage(message));\n }\n}\nfunction errorWhen(condition, message) {\n if (condition && !visitedMessages.has(message)) {\n var _console2;\n\n visitedMessages.add(message);\n\n (_console2 = console).error.apply(_console2, getFormattedMessage(message));\n }\n}\nfunction validateTargets(targets) {\n var didPassFalsyValue = !targets;\n var didPassPlainObject = Object.prototype.toString.call(targets) === '[object Object]' && !targets.addEventListener;\n errorWhen(didPassFalsyValue, ['tippy() was passed', '`' + String(targets) + '`', 'as its targets (first) argument. Valid types are: String, Element,', 'Element[], or NodeList.'].join(' '));\n errorWhen(didPassPlainObject, ['tippy() was passed a plain object which is not supported as an argument', 'for virtual positioning. Use props.getReferenceClientRect instead.'].join(' '));\n}\n\nvar pluginProps = {\n animateFill: false,\n followCursor: false,\n inlinePositioning: false,\n sticky: false\n};\nvar renderProps = {\n allowHTML: false,\n animation: 'fade',\n arrow: true,\n content: '',\n inertia: false,\n maxWidth: 350,\n role: 'tooltip',\n theme: '',\n zIndex: 9999\n};\nvar defaultProps = Object.assign({\n appendTo: TIPPY_DEFAULT_APPEND_TO,\n aria: {\n content: 'auto',\n expanded: 'auto'\n },\n delay: 0,\n duration: [300, 250],\n getReferenceClientRect: null,\n hideOnClick: true,\n ignoreAttributes: false,\n interactive: false,\n interactiveBorder: 2,\n interactiveDebounce: 0,\n moveTransition: '',\n offset: [0, 10],\n onAfterUpdate: function onAfterUpdate() {},\n onBeforeUpdate: function onBeforeUpdate() {},\n onCreate: function onCreate() {},\n onDestroy: function onDestroy() {},\n onHidden: function onHidden() {},\n onHide: function onHide() {},\n onMount: function onMount() {},\n onShow: function onShow() {},\n onShown: function onShown() {},\n onTrigger: function onTrigger() {},\n onUntrigger: function onUntrigger() {},\n onClickOutside: function onClickOutside() {},\n placement: 'top',\n plugins: [],\n popperOptions: {},\n render: null,\n showOnCreate: false,\n touch: true,\n trigger: 'mouseenter focus',\n triggerTarget: null\n}, pluginProps, renderProps);\nvar defaultKeys = Object.keys(defaultProps);\nvar setDefaultProps = function setDefaultProps(partialProps) {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== \"production\") {\n validateProps(partialProps, []);\n }\n\n var keys = Object.keys(partialProps);\n keys.forEach(function (key) {\n defaultProps[key] = partialProps[key];\n });\n};\nfunction getExtendedPassedProps(passedProps) {\n var plugins = passedProps.plugins || [];\n var pluginProps = plugins.reduce(function (acc, plugin) {\n var name = plugin.name,\n defaultValue = plugin.defaultValue;\n\n if (name) {\n var _name;\n\n acc[name] = passedProps[name] !== undefined ? passedProps[name] : (_name = defaultProps[name]) != null ? _name : defaultValue;\n }\n\n return acc;\n }, {});\n return Object.assign({}, passedProps, pluginProps);\n}\nfunction getDataAttributeProps(reference, plugins) {\n var propKeys = plugins ? Object.keys(getExtendedPassedProps(Object.assign({}, defaultProps, {\n plugins: plugins\n }))) : defaultKeys;\n var props = propKeys.reduce(function (acc, key) {\n var valueAsString = (reference.getAttribute(\"data-tippy-\" + key) || '').trim();\n\n if (!valueAsString) {\n return acc;\n }\n\n if (key === 'content') {\n acc[key] = valueAsString;\n } else {\n try {\n acc[key] = JSON.parse(valueAsString);\n } catch (e) {\n acc[key] = valueAsString;\n }\n }\n\n return acc;\n }, {});\n return props;\n}\nfunction evaluateProps(reference, props) {\n var out = Object.assign({}, props, {\n content: invokeWithArgsOrReturn(props.content, [reference])\n }, props.ignoreAttributes ? {} : getDataAttributeProps(reference, props.plugins));\n out.aria = Object.assign({}, defaultProps.aria, out.aria);\n out.aria = {\n expanded: out.aria.expanded === 'auto' ? props.interactive : out.aria.expanded,\n content: out.aria.content === 'auto' ? props.interactive ? null : 'describedby' : out.aria.content\n };\n return out;\n}\nfunction validateProps(partialProps, plugins) {\n if (partialProps === void 0) {\n partialProps = {};\n }\n\n if (plugins === void 0) {\n plugins = [];\n }\n\n var keys = Object.keys(partialProps);\n keys.forEach(function (prop) {\n var nonPluginProps = removeProperties(defaultProps, Object.keys(pluginProps));\n var didPassUnknownProp = !hasOwnProperty(nonPluginProps, prop); // Check if the prop exists in `plugins`\n\n if (didPassUnknownProp) {\n didPassUnknownProp = plugins.filter(function (plugin) {\n return plugin.name === prop;\n }).length === 0;\n }\n\n warnWhen(didPassUnknownProp, [\"`\" + prop + \"`\", \"is not a valid prop. You may have spelled it incorrectly, or if it's\", 'a plugin, forgot to pass it in an array as props.plugins.', '\\n\\n', 'All props: https://atomiks.github.io/tippyjs/v6/all-props/\\n', 'Plugins: https://atomiks.github.io/tippyjs/v6/plugins/'].join(' '));\n });\n}\n\nvar innerHTML = function innerHTML() {\n return 'innerHTML';\n};\n\nfunction dangerouslySetInnerHTML(element, html) {\n element[innerHTML()] = html;\n}\n\nfunction createArrowElement(value) {\n var arrow = div();\n\n if (value === true) {\n arrow.className = ARROW_CLASS;\n } else {\n arrow.className = SVG_ARROW_CLASS;\n\n if (isElement(value)) {\n arrow.appendChild(value);\n } else {\n dangerouslySetInnerHTML(arrow, value);\n }\n }\n\n return arrow;\n}\n\nfunction setContent(content, props) {\n if (isElement(props.content)) {\n dangerouslySetInnerHTML(content, '');\n content.appendChild(props.content);\n } else if (typeof props.content !== 'function') {\n if (props.allowHTML) {\n dangerouslySetInnerHTML(content, props.content);\n } else {\n content.textContent = props.content;\n }\n }\n}\nfunction getChildren(popper) {\n var box = popper.firstElementChild;\n var boxChildren = arrayFrom(box.children);\n return {\n box: box,\n content: boxChildren.find(function (node) {\n return node.classList.contains(CONTENT_CLASS);\n }),\n arrow: boxChildren.find(function (node) {\n return node.classList.contains(ARROW_CLASS) || node.classList.contains(SVG_ARROW_CLASS);\n }),\n backdrop: boxChildren.find(function (node) {\n return node.classList.contains(BACKDROP_CLASS);\n })\n };\n}\nfunction render(instance) {\n var popper = div();\n var box = div();\n box.className = BOX_CLASS;\n box.setAttribute('data-state', 'hidden');\n box.setAttribute('tabindex', '-1');\n var content = div();\n content.className = CONTENT_CLASS;\n content.setAttribute('data-state', 'hidden');\n setContent(content, instance.props);\n popper.appendChild(box);\n box.appendChild(content);\n onUpdate(instance.props, instance.props);\n\n function onUpdate(prevProps, nextProps) {\n var _getChildren = getChildren(popper),\n box = _getChildren.box,\n content = _getChildren.content,\n arrow = _getChildren.arrow;\n\n if (nextProps.theme) {\n box.setAttribute('data-theme', nextProps.theme);\n } else {\n box.removeAttribute('data-theme');\n }\n\n if (typeof nextProps.animation === 'string') {\n box.setAttribute('data-animation', nextProps.animation);\n } else {\n box.removeAttribute('data-animation');\n }\n\n if (nextProps.inertia) {\n box.setAttribute('data-inertia', '');\n } else {\n box.removeAttribute('data-inertia');\n }\n\n box.style.maxWidth = typeof nextProps.maxWidth === 'number' ? nextProps.maxWidth + \"px\" : nextProps.maxWidth;\n\n if (nextProps.role) {\n box.setAttribute('role', nextProps.role);\n } else {\n box.removeAttribute('role');\n }\n\n if (prevProps.content !== nextProps.content || prevProps.allowHTML !== nextProps.allowHTML) {\n setContent(content, instance.props);\n }\n\n if (nextProps.arrow) {\n if (!arrow) {\n box.appendChild(createArrowElement(nextProps.arrow));\n } else if (prevProps.arrow !== nextProps.arrow) {\n box.removeChild(arrow);\n box.appendChild(createArrowElement(nextProps.arrow));\n }\n } else if (arrow) {\n box.removeChild(arrow);\n }\n }\n\n return {\n popper: popper,\n onUpdate: onUpdate\n };\n} // Runtime check to identify if the render function is the default one; this\n// way we can apply default CSS transitions logic and it can be tree-shaken away\n\nrender.$$tippy = true;\n\nvar idCounter = 1;\nvar mouseMoveListeners = []; // Used by `hideAll()`\n\nvar mountedInstances = [];\nfunction createTippy(reference, passedProps) {\n var props = evaluateProps(reference, Object.assign({}, defaultProps, getExtendedPassedProps(removeUndefinedProps(passedProps)))); // ===========================================================================\n // 🔒 Private members\n // ===========================================================================\n\n var showTimeout;\n var hideTimeout;\n var scheduleHideAnimationFrame;\n var isVisibleFromClick = false;\n var didHideDueToDocumentMouseDown = false;\n var didTouchMove = false;\n var ignoreOnFirstUpdate = false;\n var lastTriggerEvent;\n var currentTransitionEndListener;\n var onFirstUpdate;\n var listeners = [];\n var debouncedOnMouseMove = debounce(onMouseMove, props.interactiveDebounce);\n var currentTarget; // ===========================================================================\n // 🔑 Public members\n // ===========================================================================\n\n var id = idCounter++;\n var popperInstance = null;\n var plugins = unique(props.plugins);\n var state = {\n // Is the instance currently enabled?\n isEnabled: true,\n // Is the tippy currently showing and not transitioning out?\n isVisible: false,\n // Has the instance been destroyed?\n isDestroyed: false,\n // Is the tippy currently mounted to the DOM?\n isMounted: false,\n // Has the tippy finished transitioning in?\n isShown: false\n };\n var instance = {\n // properties\n id: id,\n reference: reference,\n popper: div(),\n popperInstance: popperInstance,\n props: props,\n state: state,\n plugins: plugins,\n // methods\n clearDelayTimeouts: clearDelayTimeouts,\n setProps: setProps,\n setContent: setContent,\n show: show,\n hide: hide,\n hideWithInteractivity: hideWithInteractivity,\n enable: enable,\n disable: disable,\n unmount: unmount,\n destroy: destroy\n }; // TODO: Investigate why this early return causes a TDZ error in the tests —\n // it doesn't seem to happen in the browser\n\n /* istanbul ignore if */\n\n if (!props.render) {\n if (process.env.NODE_ENV !== \"production\") {\n errorWhen(true, 'render() function has not been supplied.');\n }\n\n return instance;\n } // ===========================================================================\n // Initial mutations\n // ===========================================================================\n\n\n var _props$render = props.render(instance),\n popper = _props$render.popper,\n onUpdate = _props$render.onUpdate;\n\n popper.setAttribute('data-tippy-root', '');\n popper.id = \"tippy-\" + instance.id;\n instance.popper = popper;\n reference._tippy = instance;\n popper._tippy = instance;\n var pluginsHooks = plugins.map(function (plugin) {\n return plugin.fn(instance);\n });\n var hasAriaExpanded = reference.hasAttribute('aria-expanded');\n addListeners();\n handleAriaExpandedAttribute();\n handleStyles();\n invokeHook('onCreate', [instance]);\n\n if (props.showOnCreate) {\n scheduleShow();\n } // Prevent a tippy with a delay from hiding if the cursor left then returned\n // before it started hiding\n\n\n popper.addEventListener('mouseenter', function () {\n if (instance.props.interactive && instance.state.isVisible) {\n instance.clearDelayTimeouts();\n }\n });\n popper.addEventListener('mouseleave', function () {\n if (instance.props.interactive && instance.props.trigger.indexOf('mouseenter') >= 0) {\n getDocument().addEventListener('mousemove', debouncedOnMouseMove);\n }\n });\n return instance; // ===========================================================================\n // 🔒 Private methods\n // ===========================================================================\n\n function getNormalizedTouchSettings() {\n var touch = instance.props.touch;\n return Array.isArray(touch) ? touch : [touch, 0];\n }\n\n function getIsCustomTouchBehavior() {\n return getNormalizedTouchSettings()[0] === 'hold';\n }\n\n function getIsDefaultRenderFn() {\n var _instance$props$rende;\n\n // @ts-ignore\n return !!((_instance$props$rende = instance.props.render) != null && _instance$props$rende.$$tippy);\n }\n\n function getCurrentTarget() {\n return currentTarget || reference;\n }\n\n function getDocument() {\n var parent = getCurrentTarget().parentNode;\n return parent ? getOwnerDocument(parent) : document;\n }\n\n function getDefaultTemplateChildren() {\n return getChildren(popper);\n }\n\n function getDelay(isShow) {\n // For touch or keyboard input, force `0` delay for UX reasons\n // Also if the instance is mounted but not visible (transitioning out),\n // ignore delay\n if (instance.state.isMounted && !instance.state.isVisible || currentInput.isTouch || lastTriggerEvent && lastTriggerEvent.type === 'focus') {\n return 0;\n }\n\n return getValueAtIndexOrReturn(instance.props.delay, isShow ? 0 : 1, defaultProps.delay);\n }\n\n function handleStyles(fromHide) {\n if (fromHide === void 0) {\n fromHide = false;\n }\n\n popper.style.pointerEvents = instance.props.interactive && !fromHide ? '' : 'none';\n popper.style.zIndex = \"\" + instance.props.zIndex;\n }\n\n function invokeHook(hook, args, shouldInvokePropsHook) {\n if (shouldInvokePropsHook === void 0) {\n shouldInvokePropsHook = true;\n }\n\n pluginsHooks.forEach(function (pluginHooks) {\n if (pluginHooks[hook]) {\n pluginHooks[hook].apply(pluginHooks, args);\n }\n });\n\n if (shouldInvokePropsHook) {\n var _instance$props;\n\n (_instance$props = instance.props)[hook].apply(_instance$props, args);\n }\n }\n\n function handleAriaContentAttribute() {\n var aria = instance.props.aria;\n\n if (!aria.content) {\n return;\n }\n\n var attr = \"aria-\" + aria.content;\n var id = popper.id;\n var nodes = normalizeToArray(instance.props.triggerTarget || reference);\n nodes.forEach(function (node) {\n var currentValue = node.getAttribute(attr);\n\n if (instance.state.isVisible) {\n node.setAttribute(attr, currentValue ? currentValue + \" \" + id : id);\n } else {\n var nextValue = currentValue && currentValue.replace(id, '').trim();\n\n if (nextValue) {\n node.setAttribute(attr, nextValue);\n } else {\n node.removeAttribute(attr);\n }\n }\n });\n }\n\n function handleAriaExpandedAttribute() {\n if (hasAriaExpanded || !instance.props.aria.expanded) {\n return;\n }\n\n var nodes = normalizeToArray(instance.props.triggerTarget || reference);\n nodes.forEach(function (node) {\n if (instance.props.interactive) {\n node.setAttribute('aria-expanded', instance.state.isVisible && node === getCurrentTarget() ? 'true' : 'false');\n } else {\n node.removeAttribute('aria-expanded');\n }\n });\n }\n\n function cleanupInteractiveMouseListeners() {\n getDocument().removeEventListener('mousemove', debouncedOnMouseMove);\n mouseMoveListeners = mouseMoveListeners.filter(function (listener) {\n return listener !== debouncedOnMouseMove;\n });\n }\n\n function onDocumentPress(event) {\n // Moved finger to scroll instead of an intentional tap outside\n if (currentInput.isTouch) {\n if (didTouchMove || event.type === 'mousedown') {\n return;\n }\n }\n\n var actualTarget = event.composedPath && event.composedPath()[0] || event.target; // Clicked on interactive popper\n\n if (instance.props.interactive && actualContains(popper, actualTarget)) {\n return;\n } // Clicked on the event listeners target\n\n\n if (normalizeToArray(instance.props.triggerTarget || reference).some(function (el) {\n return actualContains(el, actualTarget);\n })) {\n if (currentInput.isTouch) {\n return;\n }\n\n if (instance.state.isVisible && instance.props.trigger.indexOf('click') >= 0) {\n return;\n }\n } else {\n invokeHook('onClickOutside', [instance, event]);\n }\n\n if (instance.props.hideOnClick === true) {\n instance.clearDelayTimeouts();\n instance.hide(); // `mousedown` event is fired right before `focus` if pressing the\n // currentTarget. This lets a tippy with `focus` trigger know that it\n // should not show\n\n didHideDueToDocumentMouseDown = true;\n setTimeout(function () {\n didHideDueToDocumentMouseDown = false;\n }); // The listener gets added in `scheduleShow()`, but this may be hiding it\n // before it shows, and hide()'s early bail-out behavior can prevent it\n // from being cleaned up\n\n if (!instance.state.isMounted) {\n removeDocumentPress();\n }\n }\n }\n\n function onTouchMove() {\n didTouchMove = true;\n }\n\n function onTouchStart() {\n didTouchMove = false;\n }\n\n function addDocumentPress() {\n var doc = getDocument();\n doc.addEventListener('mousedown', onDocumentPress, true);\n doc.addEventListener('touchend', onDocumentPress, TOUCH_OPTIONS);\n doc.addEventListener('touchstart', onTouchStart, TOUCH_OPTIONS);\n doc.addEventListener('touchmove', onTouchMove, TOUCH_OPTIONS);\n }\n\n function removeDocumentPress() {\n var doc = getDocument();\n doc.removeEventListener('mousedown', onDocumentPress, true);\n doc.removeEventListener('touchend', onDocumentPress, TOUCH_OPTIONS);\n doc.removeEventListener('touchstart', onTouchStart, TOUCH_OPTIONS);\n doc.removeEventListener('touchmove', onTouchMove, TOUCH_OPTIONS);\n }\n\n function onTransitionedOut(duration, callback) {\n onTransitionEnd(duration, function () {\n if (!instance.state.isVisible && popper.parentNode && popper.parentNode.contains(popper)) {\n callback();\n }\n });\n }\n\n function onTransitionedIn(duration, callback) {\n onTransitionEnd(duration, callback);\n }\n\n function onTransitionEnd(duration, callback) {\n var box = getDefaultTemplateChildren().box;\n\n function listener(event) {\n if (event.target === box) {\n updateTransitionEndListener(box, 'remove', listener);\n callback();\n }\n } // Make callback synchronous if duration is 0\n // `transitionend` won't fire otherwise\n\n\n if (duration === 0) {\n return callback();\n }\n\n updateTransitionEndListener(box, 'remove', currentTransitionEndListener);\n updateTransitionEndListener(box, 'add', listener);\n currentTransitionEndListener = listener;\n }\n\n function on(eventType, handler, options) {\n if (options === void 0) {\n options = false;\n }\n\n var nodes = normalizeToArray(instance.props.triggerTarget || reference);\n nodes.forEach(function (node) {\n node.addEventListener(eventType, handler, options);\n listeners.push({\n node: node,\n eventType: eventType,\n handler: handler,\n options: options\n });\n });\n }\n\n function addListeners() {\n if (getIsCustomTouchBehavior()) {\n on('touchstart', onTrigger, {\n passive: true\n });\n on('touchend', onMouseLeave, {\n passive: true\n });\n }\n\n splitBySpaces(instance.props.trigger).forEach(function (eventType) {\n if (eventType === 'manual') {\n return;\n }\n\n on(eventType, onTrigger);\n\n switch (eventType) {\n case 'mouseenter':\n on('mouseleave', onMouseLeave);\n break;\n\n case 'focus':\n on(isIE11 ? 'focusout' : 'blur', onBlurOrFocusOut);\n break;\n\n case 'focusin':\n on('focusout', onBlurOrFocusOut);\n break;\n }\n });\n }\n\n function removeListeners() {\n listeners.forEach(function (_ref) {\n var node = _ref.node,\n eventType = _ref.eventType,\n handler = _ref.handler,\n options = _ref.options;\n node.removeEventListener(eventType, handler, options);\n });\n listeners = [];\n }\n\n function onTrigger(event) {\n var _lastTriggerEvent;\n\n var shouldScheduleClickHide = false;\n\n if (!instance.state.isEnabled || isEventListenerStopped(event) || didHideDueToDocumentMouseDown) {\n return;\n }\n\n var wasFocused = ((_lastTriggerEvent = lastTriggerEvent) == null ? void 0 : _lastTriggerEvent.type) === 'focus';\n lastTriggerEvent = event;\n currentTarget = event.currentTarget;\n handleAriaExpandedAttribute();\n\n if (!instance.state.isVisible && isMouseEvent(event)) {\n // If scrolling, `mouseenter` events can be fired if the cursor lands\n // over a new target, but `mousemove` events don't get fired. This\n // causes interactive tooltips to get stuck open until the cursor is\n // moved\n mouseMoveListeners.forEach(function (listener) {\n return listener(event);\n });\n } // Toggle show/hide when clicking click-triggered tooltips\n\n\n if (event.type === 'click' && (instance.props.trigger.indexOf('mouseenter') < 0 || isVisibleFromClick) && instance.props.hideOnClick !== false && instance.state.isVisible) {\n shouldScheduleClickHide = true;\n } else {\n scheduleShow(event);\n }\n\n if (event.type === 'click') {\n isVisibleFromClick = !shouldScheduleClickHide;\n }\n\n if (shouldScheduleClickHide && !wasFocused) {\n scheduleHide(event);\n }\n }\n\n function onMouseMove(event) {\n var target = event.target;\n var isCursorOverReferenceOrPopper = getCurrentTarget().contains(target) || popper.contains(target);\n\n if (event.type === 'mousemove' && isCursorOverReferenceOrPopper) {\n return;\n }\n\n var popperTreeData = getNestedPopperTree().concat(popper).map(function (popper) {\n var _instance$popperInsta;\n\n var instance = popper._tippy;\n var state = (_instance$popperInsta = instance.popperInstance) == null ? void 0 : _instance$popperInsta.state;\n\n if (state) {\n return {\n popperRect: popper.getBoundingClientRect(),\n popperState: state,\n props: props\n };\n }\n\n return null;\n }).filter(Boolean);\n\n if (isCursorOutsideInteractiveBorder(popperTreeData, event)) {\n cleanupInteractiveMouseListeners();\n scheduleHide(event);\n }\n }\n\n function onMouseLeave(event) {\n var shouldBail = isEventListenerStopped(event) || instance.props.trigger.indexOf('click') >= 0 && isVisibleFromClick;\n\n if (shouldBail) {\n return;\n }\n\n if (instance.props.interactive) {\n instance.hideWithInteractivity(event);\n return;\n }\n\n scheduleHide(event);\n }\n\n function onBlurOrFocusOut(event) {\n if (instance.props.trigger.indexOf('focusin') < 0 && event.target !== getCurrentTarget()) {\n return;\n } // If focus was moved to within the popper\n\n\n if (instance.props.interactive && event.relatedTarget && popper.contains(event.relatedTarget)) {\n return;\n }\n\n scheduleHide(event);\n }\n\n function isEventListenerStopped(event) {\n return currentInput.isTouch ? getIsCustomTouchBehavior() !== event.type.indexOf('touch') >= 0 : false;\n }\n\n function createPopperInstance() {\n destroyPopperInstance();\n var _instance$props2 = instance.props,\n popperOptions = _instance$props2.popperOptions,\n placement = _instance$props2.placement,\n offset = _instance$props2.offset,\n getReferenceClientRect = _instance$props2.getReferenceClientRect,\n moveTransition = _instance$props2.moveTransition;\n var arrow = getIsDefaultRenderFn() ? getChildren(popper).arrow : null;\n var computedReference = getReferenceClientRect ? {\n getBoundingClientRect: getReferenceClientRect,\n contextElement: getReferenceClientRect.contextElement || getCurrentTarget()\n } : reference;\n var tippyModifier = {\n name: '$$tippy',\n enabled: true,\n phase: 'beforeWrite',\n requires: ['computeStyles'],\n fn: function fn(_ref2) {\n var state = _ref2.state;\n\n if (getIsDefaultRenderFn()) {\n var _getDefaultTemplateCh = getDefaultTemplateChildren(),\n box = _getDefaultTemplateCh.box;\n\n ['placement', 'reference-hidden', 'escaped'].forEach(function (attr) {\n if (attr === 'placement') {\n box.setAttribute('data-placement', state.placement);\n } else {\n if (state.attributes.popper[\"data-popper-\" + attr]) {\n box.setAttribute(\"data-\" + attr, '');\n } else {\n box.removeAttribute(\"data-\" + attr);\n }\n }\n });\n state.attributes.popper = {};\n }\n }\n };\n var modifiers = [{\n name: 'offset',\n options: {\n offset: offset\n }\n }, {\n name: 'preventOverflow',\n options: {\n padding: {\n top: 2,\n bottom: 2,\n left: 5,\n right: 5\n }\n }\n }, {\n name: 'flip',\n options: {\n padding: 5\n }\n }, {\n name: 'computeStyles',\n options: {\n adaptive: !moveTransition\n }\n }, tippyModifier];\n\n if (getIsDefaultRenderFn() && arrow) {\n modifiers.push({\n name: 'arrow',\n options: {\n element: arrow,\n padding: 3\n }\n });\n }\n\n modifiers.push.apply(modifiers, (popperOptions == null ? void 0 : popperOptions.modifiers) || []);\n instance.popperInstance = createPopper(computedReference, popper, Object.assign({}, popperOptions, {\n placement: placement,\n onFirstUpdate: onFirstUpdate,\n modifiers: modifiers\n }));\n }\n\n function destroyPopperInstance() {\n if (instance.popperInstance) {\n instance.popperInstance.destroy();\n instance.popperInstance = null;\n }\n }\n\n function mount() {\n var appendTo = instance.props.appendTo;\n var parentNode; // By default, we'll append the popper to the triggerTargets's parentNode so\n // it's directly after the reference element so the elements inside the\n // tippy can be tabbed to\n // If there are clipping issues, the user can specify a different appendTo\n // and ensure focus management is handled correctly manually\n\n var node = getCurrentTarget();\n\n if (instance.props.interactive && appendTo === TIPPY_DEFAULT_APPEND_TO || appendTo === 'parent') {\n parentNode = node.parentNode;\n } else {\n parentNode = invokeWithArgsOrReturn(appendTo, [node]);\n } // The popper element needs to exist on the DOM before its position can be\n // updated as Popper needs to read its dimensions\n\n\n if (!parentNode.contains(popper)) {\n parentNode.appendChild(popper);\n }\n\n instance.state.isMounted = true;\n createPopperInstance();\n /* istanbul ignore else */\n\n if (process.env.NODE_ENV !== \"production\") {\n // Accessibility check\n warnWhen(instance.props.interactive && appendTo === defaultProps.appendTo && node.nextElementSibling !== popper, ['Interactive tippy element may not be accessible via keyboard', 'navigation because it is not directly after the reference element', 'in the DOM source order.', '\\n\\n', 'Using a wrapper <div> or <span> tag around the reference element', 'solves this by creating a new parentNode context.', '\\n\\n', 'Specifying `appendTo: document.body` silences this warning, but it', 'assumes you are using a focus management solution to handle', 'keyboard navigation.', '\\n\\n', 'See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity'].join(' '));\n }\n }\n\n function getNestedPopperTree() {\n return arrayFrom(popper.querySelectorAll('[data-tippy-root]'));\n }\n\n function scheduleShow(event) {\n instance.clearDelayTimeouts();\n\n if (event) {\n invokeHook('onTrigger', [instance, event]);\n }\n\n addDocumentPress();\n var delay = getDelay(true);\n\n var _getNormalizedTouchSe = getNormalizedTouchSettings(),\n touchValue = _getNormalizedTouchSe[0],\n touchDelay = _getNormalizedTouchSe[1];\n\n if (currentInput.isTouch && touchValue === 'hold' && touchDelay) {\n delay = touchDelay;\n }\n\n if (delay) {\n showTimeout = setTimeout(function () {\n instance.show();\n }, delay);\n } else {\n instance.show();\n }\n }\n\n function scheduleHide(event) {\n instance.clearDelayTimeouts();\n invokeHook('onUntrigger', [instance, event]);\n\n if (!instance.state.isVisible) {\n removeDocumentPress();\n return;\n } // For interactive tippies, scheduleHide is added to a document.body handler\n // from onMouseLeave so must intercept scheduled hides from mousemove/leave\n // events when trigger contains mouseenter and click, and the tip is\n // currently shown as a result of a click.\n\n\n if (instance.props.trigger.indexOf('mouseenter') >= 0 && instance.props.trigger.indexOf('click') >= 0 && ['mouseleave', 'mousemove'].indexOf(event.type) >= 0 && isVisibleFromClick) {\n return;\n }\n\n var delay = getDelay(false);\n\n if (delay) {\n hideTimeout = setTimeout(function () {\n if (instance.state.isVisible) {\n instance.hide();\n }\n }, delay);\n } else {\n // Fixes a `transitionend` problem when it fires 1 frame too\n // late sometimes, we don't want hide() to be called.\n scheduleHideAnimationFrame = requestAnimationFrame(function () {\n instance.hide();\n });\n }\n } // ===========================================================================\n // 🔑 Public methods\n // ===========================================================================\n\n\n function enable() {\n instance.state.isEnabled = true;\n }\n\n function disable() {\n // Disabling the instance should also hide it\n // https://github.com/atomiks/tippy.js-react/issues/106\n instance.hide();\n instance.state.isEnabled = false;\n }\n\n function clearDelayTimeouts() {\n clearTimeout(showTimeout);\n clearTimeout(hideTimeout);\n cancelAnimationFrame(scheduleHideAnimationFrame);\n }\n\n function setProps(partialProps) {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== \"production\") {\n warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('setProps'));\n }\n\n if (instance.state.isDestroyed) {\n return;\n }\n\n invokeHook('onBeforeUpdate', [instance, partialProps]);\n removeListeners();\n var prevProps = instance.props;\n var nextProps = evaluateProps(reference, Object.assign({}, prevProps, removeUndefinedProps(partialProps), {\n ignoreAttributes: true\n }));\n instance.props = nextProps;\n addListeners();\n\n if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {\n cleanupInteractiveMouseListeners();\n debouncedOnMouseMove = debounce(onMouseMove, nextProps.interactiveDebounce);\n } // Ensure stale aria-expanded attributes are removed\n\n\n if (prevProps.triggerTarget && !nextProps.triggerTarget) {\n normalizeToArray(prevProps.triggerTarget).forEach(function (node) {\n node.removeAttribute('aria-expanded');\n });\n } else if (nextProps.triggerTarget) {\n reference.removeAttribute('aria-expanded');\n }\n\n handleAriaExpandedAttribute();\n handleStyles();\n\n if (onUpdate) {\n onUpdate(prevProps, nextProps);\n }\n\n if (instance.popperInstance) {\n createPopperInstance(); // Fixes an issue with nested tippies if they are all getting re-rendered,\n // and the nested ones get re-rendered first.\n // https://github.com/atomiks/tippyjs-react/issues/177\n // TODO: find a cleaner / more efficient solution(!)\n\n getNestedPopperTree().forEach(function (nestedPopper) {\n // React (and other UI libs likely) requires a rAF wrapper as it flushes\n // its work in one\n requestAnimationFrame(nestedPopper._tippy.popperInstance.forceUpdate);\n });\n }\n\n invokeHook('onAfterUpdate', [instance, partialProps]);\n }\n\n function setContent(content) {\n instance.setProps({\n content: content\n });\n }\n\n function show() {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== \"production\") {\n warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('show'));\n } // Early bail-out\n\n\n var isAlreadyVisible = instance.state.isVisible;\n var isDestroyed = instance.state.isDestroyed;\n var isDisabled = !instance.state.isEnabled;\n var isTouchAndTouchDisabled = currentInput.isTouch && !instance.props.touch;\n var duration = getValueAtIndexOrReturn(instance.props.duration, 0, defaultProps.duration);\n\n if (isAlreadyVisible || isDestroyed || isDisabled || isTouchAndTouchDisabled) {\n return;\n } // Normalize `disabled` behavior across browsers.\n // Firefox allows events on disabled elements, but Chrome doesn't.\n // Using a wrapper element (i.e. <span>) is recommended.\n\n\n if (getCurrentTarget().hasAttribute('disabled')) {\n return;\n }\n\n invokeHook('onShow', [instance], false);\n\n if (instance.props.onShow(instance) === false) {\n return;\n }\n\n instance.state.isVisible = true;\n\n if (getIsDefaultRenderFn()) {\n popper.style.visibility = 'visible';\n }\n\n handleStyles();\n addDocumentPress();\n\n if (!instance.state.isMounted) {\n popper.style.transition = 'none';\n } // If flipping to the opposite side after hiding at least once, the\n // animation will use the wrong placement without resetting the duration\n\n\n if (getIsDefaultRenderFn()) {\n var _getDefaultTemplateCh2 = getDefaultTemplateChildren(),\n box = _getDefaultTemplateCh2.box,\n content = _getDefaultTemplateCh2.content;\n\n setTransitionDuration([box, content], 0);\n }\n\n onFirstUpdate = function onFirstUpdate() {\n var _instance$popperInsta2;\n\n if (!instance.state.isVisible || ignoreOnFirstUpdate) {\n return;\n }\n\n ignoreOnFirstUpdate = true; // reflow\n\n void popper.offsetHeight;\n popper.style.transition = instance.props.moveTransition;\n\n if (getIsDefaultRenderFn() && instance.props.animation) {\n var _getDefaultTemplateCh3 = getDefaultTemplateChildren(),\n _box = _getDefaultTemplateCh3.box,\n _content = _getDefaultTemplateCh3.content;\n\n setTransitionDuration([_box, _content], duration);\n setVisibilityState([_box, _content], 'visible');\n }\n\n handleAriaContentAttribute();\n handleAriaExpandedAttribute();\n pushIfUnique(mountedInstances, instance); // certain modifiers (e.g. `maxSize`) require a second update after the\n // popper has been positioned for the first time\n\n (_instance$popperInsta2 = instance.popperInstance) == null ? void 0 : _instance$popperInsta2.forceUpdate();\n invokeHook('onMount', [instance]);\n\n if (instance.props.animation && getIsDefaultRenderFn()) {\n onTransitionedIn(duration, function () {\n instance.state.isShown = true;\n invokeHook('onShown', [instance]);\n });\n }\n };\n\n mount();\n }\n\n function hide() {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== \"production\") {\n warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('hide'));\n } // Early bail-out\n\n\n var isAlreadyHidden = !instance.state.isVisible;\n var isDestroyed = instance.state.isDestroyed;\n var isDisabled = !instance.state.isEnabled;\n var duration = getValueAtIndexOrReturn(instance.props.duration, 1, defaultProps.duration);\n\n if (isAlreadyHidden || isDestroyed || isDisabled) {\n return;\n }\n\n invokeHook('onHide', [instance], false);\n\n if (instance.props.onHide(instance) === false) {\n return;\n }\n\n instance.state.isVisible = false;\n instance.state.isShown = false;\n ignoreOnFirstUpdate = false;\n isVisibleFromClick = false;\n\n if (getIsDefaultRenderFn()) {\n popper.style.visibility = 'hidden';\n }\n\n cleanupInteractiveMouseListeners();\n removeDocumentPress();\n handleStyles(true);\n\n if (getIsDefaultRenderFn()) {\n var _getDefaultTemplateCh4 = getDefaultTemplateChildren(),\n box = _getDefaultTemplateCh4.box,\n content = _getDefaultTemplateCh4.content;\n\n if (instance.props.animation) {\n setTransitionDuration([box, content], duration);\n setVisibilityState([box, content], 'hidden');\n }\n }\n\n handleAriaContentAttribute();\n handleAriaExpandedAttribute();\n\n if (instance.props.animation) {\n if (getIsDefaultRenderFn()) {\n onTransitionedOut(duration, instance.unmount);\n }\n } else {\n instance.unmount();\n }\n }\n\n function hideWithInteractivity(event) {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== \"production\") {\n warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('hideWithInteractivity'));\n }\n\n getDocument().addEventListener('mousemove', debouncedOnMouseMove);\n pushIfUnique(mouseMoveListeners, debouncedOnMouseMove);\n debouncedOnMouseMove(event);\n }\n\n function unmount() {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== \"production\") {\n warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('unmount'));\n }\n\n if (instance.state.isVisible) {\n instance.hide();\n }\n\n if (!instance.state.isMounted) {\n return;\n }\n\n destroyPopperInstance(); // If a popper is not interactive, it will be appended outside the popper\n // tree by default. This seems mainly for interactive tippies, but we should\n // find a workaround if possible\n\n getNestedPopperTree().forEach(function (nestedPopper) {\n nestedPopper._tippy.unmount();\n });\n\n if (popper.parentNode) {\n popper.parentNode.removeChild(popper);\n }\n\n mountedInstances = mountedInstances.filter(function (i) {\n return i !== instance;\n });\n instance.state.isMounted = false;\n invokeHook('onHidden', [instance]);\n }\n\n function destroy() {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== \"production\") {\n warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('destroy'));\n }\n\n if (instance.state.isDestroyed) {\n return;\n }\n\n instance.clearDelayTimeouts();\n instance.unmount();\n removeListeners();\n delete reference._tippy;\n instance.state.isDestroyed = true;\n invokeHook('onDestroy', [instance]);\n }\n}\n\nfunction tippy(targets, optionalProps) {\n if (optionalProps === void 0) {\n optionalProps = {};\n }\n\n var plugins = defaultProps.plugins.concat(optionalProps.plugins || []);\n /* istanbul ignore else */\n\n if (process.env.NODE_ENV !== \"production\") {\n validateTargets(targets);\n validateProps(optionalProps, plugins);\n }\n\n bindGlobalEventListeners();\n var passedProps = Object.assign({}, optionalProps, {\n plugins: plugins\n });\n var elements = getArrayOfElements(targets);\n /* istanbul ignore else */\n\n if (process.env.NODE_ENV !== \"production\") {\n var isSingleContentElement = isElement(passedProps.content);\n var isMoreThanOneReferenceElement = elements.length > 1;\n warnWhen(isSingleContentElement && isMoreThanOneReferenceElement, ['tippy() was passed an Element as the `content` prop, but more than', 'one tippy instance was created by this invocation. This means the', 'content element will only be appended to the last tippy instance.', '\\n\\n', 'Instead, pass the .innerHTML of the element, or use a function that', 'returns a cloned version of the element instead.', '\\n\\n', '1) content: element.innerHTML\\n', '2) content: () => element.cloneNode(true)'].join(' '));\n }\n\n var instances = elements.reduce(function (acc, reference) {\n var instance = reference && createTippy(reference, passedProps);\n\n if (instance) {\n acc.push(instance);\n }\n\n return acc;\n }, []);\n return isElement(targets) ? instances[0] : instances;\n}\n\ntippy.defaultProps = defaultProps;\ntippy.setDefaultProps = setDefaultProps;\ntippy.currentInput = currentInput;\nvar hideAll = function hideAll(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n excludedReferenceOrInstance = _ref.exclude,\n duration = _ref.duration;\n\n mountedInstances.forEach(function (instance) {\n var isExcluded = false;\n\n if (excludedReferenceOrInstance) {\n isExcluded = isReferenceElement(excludedReferenceOrInstance) ? instance.reference === excludedReferenceOrInstance : instance.popper === excludedReferenceOrInstance.popper;\n }\n\n if (!isExcluded) {\n var originalDuration = instance.props.duration;\n instance.setProps({\n duration: duration\n });\n instance.hide();\n\n if (!instance.state.isDestroyed) {\n instance.setProps({\n duration: originalDuration\n });\n }\n }\n });\n};\n\n// every time the popper is destroyed (i.e. a new target), removing the styles\n// and causing transitions to break for singletons when the console is open, but\n// most notably for non-transform styles being used, `gpuAcceleration: false`.\n\nvar applyStylesModifier = Object.assign({}, applyStyles, {\n effect: function effect(_ref) {\n var state = _ref.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n } // intentionally return no cleanup function\n // return () => { ... }\n\n }\n});\n\nvar createSingleton = function createSingleton(tippyInstances, optionalProps) {\n var _optionalProps$popper;\n\n if (optionalProps === void 0) {\n optionalProps = {};\n }\n\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== \"production\") {\n errorWhen(!Array.isArray(tippyInstances), ['The first argument passed to createSingleton() must be an array of', 'tippy instances. The passed value was', String(tippyInstances)].join(' '));\n }\n\n var individualInstances = tippyInstances;\n var references = [];\n var triggerTargets = [];\n var currentTarget;\n var overrides = optionalProps.overrides;\n var interceptSetPropsCleanups = [];\n var shownOnCreate = false;\n\n function setTriggerTargets() {\n triggerTargets = individualInstances.map(function (instance) {\n return normalizeToArray(instance.props.triggerTarget || instance.reference);\n }).reduce(function (acc, item) {\n return acc.concat(item);\n }, []);\n }\n\n function setReferences() {\n references = individualInstances.map(function (instance) {\n return instance.reference;\n });\n }\n\n function enableInstances(isEnabled) {\n individualInstances.forEach(function (instance) {\n if (isEnabled) {\n instance.enable();\n } else {\n instance.disable();\n }\n });\n }\n\n function interceptSetProps(singleton) {\n return individualInstances.map(function (instance) {\n var originalSetProps = instance.setProps;\n\n instance.setProps = function (props) {\n originalSetProps(props);\n\n if (instance.reference === currentTarget) {\n singleton.setProps(props);\n }\n };\n\n return function () {\n instance.setProps = originalSetProps;\n };\n });\n } // have to pass singleton, as it maybe undefined on first call\n\n\n function prepareInstance(singleton, target) {\n var index = triggerTargets.indexOf(target); // bail-out\n\n if (target === currentTarget) {\n return;\n }\n\n currentTarget = target;\n var overrideProps = (overrides || []).concat('content').reduce(function (acc, prop) {\n acc[prop] = individualInstances[index].props[prop];\n return acc;\n }, {});\n singleton.setProps(Object.assign({}, overrideProps, {\n getReferenceClientRect: typeof overrideProps.getReferenceClientRect === 'function' ? overrideProps.getReferenceClientRect : function () {\n var _references$index;\n\n return (_references$index = references[index]) == null ? void 0 : _references$index.getBoundingClientRect();\n }\n }));\n }\n\n enableInstances(false);\n setReferences();\n setTriggerTargets();\n var plugin = {\n fn: function fn() {\n return {\n onDestroy: function onDestroy() {\n enableInstances(true);\n },\n onHidden: function onHidden() {\n currentTarget = null;\n },\n onClickOutside: function onClickOutside(instance) {\n if (instance.props.showOnCreate && !shownOnCreate) {\n shownOnCreate = true;\n currentTarget = null;\n }\n },\n onShow: function onShow(instance) {\n if (instance.props.showOnCreate && !shownOnCreate) {\n shownOnCreate = true;\n prepareInstance(instance, references[0]);\n }\n },\n onTrigger: function onTrigger(instance, event) {\n prepareInstance(instance, event.currentTarget);\n }\n };\n }\n };\n var singleton = tippy(div(), Object.assign({}, removeProperties(optionalProps, ['overrides']), {\n plugins: [plugin].concat(optionalProps.plugins || []),\n triggerTarget: triggerTargets,\n popperOptions: Object.assign({}, optionalProps.popperOptions, {\n modifiers: [].concat(((_optionalProps$popper = optionalProps.popperOptions) == null ? void 0 : _optionalProps$popper.modifiers) || [], [applyStylesModifier])\n })\n }));\n var originalShow = singleton.show;\n\n singleton.show = function (target) {\n originalShow(); // first time, showOnCreate or programmatic call with no params\n // default to showing first instance\n\n if (!currentTarget && target == null) {\n return prepareInstance(singleton, references[0]);\n } // triggered from event (do nothing as prepareInstance already called by onTrigger)\n // programmatic call with no params when already visible (do nothing again)\n\n\n if (currentTarget && target == null) {\n return;\n } // target is index of instance\n\n\n if (typeof target === 'number') {\n return references[target] && prepareInstance(singleton, references[target]);\n } // target is a child tippy instance\n\n\n if (individualInstances.indexOf(target) >= 0) {\n var ref = target.reference;\n return prepareInstance(singleton, ref);\n } // target is a ReferenceElement\n\n\n if (references.indexOf(target) >= 0) {\n return prepareInstance(singleton, target);\n }\n };\n\n singleton.showNext = function () {\n var first = references[0];\n\n if (!currentTarget) {\n return singleton.show(0);\n }\n\n var index = references.indexOf(currentTarget);\n singleton.show(references[index + 1] || first);\n };\n\n singleton.showPrevious = function () {\n var last = references[references.length - 1];\n\n if (!currentTarget) {\n return singleton.show(last);\n }\n\n var index = references.indexOf(currentTarget);\n var target = references[index - 1] || last;\n singleton.show(target);\n };\n\n var originalSetProps = singleton.setProps;\n\n singleton.setProps = function (props) {\n overrides = props.overrides || overrides;\n originalSetProps(props);\n };\n\n singleton.setInstances = function (nextInstances) {\n enableInstances(true);\n interceptSetPropsCleanups.forEach(function (fn) {\n return fn();\n });\n individualInstances = nextInstances;\n enableInstances(false);\n setReferences();\n setTriggerTargets();\n interceptSetPropsCleanups = interceptSetProps(singleton);\n singleton.setProps({\n triggerTarget: triggerTargets\n });\n };\n\n interceptSetPropsCleanups = interceptSetProps(singleton);\n return singleton;\n};\n\nvar BUBBLING_EVENTS_MAP = {\n mouseover: 'mouseenter',\n focusin: 'focus',\n click: 'click'\n};\n/**\n * Creates a delegate instance that controls the creation of tippy instances\n * for child elements (`target` CSS selector).\n */\n\nfunction delegate(targets, props) {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== \"production\") {\n errorWhen(!(props && props.target), ['You must specity a `target` prop indicating a CSS selector string matching', 'the target elements that should receive a tippy.'].join(' '));\n }\n\n var listeners = [];\n var childTippyInstances = [];\n var disabled = false;\n var target = props.target;\n var nativeProps = removeProperties(props, ['target']);\n var parentProps = Object.assign({}, nativeProps, {\n trigger: 'manual',\n touch: false\n });\n var childProps = Object.assign({\n touch: defaultProps.touch\n }, nativeProps, {\n showOnCreate: true\n });\n var returnValue = tippy(targets, parentProps);\n var normalizedReturnValue = normalizeToArray(returnValue);\n\n function onTrigger(event) {\n if (!event.target || disabled) {\n return;\n }\n\n var targetNode = event.target.closest(target);\n\n if (!targetNode) {\n return;\n } // Get relevant trigger with fallbacks:\n // 1. Check `data-tippy-trigger` attribute on target node\n // 2. Fallback to `trigger` passed to `delegate()`\n // 3. Fallback to `defaultProps.trigger`\n\n\n var trigger = targetNode.getAttribute('data-tippy-trigger') || props.trigger || defaultProps.trigger; // @ts-ignore\n\n if (targetNode._tippy) {\n return;\n }\n\n if (event.type === 'touchstart' && typeof childProps.touch === 'boolean') {\n return;\n }\n\n if (event.type !== 'touchstart' && trigger.indexOf(BUBBLING_EVENTS_MAP[event.type]) < 0) {\n return;\n }\n\n var instance = tippy(targetNode, childProps);\n\n if (instance) {\n childTippyInstances = childTippyInstances.concat(instance);\n }\n }\n\n function on(node, eventType, handler, options) {\n if (options === void 0) {\n options = false;\n }\n\n node.addEventListener(eventType, handler, options);\n listeners.push({\n node: node,\n eventType: eventType,\n handler: handler,\n options: options\n });\n }\n\n function addEventListeners(instance) {\n var reference = instance.reference;\n on(reference, 'touchstart', onTrigger, TOUCH_OPTIONS);\n on(reference, 'mouseover', onTrigger);\n on(reference, 'focusin', onTrigger);\n on(reference, 'click', onTrigger);\n }\n\n function removeEventListeners() {\n listeners.forEach(function (_ref) {\n var node = _ref.node,\n eventType = _ref.eventType,\n handler = _ref.handler,\n options = _ref.options;\n node.removeEventListener(eventType, handler, options);\n });\n listeners = [];\n }\n\n function applyMutations(instance) {\n var originalDestroy = instance.destroy;\n var originalEnable = instance.enable;\n var originalDisable = instance.disable;\n\n instance.destroy = function (shouldDestroyChildInstances) {\n if (shouldDestroyChildInstances === void 0) {\n shouldDestroyChildInstances = true;\n }\n\n if (shouldDestroyChildInstances) {\n childTippyInstances.forEach(function (instance) {\n instance.destroy();\n });\n }\n\n childTippyInstances = [];\n removeEventListeners();\n originalDestroy();\n };\n\n instance.enable = function () {\n originalEnable();\n childTippyInstances.forEach(function (instance) {\n return instance.enable();\n });\n disabled = false;\n };\n\n instance.disable = function () {\n originalDisable();\n childTippyInstances.forEach(function (instance) {\n return instance.disable();\n });\n disabled = true;\n };\n\n addEventListeners(instance);\n }\n\n normalizedReturnValue.forEach(applyMutations);\n return returnValue;\n}\n\nvar animateFill = {\n name: 'animateFill',\n defaultValue: false,\n fn: function fn(instance) {\n var _instance$props$rende;\n\n // @ts-ignore\n if (!((_instance$props$rende = instance.props.render) != null && _instance$props$rende.$$tippy)) {\n if (process.env.NODE_ENV !== \"production\") {\n errorWhen(instance.props.animateFill, 'The `animateFill` plugin requires the default render function.');\n }\n\n return {};\n }\n\n var _getChildren = getChildren(instance.popper),\n box = _getChildren.box,\n content = _getChildren.content;\n\n var backdrop = instance.props.animateFill ? createBackdropElement() : null;\n return {\n onCreate: function onCreate() {\n if (backdrop) {\n box.insertBefore(backdrop, box.firstElementChild);\n box.setAttribute('data-animatefill', '');\n box.style.overflow = 'hidden';\n instance.setProps({\n arrow: false,\n animation: 'shift-away'\n });\n }\n },\n onMount: function onMount() {\n if (backdrop) {\n var transitionDuration = box.style.transitionDuration;\n var duration = Number(transitionDuration.replace('ms', '')); // The content should fade in after the backdrop has mostly filled the\n // tooltip element. `clip-path` is the other alternative but is not\n // well-supported and is buggy on some devices.\n\n content.style.transitionDelay = Math.round(duration / 10) + \"ms\";\n backdrop.style.transitionDuration = transitionDuration;\n setVisibilityState([backdrop], 'visible');\n }\n },\n onShow: function onShow() {\n if (backdrop) {\n backdrop.style.transitionDuration = '0ms';\n }\n },\n onHide: function onHide() {\n if (backdrop) {\n setVisibilityState([backdrop], 'hidden');\n }\n }\n };\n }\n};\n\nfunction createBackdropElement() {\n var backdrop = div();\n backdrop.className = BACKDROP_CLASS;\n setVisibilityState([backdrop], 'hidden');\n return backdrop;\n}\n\nvar mouseCoords = {\n clientX: 0,\n clientY: 0\n};\nvar activeInstances = [];\n\nfunction storeMouseCoords(_ref) {\n var clientX = _ref.clientX,\n clientY = _ref.clientY;\n mouseCoords = {\n clientX: clientX,\n clientY: clientY\n };\n}\n\nfunction addMouseCoordsListener(doc) {\n doc.addEventListener('mousemove', storeMouseCoords);\n}\n\nfunction removeMouseCoordsListener(doc) {\n doc.removeEventListener('mousemove', storeMouseCoords);\n}\n\nvar followCursor = {\n name: 'followCursor',\n defaultValue: false,\n fn: function fn(instance) {\n var reference = instance.reference;\n var doc = getOwnerDocument(instance.props.triggerTarget || reference);\n var isInternalUpdate = false;\n var wasFocusEvent = false;\n var isUnmounted = true;\n var prevProps = instance.props;\n\n function getIsInitialBehavior() {\n return instance.props.followCursor === 'initial' && instance.state.isVisible;\n }\n\n function addListener() {\n doc.addEventListener('mousemove', onMouseMove);\n }\n\n function removeListener() {\n doc.removeEventListener('mousemove', onMouseMove);\n }\n\n function unsetGetReferenceClientRect() {\n isInternalUpdate = true;\n instance.setProps({\n getReferenceClientRect: null\n });\n isInternalUpdate = false;\n }\n\n function onMouseMove(event) {\n // If the instance is interactive, avoid updating the position unless it's\n // over the reference element\n var isCursorOverReference = event.target ? reference.contains(event.target) : true;\n var followCursor = instance.props.followCursor;\n var clientX = event.clientX,\n clientY = event.clientY;\n var rect = reference.getBoundingClientRect();\n var relativeX = clientX - rect.left;\n var relativeY = clientY - rect.top;\n\n if (isCursorOverReference || !instance.props.interactive) {\n instance.setProps({\n // @ts-ignore - unneeded DOMRect properties\n getReferenceClientRect: function getReferenceClientRect() {\n var rect = reference.getBoundingClientRect();\n var x = clientX;\n var y = clientY;\n\n if (followCursor === 'initial') {\n x = rect.left + relativeX;\n y = rect.top + relativeY;\n }\n\n var top = followCursor === 'horizontal' ? rect.top : y;\n var right = followCursor === 'vertical' ? rect.right : x;\n var bottom = followCursor === 'horizontal' ? rect.bottom : y;\n var left = followCursor === 'vertical' ? rect.left : x;\n return {\n width: right - left,\n height: bottom - top,\n top: top,\n right: right,\n bottom: bottom,\n left: left\n };\n }\n });\n }\n }\n\n function create() {\n if (instance.props.followCursor) {\n activeInstances.push({\n instance: instance,\n doc: doc\n });\n addMouseCoordsListener(doc);\n }\n }\n\n function destroy() {\n activeInstances = activeInstances.filter(function (data) {\n return data.instance !== instance;\n });\n\n if (activeInstances.filter(function (data) {\n return data.doc === doc;\n }).length === 0) {\n removeMouseCoordsListener(doc);\n }\n }\n\n return {\n onCreate: create,\n onDestroy: destroy,\n onBeforeUpdate: function onBeforeUpdate() {\n prevProps = instance.props;\n },\n onAfterUpdate: function onAfterUpdate(_, _ref2) {\n var followCursor = _ref2.followCursor;\n\n if (isInternalUpdate) {\n return;\n }\n\n if (followCursor !== undefined && prevProps.followCursor !== followCursor) {\n destroy();\n\n if (followCursor) {\n create();\n\n if (instance.state.isMounted && !wasFocusEvent && !getIsInitialBehavior()) {\n addListener();\n }\n } else {\n removeListener();\n unsetGetReferenceClientRect();\n }\n }\n },\n onMount: function onMount() {\n if (instance.props.followCursor && !wasFocusEvent) {\n if (isUnmounted) {\n onMouseMove(mouseCoords);\n isUnmounted = false;\n }\n\n if (!getIsInitialBehavior()) {\n addListener();\n }\n }\n },\n onTrigger: function onTrigger(_, event) {\n if (isMouseEvent(event)) {\n mouseCoords = {\n clientX: event.clientX,\n clientY: event.clientY\n };\n }\n\n wasFocusEvent = event.type === 'focus';\n },\n onHidden: function onHidden() {\n if (instance.props.followCursor) {\n unsetGetReferenceClientRect();\n removeListener();\n isUnmounted = true;\n }\n }\n };\n }\n};\n\nfunction getProps(props, modifier) {\n var _props$popperOptions;\n\n return {\n popperOptions: Object.assign({}, props.popperOptions, {\n modifiers: [].concat((((_props$popperOptions = props.popperOptions) == null ? void 0 : _props$popperOptions.modifiers) || []).filter(function (_ref) {\n var name = _ref.name;\n return name !== modifier.name;\n }), [modifier])\n })\n };\n}\n\nvar inlinePositioning = {\n name: 'inlinePositioning',\n defaultValue: false,\n fn: function fn(instance) {\n var reference = instance.reference;\n\n function isEnabled() {\n return !!instance.props.inlinePositioning;\n }\n\n var placement;\n var cursorRectIndex = -1;\n var isInternalUpdate = false;\n var triedPlacements = [];\n var modifier = {\n name: 'tippyInlinePositioning',\n enabled: true,\n phase: 'afterWrite',\n fn: function fn(_ref2) {\n var state = _ref2.state;\n\n if (isEnabled()) {\n if (triedPlacements.indexOf(state.placement) !== -1) {\n triedPlacements = [];\n }\n\n if (placement !== state.placement && triedPlacements.indexOf(state.placement) === -1) {\n triedPlacements.push(state.placement);\n instance.setProps({\n // @ts-ignore - unneeded DOMRect properties\n getReferenceClientRect: function getReferenceClientRect() {\n return _getReferenceClientRect(state.placement);\n }\n });\n }\n\n placement = state.placement;\n }\n }\n };\n\n function _getReferenceClientRect(placement) {\n return getInlineBoundingClientRect(getBasePlacement(placement), reference.getBoundingClientRect(), arrayFrom(reference.getClientRects()), cursorRectIndex);\n }\n\n function setInternalProps(partialProps) {\n isInternalUpdate = true;\n instance.setProps(partialProps);\n isInternalUpdate = false;\n }\n\n function addModifier() {\n if (!isInternalUpdate) {\n setInternalProps(getProps(instance.props, modifier));\n }\n }\n\n return {\n onCreate: addModifier,\n onAfterUpdate: addModifier,\n onTrigger: function onTrigger(_, event) {\n if (isMouseEvent(event)) {\n var rects = arrayFrom(instance.reference.getClientRects());\n var cursorRect = rects.find(function (rect) {\n return rect.left - 2 <= event.clientX && rect.right + 2 >= event.clientX && rect.top - 2 <= event.clientY && rect.bottom + 2 >= event.clientY;\n });\n var index = rects.indexOf(cursorRect);\n cursorRectIndex = index > -1 ? index : cursorRectIndex;\n }\n },\n onHidden: function onHidden() {\n cursorRectIndex = -1;\n }\n };\n }\n};\nfunction getInlineBoundingClientRect(currentBasePlacement, boundingRect, clientRects, cursorRectIndex) {\n // Not an inline element, or placement is not yet known\n if (clientRects.length < 2 || currentBasePlacement === null) {\n return boundingRect;\n } // There are two rects and they are disjoined\n\n\n if (clientRects.length === 2 && cursorRectIndex >= 0 && clientRects[0].left > clientRects[1].right) {\n return clientRects[cursorRectIndex] || boundingRect;\n }\n\n switch (currentBasePlacement) {\n case 'top':\n case 'bottom':\n {\n var firstRect = clientRects[0];\n var lastRect = clientRects[clientRects.length - 1];\n var isTop = currentBasePlacement === 'top';\n var top = firstRect.top;\n var bottom = lastRect.bottom;\n var left = isTop ? firstRect.left : lastRect.left;\n var right = isTop ? firstRect.right : lastRect.right;\n var width = right - left;\n var height = bottom - top;\n return {\n top: top,\n bottom: bottom,\n left: left,\n right: right,\n width: width,\n height: height\n };\n }\n\n case 'left':\n case 'right':\n {\n var minLeft = Math.min.apply(Math, clientRects.map(function (rects) {\n return rects.left;\n }));\n var maxRight = Math.max.apply(Math, clientRects.map(function (rects) {\n return rects.right;\n }));\n var measureRects = clientRects.filter(function (rect) {\n return currentBasePlacement === 'left' ? rect.left === minLeft : rect.right === maxRight;\n });\n var _top = measureRects[0].top;\n var _bottom = measureRects[measureRects.length - 1].bottom;\n var _left = minLeft;\n var _right = maxRight;\n\n var _width = _right - _left;\n\n var _height = _bottom - _top;\n\n return {\n top: _top,\n bottom: _bottom,\n left: _left,\n right: _right,\n width: _width,\n height: _height\n };\n }\n\n default:\n {\n return boundingRect;\n }\n }\n}\n\nvar sticky = {\n name: 'sticky',\n defaultValue: false,\n fn: function fn(instance) {\n var reference = instance.reference,\n popper = instance.popper;\n\n function getReference() {\n return instance.popperInstance ? instance.popperInstance.state.elements.reference : reference;\n }\n\n function shouldCheck(value) {\n return instance.props.sticky === true || instance.props.sticky === value;\n }\n\n var prevRefRect = null;\n var prevPopRect = null;\n\n function updatePosition() {\n var currentRefRect = shouldCheck('reference') ? getReference().getBoundingClientRect() : null;\n var currentPopRect = shouldCheck('popper') ? popper.getBoundingClientRect() : null;\n\n if (currentRefRect && areRectsDifferent(prevRefRect, currentRefRect) || currentPopRect && areRectsDifferent(prevPopRect, currentPopRect)) {\n if (instance.popperInstance) {\n instance.popperInstance.update();\n }\n }\n\n prevRefRect = currentRefRect;\n prevPopRect = currentPopRect;\n\n if (instance.state.isMounted) {\n requestAnimationFrame(updatePosition);\n }\n }\n\n return {\n onMount: function onMount() {\n if (instance.props.sticky) {\n updatePosition();\n }\n }\n };\n }\n};\n\nfunction areRectsDifferent(rectA, rectB) {\n if (rectA && rectB) {\n return rectA.top !== rectB.top || rectA.right !== rectB.right || rectA.bottom !== rectB.bottom || rectA.left !== rectB.left;\n }\n\n return true;\n}\n\ntippy.setDefaultProps({\n render: render\n});\n\nexport default tippy;\nexport { animateFill, createSingleton, delegate, followCursor, hideAll, inlinePositioning, ROUND_ARROW as roundArrow, sticky };\n//# sourceMappingURL=tippy.esm.js.map\n","import { vttToLines as en, parseTimestamp as qs, templateToScenes as Xs, crossFade as tn, getSizeDetails as sn } from \"@vouchfor/canvas-video\";\nimport { noChange as qi, unsafeCSS as $t, css as pe, LitElement as rn, html as G } from \"lit\";\nimport { property as P, state as Ee } from \"lit/decorators.js\";\nimport { classMap as te } from \"lit/directives/class-map.js\";\nimport { ifDefined as dt } from \"lit/directives/if-defined.js\";\nimport { createRef as Me, ref as Ne } from \"lit/directives/ref.js\";\nimport { Task as nn } from \"@lit/task\";\nimport { AsyncDirective as an } from \"lit/async-directive.js\";\nimport { directive as Xi, PartType as Zi, Directive as on } from \"lit/directive.js\";\nimport ln from \"flat\";\nimport { repeat as Qi } from \"lit/directives/repeat.js\";\nimport ws from \"tippy.js\";\nconst hn = 5;\nclass cn {\n constructor(e) {\n this._caption = \"\", this._currentTime = 0, this._activeScenes = [], this._upcomingScenes = [], this._fakeBufferSegments = [], this._canvas = Me(), this._controls = Me(), this.host = e;\n }\n set activeScenes(e) {\n if (e !== this._activeScenes) {\n const t = e[0], s = this._activeScenes[0];\n this._activeScenes = e, t !== s && (this.host.dispatchEvent(new CustomEvent(\"scenechange\", { detail: e[0] })), this.host.requestUpdate());\n }\n }\n get activeScenes() {\n return this._activeScenes;\n }\n set currentTime(e) {\n var r, n, o, l, h;\n const t = Math.min(this.host.duration, Math.max(0, e));\n this._currentTime = t, this.activeScenes = ((r = this.host.scenes) == null ? void 0 : r.filter(({ start: c, duration: d }) => t >= c && t <= c + d)) ?? [], this._upcomingScenes = ((n = this.host.scenes) == null ? void 0 : n.filter(({ start: c }) => t >= c - hn && t < c)) ?? [], this.loadScenes(), this.syncVideoState(), (o = this._controls.value) == null || o.setAttribute(\"currentTime\", t.toString());\n const s = this.activeScenes[0], i = en((l = s == null ? void 0 : s.videoMeta) == null ? void 0 : l.captions);\n this.caption = ((h = i.find(({ start: c, end: d }) => {\n var f;\n const u = t - s.start + (((f = s.videoMeta) == null ? void 0 : f.start) ?? 0);\n return c && d && u >= qs(c) && u <= qs(d);\n })) == null ? void 0 : h.text) ?? \"\", this.draw(t), !this.host.paused && !this.host.loading && !this.host.processing && !this.host.waiting && !this.host.stalled && this.host.dispatchEvent(new CustomEvent(\"timeupdate\", { detail: t }));\n }\n get currentTime() {\n return this._currentTime;\n }\n set fakeBufferSegments(e) {\n e !== this._fakeBufferSegments && (this._fakeBufferSegments = e, this.host.requestUpdate());\n }\n get fakeBufferSegments() {\n return this._fakeBufferSegments;\n }\n set caption(e) {\n e !== this._caption && (this._caption = e, this.host.requestUpdate());\n }\n get caption() {\n return this._caption;\n }\n canvas() {\n return Ne(this._canvas);\n }\n controls() {\n return Ne(this._controls);\n }\n loadScenes() {\n var t;\n let e = this.fakeBufferSegments;\n (t = this.host.scenes) == null || t.forEach((s) => {\n var d, u;\n const { start: i, duration: r, video: n, videoMeta: o } = s, l = this.activeScenes.includes(s), c = (this._upcomingScenes.includes(s) || l) && (this.host.currentTime > 0 || this.host.preload === \"auto\" || !this.host.paused);\n if (n && o) {\n const { id: f, hls: g, node: p } = n, { start: y, duration: v } = o, E = this.host.videoState[f];\n p && E && (p.currentTime >= y + v || p.ended || c && (g ? (d = g.startLoadOnce) == null || d.call(g, p.currentTime) : E.initialised || (u = p.startLoadOnce) == null || u.call(p)));\n } else if (c) {\n const f = {\n start: Math.max(0, i / this.host.duration * 100),\n end: Math.min((i + r) / this.host.duration * 100, 100)\n };\n this.fakeBufferSegments.find(({ start: p }) => p === f.start) || (e = [...e, f]);\n }\n }), this.fakeBufferSegments = e;\n }\n syncVideoState() {\n var e;\n (e = this.host.scenes) == null || e.forEach((t) => {\n if (t.video) {\n const { id: s, node: i } = t.video, r = this.host.videoState[s], n = this.activeScenes.includes(t);\n if (i && r)\n if (n && !this.host.waiting && !this.host.loading && !this.host.paused) {\n if (i.paused && r.initialised)\n return i.play();\n } else\n i.paused || i.pause();\n }\n });\n }\n draw(e = this.currentTime) {\n var t, s;\n this.host.sceneConfig && this._canvas.value && ((s = (t = this.host).compilation) == null || s.call(t, {\n currentTime: e,\n scenes: this.host.sceneConfig,\n canvas: this._canvas.value\n }));\n }\n clear() {\n var t;\n const e = this._canvas.value;\n (t = e == null ? void 0 : e.getContext(\"2d\")) == null || t.clearRect(0, 0, e.width, e.height);\n }\n}\nfunction dn(a) {\n return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, \"default\") ? a.default : a;\n}\nvar Ji = { exports: {} };\n(function(a, e) {\n (function(t) {\n var s = /^(?=((?:[a-zA-Z0-9+\\-.]+:)?))\\1(?=((?:\\/\\/[^\\/?#]*)?))\\2(?=((?:(?:[^?#\\/]*\\/)*[^;?#\\/]*)?))\\3((?:;[^?#]*)?)(\\?[^#]*)?(#[^]*)?$/, i = /^(?=([^\\/?#]*))\\1([^]*)$/, r = /(?:\\/|^)\\.(?=\\/)/g, n = /(?:\\/|^)\\.\\.\\/(?!\\.\\.\\/)[^\\/]*(?=\\/)/g, o = {\n // If opts.alwaysNormalize is true then the path will always be normalized even when it starts with / or //\n // E.g\n // With opts.alwaysNormalize = false (default, spec compliant)\n // http://a.com/b/cd + /e/f/../g => http://a.com/e/f/../g\n // With opts.alwaysNormalize = true (not spec compliant)\n // http://a.com/b/cd + /e/f/../g => http://a.com/e/g\n buildAbsoluteURL: function(l, h, c) {\n if (c = c || {}, l = l.trim(), h = h.trim(), !h) {\n if (!c.alwaysNormalize)\n return l;\n var d = o.parseURL(l);\n if (!d)\n throw new Error(\"Error trying to parse base URL.\");\n return d.path = o.normalizePath(\n d.path\n ), o.buildURLFromParts(d);\n }\n var u = o.parseURL(h);\n if (!u)\n throw new Error(\"Error trying to parse relative URL.\");\n if (u.scheme)\n return c.alwaysNormalize ? (u.path = o.normalizePath(u.path), o.buildURLFromParts(u)) : h;\n var f = o.parseURL(l);\n if (!f)\n throw new Error(\"Error trying to parse base URL.\");\n if (!f.netLoc && f.path && f.path[0] !== \"/\") {\n var g = i.exec(f.path);\n f.netLoc = g[1], f.path = g[2];\n }\n f.netLoc && !f.path && (f.path = \"/\");\n var p = {\n // 2c) Otherwise, the embedded URL inherits the scheme of\n // the base URL.\n scheme: f.scheme,\n netLoc: u.netLoc,\n path: null,\n params: u.params,\n query: u.query,\n fragment: u.fragment\n };\n if (!u.netLoc && (p.netLoc = f.netLoc, u.path[0] !== \"/\"))\n if (!u.path)\n p.path = f.path, u.params || (p.params = f.params, u.query || (p.query = f.query));\n else {\n var y = f.path, v = y.substring(0, y.lastIndexOf(\"/\") + 1) + u.path;\n p.path = o.normalizePath(v);\n }\n return p.path === null && (p.path = c.alwaysNormalize ? o.normalizePath(u.path) : u.path), o.buildURLFromParts(p);\n },\n parseURL: function(l) {\n var h = s.exec(l);\n return h ? {\n scheme: h[1] || \"\",\n netLoc: h[2] || \"\",\n path: h[3] || \"\",\n params: h[4] || \"\",\n query: h[5] || \"\",\n fragment: h[6] || \"\"\n } : null;\n },\n normalizePath: function(l) {\n for (l = l.split(\"\").reverse().join(\"\").replace(r, \"\"); l.length !== (l = l.replace(n, \"\")).length; )\n ;\n return l.split(\"\").reverse().join(\"\");\n },\n buildURLFromParts: function(l) {\n return l.scheme + l.netLoc + l.path + l.params + l.query + l.fragment;\n }\n };\n a.exports = o;\n })();\n})(Ji);\nvar Cs = Ji.exports;\nfunction Zs(a, e) {\n var t = Object.keys(a);\n if (Object.getOwnPropertySymbols) {\n var s = Object.getOwnPropertySymbols(a);\n e && (s = s.filter(function(i) {\n return Object.getOwnPropertyDescriptor(a, i).enumerable;\n })), t.push.apply(t, s);\n }\n return t;\n}\nfunction xe(a) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e] != null ? arguments[e] : {};\n e % 2 ? Zs(Object(t), !0).forEach(function(s) {\n un(a, s, t[s]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : Zs(Object(t)).forEach(function(s) {\n Object.defineProperty(a, s, Object.getOwnPropertyDescriptor(t, s));\n });\n }\n return a;\n}\nfunction un(a, e, t) {\n return e = gn(e), e in a ? Object.defineProperty(a, e, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : a[e] = t, a;\n}\nfunction ne() {\n return ne = Object.assign ? Object.assign.bind() : function(a) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var s in t)\n Object.prototype.hasOwnProperty.call(t, s) && (a[s] = t[s]);\n }\n return a;\n }, ne.apply(this, arguments);\n}\nfunction fn(a, e) {\n if (typeof a != \"object\" || a === null)\n return a;\n var t = a[Symbol.toPrimitive];\n if (t !== void 0) {\n var s = t.call(a, e || \"default\");\n if (typeof s != \"object\")\n return s;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (e === \"string\" ? String : Number)(a);\n}\nfunction gn(a) {\n var e = fn(a, \"string\");\n return typeof e == \"symbol\" ? e : String(e);\n}\nconst M = Number.isFinite || function(a) {\n return typeof a == \"number\" && isFinite(a);\n};\nlet m = /* @__PURE__ */ function(a) {\n return a.MEDIA_ATTACHING = \"hlsMediaAttaching\", a.MEDIA_ATTACHED = \"hlsMediaAttached\", a.MEDIA_DETACHING = \"hlsMediaDetaching\", a.MEDIA_DETACHED = \"hlsMediaDetached\", a.BUFFER_RESET = \"hlsBufferReset\", a.BUFFER_CODECS = \"hlsBufferCodecs\", a.BUFFER_CREATED = \"hlsBufferCreated\", a.BUFFER_APPENDING = \"hlsBufferAppending\", a.BUFFER_APPENDED = \"hlsBufferAppended\", a.BUFFER_EOS = \"hlsBufferEos\", a.BUFFER_FLUSHING = \"hlsBufferFlushing\", a.BUFFER_FLUSHED = \"hlsBufferFlushed\", a.MANIFEST_LOADING = \"hlsManifestLoading\", a.MANIFEST_LOADED = \"hlsManifestLoaded\", a.MANIFEST_PARSED = \"hlsManifestParsed\", a.LEVEL_SWITCHING = \"hlsLevelSwitching\", a.LEVEL_SWITCHED = \"hlsLevelSwitched\", a.LEVEL_LOADING = \"hlsLevelLoading\", a.LEVEL_LOADED = \"hlsLevelLoaded\", a.LEVEL_UPDATED = \"hlsLevelUpdated\", a.LEVEL_PTS_UPDATED = \"hlsLevelPtsUpdated\", a.LEVELS_UPDATED = \"hlsLevelsUpdated\", a.AUDIO_TRACKS_UPDATED = \"hlsAudioTracksUpdated\", a.AUDIO_TRACK_SWITCHING = \"hlsAudioTrackSwitching\", a.AUDIO_TRACK_SWITCHED = \"hlsAudioTrackSwitched\", a.AUDIO_TRACK_LOADING = \"hlsAudioTrackLoading\", a.AUDIO_TRACK_LOADED = \"hlsAudioTrackLoaded\", a.SUBTITLE_TRACKS_UPDATED = \"hlsSubtitleTracksUpdated\", a.SUBTITLE_TRACKS_CLEARED = \"hlsSubtitleTracksCleared\", a.SUBTITLE_TRACK_SWITCH = \"hlsSubtitleTrackSwitch\", a.SUBTITLE_TRACK_LOADING = \"hlsSubtitleTrackLoading\", a.SUBTITLE_TRACK_LOADED = \"hlsSubtitleTrackLoaded\", a.SUBTITLE_FRAG_PROCESSED = \"hlsSubtitleFragProcessed\", a.CUES_PARSED = \"hlsCuesParsed\", a.NON_NATIVE_TEXT_TRACKS_FOUND = \"hlsNonNativeTextTracksFound\", a.INIT_PTS_FOUND = \"hlsInitPtsFound\", a.FRAG_LOADING = \"hlsFragLoading\", a.FRAG_LOAD_EMERGENCY_ABORTED = \"hlsFragLoadEmergencyAborted\", a.FRAG_LOADED = \"hlsFragLoaded\", a.FRAG_DECRYPTED = \"hlsFragDecrypted\", a.FRAG_PARSING_INIT_SEGMENT = \"hlsFragParsingInitSegment\", a.FRAG_PARSING_USERDATA = \"hlsFragParsingUserdata\", a.FRAG_PARSING_METADATA = \"hlsFragParsingMetadata\", a.FRAG_PARSED = \"hlsFragParsed\", a.FRAG_BUFFERED = \"hlsFragBuffered\", a.FRAG_CHANGED = \"hlsFragChanged\", a.FPS_DROP = \"hlsFpsDrop\", a.FPS_DROP_LEVEL_CAPPING = \"hlsFpsDropLevelCapping\", a.ERROR = \"hlsError\", a.DESTROYING = \"hlsDestroying\", a.KEY_LOADING = \"hlsKeyLoading\", a.KEY_LOADED = \"hlsKeyLoaded\", a.LIVE_BACK_BUFFER_REACHED = \"hlsLiveBackBufferReached\", a.BACK_BUFFER_REACHED = \"hlsBackBufferReached\", a;\n}({}), U = /* @__PURE__ */ function(a) {\n return a.NETWORK_ERROR = \"networkError\", a.MEDIA_ERROR = \"mediaError\", a.KEY_SYSTEM_ERROR = \"keySystemError\", a.MUX_ERROR = \"muxError\", a.OTHER_ERROR = \"otherError\", a;\n}({}), L = /* @__PURE__ */ function(a) {\n return a.KEY_SYSTEM_NO_KEYS = \"keySystemNoKeys\", a.KEY_SYSTEM_NO_ACCESS = \"keySystemNoAccess\", a.KEY_SYSTEM_NO_SESSION = \"keySystemNoSession\", a.KEY_SYSTEM_NO_CONFIGURED_LICENSE = \"keySystemNoConfiguredLicense\", a.KEY_SYSTEM_LICENSE_REQUEST_FAILED = \"keySystemLicenseRequestFailed\", a.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED = \"keySystemServerCertificateRequestFailed\", a.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED = \"keySystemServerCertificateUpdateFailed\", a.KEY_SYSTEM_SESSION_UPDATE_FAILED = \"keySystemSessionUpdateFailed\", a.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED = \"keySystemStatusOutputRestricted\", a.KEY_SYSTEM_STATUS_INTERNAL_ERROR = \"keySystemStatusInternalError\", a.MANIFEST_LOAD_ERROR = \"manifestLoadError\", a.MANIFEST_LOAD_TIMEOUT = \"manifestLoadTimeOut\", a.MANIFEST_PARSING_ERROR = \"manifestParsingError\", a.MANIFEST_INCOMPATIBLE_CODECS_ERROR = \"manifestIncompatibleCodecsError\", a.LEVEL_EMPTY_ERROR = \"levelEmptyError\", a.LEVEL_LOAD_ERROR = \"levelLoadError\", a.LEVEL_LOAD_TIMEOUT = \"levelLoadTimeOut\", a.LEVEL_PARSING_ERROR = \"levelParsingError\", a.LEVEL_SWITCH_ERROR = \"levelSwitchError\", a.AUDIO_TRACK_LOAD_ERROR = \"audioTrackLoadError\", a.AUDIO_TRACK_LOAD_TIMEOUT = \"audioTrackLoadTimeOut\", a.SUBTITLE_LOAD_ERROR = \"subtitleTrackLoadError\", a.SUBTITLE_TRACK_LOAD_TIMEOUT = \"subtitleTrackLoadTimeOut\", a.FRAG_LOAD_ERROR = \"fragLoadError\", a.FRAG_LOAD_TIMEOUT = \"fragLoadTimeOut\", a.FRAG_DECRYPT_ERROR = \"fragDecryptError\", a.FRAG_PARSING_ERROR = \"fragParsingError\", a.FRAG_GAP = \"fragGap\", a.REMUX_ALLOC_ERROR = \"remuxAllocError\", a.KEY_LOAD_ERROR = \"keyLoadError\", a.KEY_LOAD_TIMEOUT = \"keyLoadTimeOut\", a.BUFFER_ADD_CODEC_ERROR = \"bufferAddCodecError\", a.BUFFER_INCOMPATIBLE_CODECS_ERROR = \"bufferIncompatibleCodecsError\", a.BUFFER_APPEND_ERROR = \"bufferAppendError\", a.BUFFER_APPENDING_ERROR = \"bufferAppendingError\", a.BUFFER_STALLED_ERROR = \"bufferStalledError\", a.BUFFER_FULL_ERROR = \"bufferFullError\", a.BUFFER_SEEK_OVER_HOLE = \"bufferSeekOverHole\", a.BUFFER_NUDGE_ON_STALL = \"bufferNudgeOnStall\", a.INTERNAL_EXCEPTION = \"internalException\", a.INTERNAL_ABORTED = \"aborted\", a.UNKNOWN = \"unknown\", a;\n}({});\nconst qe = function() {\n}, ms = {\n trace: qe,\n debug: qe,\n log: qe,\n warn: qe,\n info: qe,\n error: qe\n};\nlet ut = ms;\nfunction mn(a) {\n const e = self.console[a];\n return e ? e.bind(self.console, `[${a}] >`) : qe;\n}\nfunction pn(a, ...e) {\n e.forEach(function(t) {\n ut[t] = a[t] ? a[t].bind(a) : mn(t);\n });\n}\nfunction yn(a, e) {\n if (self.console && a === !0 || typeof a == \"object\") {\n pn(\n a,\n // Remove out from list here to hard-disable a log-level\n // 'trace',\n \"debug\",\n \"log\",\n \"info\",\n \"warn\",\n \"error\"\n );\n try {\n ut.log(`Debug logs enabled for \"${e}\" in hls.js version 1.4.12`);\n } catch {\n ut = ms;\n }\n } else\n ut = ms;\n}\nconst x = ut, vn = /^(\\d+)x(\\d+)$/, Qs = /(.+?)=(\".*?\"|.*?)(?:,|$)/g;\nclass ee {\n constructor(e) {\n typeof e == \"string\" && (e = ee.parseAttrList(e));\n for (const t in e)\n e.hasOwnProperty(t) && (t.substring(0, 2) === \"X-\" && (this.clientAttrs = this.clientAttrs || [], this.clientAttrs.push(t)), this[t] = e[t]);\n }\n decimalInteger(e) {\n const t = parseInt(this[e], 10);\n return t > Number.MAX_SAFE_INTEGER ? 1 / 0 : t;\n }\n hexadecimalInteger(e) {\n if (this[e]) {\n let t = (this[e] || \"0x\").slice(2);\n t = (t.length & 1 ? \"0\" : \"\") + t;\n const s = new Uint8Array(t.length / 2);\n for (let i = 0; i < t.length / 2; i++)\n s[i] = parseInt(t.slice(i * 2, i * 2 + 2), 16);\n return s;\n } else\n return null;\n }\n hexadecimalIntegerAsNumber(e) {\n const t = parseInt(this[e], 16);\n return t > Number.MAX_SAFE_INTEGER ? 1 / 0 : t;\n }\n decimalFloatingPoint(e) {\n return parseFloat(this[e]);\n }\n optionalFloat(e, t) {\n const s = this[e];\n return s ? parseFloat(s) : t;\n }\n enumeratedString(e) {\n return this[e];\n }\n bool(e) {\n return this[e] === \"YES\";\n }\n decimalResolution(e) {\n const t = vn.exec(this[e]);\n if (t !== null)\n return {\n width: parseInt(t[1], 10),\n height: parseInt(t[2], 10)\n };\n }\n static parseAttrList(e) {\n let t;\n const s = {}, i = '\"';\n for (Qs.lastIndex = 0; (t = Qs.exec(e)) !== null; ) {\n let r = t[2];\n r.indexOf(i) === 0 && r.lastIndexOf(i) === r.length - 1 && (r = r.slice(1, -1));\n const n = t[1].trim();\n s[n] = r;\n }\n return s;\n }\n}\nfunction Tn(a) {\n return a !== \"ID\" && a !== \"CLASS\" && a !== \"START-DATE\" && a !== \"DURATION\" && a !== \"END-DATE\" && a !== \"END-ON-NEXT\";\n}\nfunction xn(a) {\n return a === \"SCTE35-OUT\" || a === \"SCTE35-IN\";\n}\nclass er {\n constructor(e, t) {\n if (this.attr = void 0, this._startDate = void 0, this._endDate = void 0, this._badValueForSameId = void 0, t) {\n const s = t.attr;\n for (const i in s)\n if (Object.prototype.hasOwnProperty.call(e, i) && e[i] !== s[i]) {\n x.warn(`DATERANGE tag attribute: \"${i}\" does not match for tags with ID: \"${e.ID}\"`), this._badValueForSameId = i;\n break;\n }\n e = ne(new ee({}), s, e);\n }\n if (this.attr = e, this._startDate = new Date(e[\"START-DATE\"]), \"END-DATE\" in this.attr) {\n const s = new Date(this.attr[\"END-DATE\"]);\n M(s.getTime()) && (this._endDate = s);\n }\n }\n get id() {\n return this.attr.ID;\n }\n get class() {\n return this.attr.CLASS;\n }\n get startDate() {\n return this._startDate;\n }\n get endDate() {\n if (this._endDate)\n return this._endDate;\n const e = this.duration;\n return e !== null ? new Date(this._startDate.getTime() + e * 1e3) : null;\n }\n get duration() {\n if (\"DURATION\" in this.attr) {\n const e = this.attr.decimalFloatingPoint(\"DURATION\");\n if (M(e))\n return e;\n } else if (this._endDate)\n return (this._endDate.getTime() - this._startDate.getTime()) / 1e3;\n return null;\n }\n get plannedDuration() {\n return \"PLANNED-DURATION\" in this.attr ? this.attr.decimalFloatingPoint(\"PLANNED-DURATION\") : null;\n }\n get endOnNext() {\n return this.attr.bool(\"END-ON-NEXT\");\n }\n get isValid() {\n return !!this.id && !this._badValueForSameId && M(this.startDate.getTime()) && (this.duration === null || this.duration >= 0) && (!this.endOnNext || !!this.class);\n }\n}\nclass Gt {\n constructor() {\n this.aborted = !1, this.loaded = 0, this.retry = 0, this.total = 0, this.chunkCount = 0, this.bwEstimate = 0, this.loading = {\n start: 0,\n first: 0,\n end: 0\n }, this.parsing = {\n start: 0,\n end: 0\n }, this.buffering = {\n start: 0,\n first: 0,\n end: 0\n };\n }\n}\nvar j = {\n AUDIO: \"audio\",\n VIDEO: \"video\",\n AUDIOVIDEO: \"audiovideo\"\n};\nclass tr {\n // baseurl is the URL to the playlist\n // relurl is the portion of the URL that comes from inside the playlist.\n // Holds the types of data this fragment supports\n constructor(e) {\n this._byteRange = null, this._url = null, this.baseurl = void 0, this.relurl = void 0, this.elementaryStreams = {\n [j.AUDIO]: null,\n [j.VIDEO]: null,\n [j.AUDIOVIDEO]: null\n }, this.baseurl = e;\n }\n // setByteRange converts a EXT-X-BYTERANGE attribute into a two element array\n setByteRange(e, t) {\n const s = e.split(\"@\", 2), i = [];\n s.length === 1 ? i[0] = t ? t.byteRangeEndOffset : 0 : i[0] = parseInt(s[1]), i[1] = parseInt(s[0]) + i[0], this._byteRange = i;\n }\n get byteRange() {\n return this._byteRange ? this._byteRange : [];\n }\n get byteRangeStartOffset() {\n return this.byteRange[0];\n }\n get byteRangeEndOffset() {\n return this.byteRange[1];\n }\n get url() {\n return !this._url && this.baseurl && this.relurl && (this._url = Cs.buildAbsoluteURL(this.baseurl, this.relurl, {\n alwaysNormalize: !0\n })), this._url || \"\";\n }\n set url(e) {\n this._url = e;\n }\n}\nclass Yt extends tr {\n // EXTINF has to be present for a m3u8 to be considered valid\n // sn notates the sequence number for a segment, and if set to a string can be 'initSegment'\n // levelkeys are the EXT-X-KEY tags that apply to this segment for decryption\n // core difference from the private field _decryptdata is the lack of the initialized IV\n // _decryptdata will set the IV for this segment based on the segment number in the fragment\n // A string representing the fragment type\n // A reference to the loader. Set while the fragment is loading, and removed afterwards. Used to abort fragment loading\n // A reference to the key loader. Set while the key is loading, and removed afterwards. Used to abort key loading\n // The level/track index to which the fragment belongs\n // The continuity counter of the fragment\n // The starting Presentation Time Stamp (PTS) of the fragment. Set after transmux complete.\n // The ending Presentation Time Stamp (PTS) of the fragment. Set after transmux complete.\n // The starting Decode Time Stamp (DTS) of the fragment. Set after transmux complete.\n // The ending Decode Time Stamp (DTS) of the fragment. Set after transmux complete.\n // The start time of the fragment, as listed in the manifest. Updated after transmux complete.\n // Set by `updateFragPTSDTS` in level-helper\n // The maximum starting Presentation Time Stamp (audio/video PTS) of the fragment. Set after transmux complete.\n // The minimum ending Presentation Time Stamp (audio/video PTS) of the fragment. Set after transmux complete.\n // Load/parse timing information\n // A flag indicating whether the segment was downloaded in order to test bitrate, and was not buffered\n // #EXTINF segment title\n // The Media Initialization Section for this segment\n // Fragment is the last fragment in the media playlist\n // Fragment is marked by an EXT-X-GAP tag indicating that it does not contain media data and should not be loaded\n constructor(e, t) {\n super(t), this._decryptdata = null, this.rawProgramDateTime = null, this.programDateTime = null, this.tagList = [], this.duration = 0, this.sn = 0, this.levelkeys = void 0, this.type = void 0, this.loader = null, this.keyLoader = null, this.level = -1, this.cc = 0, this.startPTS = void 0, this.endPTS = void 0, this.startDTS = void 0, this.endDTS = void 0, this.start = 0, this.deltaPTS = void 0, this.maxStartPTS = void 0, this.minEndPTS = void 0, this.stats = new Gt(), this.urlId = 0, this.data = void 0, this.bitrateTest = !1, this.title = null, this.initSegment = null, this.endList = void 0, this.gap = void 0, this.type = e;\n }\n get decryptdata() {\n const {\n levelkeys: e\n } = this;\n if (!e && !this._decryptdata)\n return null;\n if (!this._decryptdata && this.levelkeys && !this.levelkeys.NONE) {\n const t = this.levelkeys.identity;\n if (t)\n this._decryptdata = t.getDecryptData(this.sn);\n else {\n const s = Object.keys(this.levelkeys);\n if (s.length === 1)\n return this._decryptdata = this.levelkeys[s[0]].getDecryptData(this.sn);\n }\n }\n return this._decryptdata;\n }\n get end() {\n return this.start + this.duration;\n }\n get endProgramDateTime() {\n if (this.programDateTime === null || !M(this.programDateTime))\n return null;\n const e = M(this.duration) ? this.duration : 0;\n return this.programDateTime + e * 1e3;\n }\n get encrypted() {\n var e;\n if ((e = this._decryptdata) != null && e.encrypted)\n return !0;\n if (this.levelkeys) {\n const t = Object.keys(this.levelkeys), s = t.length;\n if (s > 1 || s === 1 && this.levelkeys[t[0]].encrypted)\n return !0;\n }\n return !1;\n }\n setKeyFormat(e) {\n if (this.levelkeys) {\n const t = this.levelkeys[e];\n t && !this._decryptdata && (this._decryptdata = t.getDecryptData(this.sn));\n }\n }\n abortRequests() {\n var e, t;\n (e = this.loader) == null || e.abort(), (t = this.keyLoader) == null || t.abort();\n }\n setElementaryStreamInfo(e, t, s, i, r, n = !1) {\n const {\n elementaryStreams: o\n } = this, l = o[e];\n if (!l) {\n o[e] = {\n startPTS: t,\n endPTS: s,\n startDTS: i,\n endDTS: r,\n partial: n\n };\n return;\n }\n l.startPTS = Math.min(l.startPTS, t), l.endPTS = Math.max(l.endPTS, s), l.startDTS = Math.min(l.startDTS, i), l.endDTS = Math.max(l.endDTS, r);\n }\n clearElementaryStreamInfo() {\n const {\n elementaryStreams: e\n } = this;\n e[j.AUDIO] = null, e[j.VIDEO] = null, e[j.AUDIOVIDEO] = null;\n }\n}\nclass En extends tr {\n constructor(e, t, s, i, r) {\n super(s), this.fragOffset = 0, this.duration = 0, this.gap = !1, this.independent = !1, this.relurl = void 0, this.fragment = void 0, this.index = void 0, this.stats = new Gt(), this.duration = e.decimalFloatingPoint(\"DURATION\"), this.gap = e.bool(\"GAP\"), this.independent = e.bool(\"INDEPENDENT\"), this.relurl = e.enumeratedString(\"URI\"), this.fragment = t, this.index = i;\n const n = e.enumeratedString(\"BYTERANGE\");\n n && this.setByteRange(n, r), r && (this.fragOffset = r.fragOffset + r.duration);\n }\n get start() {\n return this.fragment.start + this.fragOffset;\n }\n get end() {\n return this.start + this.duration;\n }\n get loaded() {\n const {\n elementaryStreams: e\n } = this;\n return !!(e.audio || e.video || e.audiovideo);\n }\n}\nconst Sn = 10;\nclass bn {\n // Manifest reload synchronization\n constructor(e) {\n this.PTSKnown = !1, this.alignedSliding = !1, this.averagetargetduration = void 0, this.endCC = 0, this.endSN = 0, this.fragments = void 0, this.fragmentHint = void 0, this.partList = null, this.dateRanges = void 0, this.live = !0, this.ageHeader = 0, this.advancedDateTime = void 0, this.updated = !0, this.advanced = !0, this.availabilityDelay = void 0, this.misses = 0, this.startCC = 0, this.startSN = 0, this.startTimeOffset = null, this.targetduration = 0, this.totalduration = 0, this.type = null, this.url = void 0, this.m3u8 = \"\", this.version = null, this.canBlockReload = !1, this.canSkipUntil = 0, this.canSkipDateRanges = !1, this.skippedSegments = 0, this.recentlyRemovedDateranges = void 0, this.partHoldBack = 0, this.holdBack = 0, this.partTarget = 0, this.preloadHint = void 0, this.renditionReports = void 0, this.tuneInGoal = 0, this.deltaUpdateFailed = void 0, this.driftStartTime = 0, this.driftEndTime = 0, this.driftStart = 0, this.driftEnd = 0, this.encryptedFragments = void 0, this.playlistParsingError = null, this.variableList = null, this.hasVariableRefs = !1, this.fragments = [], this.encryptedFragments = [], this.dateRanges = {}, this.url = e;\n }\n reloaded(e) {\n if (!e) {\n this.advanced = !0, this.updated = !0;\n return;\n }\n const t = this.lastPartSn - e.lastPartSn, s = this.lastPartIndex - e.lastPartIndex;\n this.updated = this.endSN !== e.endSN || !!s || !!t || !this.live, this.advanced = this.endSN > e.endSN || t > 0 || t === 0 && s > 0, this.updated || this.advanced ? this.misses = Math.floor(e.misses * 0.6) : this.misses = e.misses + 1, this.availabilityDelay = e.availabilityDelay;\n }\n get hasProgramDateTime() {\n return this.fragments.length ? M(this.fragments[this.fragments.length - 1].programDateTime) : !1;\n }\n get levelTargetDuration() {\n return this.averagetargetduration || this.targetduration || Sn;\n }\n get drift() {\n const e = this.driftEndTime - this.driftStartTime;\n return e > 0 ? (this.driftEnd - this.driftStart) * 1e3 / e : 1;\n }\n get edge() {\n return this.partEnd || this.fragmentEnd;\n }\n get partEnd() {\n var e;\n return (e = this.partList) != null && e.length ? this.partList[this.partList.length - 1].end : this.fragmentEnd;\n }\n get fragmentEnd() {\n var e;\n return (e = this.fragments) != null && e.length ? this.fragments[this.fragments.length - 1].end : 0;\n }\n get age() {\n return this.advancedDateTime ? Math.max(Date.now() - this.advancedDateTime, 0) / 1e3 : 0;\n }\n get lastPartIndex() {\n var e;\n return (e = this.partList) != null && e.length ? this.partList[this.partList.length - 1].index : -1;\n }\n get lastPartSn() {\n var e;\n return (e = this.partList) != null && e.length ? this.partList[this.partList.length - 1].fragment.sn : this.endSN;\n }\n}\nfunction Ds(a) {\n return Uint8Array.from(atob(a), (e) => e.charCodeAt(0));\n}\nfunction Ln(a) {\n const e = sr(a).subarray(0, 16), t = new Uint8Array(16);\n return t.set(e, 16 - e.length), t;\n}\nfunction An(a) {\n const e = function(s, i, r) {\n const n = s[i];\n s[i] = s[r], s[r] = n;\n };\n e(a, 0, 3), e(a, 1, 2), e(a, 4, 5), e(a, 6, 7);\n}\nfunction Rn(a) {\n const e = a.split(\":\");\n let t = null;\n if (e[0] === \"data\" && e.length === 2) {\n const s = e[1].split(\";\"), i = s[s.length - 1].split(\",\");\n if (i.length === 2) {\n const r = i[0] === \"base64\", n = i[1];\n r ? (s.splice(-1, 1), t = Ds(n)) : t = Ln(n);\n }\n }\n return t;\n}\nfunction sr(a) {\n return Uint8Array.from(unescape(encodeURIComponent(a)), (e) => e.charCodeAt(0));\n}\nvar se = {\n CLEARKEY: \"org.w3.clearkey\",\n FAIRPLAY: \"com.apple.fps\",\n PLAYREADY: \"com.microsoft.playready\",\n WIDEVINE: \"com.widevine.alpha\"\n}, Te = {\n CLEARKEY: \"org.w3.clearkey\",\n FAIRPLAY: \"com.apple.streamingkeydelivery\",\n PLAYREADY: \"com.microsoft.playready\",\n WIDEVINE: \"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed\"\n};\nfunction Js(a) {\n switch (a) {\n case Te.FAIRPLAY:\n return se.FAIRPLAY;\n case Te.PLAYREADY:\n return se.PLAYREADY;\n case Te.WIDEVINE:\n return se.WIDEVINE;\n case Te.CLEARKEY:\n return se.CLEARKEY;\n }\n}\nvar ir = {\n WIDEVINE: \"edef8ba979d64acea3c827dcd51d21ed\"\n};\nfunction In(a) {\n if (a === ir.WIDEVINE)\n return se.WIDEVINE;\n}\nfunction ei(a) {\n switch (a) {\n case se.FAIRPLAY:\n return Te.FAIRPLAY;\n case se.PLAYREADY:\n return Te.PLAYREADY;\n case se.WIDEVINE:\n return Te.WIDEVINE;\n case se.CLEARKEY:\n return Te.CLEARKEY;\n }\n}\nfunction zt(a) {\n const {\n drmSystems: e,\n widevineLicenseUrl: t\n } = a, s = e ? [se.FAIRPLAY, se.WIDEVINE, se.PLAYREADY, se.CLEARKEY].filter((i) => !!e[i]) : [];\n return !s[se.WIDEVINE] && t && s.push(se.WIDEVINE), s;\n}\nconst rr = function() {\n return typeof self < \"u\" && self.navigator && self.navigator.requestMediaKeySystemAccess ? self.navigator.requestMediaKeySystemAccess.bind(self.navigator) : null;\n}();\nfunction wn(a, e, t, s) {\n let i;\n switch (a) {\n case se.FAIRPLAY:\n i = [\"cenc\", \"sinf\"];\n break;\n case se.WIDEVINE:\n case se.PLAYREADY:\n i = [\"cenc\"];\n break;\n case se.CLEARKEY:\n i = [\"cenc\", \"keyids\"];\n break;\n default:\n throw new Error(`Unknown key-system: ${a}`);\n }\n return Cn(i, e, t, s);\n}\nfunction Cn(a, e, t, s) {\n return [{\n initDataTypes: a,\n persistentState: s.persistentState || \"not-allowed\",\n distinctiveIdentifier: s.distinctiveIdentifier || \"not-allowed\",\n sessionTypes: s.sessionTypes || [s.sessionType || \"temporary\"],\n audioCapabilities: e.map((r) => ({\n contentType: `audio/mp4; codecs=\"${r}\"`,\n robustness: s.audioRobustness || \"\",\n encryptionScheme: s.audioEncryptionScheme || null\n })),\n videoCapabilities: t.map((r) => ({\n contentType: `video/mp4; codecs=\"${r}\"`,\n robustness: s.videoRobustness || \"\",\n encryptionScheme: s.videoEncryptionScheme || null\n }))\n }];\n}\nfunction Xe(a, e, t) {\n return Uint8Array.prototype.slice ? a.slice(e, t) : new Uint8Array(Array.prototype.slice.call(a, e, t));\n}\nconst _s = (a, e) => e + 10 <= a.length && a[e] === 73 && a[e + 1] === 68 && a[e + 2] === 51 && a[e + 3] < 255 && a[e + 4] < 255 && a[e + 6] < 128 && a[e + 7] < 128 && a[e + 8] < 128 && a[e + 9] < 128, nr = (a, e) => e + 10 <= a.length && a[e] === 51 && a[e + 1] === 68 && a[e + 2] === 73 && a[e + 3] < 255 && a[e + 4] < 255 && a[e + 6] < 128 && a[e + 7] < 128 && a[e + 8] < 128 && a[e + 9] < 128, kt = (a, e) => {\n const t = e;\n let s = 0;\n for (; _s(a, e); ) {\n s += 10;\n const i = Vt(a, e + 6);\n s += i, nr(a, e + 10) && (s += 10), e += s;\n }\n if (s > 0)\n return a.subarray(t, t + s);\n}, Vt = (a, e) => {\n let t = 0;\n return t = (a[e] & 127) << 21, t |= (a[e + 1] & 127) << 14, t |= (a[e + 2] & 127) << 7, t |= a[e + 3] & 127, t;\n}, Dn = (a, e) => _s(a, e) && Vt(a, e + 6) + 10 <= a.length - e, _n = (a) => {\n const e = or(a);\n for (let t = 0; t < e.length; t++) {\n const s = e[t];\n if (ar(s))\n return Nn(s);\n }\n}, ar = (a) => a && a.key === \"PRIV\" && a.info === \"com.apple.streaming.transportStreamTimestamp\", kn = (a) => {\n const e = String.fromCharCode(a[0], a[1], a[2], a[3]), t = Vt(a, 4), s = 10;\n return {\n type: e,\n size: t,\n data: a.subarray(s, s + t)\n };\n}, or = (a) => {\n let e = 0;\n const t = [];\n for (; _s(a, e); ) {\n const s = Vt(a, e + 6);\n e += 10;\n const i = e + s;\n for (; e + 8 < i; ) {\n const r = kn(a.subarray(e)), n = Pn(r);\n n && t.push(n), e += r.size + 10;\n }\n nr(a, e) && (e += 10);\n }\n return t;\n}, Pn = (a) => a.type === \"PRIV\" ? On(a) : a.type[0] === \"W\" ? Mn(a) : Fn(a), On = (a) => {\n if (a.size < 2)\n return;\n const e = Fe(a.data, !0), t = new Uint8Array(a.data.subarray(e.length + 1));\n return {\n key: a.type,\n info: e,\n data: t.buffer\n };\n}, Fn = (a) => {\n if (a.size < 2)\n return;\n if (a.type === \"TXXX\") {\n let t = 1;\n const s = Fe(a.data.subarray(t), !0);\n t += s.length + 1;\n const i = Fe(a.data.subarray(t));\n return {\n key: a.type,\n info: s,\n data: i\n };\n }\n const e = Fe(a.data.subarray(1));\n return {\n key: a.type,\n data: e\n };\n}, Mn = (a) => {\n if (a.type === \"WXXX\") {\n if (a.size < 2)\n return;\n let t = 1;\n const s = Fe(a.data.subarray(t), !0);\n t += s.length + 1;\n const i = Fe(a.data.subarray(t));\n return {\n key: a.type,\n info: s,\n data: i\n };\n }\n const e = Fe(a.data);\n return {\n key: a.type,\n data: e\n };\n}, Nn = (a) => {\n if (a.data.byteLength === 8) {\n const e = new Uint8Array(a.data), t = e[3] & 1;\n let s = (e[4] << 23) + (e[5] << 15) + (e[6] << 7) + e[7];\n return s /= 45, t && (s += 4772185884e-2), Math.round(s);\n }\n}, Fe = (a, e = !1) => {\n const t = Un();\n if (t) {\n const h = t.decode(a);\n if (e) {\n const c = h.indexOf(\"\\0\");\n return c !== -1 ? h.substring(0, c) : h;\n }\n return h.replace(/\\0/g, \"\");\n }\n const s = a.length;\n let i, r, n, o = \"\", l = 0;\n for (; l < s; ) {\n if (i = a[l++], i === 0 && e)\n return o;\n if (i === 0 || i === 3)\n continue;\n switch (i >> 4) {\n case 0:\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n case 6:\n case 7:\n o += String.fromCharCode(i);\n break;\n case 12:\n case 13:\n r = a[l++], o += String.fromCharCode((i & 31) << 6 | r & 63);\n break;\n case 14:\n r = a[l++], n = a[l++], o += String.fromCharCode((i & 15) << 12 | (r & 63) << 6 | (n & 63) << 0);\n break;\n }\n }\n return o;\n};\nlet jt;\nfunction Un() {\n return !jt && typeof self.TextDecoder < \"u\" && (jt = new self.TextDecoder(\"utf-8\")), jt;\n}\nconst Pe = {\n hexDump: function(a) {\n let e = \"\";\n for (let t = 0; t < a.length; t++) {\n let s = a[t].toString(16);\n s.length < 2 && (s = \"0\" + s), e += s;\n }\n return e;\n }\n}, Pt = Math.pow(2, 32) - 1, Bn = [].push, lr = {\n video: 1,\n audio: 2,\n id3: 3,\n text: 4\n};\nfunction de(a) {\n return String.fromCharCode.apply(null, a);\n}\nfunction hr(a, e) {\n const t = a[e] << 8 | a[e + 1];\n return t < 0 ? 65536 + t : t;\n}\nfunction $(a, e) {\n const t = cr(a, e);\n return t < 0 ? 4294967296 + t : t;\n}\nfunction cr(a, e) {\n return a[e] << 24 | a[e + 1] << 16 | a[e + 2] << 8 | a[e + 3];\n}\nfunction qt(a, e, t) {\n a[e] = t >> 24, a[e + 1] = t >> 16 & 255, a[e + 2] = t >> 8 & 255, a[e + 3] = t & 255;\n}\nfunction H(a, e) {\n const t = [];\n if (!e.length)\n return t;\n const s = a.byteLength;\n for (let i = 0; i < s; ) {\n const r = $(a, i), n = de(a.subarray(i + 4, i + 8)), o = r > 1 ? i + r : s;\n if (n === e[0])\n if (e.length === 1)\n t.push(a.subarray(i + 8, o));\n else {\n const l = H(a.subarray(i + 8, o), e.slice(1));\n l.length && Bn.apply(t, l);\n }\n i = o;\n }\n return t;\n}\nfunction $n(a) {\n const e = [], t = a[0];\n let s = 8;\n const i = $(a, s);\n s += 4;\n const r = 0, n = 0;\n t === 0 ? s += 8 : s += 16, s += 2;\n let o = a.length + n;\n const l = hr(a, s);\n s += 2;\n for (let h = 0; h < l; h++) {\n let c = s;\n const d = $(a, c);\n c += 4;\n const u = d & 2147483647;\n if ((d & 2147483648) >>> 31 === 1)\n return x.warn(\"SIDX has hierarchical references (not supported)\"), null;\n const g = $(a, c);\n c += 4, e.push({\n referenceSize: u,\n subsegmentDuration: g,\n // unscaled\n info: {\n duration: g / i,\n start: o,\n end: o + u - 1\n }\n }), o += u, c += 4, s = c;\n }\n return {\n earliestPresentationTime: r,\n timescale: i,\n version: t,\n referencesCount: l,\n references: e\n };\n}\nfunction dr(a) {\n const e = [], t = H(a, [\"moov\", \"trak\"]);\n for (let i = 0; i < t.length; i++) {\n const r = t[i], n = H(r, [\"tkhd\"])[0];\n if (n) {\n let o = n[0], l = o === 0 ? 12 : 20;\n const h = $(n, l), c = H(r, [\"mdia\", \"mdhd\"])[0];\n if (c) {\n o = c[0], l = o === 0 ? 12 : 20;\n const d = $(c, l), u = H(r, [\"mdia\", \"hdlr\"])[0];\n if (u) {\n const f = de(u.subarray(8, 12)), g = {\n soun: j.AUDIO,\n vide: j.VIDEO\n }[f];\n if (g) {\n const p = H(r, [\"mdia\", \"minf\", \"stbl\", \"stsd\"])[0];\n let y;\n p && (y = de(p.subarray(12, 16))), e[h] = {\n timescale: d,\n type: g\n }, e[g] = {\n timescale: d,\n id: h,\n codec: y\n };\n }\n }\n }\n }\n }\n return H(a, [\"moov\", \"mvex\", \"trex\"]).forEach((i) => {\n const r = $(i, 4), n = e[r];\n n && (n.default = {\n duration: $(i, 12),\n flags: $(i, 20)\n });\n }), e;\n}\nfunction Gn(a, e) {\n if (!a || !e)\n return a;\n const t = e.keyId;\n return t && e.isCommonEncryption && H(a, [\"moov\", \"trak\"]).forEach((i) => {\n const n = H(i, [\"mdia\", \"minf\", \"stbl\", \"stsd\"])[0].subarray(8);\n let o = H(n, [\"enca\"]);\n const l = o.length > 0;\n l || (o = H(n, [\"encv\"])), o.forEach((h) => {\n const c = l ? h.subarray(28) : h.subarray(78);\n H(c, [\"sinf\"]).forEach((u) => {\n const f = ur(u);\n if (f) {\n const g = f.subarray(8, 24);\n g.some((p) => p !== 0) || (x.log(`[eme] Patching keyId in 'enc${l ? \"a\" : \"v\"}>sinf>>tenc' box: ${Pe.hexDump(g)} -> ${Pe.hexDump(t)}`), f.set(t, 8));\n }\n });\n });\n }), a;\n}\nfunction ur(a) {\n const e = H(a, [\"schm\"])[0];\n if (e) {\n const t = de(e.subarray(4, 8));\n if (t === \"cbcs\" || t === \"cenc\")\n return H(a, [\"schi\", \"tenc\"])[0];\n }\n return x.error(\"[eme] missing 'schm' box\"), null;\n}\nfunction Vn(a, e) {\n return H(e, [\"moof\", \"traf\"]).reduce((t, s) => {\n const i = H(s, [\"tfdt\"])[0], r = i[0], n = H(s, [\"tfhd\"]).reduce((o, l) => {\n const h = $(l, 4), c = a[h];\n if (c) {\n let d = $(i, 4);\n if (r === 1) {\n if (d === Pt)\n return x.warn(\"[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time\"), o;\n d *= Pt + 1, d += $(i, 8);\n }\n const u = c.timescale || 9e4, f = d / u;\n if (isFinite(f) && (o === null || f < o))\n return f;\n }\n return o;\n }, null);\n return n !== null && isFinite(n) && (t === null || n < t) ? n : t;\n }, null);\n}\nfunction Hn(a, e) {\n let t = 0, s = 0, i = 0;\n const r = H(a, [\"moof\", \"traf\"]);\n for (let n = 0; n < r.length; n++) {\n const o = r[n], l = H(o, [\"tfhd\"])[0], h = $(l, 4), c = e[h];\n if (!c)\n continue;\n const d = c.default, u = $(l, 0) | (d == null ? void 0 : d.flags);\n let f = d == null ? void 0 : d.duration;\n u & 8 && (u & 2 ? f = $(l, 12) : f = $(l, 8));\n const g = c.timescale || 9e4, p = H(o, [\"trun\"]);\n for (let y = 0; y < p.length; y++) {\n if (t = Kn(p[y]), !t && f) {\n const v = $(p[y], 4);\n t = f * v;\n }\n c.type === j.VIDEO ? s += t / g : c.type === j.AUDIO && (i += t / g);\n }\n }\n if (s === 0 && i === 0) {\n let n = 0;\n const o = H(a, [\"sidx\"]);\n for (let l = 0; l < o.length; l++) {\n const h = $n(o[l]);\n h != null && h.references && (n += h.references.reduce((c, d) => c + d.info.duration || 0, 0));\n }\n return n;\n }\n return s || i;\n}\nfunction Kn(a) {\n const e = $(a, 0);\n let t = 8;\n e & 1 && (t += 4), e & 4 && (t += 4);\n let s = 0;\n const i = $(a, 4);\n for (let r = 0; r < i; r++) {\n if (e & 256) {\n const n = $(a, t);\n s += n, t += 4;\n }\n e & 512 && (t += 4), e & 1024 && (t += 4), e & 2048 && (t += 4);\n }\n return s;\n}\nfunction Wn(a, e, t) {\n H(e, [\"moof\", \"traf\"]).forEach((s) => {\n H(s, [\"tfhd\"]).forEach((i) => {\n const r = $(i, 4), n = a[r];\n if (!n)\n return;\n const o = n.timescale || 9e4;\n H(s, [\"tfdt\"]).forEach((l) => {\n const h = l[0];\n let c = $(l, 4);\n if (h === 0)\n c -= t * o, c = Math.max(c, 0), qt(l, 4, c);\n else {\n c *= Math.pow(2, 32), c += $(l, 8), c -= t * o, c = Math.max(c, 0);\n const d = Math.floor(c / (Pt + 1)), u = Math.floor(c % (Pt + 1));\n qt(l, 4, d), qt(l, 8, u);\n }\n });\n });\n });\n}\nfunction Yn(a) {\n const e = {\n valid: null,\n remainder: null\n }, t = H(a, [\"moof\"]);\n if (t) {\n if (t.length < 2)\n return e.remainder = a, e;\n } else\n return e;\n const s = t[t.length - 1];\n return e.valid = Xe(a, 0, s.byteOffset - 8), e.remainder = Xe(a, s.byteOffset - 8), e;\n}\nfunction Ze(a, e) {\n const t = new Uint8Array(a.length + e.length);\n return t.set(a), t.set(e, a.length), t;\n}\nfunction ti(a, e) {\n const t = [], s = e.samples, i = e.timescale, r = e.id;\n let n = !1;\n return H(s, [\"moof\"]).map((l) => {\n const h = l.byteOffset - 8;\n H(l, [\"traf\"]).map((d) => {\n const u = H(d, [\"tfdt\"]).map((f) => {\n const g = f[0];\n let p = $(f, 4);\n return g === 1 && (p *= Math.pow(2, 32), p += $(f, 8)), p / i;\n })[0];\n return u !== void 0 && (a = u), H(d, [\"tfhd\"]).map((f) => {\n const g = $(f, 4), p = $(f, 0) & 16777215, y = (p & 1) !== 0, v = (p & 2) !== 0, E = (p & 8) !== 0;\n let T = 0;\n const A = (p & 16) !== 0;\n let b = 0;\n const D = (p & 32) !== 0;\n let I = 8;\n g === r && (y && (I += 8), v && (I += 4), E && (T = $(f, I), I += 4), A && (b = $(f, I), I += 4), D && (I += 4), e.type === \"video\" && (n = zn(e.codec)), H(d, [\"trun\"]).map((C) => {\n const _ = C[0], R = $(C, 0) & 16777215, F = (R & 1) !== 0;\n let k = 0;\n const W = (R & 4) !== 0, oe = (R & 256) !== 0;\n let V = 0;\n const Y = (R & 512) !== 0;\n let q = 0;\n const O = (R & 1024) !== 0, N = (R & 2048) !== 0;\n let X = 0;\n const Q = $(C, 4);\n let z = 8;\n F && (k = $(C, z), z += 4), W && (z += 4);\n let re = k + h;\n for (let be = 0; be < Q; be++) {\n if (oe ? (V = $(C, z), z += 4) : V = T, Y ? (q = $(C, z), z += 4) : q = b, O && (z += 4), N && (_ === 0 ? X = $(C, z) : X = cr(C, z), z += 4), e.type === j.VIDEO) {\n let we = 0;\n for (; we < q; ) {\n const Le = $(s, re);\n if (re += 4, jn(n, s[re])) {\n const ze = s.subarray(re, re + Le);\n fr(ze, n ? 2 : 1, a + X / i, t);\n }\n re += Le, we += Le + 4;\n }\n }\n a += V / i;\n }\n }));\n });\n });\n }), t;\n}\nfunction zn(a) {\n if (!a)\n return !1;\n const e = a.indexOf(\".\"), t = e < 0 ? a : a.substring(0, e);\n return t === \"hvc1\" || t === \"hev1\" || // Dolby Vision\n t === \"dvh1\" || t === \"dvhe\";\n}\nfunction jn(a, e) {\n if (a) {\n const t = e >> 1 & 63;\n return t === 39 || t === 40;\n } else\n return (e & 31) === 6;\n}\nfunction fr(a, e, t, s) {\n const i = gr(a);\n let r = 0;\n r += e;\n let n = 0, o = 0, l = !1, h = 0;\n for (; r < i.length; ) {\n n = 0;\n do {\n if (r >= i.length)\n break;\n h = i[r++], n += h;\n } while (h === 255);\n o = 0;\n do {\n if (r >= i.length)\n break;\n h = i[r++], o += h;\n } while (h === 255);\n const c = i.length - r;\n if (!l && n === 4 && r < i.length) {\n if (l = !0, i[r++] === 181) {\n const u = hr(i, r);\n if (r += 2, u === 49) {\n const f = $(i, r);\n if (r += 4, f === 1195456820) {\n const g = i[r++];\n if (g === 3) {\n const p = i[r++], y = 31 & p, v = 64 & p, E = v ? 2 + y * 3 : 0, T = new Uint8Array(E);\n if (v) {\n T[0] = p;\n for (let A = 1; A < E; A++)\n T[A] = i[r++];\n }\n s.push({\n type: g,\n payloadType: n,\n pts: t,\n bytes: T\n });\n }\n }\n }\n }\n } else if (n === 5 && o < c) {\n if (l = !0, o > 16) {\n const d = [];\n for (let g = 0; g < 16; g++) {\n const p = i[r++].toString(16);\n d.push(p.length == 1 ? \"0\" + p : p), (g === 3 || g === 5 || g === 7 || g === 9) && d.push(\"-\");\n }\n const u = o - 16, f = new Uint8Array(u);\n for (let g = 0; g < u; g++)\n f[g] = i[r++];\n s.push({\n payloadType: n,\n pts: t,\n uuid: d.join(\"\"),\n userData: Fe(f),\n userDataBytes: f\n });\n }\n } else if (o < c)\n r += o;\n else if (o > c)\n break;\n }\n}\nfunction gr(a) {\n const e = a.byteLength, t = [];\n let s = 1;\n for (; s < e - 2; )\n a[s] === 0 && a[s + 1] === 0 && a[s + 2] === 3 ? (t.push(s + 2), s += 2) : s++;\n if (t.length === 0)\n return a;\n const i = e - t.length, r = new Uint8Array(i);\n let n = 0;\n for (s = 0; s < i; n++, s++)\n n === t[0] && (n++, t.shift()), r[s] = a[n];\n return r;\n}\nfunction qn(a) {\n const e = a[0];\n let t = \"\", s = \"\", i = 0, r = 0, n = 0, o = 0, l = 0, h = 0;\n if (e === 0) {\n for (; de(a.subarray(h, h + 1)) !== \"\\0\"; )\n t += de(a.subarray(h, h + 1)), h += 1;\n for (t += de(a.subarray(h, h + 1)), h += 1; de(a.subarray(h, h + 1)) !== \"\\0\"; )\n s += de(a.subarray(h, h + 1)), h += 1;\n s += de(a.subarray(h, h + 1)), h += 1, i = $(a, 12), r = $(a, 16), o = $(a, 20), l = $(a, 24), h = 28;\n } else if (e === 1) {\n h += 4, i = $(a, h), h += 4;\n const d = $(a, h);\n h += 4;\n const u = $(a, h);\n for (h += 4, n = 2 ** 32 * d + u, Number.isSafeInteger(n) || (n = Number.MAX_SAFE_INTEGER, x.warn(\"Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box\")), o = $(a, h), h += 4, l = $(a, h), h += 4; de(a.subarray(h, h + 1)) !== \"\\0\"; )\n t += de(a.subarray(h, h + 1)), h += 1;\n for (t += de(a.subarray(h, h + 1)), h += 1; de(a.subarray(h, h + 1)) !== \"\\0\"; )\n s += de(a.subarray(h, h + 1)), h += 1;\n s += de(a.subarray(h, h + 1)), h += 1;\n }\n const c = a.subarray(h, a.byteLength);\n return {\n schemeIdUri: t,\n value: s,\n timeScale: i,\n presentationTime: n,\n presentationTimeDelta: r,\n eventDuration: o,\n id: l,\n payload: c\n };\n}\nfunction Xn(a, ...e) {\n const t = e.length;\n let s = 8, i = t;\n for (; i--; )\n s += e[i].byteLength;\n const r = new Uint8Array(s);\n for (r[0] = s >> 24 & 255, r[1] = s >> 16 & 255, r[2] = s >> 8 & 255, r[3] = s & 255, r.set(a, 4), i = 0, s = 8; i < t; i++)\n r.set(e[i], s), s += e[i].byteLength;\n return r;\n}\nfunction Zn(a, e, t) {\n if (a.byteLength !== 16)\n throw new RangeError(\"Invalid system id\");\n let s, i;\n if (e) {\n s = 1, i = new Uint8Array(e.length * 16);\n for (let o = 0; o < e.length; o++) {\n const l = e[o];\n if (l.byteLength !== 16)\n throw new RangeError(\"Invalid key\");\n i.set(l, o * 16);\n }\n } else\n s = 0, i = new Uint8Array();\n let r;\n s > 0 ? (r = new Uint8Array(4), e.length > 0 && new DataView(r.buffer).setUint32(0, e.length, !1)) : r = new Uint8Array();\n const n = new Uint8Array(4);\n return t && t.byteLength > 0 && new DataView(n.buffer).setUint32(0, t.byteLength, !1), Xn(\n [112, 115, 115, 104],\n new Uint8Array([\n s,\n 0,\n 0,\n 0\n // Flags\n ]),\n a,\n // 16 bytes\n r,\n i,\n n,\n t || new Uint8Array()\n );\n}\nfunction Qn(a) {\n if (!(a instanceof ArrayBuffer) || a.byteLength < 32)\n return null;\n const e = {\n version: 0,\n systemId: \"\",\n kids: null,\n data: null\n }, t = new DataView(a), s = t.getUint32(0);\n if (a.byteLength !== s && s > 44 || t.getUint32(4) !== 1886614376 || (e.version = t.getUint32(8) >>> 24, e.version > 1))\n return null;\n e.systemId = Pe.hexDump(new Uint8Array(a, 12, 16));\n const r = t.getUint32(28);\n if (e.version === 0) {\n if (s - 32 < r)\n return null;\n e.data = new Uint8Array(a, 32, r);\n } else if (e.version === 1) {\n e.kids = [];\n for (let n = 0; n < r; n++)\n e.kids.push(new Uint8Array(a, 32 + n * 16, 16));\n }\n return e;\n}\nlet Et = {};\nclass gt {\n static clearKeyUriToKeyIdMap() {\n Et = {};\n }\n constructor(e, t, s, i = [1], r = null) {\n this.uri = void 0, this.method = void 0, this.keyFormat = void 0, this.keyFormatVersions = void 0, this.encrypted = void 0, this.isCommonEncryption = void 0, this.iv = null, this.key = null, this.keyId = null, this.pssh = null, this.method = e, this.uri = t, this.keyFormat = s, this.keyFormatVersions = i, this.iv = r, this.encrypted = e ? e !== \"NONE\" : !1, this.isCommonEncryption = this.encrypted && e !== \"AES-128\";\n }\n isSupported() {\n if (this.method) {\n if (this.method === \"AES-128\" || this.method === \"NONE\")\n return !0;\n if (this.keyFormat === \"identity\")\n return this.method === \"SAMPLE-AES\";\n switch (this.keyFormat) {\n case Te.FAIRPLAY:\n case Te.WIDEVINE:\n case Te.PLAYREADY:\n case Te.CLEARKEY:\n return [\"ISO-23001-7\", \"SAMPLE-AES\", \"SAMPLE-AES-CENC\", \"SAMPLE-AES-CTR\"].indexOf(this.method) !== -1;\n }\n }\n return !1;\n }\n getDecryptData(e) {\n if (!this.encrypted || !this.uri)\n return null;\n if (this.method === \"AES-128\" && this.uri && !this.iv) {\n typeof e != \"number\" && (this.method === \"AES-128\" && !this.iv && x.warn(`missing IV for initialization segment with method=\"${this.method}\" - compliance issue`), e = 0);\n const s = Jn(e);\n return new gt(this.method, this.uri, \"identity\", this.keyFormatVersions, s);\n }\n const t = Rn(this.uri);\n if (t)\n switch (this.keyFormat) {\n case Te.WIDEVINE:\n this.pssh = t, t.length >= 22 && (this.keyId = t.subarray(t.length - 22, t.length - 6));\n break;\n case Te.PLAYREADY: {\n const s = new Uint8Array([154, 4, 240, 121, 152, 64, 66, 134, 171, 146, 230, 91, 224, 136, 95, 149]);\n this.pssh = Zn(s, null, t);\n const i = new Uint16Array(t.buffer, t.byteOffset, t.byteLength / 2), r = String.fromCharCode.apply(null, Array.from(i)), n = r.substring(r.indexOf(\"<\"), r.length), h = new DOMParser().parseFromString(n, \"text/xml\").getElementsByTagName(\"KID\")[0];\n if (h) {\n const c = h.childNodes[0] ? h.childNodes[0].nodeValue : h.getAttribute(\"VALUE\");\n if (c) {\n const d = Ds(c).subarray(0, 16);\n An(d), this.keyId = d;\n }\n }\n break;\n }\n default: {\n let s = t.subarray(0, 16);\n if (s.length !== 16) {\n const i = new Uint8Array(16);\n i.set(s, 16 - s.length), s = i;\n }\n this.keyId = s;\n break;\n }\n }\n if (!this.keyId || this.keyId.byteLength !== 16) {\n let s = Et[this.uri];\n if (!s) {\n const i = Object.keys(Et).length % Number.MAX_SAFE_INTEGER;\n s = new Uint8Array(16), new DataView(s.buffer, 12, 4).setUint32(0, i), Et[this.uri] = s;\n }\n this.keyId = s;\n }\n return this;\n }\n}\nfunction Jn(a) {\n const e = new Uint8Array(16);\n for (let t = 12; t < 16; t++)\n e[t] = a >> 8 * (15 - t) & 255;\n return e;\n}\nconst mr = /\\{\\$([a-zA-Z0-9-_]+)\\}/g;\nfunction si(a) {\n return mr.test(a);\n}\nfunction ve(a, e, t) {\n if (a.variableList !== null || a.hasVariableRefs)\n for (let s = t.length; s--; ) {\n const i = t[s], r = e[i];\n r && (e[i] = ps(a, r));\n }\n}\nfunction ps(a, e) {\n if (a.variableList !== null || a.hasVariableRefs) {\n const t = a.variableList;\n return e.replace(mr, (s) => {\n const i = s.substring(2, s.length - 1), r = t == null ? void 0 : t[i];\n return r === void 0 ? (a.playlistParsingError || (a.playlistParsingError = new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: \"${i}\"`)), s) : r;\n });\n }\n return e;\n}\nfunction ii(a, e, t) {\n let s = a.variableList;\n s || (a.variableList = s = {});\n let i, r;\n if (\"QUERYPARAM\" in e) {\n i = e.QUERYPARAM;\n try {\n const n = new self.URL(t).searchParams;\n if (n.has(i))\n r = n.get(i);\n else\n throw new Error(`\"${i}\" does not match any query parameter in URI: \"${t}\"`);\n } catch (n) {\n a.playlistParsingError || (a.playlistParsingError = new Error(`EXT-X-DEFINE QUERYPARAM: ${n.message}`));\n }\n } else\n i = e.NAME, r = e.VALUE;\n i in s ? a.playlistParsingError || (a.playlistParsingError = new Error(`EXT-X-DEFINE duplicate Variable Name declarations: \"${i}\"`)) : s[i] = r || \"\";\n}\nfunction ea(a, e, t) {\n const s = e.IMPORT;\n if (t && s in t) {\n let i = a.variableList;\n i || (a.variableList = i = {}), i[s] = t[s];\n } else\n a.playlistParsingError || (a.playlistParsingError = new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: \"${s}\"`));\n}\nfunction Ht() {\n if (!(typeof self > \"u\"))\n return self.MediaSource || self.WebKitMediaSource;\n}\nconst ta = {\n audio: {\n a3ds: !0,\n \"ac-3\": !0,\n \"ac-4\": !0,\n alac: !0,\n alaw: !0,\n dra1: !0,\n \"dts+\": !0,\n \"dts-\": !0,\n dtsc: !0,\n dtse: !0,\n dtsh: !0,\n \"ec-3\": !0,\n enca: !0,\n g719: !0,\n g726: !0,\n m4ae: !0,\n mha1: !0,\n mha2: !0,\n mhm1: !0,\n mhm2: !0,\n mlpa: !0,\n mp4a: !0,\n \"raw \": !0,\n Opus: !0,\n opus: !0,\n // browsers expect this to be lowercase despite MP4RA says 'Opus'\n samr: !0,\n sawb: !0,\n sawp: !0,\n sevc: !0,\n sqcp: !0,\n ssmv: !0,\n twos: !0,\n ulaw: !0\n },\n video: {\n avc1: !0,\n avc2: !0,\n avc3: !0,\n avc4: !0,\n avcp: !0,\n av01: !0,\n drac: !0,\n dva1: !0,\n dvav: !0,\n dvh1: !0,\n dvhe: !0,\n encv: !0,\n hev1: !0,\n hvc1: !0,\n mjp2: !0,\n mp4v: !0,\n mvc1: !0,\n mvc2: !0,\n mvc3: !0,\n mvc4: !0,\n resv: !0,\n rv60: !0,\n s263: !0,\n svc1: !0,\n svc2: !0,\n \"vc-1\": !0,\n vp08: !0,\n vp09: !0\n },\n text: {\n stpp: !0,\n wvtt: !0\n }\n}, ri = Ht();\nfunction sa(a, e) {\n const t = ta[e];\n return !!t && t[a.slice(0, 4)] === !0;\n}\nfunction Xt(a, e) {\n var t;\n return (t = ri == null ? void 0 : ri.isTypeSupported(`${e || \"video\"}/mp4;codecs=\"${a}\"`)) != null ? t : !1;\n}\nconst ni = /#EXT-X-STREAM-INF:([^\\r\\n]*)(?:[\\r\\n](?:#[^\\r\\n]*)?)*([^\\r\\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\\r\\n]*)[\\r\\n]+/g, ai = /#EXT-X-MEDIA:(.*)/g, ia = /^#EXT(?:INF|-X-TARGETDURATION):/m, oi = new RegExp([\n /#EXTINF:\\s*(\\d*(?:\\.\\d+)?)(?:,(.*)\\s+)?/.source,\n // duration (#EXTINF:<duration>,<title>), group 1 => duration, group 2 => title\n /(?!#) *(\\S[\\S ]*)/.source,\n // segment URI, group 3 => the URI (note newline is not eaten)\n /#EXT-X-BYTERANGE:*(.+)/.source,\n // next segment's byterange, group 4 => range spec (x@y)\n /#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,\n // next segment's program date/time group 5 => the datetime spec\n /#.*/.source\n // All other non-segment oriented tags will match with all groups empty\n].join(\"|\"), \"g\"), ra = new RegExp([/#(EXTM3U)/.source, /#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source, /#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\\d+)/.source, /#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source, /(#)([^:]*):(.*)/.source, /(#)(.*)(?:.*)\\r?\\n?/.source].join(\"|\"));\nclass _e {\n static findGroup(e, t) {\n for (let s = 0; s < e.length; s++) {\n const i = e[s];\n if (i.id === t)\n return i;\n }\n }\n static convertAVC1ToAVCOTI(e) {\n const t = e.split(\".\");\n if (t.length > 2) {\n let s = t.shift() + \".\";\n return s += parseInt(t.shift()).toString(16), s += (\"000\" + parseInt(t.shift()).toString(16)).slice(-4), s;\n }\n return e;\n }\n static resolve(e, t) {\n return Cs.buildAbsoluteURL(t, e, {\n alwaysNormalize: !0\n });\n }\n static isMediaPlaylist(e) {\n return ia.test(e);\n }\n static parseMasterPlaylist(e, t) {\n const s = si(e), i = {\n contentSteering: null,\n levels: [],\n playlistParsingError: null,\n sessionData: null,\n sessionKeys: null,\n startTimeOffset: null,\n variableList: null,\n hasVariableRefs: s\n }, r = [];\n ni.lastIndex = 0;\n let n;\n for (; (n = ni.exec(e)) != null; )\n if (n[1]) {\n var o;\n const h = new ee(n[1]);\n ve(i, h, [\"CODECS\", \"SUPPLEMENTAL-CODECS\", \"ALLOWED-CPC\", \"PATHWAY-ID\", \"STABLE-VARIANT-ID\", \"AUDIO\", \"VIDEO\", \"SUBTITLES\", \"CLOSED-CAPTIONS\", \"NAME\"]);\n const c = ps(i, n[2]), d = {\n attrs: h,\n bitrate: h.decimalInteger(\"AVERAGE-BANDWIDTH\") || h.decimalInteger(\"BANDWIDTH\"),\n name: h.NAME,\n url: _e.resolve(c, t)\n }, u = h.decimalResolution(\"RESOLUTION\");\n u && (d.width = u.width, d.height = u.height), na((h.CODECS || \"\").split(/[ ,]+/).filter((f) => f), d), d.videoCodec && d.videoCodec.indexOf(\"avc1\") !== -1 && (d.videoCodec = _e.convertAVC1ToAVCOTI(d.videoCodec)), (o = d.unknownCodecs) != null && o.length || r.push(d), i.levels.push(d);\n } else if (n[3]) {\n const h = n[3], c = n[4];\n switch (h) {\n case \"SESSION-DATA\": {\n const d = new ee(c);\n ve(i, d, [\"DATA-ID\", \"LANGUAGE\", \"VALUE\", \"URI\"]);\n const u = d[\"DATA-ID\"];\n u && (i.sessionData === null && (i.sessionData = {}), i.sessionData[u] = d);\n break;\n }\n case \"SESSION-KEY\": {\n const d = li(c, t, i);\n d.encrypted && d.isSupported() ? (i.sessionKeys === null && (i.sessionKeys = []), i.sessionKeys.push(d)) : x.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: \"${c}\"`);\n break;\n }\n case \"DEFINE\": {\n {\n const d = new ee(c);\n ve(i, d, [\"NAME\", \"VALUE\", \"QUERYPARAM\"]), ii(i, d, t);\n }\n break;\n }\n case \"CONTENT-STEERING\": {\n const d = new ee(c);\n ve(i, d, [\"SERVER-URI\", \"PATHWAY-ID\"]), i.contentSteering = {\n uri: _e.resolve(d[\"SERVER-URI\"], t),\n pathwayId: d[\"PATHWAY-ID\"] || \".\"\n };\n break;\n }\n case \"START\": {\n i.startTimeOffset = hi(c);\n break;\n }\n }\n }\n const l = r.length > 0 && r.length < i.levels.length;\n return i.levels = l ? r : i.levels, i.levels.length === 0 && (i.playlistParsingError = new Error(\"no levels found in manifest\")), i;\n }\n static parseMasterPlaylistMedia(e, t, s) {\n let i;\n const r = {}, n = s.levels, o = {\n AUDIO: n.map((h) => ({\n id: h.attrs.AUDIO,\n audioCodec: h.audioCodec\n })),\n SUBTITLES: n.map((h) => ({\n id: h.attrs.SUBTITLES,\n textCodec: h.textCodec\n })),\n \"CLOSED-CAPTIONS\": []\n };\n let l = 0;\n for (ai.lastIndex = 0; (i = ai.exec(e)) !== null; ) {\n const h = new ee(i[1]), c = h.TYPE;\n if (c) {\n const d = o[c], u = r[c] || [];\n r[c] = u, ve(s, h, [\"URI\", \"GROUP-ID\", \"LANGUAGE\", \"ASSOC-LANGUAGE\", \"STABLE-RENDITION-ID\", \"NAME\", \"INSTREAM-ID\", \"CHARACTERISTICS\", \"CHANNELS\"]);\n const f = {\n attrs: h,\n bitrate: 0,\n id: l++,\n groupId: h[\"GROUP-ID\"] || \"\",\n instreamId: h[\"INSTREAM-ID\"],\n name: h.NAME || h.LANGUAGE || \"\",\n type: c,\n default: h.bool(\"DEFAULT\"),\n autoselect: h.bool(\"AUTOSELECT\"),\n forced: h.bool(\"FORCED\"),\n lang: h.LANGUAGE,\n url: h.URI ? _e.resolve(h.URI, t) : \"\"\n };\n if (d != null && d.length) {\n const g = _e.findGroup(d, f.groupId) || d[0];\n ci(f, g, \"audioCodec\"), ci(f, g, \"textCodec\");\n }\n u.push(f);\n }\n }\n return r;\n }\n static parseLevelPlaylist(e, t, s, i, r, n) {\n const o = new bn(t), l = o.fragments;\n let h = null, c = 0, d = 0, u = 0, f = 0, g = null, p = new Yt(i, t), y, v, E, T = -1, A = !1;\n for (oi.lastIndex = 0, o.m3u8 = e, o.hasVariableRefs = si(e); (y = oi.exec(e)) !== null; ) {\n A && (A = !1, p = new Yt(i, t), p.start = u, p.sn = c, p.cc = f, p.level = s, h && (p.initSegment = h, p.rawProgramDateTime = h.rawProgramDateTime, h.rawProgramDateTime = null));\n const C = y[1];\n if (C) {\n p.duration = parseFloat(C);\n const _ = (\" \" + y[2]).slice(1);\n p.title = _ || null, p.tagList.push(_ ? [\"INF\", C, _] : [\"INF\", C]);\n } else if (y[3]) {\n if (M(p.duration)) {\n p.start = u, E && fi(p, E, o), p.sn = c, p.level = s, p.cc = f, p.urlId = r, l.push(p);\n const _ = (\" \" + y[3]).slice(1);\n p.relurl = ps(o, _), di(p, g), g = p, u += p.duration, c++, d = 0, A = !0;\n }\n } else if (y[4]) {\n const _ = (\" \" + y[4]).slice(1);\n g ? p.setByteRange(_, g) : p.setByteRange(_);\n } else if (y[5])\n p.rawProgramDateTime = (\" \" + y[5]).slice(1), p.tagList.push([\"PROGRAM-DATE-TIME\", p.rawProgramDateTime]), T === -1 && (T = l.length);\n else {\n if (y = y[0].match(ra), !y) {\n x.warn(\"No matches on slow regex match for level playlist!\");\n continue;\n }\n for (v = 1; v < y.length && !(typeof y[v] < \"u\"); v++)\n ;\n const _ = (\" \" + y[v]).slice(1), R = (\" \" + y[v + 1]).slice(1), F = y[v + 2] ? (\" \" + y[v + 2]).slice(1) : \"\";\n switch (_) {\n case \"PLAYLIST-TYPE\":\n o.type = R.toUpperCase();\n break;\n case \"MEDIA-SEQUENCE\":\n c = o.startSN = parseInt(R);\n break;\n case \"SKIP\": {\n const k = new ee(R);\n ve(o, k, [\"RECENTLY-REMOVED-DATERANGES\"]);\n const W = k.decimalInteger(\"SKIPPED-SEGMENTS\");\n if (M(W)) {\n o.skippedSegments = W;\n for (let V = W; V--; )\n l.unshift(null);\n c += W;\n }\n const oe = k.enumeratedString(\"RECENTLY-REMOVED-DATERANGES\");\n oe && (o.recentlyRemovedDateranges = oe.split(\"\t\"));\n break;\n }\n case \"TARGETDURATION\":\n o.targetduration = Math.max(parseInt(R), 1);\n break;\n case \"VERSION\":\n o.version = parseInt(R);\n break;\n case \"EXTM3U\":\n break;\n case \"ENDLIST\":\n o.live = !1;\n break;\n case \"#\":\n (R || F) && p.tagList.push(F ? [R, F] : [R]);\n break;\n case \"DISCONTINUITY\":\n f++, p.tagList.push([\"DIS\"]);\n break;\n case \"GAP\":\n p.gap = !0, p.tagList.push([_]);\n break;\n case \"BITRATE\":\n p.tagList.push([_, R]);\n break;\n case \"DATERANGE\": {\n const k = new ee(R);\n ve(o, k, [\"ID\", \"CLASS\", \"START-DATE\", \"END-DATE\", \"SCTE35-CMD\", \"SCTE35-OUT\", \"SCTE35-IN\"]), ve(o, k, k.clientAttrs);\n const W = new er(k, o.dateRanges[k.ID]);\n W.isValid || o.skippedSegments ? o.dateRanges[W.id] = W : x.warn(`Ignoring invalid DATERANGE tag: \"${R}\"`), p.tagList.push([\"EXT-X-DATERANGE\", R]);\n break;\n }\n case \"DEFINE\": {\n {\n const k = new ee(R);\n ve(o, k, [\"NAME\", \"VALUE\", \"IMPORT\", \"QUERYPARAM\"]), \"IMPORT\" in k ? ea(o, k, n) : ii(o, k, t);\n }\n break;\n }\n case \"DISCONTINUITY-SEQUENCE\":\n f = parseInt(R);\n break;\n case \"KEY\": {\n const k = li(R, t, o);\n if (k.isSupported()) {\n if (k.method === \"NONE\") {\n E = void 0;\n break;\n }\n E || (E = {}), E[k.keyFormat] && (E = ne({}, E)), E[k.keyFormat] = k;\n } else\n x.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: \"${R}\"`);\n break;\n }\n case \"START\":\n o.startTimeOffset = hi(R);\n break;\n case \"MAP\": {\n const k = new ee(R);\n if (ve(o, k, [\"BYTERANGE\", \"URI\"]), p.duration) {\n const W = new Yt(i, t);\n ui(W, k, s, E), h = W, p.initSegment = h, h.rawProgramDateTime && !p.rawProgramDateTime && (p.rawProgramDateTime = h.rawProgramDateTime);\n } else\n ui(p, k, s, E), h = p, A = !0;\n break;\n }\n case \"SERVER-CONTROL\": {\n const k = new ee(R);\n o.canBlockReload = k.bool(\"CAN-BLOCK-RELOAD\"), o.canSkipUntil = k.optionalFloat(\"CAN-SKIP-UNTIL\", 0), o.canSkipDateRanges = o.canSkipUntil > 0 && k.bool(\"CAN-SKIP-DATERANGES\"), o.partHoldBack = k.optionalFloat(\"PART-HOLD-BACK\", 0), o.holdBack = k.optionalFloat(\"HOLD-BACK\", 0);\n break;\n }\n case \"PART-INF\": {\n const k = new ee(R);\n o.partTarget = k.decimalFloatingPoint(\"PART-TARGET\");\n break;\n }\n case \"PART\": {\n let k = o.partList;\n k || (k = o.partList = []);\n const W = d > 0 ? k[k.length - 1] : void 0, oe = d++, V = new ee(R);\n ve(o, V, [\"BYTERANGE\", \"URI\"]);\n const Y = new En(V, p, t, oe, W);\n k.push(Y), p.duration += Y.duration;\n break;\n }\n case \"PRELOAD-HINT\": {\n const k = new ee(R);\n ve(o, k, [\"URI\"]), o.preloadHint = k;\n break;\n }\n case \"RENDITION-REPORT\": {\n const k = new ee(R);\n ve(o, k, [\"URI\"]), o.renditionReports = o.renditionReports || [], o.renditionReports.push(k);\n break;\n }\n default:\n x.warn(`line parsed but not handled: ${y}`);\n break;\n }\n }\n }\n g && !g.relurl ? (l.pop(), u -= g.duration, o.partList && (o.fragmentHint = g)) : o.partList && (di(p, g), p.cc = f, o.fragmentHint = p, E && fi(p, E, o));\n const b = l.length, D = l[0], I = l[b - 1];\n if (u += o.skippedSegments * o.targetduration, u > 0 && b && I) {\n o.averagetargetduration = u / b;\n const C = I.sn;\n o.endSN = C !== \"initSegment\" ? C : 0, o.live || (I.endList = !0), D && (o.startCC = D.cc);\n } else\n o.endSN = 0, o.startCC = 0;\n return o.fragmentHint && (u += o.fragmentHint.duration), o.totalduration = u, o.endCC = f, T > 0 && aa(l, T), o;\n }\n}\nfunction li(a, e, t) {\n var s, i;\n const r = new ee(a);\n ve(t, r, [\"KEYFORMAT\", \"KEYFORMATVERSIONS\", \"URI\", \"IV\", \"URI\"]);\n const n = (s = r.METHOD) != null ? s : \"\", o = r.URI, l = r.hexadecimalInteger(\"IV\"), h = r.KEYFORMATVERSIONS, c = (i = r.KEYFORMAT) != null ? i : \"identity\";\n o && r.IV && !l && x.error(`Invalid IV: ${r.IV}`);\n const d = o ? _e.resolve(o, e) : \"\", u = (h || \"1\").split(\"/\").map(Number).filter(Number.isFinite);\n return new gt(n, d, c, u, l);\n}\nfunction hi(a) {\n const t = new ee(a).decimalFloatingPoint(\"TIME-OFFSET\");\n return M(t) ? t : null;\n}\nfunction na(a, e) {\n [\"video\", \"audio\", \"text\"].forEach((t) => {\n const s = a.filter((i) => sa(i, t));\n if (s.length) {\n const i = s.filter((r) => r.lastIndexOf(\"avc1\", 0) === 0 || r.lastIndexOf(\"mp4a\", 0) === 0);\n e[`${t}Codec`] = i.length > 0 ? i[0] : s[0], a = a.filter((r) => s.indexOf(r) === -1);\n }\n }), e.unknownCodecs = a;\n}\nfunction ci(a, e, t) {\n const s = e[t];\n s && (a[t] = s);\n}\nfunction aa(a, e) {\n let t = a[e];\n for (let s = e; s--; ) {\n const i = a[s];\n if (!i)\n return;\n i.programDateTime = t.programDateTime - i.duration * 1e3, t = i;\n }\n}\nfunction di(a, e) {\n a.rawProgramDateTime ? a.programDateTime = Date.parse(a.rawProgramDateTime) : e != null && e.programDateTime && (a.programDateTime = e.endProgramDateTime), M(a.programDateTime) || (a.programDateTime = null, a.rawProgramDateTime = null);\n}\nfunction ui(a, e, t, s) {\n a.relurl = e.URI, e.BYTERANGE && a.setByteRange(e.BYTERANGE), a.level = t, a.sn = \"initSegment\", s && (a.levelkeys = s), a.initSegment = null;\n}\nfunction fi(a, e, t) {\n a.levelkeys = e;\n const {\n encryptedFragments: s\n } = t;\n (!s.length || s[s.length - 1].levelkeys !== e) && Object.keys(e).some((i) => e[i].isCommonEncryption) && s.push(a);\n}\nvar K = {\n MANIFEST: \"manifest\",\n LEVEL: \"level\",\n AUDIO_TRACK: \"audioTrack\",\n SUBTITLE_TRACK: \"subtitleTrack\"\n}, B = {\n MAIN: \"main\",\n AUDIO: \"audio\",\n SUBTITLE: \"subtitle\"\n};\nfunction gi(a) {\n const {\n type: e\n } = a;\n switch (e) {\n case K.AUDIO_TRACK:\n return B.AUDIO;\n case K.SUBTITLE_TRACK:\n return B.SUBTITLE;\n default:\n return B.MAIN;\n }\n}\nfunction Zt(a, e) {\n let t = a.url;\n return (t === void 0 || t.indexOf(\"data:\") === 0) && (t = e.url), t;\n}\nclass oa {\n constructor(e) {\n this.hls = void 0, this.loaders = /* @__PURE__ */ Object.create(null), this.variableList = null, this.hls = e, this.registerListeners();\n }\n startLoad(e) {\n }\n stopLoad() {\n this.destroyInternalLoaders();\n }\n registerListeners() {\n const {\n hls: e\n } = this;\n e.on(m.MANIFEST_LOADING, this.onManifestLoading, this), e.on(m.LEVEL_LOADING, this.onLevelLoading, this), e.on(m.AUDIO_TRACK_LOADING, this.onAudioTrackLoading, this), e.on(m.SUBTITLE_TRACK_LOADING, this.onSubtitleTrackLoading, this);\n }\n unregisterListeners() {\n const {\n hls: e\n } = this;\n e.off(m.MANIFEST_LOADING, this.onManifestLoading, this), e.off(m.LEVEL_LOADING, this.onLevelLoading, this), e.off(m.AUDIO_TRACK_LOADING, this.onAudioTrackLoading, this), e.off(m.SUBTITLE_TRACK_LOADING, this.onSubtitleTrackLoading, this);\n }\n /**\n * Returns defaults or configured loader-type overloads (pLoader and loader config params)\n */\n createInternalLoader(e) {\n const t = this.hls.config, s = t.pLoader, i = t.loader, r = s || i, n = new r(t);\n return this.loaders[e.type] = n, n;\n }\n getInternalLoader(e) {\n return this.loaders[e.type];\n }\n resetInternalLoader(e) {\n this.loaders[e] && delete this.loaders[e];\n }\n /**\n * Call `destroy` on all internal loader instances mapped (one per context type)\n */\n destroyInternalLoaders() {\n for (const e in this.loaders) {\n const t = this.loaders[e];\n t && t.destroy(), this.resetInternalLoader(e);\n }\n }\n destroy() {\n this.variableList = null, this.unregisterListeners(), this.destroyInternalLoaders();\n }\n onManifestLoading(e, t) {\n const {\n url: s\n } = t;\n this.variableList = null, this.load({\n id: null,\n level: 0,\n responseType: \"text\",\n type: K.MANIFEST,\n url: s,\n deliveryDirectives: null\n });\n }\n onLevelLoading(e, t) {\n const {\n id: s,\n level: i,\n url: r,\n deliveryDirectives: n\n } = t;\n this.load({\n id: s,\n level: i,\n responseType: \"text\",\n type: K.LEVEL,\n url: r,\n deliveryDirectives: n\n });\n }\n onAudioTrackLoading(e, t) {\n const {\n id: s,\n groupId: i,\n url: r,\n deliveryDirectives: n\n } = t;\n this.load({\n id: s,\n groupId: i,\n level: null,\n responseType: \"text\",\n type: K.AUDIO_TRACK,\n url: r,\n deliveryDirectives: n\n });\n }\n onSubtitleTrackLoading(e, t) {\n const {\n id: s,\n groupId: i,\n url: r,\n deliveryDirectives: n\n } = t;\n this.load({\n id: s,\n groupId: i,\n level: null,\n responseType: \"text\",\n type: K.SUBTITLE_TRACK,\n url: r,\n deliveryDirectives: n\n });\n }\n load(e) {\n var t;\n const s = this.hls.config;\n let i = this.getInternalLoader(e);\n if (i) {\n const h = i.context;\n if (h && h.url === e.url) {\n x.trace(\"[playlist-loader]: playlist request ongoing\");\n return;\n }\n x.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`), i.abort();\n }\n let r;\n if (e.type === K.MANIFEST ? r = s.manifestLoadPolicy.default : r = ne({}, s.playlistLoadPolicy.default, {\n timeoutRetry: null,\n errorRetry: null\n }), i = this.createInternalLoader(e), (t = e.deliveryDirectives) != null && t.part) {\n let h;\n if (e.type === K.LEVEL && e.level !== null ? h = this.hls.levels[e.level].details : e.type === K.AUDIO_TRACK && e.id !== null ? h = this.hls.audioTracks[e.id].details : e.type === K.SUBTITLE_TRACK && e.id !== null && (h = this.hls.subtitleTracks[e.id].details), h) {\n const c = h.partTarget, d = h.targetduration;\n if (c && d) {\n const u = Math.max(c * 3, d * 0.8) * 1e3;\n r = ne({}, r, {\n maxTimeToFirstByteMs: Math.min(u, r.maxTimeToFirstByteMs),\n maxLoadTimeMs: Math.min(u, r.maxTimeToFirstByteMs)\n });\n }\n }\n }\n const n = r.errorRetry || r.timeoutRetry || {}, o = {\n loadPolicy: r,\n timeout: r.maxLoadTimeMs,\n maxRetry: n.maxNumRetry || 0,\n retryDelay: n.retryDelayMs || 0,\n maxRetryDelay: n.maxRetryDelayMs || 0\n }, l = {\n onSuccess: (h, c, d, u) => {\n const f = this.getInternalLoader(d);\n this.resetInternalLoader(d.type);\n const g = h.data;\n if (g.indexOf(\"#EXTM3U\") !== 0) {\n this.handleManifestParsingError(h, d, new Error(\"no EXTM3U delimiter\"), u || null, c);\n return;\n }\n c.parsing.start = performance.now(), _e.isMediaPlaylist(g) ? this.handleTrackOrLevelPlaylist(h, c, d, u || null, f) : this.handleMasterPlaylist(h, c, d, u);\n },\n onError: (h, c, d, u) => {\n this.handleNetworkError(c, d, !1, h, u);\n },\n onTimeout: (h, c, d) => {\n this.handleNetworkError(c, d, !0, void 0, h);\n }\n };\n i.load(e, o, l);\n }\n handleMasterPlaylist(e, t, s, i) {\n const r = this.hls, n = e.data, o = Zt(e, s), l = _e.parseMasterPlaylist(n, o);\n if (l.playlistParsingError) {\n this.handleManifestParsingError(e, s, l.playlistParsingError, i, t);\n return;\n }\n const {\n contentSteering: h,\n levels: c,\n sessionData: d,\n sessionKeys: u,\n startTimeOffset: f,\n variableList: g\n } = l;\n this.variableList = g;\n const {\n AUDIO: p = [],\n SUBTITLES: y,\n \"CLOSED-CAPTIONS\": v\n } = _e.parseMasterPlaylistMedia(n, o, l);\n p.length && !p.some((T) => !T.url) && c[0].audioCodec && !c[0].attrs.AUDIO && (x.log(\"[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one\"), p.unshift({\n type: \"main\",\n name: \"main\",\n groupId: \"main\",\n default: !1,\n autoselect: !1,\n forced: !1,\n id: -1,\n attrs: new ee({}),\n bitrate: 0,\n url: \"\"\n })), r.trigger(m.MANIFEST_LOADED, {\n levels: c,\n audioTracks: p,\n subtitles: y,\n captions: v,\n contentSteering: h,\n url: o,\n stats: t,\n networkDetails: i,\n sessionData: d,\n sessionKeys: u,\n startTimeOffset: f,\n variableList: g\n });\n }\n handleTrackOrLevelPlaylist(e, t, s, i, r) {\n const n = this.hls, {\n id: o,\n level: l,\n type: h\n } = s, c = Zt(e, s), d = M(o) ? o : 0, u = M(l) ? l : d, f = gi(s), g = _e.parseLevelPlaylist(e.data, c, u, f, d, this.variableList);\n if (h === K.MANIFEST) {\n const p = {\n attrs: new ee({}),\n bitrate: 0,\n details: g,\n name: \"\",\n url: c\n };\n n.trigger(m.MANIFEST_LOADED, {\n levels: [p],\n audioTracks: [],\n url: c,\n stats: t,\n networkDetails: i,\n sessionData: null,\n sessionKeys: null,\n contentSteering: null,\n startTimeOffset: null,\n variableList: null\n });\n }\n t.parsing.end = performance.now(), s.levelDetails = g, this.handlePlaylistLoaded(g, e, t, s, i, r);\n }\n handleManifestParsingError(e, t, s, i, r) {\n this.hls.trigger(m.ERROR, {\n type: U.NETWORK_ERROR,\n details: L.MANIFEST_PARSING_ERROR,\n fatal: t.type === K.MANIFEST,\n url: e.url,\n err: s,\n error: s,\n reason: s.message,\n response: e,\n context: t,\n networkDetails: i,\n stats: r\n });\n }\n handleNetworkError(e, t, s = !1, i, r) {\n let n = `A network ${s ? \"timeout\" : \"error\" + (i ? \" (status \" + i.code + \")\" : \"\")} occurred while loading ${e.type}`;\n e.type === K.LEVEL ? n += `: ${e.level} id: ${e.id}` : (e.type === K.AUDIO_TRACK || e.type === K.SUBTITLE_TRACK) && (n += ` id: ${e.id} group-id: \"${e.groupId}\"`);\n const o = new Error(n);\n x.warn(`[playlist-loader]: ${n}`);\n let l = L.UNKNOWN, h = !1;\n const c = this.getInternalLoader(e);\n switch (e.type) {\n case K.MANIFEST:\n l = s ? L.MANIFEST_LOAD_TIMEOUT : L.MANIFEST_LOAD_ERROR, h = !0;\n break;\n case K.LEVEL:\n l = s ? L.LEVEL_LOAD_TIMEOUT : L.LEVEL_LOAD_ERROR, h = !1;\n break;\n case K.AUDIO_TRACK:\n l = s ? L.AUDIO_TRACK_LOAD_TIMEOUT : L.AUDIO_TRACK_LOAD_ERROR, h = !1;\n break;\n case K.SUBTITLE_TRACK:\n l = s ? L.SUBTITLE_TRACK_LOAD_TIMEOUT : L.SUBTITLE_LOAD_ERROR, h = !1;\n break;\n }\n c && this.resetInternalLoader(e.type);\n const d = {\n type: U.NETWORK_ERROR,\n details: l,\n fatal: h,\n url: e.url,\n loader: c,\n context: e,\n error: o,\n networkDetails: t,\n stats: r\n };\n if (i) {\n const u = (t == null ? void 0 : t.url) || e.url;\n d.response = xe({\n url: u,\n data: void 0\n }, i);\n }\n this.hls.trigger(m.ERROR, d);\n }\n handlePlaylistLoaded(e, t, s, i, r, n) {\n const o = this.hls, {\n type: l,\n level: h,\n id: c,\n groupId: d,\n deliveryDirectives: u\n } = i, f = Zt(t, i), g = gi(i), p = typeof i.level == \"number\" && g === B.MAIN ? h : void 0;\n if (!e.fragments.length) {\n const v = new Error(\"No Segments found in Playlist\");\n o.trigger(m.ERROR, {\n type: U.NETWORK_ERROR,\n details: L.LEVEL_EMPTY_ERROR,\n fatal: !1,\n url: f,\n error: v,\n reason: v.message,\n response: t,\n context: i,\n level: p,\n parent: g,\n networkDetails: r,\n stats: s\n });\n return;\n }\n e.targetduration || (e.playlistParsingError = new Error(\"Missing Target Duration\"));\n const y = e.playlistParsingError;\n if (y) {\n o.trigger(m.ERROR, {\n type: U.NETWORK_ERROR,\n details: L.LEVEL_PARSING_ERROR,\n fatal: !1,\n url: f,\n error: y,\n reason: y.message,\n response: t,\n context: i,\n level: p,\n parent: g,\n networkDetails: r,\n stats: s\n });\n return;\n }\n switch (e.live && n && (n.getCacheAge && (e.ageHeader = n.getCacheAge() || 0), (!n.getCacheAge || isNaN(e.ageHeader)) && (e.ageHeader = 0)), l) {\n case K.MANIFEST:\n case K.LEVEL:\n o.trigger(m.LEVEL_LOADED, {\n details: e,\n level: p || 0,\n id: c || 0,\n stats: s,\n networkDetails: r,\n deliveryDirectives: u\n });\n break;\n case K.AUDIO_TRACK:\n o.trigger(m.AUDIO_TRACK_LOADED, {\n details: e,\n id: c || 0,\n groupId: d || \"\",\n stats: s,\n networkDetails: r,\n deliveryDirectives: u\n });\n break;\n case K.SUBTITLE_TRACK:\n o.trigger(m.SUBTITLE_TRACK_LOADED, {\n details: e,\n id: c || 0,\n groupId: d || \"\",\n stats: s,\n networkDetails: r,\n deliveryDirectives: u\n });\n break;\n }\n }\n}\nfunction pr(a, e) {\n let t;\n try {\n t = new Event(\"addtrack\");\n } catch {\n t = document.createEvent(\"Event\"), t.initEvent(\"addtrack\", !1, !1);\n }\n t.track = a, e.dispatchEvent(t);\n}\nfunction yr(a, e) {\n const t = a.mode;\n if (t === \"disabled\" && (a.mode = \"hidden\"), a.cues && !a.cues.getCueById(e.id))\n try {\n if (a.addCue(e), !a.cues.getCueById(e.id))\n throw new Error(`addCue is failed for: ${e}`);\n } catch (s) {\n x.debug(`[texttrack-utils]: ${s}`);\n try {\n const i = new self.TextTrackCue(e.startTime, e.endTime, e.text);\n i.id = e.id, a.addCue(i);\n } catch (i) {\n x.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${i}`);\n }\n }\n t === \"disabled\" && (a.mode = t);\n}\nfunction rt(a) {\n const e = a.mode;\n if (e === \"disabled\" && (a.mode = \"hidden\"), a.cues)\n for (let t = a.cues.length; t--; )\n a.removeCue(a.cues[t]);\n e === \"disabled\" && (a.mode = e);\n}\nfunction ys(a, e, t, s) {\n const i = a.mode;\n if (i === \"disabled\" && (a.mode = \"hidden\"), a.cues && a.cues.length > 0) {\n const r = ha(a.cues, e, t);\n for (let n = 0; n < r.length; n++)\n (!s || s(r[n])) && a.removeCue(r[n]);\n }\n i === \"disabled\" && (a.mode = i);\n}\nfunction la(a, e) {\n if (e < a[0].startTime)\n return 0;\n const t = a.length - 1;\n if (e > a[t].endTime)\n return -1;\n let s = 0, i = t;\n for (; s <= i; ) {\n const r = Math.floor((i + s) / 2);\n if (e < a[r].startTime)\n i = r - 1;\n else if (e > a[r].startTime && s < t)\n s = r + 1;\n else\n return r;\n }\n return a[s].startTime - e < e - a[i].startTime ? s : i;\n}\nfunction ha(a, e, t) {\n const s = [], i = la(a, e);\n if (i > -1)\n for (let r = i, n = a.length; r < n; r++) {\n const o = a[r];\n if (o.startTime >= e && o.endTime <= t)\n s.push(o);\n else if (o.startTime > t)\n return s;\n }\n return s;\n}\nvar De = {\n audioId3: \"org.id3\",\n dateRange: \"com.apple.quicktime.HLS\",\n emsg: \"https://aomedia.org/emsg/ID3\"\n};\nconst ca = 0.25;\nfunction vs() {\n if (!(typeof self > \"u\"))\n return self.WebKitDataCue || self.VTTCue || self.TextTrackCue;\n}\nconst St = (() => {\n const a = vs();\n try {\n new a(0, Number.POSITIVE_INFINITY, \"\");\n } catch {\n return Number.MAX_VALUE;\n }\n return Number.POSITIVE_INFINITY;\n})();\nfunction Qt(a, e) {\n return a.getTime() / 1e3 - e;\n}\nfunction da(a) {\n return Uint8Array.from(a.replace(/^0x/, \"\").replace(/([\\da-fA-F]{2}) ?/g, \"0x$1 \").replace(/ +$/, \"\").split(\" \")).buffer;\n}\nclass ua {\n constructor(e) {\n this.hls = void 0, this.id3Track = null, this.media = null, this.dateRangeCuesAppended = {}, this.hls = e, this._registerListeners();\n }\n destroy() {\n this._unregisterListeners(), this.id3Track = null, this.media = null, this.dateRangeCuesAppended = {}, this.hls = null;\n }\n _registerListeners() {\n const {\n hls: e\n } = this;\n e.on(m.MEDIA_ATTACHED, this.onMediaAttached, this), e.on(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.on(m.MANIFEST_LOADING, this.onManifestLoading, this), e.on(m.FRAG_PARSING_METADATA, this.onFragParsingMetadata, this), e.on(m.BUFFER_FLUSHING, this.onBufferFlushing, this), e.on(m.LEVEL_UPDATED, this.onLevelUpdated, this);\n }\n _unregisterListeners() {\n const {\n hls: e\n } = this;\n e.off(m.MEDIA_ATTACHED, this.onMediaAttached, this), e.off(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.off(m.MANIFEST_LOADING, this.onManifestLoading, this), e.off(m.FRAG_PARSING_METADATA, this.onFragParsingMetadata, this), e.off(m.BUFFER_FLUSHING, this.onBufferFlushing, this), e.off(m.LEVEL_UPDATED, this.onLevelUpdated, this);\n }\n // Add ID3 metatadata text track.\n onMediaAttached(e, t) {\n this.media = t.media;\n }\n onMediaDetaching() {\n this.id3Track && (rt(this.id3Track), this.id3Track = null, this.media = null, this.dateRangeCuesAppended = {});\n }\n onManifestLoading() {\n this.dateRangeCuesAppended = {};\n }\n createTrack(e) {\n const t = this.getID3Track(e.textTracks);\n return t.mode = \"hidden\", t;\n }\n getID3Track(e) {\n if (this.media) {\n for (let t = 0; t < e.length; t++) {\n const s = e[t];\n if (s.kind === \"metadata\" && s.label === \"id3\")\n return pr(s, this.media), s;\n }\n return this.media.addTextTrack(\"metadata\", \"id3\");\n }\n }\n onFragParsingMetadata(e, t) {\n if (!this.media)\n return;\n const {\n hls: {\n config: {\n enableEmsgMetadataCues: s,\n enableID3MetadataCues: i\n }\n }\n } = this;\n if (!s && !i)\n return;\n const {\n samples: r\n } = t;\n this.id3Track || (this.id3Track = this.createTrack(this.media));\n const n = vs();\n for (let o = 0; o < r.length; o++) {\n const l = r[o].type;\n if (l === De.emsg && !s || !i)\n continue;\n const h = or(r[o].data);\n if (h) {\n const c = r[o].pts;\n let d = c + r[o].duration;\n d > St && (d = St), d - c <= 0 && (d = c + ca);\n for (let f = 0; f < h.length; f++) {\n const g = h[f];\n if (!ar(g)) {\n this.updateId3CueEnds(c, l);\n const p = new n(c, d, \"\");\n p.value = g, l && (p.type = l), this.id3Track.addCue(p);\n }\n }\n }\n }\n }\n updateId3CueEnds(e, t) {\n var s;\n const i = (s = this.id3Track) == null ? void 0 : s.cues;\n if (i)\n for (let r = i.length; r--; ) {\n const n = i[r];\n n.type === t && n.startTime < e && n.endTime === St && (n.endTime = e);\n }\n }\n onBufferFlushing(e, {\n startOffset: t,\n endOffset: s,\n type: i\n }) {\n const {\n id3Track: r,\n hls: n\n } = this;\n if (!n)\n return;\n const {\n config: {\n enableEmsgMetadataCues: o,\n enableID3MetadataCues: l\n }\n } = n;\n if (r && (o || l)) {\n let h;\n i === \"audio\" ? h = (c) => c.type === De.audioId3 && l : i === \"video\" ? h = (c) => c.type === De.emsg && o : h = (c) => c.type === De.audioId3 && l || c.type === De.emsg && o, ys(r, t, s, h);\n }\n }\n onLevelUpdated(e, {\n details: t\n }) {\n if (!this.media || !t.hasProgramDateTime || !this.hls.config.enableDateRangeMetadataCues)\n return;\n const {\n dateRangeCuesAppended: s,\n id3Track: i\n } = this, {\n dateRanges: r\n } = t, n = Object.keys(r);\n if (i) {\n const c = Object.keys(s).filter((d) => !n.includes(d));\n for (let d = c.length; d--; ) {\n const u = c[d];\n Object.keys(s[u].cues).forEach((f) => {\n i.removeCue(s[u].cues[f]);\n }), delete s[u];\n }\n }\n const o = t.fragments[t.fragments.length - 1];\n if (n.length === 0 || !M(o == null ? void 0 : o.programDateTime))\n return;\n this.id3Track || (this.id3Track = this.createTrack(this.media));\n const l = o.programDateTime / 1e3 - o.start, h = vs();\n for (let c = 0; c < n.length; c++) {\n const d = n[c], u = r[d], f = s[d], g = (f == null ? void 0 : f.cues) || {};\n let p = (f == null ? void 0 : f.durationKnown) || !1;\n const y = Qt(u.startDate, l);\n let v = St;\n const E = u.endDate;\n if (E)\n v = Qt(E, l), p = !0;\n else if (u.endOnNext && !p) {\n const A = n.reduce((b, D) => {\n const I = r[D];\n return I.class === u.class && I.id !== D && I.startDate > u.startDate && b.push(I), b;\n }, []).sort((b, D) => b.startDate.getTime() - D.startDate.getTime())[0];\n A && (v = Qt(A.startDate, l), p = !0);\n }\n const T = Object.keys(u.attr);\n for (let A = 0; A < T.length; A++) {\n const b = T[A];\n if (!Tn(b))\n continue;\n let D = g[b];\n if (D)\n p && !f.durationKnown && (D.endTime = v);\n else {\n let I = u.attr[b];\n D = new h(y, v, \"\"), xn(b) && (I = da(I)), D.value = {\n key: b,\n data: I\n }, D.type = De.dateRange, D.id = d, this.id3Track.addCue(D), g[b] = D;\n }\n }\n s[d] = {\n cues: g,\n dateRange: u,\n durationKnown: p\n };\n }\n }\n}\nclass fa {\n constructor(e) {\n this.hls = void 0, this.config = void 0, this.media = null, this.levelDetails = null, this.currentTime = 0, this.stallCount = 0, this._latency = null, this.timeupdateHandler = () => this.timeupdate(), this.hls = e, this.config = e.config, this.registerListeners();\n }\n get latency() {\n return this._latency || 0;\n }\n get maxLatency() {\n const {\n config: e,\n levelDetails: t\n } = this;\n return e.liveMaxLatencyDuration !== void 0 ? e.liveMaxLatencyDuration : t ? e.liveMaxLatencyDurationCount * t.targetduration : 0;\n }\n get targetLatency() {\n const {\n levelDetails: e\n } = this;\n if (e === null)\n return null;\n const {\n holdBack: t,\n partHoldBack: s,\n targetduration: i\n } = e, {\n liveSyncDuration: r,\n liveSyncDurationCount: n,\n lowLatencyMode: o\n } = this.config, l = this.hls.userConfig;\n let h = o && s || t;\n (l.liveSyncDuration || l.liveSyncDurationCount || h === 0) && (h = r !== void 0 ? r : n * i);\n const c = i, d = 1;\n return h + Math.min(this.stallCount * d, c);\n }\n get liveSyncPosition() {\n const e = this.estimateLiveEdge(), t = this.targetLatency, s = this.levelDetails;\n if (e === null || t === null || s === null)\n return null;\n const i = s.edge, r = e - t - this.edgeStalled, n = i - s.totalduration, o = i - (this.config.lowLatencyMode && s.partTarget || s.targetduration);\n return Math.min(Math.max(n, r), o);\n }\n get drift() {\n const {\n levelDetails: e\n } = this;\n return e === null ? 1 : e.drift;\n }\n get edgeStalled() {\n const {\n levelDetails: e\n } = this;\n if (e === null)\n return 0;\n const t = (this.config.lowLatencyMode && e.partTarget || e.targetduration) * 3;\n return Math.max(e.age - t, 0);\n }\n get forwardBufferLength() {\n const {\n media: e,\n levelDetails: t\n } = this;\n if (!e || !t)\n return 0;\n const s = e.buffered.length;\n return (s ? e.buffered.end(s - 1) : t.edge) - this.currentTime;\n }\n destroy() {\n this.unregisterListeners(), this.onMediaDetaching(), this.levelDetails = null, this.hls = this.timeupdateHandler = null;\n }\n registerListeners() {\n this.hls.on(m.MEDIA_ATTACHED, this.onMediaAttached, this), this.hls.on(m.MEDIA_DETACHING, this.onMediaDetaching, this), this.hls.on(m.MANIFEST_LOADING, this.onManifestLoading, this), this.hls.on(m.LEVEL_UPDATED, this.onLevelUpdated, this), this.hls.on(m.ERROR, this.onError, this);\n }\n unregisterListeners() {\n this.hls.off(m.MEDIA_ATTACHED, this.onMediaAttached, this), this.hls.off(m.MEDIA_DETACHING, this.onMediaDetaching, this), this.hls.off(m.MANIFEST_LOADING, this.onManifestLoading, this), this.hls.off(m.LEVEL_UPDATED, this.onLevelUpdated, this), this.hls.off(m.ERROR, this.onError, this);\n }\n onMediaAttached(e, t) {\n this.media = t.media, this.media.addEventListener(\"timeupdate\", this.timeupdateHandler);\n }\n onMediaDetaching() {\n this.media && (this.media.removeEventListener(\"timeupdate\", this.timeupdateHandler), this.media = null);\n }\n onManifestLoading() {\n this.levelDetails = null, this._latency = null, this.stallCount = 0;\n }\n onLevelUpdated(e, {\n details: t\n }) {\n this.levelDetails = t, t.advanced && this.timeupdate(), !t.live && this.media && this.media.removeEventListener(\"timeupdate\", this.timeupdateHandler);\n }\n onError(e, t) {\n var s;\n t.details === L.BUFFER_STALLED_ERROR && (this.stallCount++, (s = this.levelDetails) != null && s.live && x.warn(\"[playback-rate-controller]: Stall detected, adjusting target latency\"));\n }\n timeupdate() {\n const {\n media: e,\n levelDetails: t\n } = this;\n if (!e || !t)\n return;\n this.currentTime = e.currentTime;\n const s = this.computeLatency();\n if (s === null)\n return;\n this._latency = s;\n const {\n lowLatencyMode: i,\n maxLiveSyncPlaybackRate: r\n } = this.config;\n if (!i || r === 1)\n return;\n const n = this.targetLatency;\n if (n === null)\n return;\n const o = s - n, l = Math.min(this.maxLatency, n + t.targetduration), h = o < l;\n if (t.live && h && o > 0.05 && this.forwardBufferLength > 1) {\n const c = Math.min(2, Math.max(1, r)), d = Math.round(2 / (1 + Math.exp(-0.75 * o - this.edgeStalled)) * 20) / 20;\n e.playbackRate = Math.min(c, Math.max(1, d));\n } else\n e.playbackRate !== 1 && e.playbackRate !== 0 && (e.playbackRate = 1);\n }\n estimateLiveEdge() {\n const {\n levelDetails: e\n } = this;\n return e === null ? null : e.edge + e.age;\n }\n computeLatency() {\n const e = this.estimateLiveEdge();\n return e === null ? null : e - this.currentTime;\n }\n}\nconst Ts = [\"NONE\", \"TYPE-0\", \"TYPE-1\", null];\nvar ft = {\n No: \"\",\n Yes: \"YES\",\n v2: \"v2\"\n};\nfunction ga(a, e) {\n const {\n canSkipUntil: t,\n canSkipDateRanges: s,\n endSN: i\n } = a, r = e !== void 0 ? e - i : 0;\n return t && r < t ? s ? ft.v2 : ft.Yes : ft.No;\n}\nclass mi {\n constructor(e, t, s) {\n this.msn = void 0, this.part = void 0, this.skip = void 0, this.msn = e, this.part = t, this.skip = s;\n }\n addDirectives(e) {\n const t = new self.URL(e);\n return this.msn !== void 0 && t.searchParams.set(\"_HLS_msn\", this.msn.toString()), this.part !== void 0 && t.searchParams.set(\"_HLS_part\", this.part.toString()), this.skip && t.searchParams.set(\"_HLS_skip\", this.skip), t.href;\n }\n}\nclass mt {\n constructor(e) {\n this._attrs = void 0, this.audioCodec = void 0, this.bitrate = void 0, this.codecSet = void 0, this.height = void 0, this.id = void 0, this.name = void 0, this.videoCodec = void 0, this.width = void 0, this.unknownCodecs = void 0, this.audioGroupIds = void 0, this.details = void 0, this.fragmentError = 0, this.loadError = 0, this.loaded = void 0, this.realBitrate = 0, this.textGroupIds = void 0, this.url = void 0, this._urlId = 0, this.url = [e.url], this._attrs = [e.attrs], this.bitrate = e.bitrate, e.details && (this.details = e.details), this.id = e.id || 0, this.name = e.name, this.width = e.width || 0, this.height = e.height || 0, this.audioCodec = e.audioCodec, this.videoCodec = e.videoCodec, this.unknownCodecs = e.unknownCodecs, this.codecSet = [e.videoCodec, e.audioCodec].filter((t) => t).join(\",\").replace(/\\.[^.,]+/g, \"\");\n }\n get maxBitrate() {\n return Math.max(this.realBitrate, this.bitrate);\n }\n get attrs() {\n return this._attrs[this._urlId];\n }\n get pathwayId() {\n return this.attrs[\"PATHWAY-ID\"] || \".\";\n }\n get uri() {\n return this.url[this._urlId] || \"\";\n }\n get urlId() {\n return this._urlId;\n }\n set urlId(e) {\n const t = e % this.url.length;\n this._urlId !== t && (this.fragmentError = 0, this.loadError = 0, this.details = void 0, this._urlId = t);\n }\n get audioGroupId() {\n var e;\n return (e = this.audioGroupIds) == null ? void 0 : e[this.urlId];\n }\n get textGroupId() {\n var e;\n return (e = this.textGroupIds) == null ? void 0 : e[this.urlId];\n }\n addFallback(e) {\n this.url.push(e.url), this._attrs.push(e.attrs);\n }\n}\nfunction Jt(a, e) {\n const t = e.startPTS;\n if (M(t)) {\n let s = 0, i;\n e.sn > a.sn ? (s = t - a.start, i = a) : (s = a.start - t, i = e), i.duration !== s && (i.duration = s);\n } else\n e.sn > a.sn ? a.cc === e.cc && a.minEndPTS ? e.start = a.start + (a.minEndPTS - a.start) : e.start = a.start + a.duration : e.start = Math.max(a.start - e.duration, 0);\n}\nfunction vr(a, e, t, s, i, r) {\n s - t <= 0 && (x.warn(\"Fragment should have a positive duration\", e), s = t + e.duration, r = i + e.duration);\n let o = t, l = s;\n const h = e.startPTS, c = e.endPTS;\n if (M(h)) {\n const y = Math.abs(h - t);\n M(e.deltaPTS) ? e.deltaPTS = Math.max(y, e.deltaPTS) : e.deltaPTS = y, o = Math.max(t, h), t = Math.min(t, h), i = Math.min(i, e.startDTS), l = Math.min(s, c), s = Math.max(s, c), r = Math.max(r, e.endDTS);\n }\n const d = t - e.start;\n e.start !== 0 && (e.start = t), e.duration = s - e.start, e.startPTS = t, e.maxStartPTS = o, e.startDTS = i, e.endPTS = s, e.minEndPTS = l, e.endDTS = r;\n const u = e.sn;\n if (!a || u < a.startSN || u > a.endSN)\n return 0;\n let f;\n const g = u - a.startSN, p = a.fragments;\n for (p[g] = e, f = g; f > 0; f--)\n Jt(p[f], p[f - 1]);\n for (f = g; f < p.length - 1; f++)\n Jt(p[f], p[f + 1]);\n return a.fragmentHint && Jt(p[p.length - 1], a.fragmentHint), a.PTSKnown = a.alignedSliding = !0, d;\n}\nfunction ma(a, e) {\n let t = null;\n const s = a.fragments;\n for (let l = s.length - 1; l >= 0; l--) {\n const h = s[l].initSegment;\n if (h) {\n t = h;\n break;\n }\n }\n a.fragmentHint && delete a.fragmentHint.endPTS;\n let i = 0, r;\n if (va(a, e, (l, h) => {\n l.relurl && (i = l.cc - h.cc), M(l.startPTS) && M(l.endPTS) && (h.start = h.startPTS = l.startPTS, h.startDTS = l.startDTS, h.maxStartPTS = l.maxStartPTS, h.endPTS = l.endPTS, h.endDTS = l.endDTS, h.minEndPTS = l.minEndPTS, h.duration = l.endPTS - l.startPTS, h.duration && (r = h), e.PTSKnown = e.alignedSliding = !0), h.elementaryStreams = l.elementaryStreams, h.loader = l.loader, h.stats = l.stats, h.urlId = l.urlId, l.initSegment && (h.initSegment = l.initSegment, t = l.initSegment);\n }), t && (e.fragmentHint ? e.fragments.concat(e.fragmentHint) : e.fragments).forEach((h) => {\n var c;\n (!h.initSegment || h.initSegment.relurl === ((c = t) == null ? void 0 : c.relurl)) && (h.initSegment = t);\n }), e.skippedSegments)\n if (e.deltaUpdateFailed = e.fragments.some((l) => !l), e.deltaUpdateFailed) {\n x.warn(\"[level-helper] Previous playlist missing segments skipped in delta playlist\");\n for (let l = e.skippedSegments; l--; )\n e.fragments.shift();\n e.startSN = e.fragments[0].sn, e.startCC = e.fragments[0].cc;\n } else\n e.canSkipDateRanges && (e.dateRanges = pa(a.dateRanges, e.dateRanges, e.recentlyRemovedDateranges));\n const n = e.fragments;\n if (i) {\n x.warn(\"discontinuity sliding from playlist, take drift into account\");\n for (let l = 0; l < n.length; l++)\n n[l].cc += i;\n }\n e.skippedSegments && (e.startCC = e.fragments[0].cc), ya(a.partList, e.partList, (l, h) => {\n h.elementaryStreams = l.elementaryStreams, h.stats = l.stats;\n }), r ? vr(e, r, r.startPTS, r.endPTS, r.startDTS, r.endDTS) : Tr(a, e), n.length && (e.totalduration = e.edge - n[0].start), e.driftStartTime = a.driftStartTime, e.driftStart = a.driftStart;\n const o = e.advancedDateTime;\n if (e.advanced && o) {\n const l = e.edge;\n e.driftStart || (e.driftStartTime = o, e.driftStart = l), e.driftEndTime = o, e.driftEnd = l;\n } else\n e.driftEndTime = a.driftEndTime, e.driftEnd = a.driftEnd, e.advancedDateTime = a.advancedDateTime;\n}\nfunction pa(a, e, t) {\n const s = ne({}, a);\n return t && t.forEach((i) => {\n delete s[i];\n }), Object.keys(e).forEach((i) => {\n const r = new er(e[i].attr, s[i]);\n r.isValid ? s[i] = r : x.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: \"${JSON.stringify(e[i].attr)}\"`);\n }), s;\n}\nfunction ya(a, e, t) {\n if (a && e) {\n let s = 0;\n for (let i = 0, r = a.length; i <= r; i++) {\n const n = a[i], o = e[i + s];\n n && o && n.index === o.index && n.fragment.sn === o.fragment.sn ? t(n, o) : s--;\n }\n }\n}\nfunction va(a, e, t) {\n const s = e.skippedSegments, i = Math.max(a.startSN, e.startSN) - e.startSN, r = (a.fragmentHint ? 1 : 0) + (s ? e.endSN : Math.min(a.endSN, e.endSN)) - e.startSN, n = e.startSN - a.startSN, o = e.fragmentHint ? e.fragments.concat(e.fragmentHint) : e.fragments, l = a.fragmentHint ? a.fragments.concat(a.fragmentHint) : a.fragments;\n for (let h = i; h <= r; h++) {\n const c = l[n + h];\n let d = o[h];\n s && !d && h < s && (d = e.fragments[h] = c), c && d && t(c, d);\n }\n}\nfunction Tr(a, e) {\n const t = e.startSN + e.skippedSegments - a.startSN, s = a.fragments;\n t < 0 || t >= s.length || xs(e, s[t].start);\n}\nfunction xs(a, e) {\n if (e) {\n const t = a.fragments;\n for (let s = a.skippedSegments; s < t.length; s++)\n t[s].start += e;\n a.fragmentHint && (a.fragmentHint.start += e);\n }\n}\nfunction Ta(a, e = 1 / 0) {\n let t = 1e3 * a.targetduration;\n if (a.updated) {\n const s = a.fragments, i = 4;\n if (s.length && t * i > e) {\n const r = s[s.length - 1].duration * 1e3;\n r < t && (t = r);\n }\n } else\n t /= 2;\n return Math.round(t);\n}\nfunction xa(a, e, t) {\n if (!(a != null && a.details))\n return null;\n const s = a.details;\n let i = s.fragments[e - s.startSN];\n return i || (i = s.fragmentHint, i && i.sn === e) ? i : e < s.startSN && t && t.sn === e ? t : null;\n}\nfunction pi(a, e, t) {\n var s;\n return a != null && a.details ? xr((s = a.details) == null ? void 0 : s.partList, e, t) : null;\n}\nfunction xr(a, e, t) {\n if (a)\n for (let s = a.length; s--; ) {\n const i = a[s];\n if (i.index === t && i.fragment.sn === e)\n return i;\n }\n return null;\n}\nfunction Ot(a) {\n switch (a.details) {\n case L.FRAG_LOAD_TIMEOUT:\n case L.KEY_LOAD_TIMEOUT:\n case L.LEVEL_LOAD_TIMEOUT:\n case L.MANIFEST_LOAD_TIMEOUT:\n return !0;\n }\n return !1;\n}\nfunction yi(a, e) {\n const t = Ot(e);\n return a.default[`${t ? \"timeout\" : \"error\"}Retry`];\n}\nfunction ks(a, e) {\n const t = a.backoff === \"linear\" ? 1 : Math.pow(2, e);\n return Math.min(t * a.retryDelayMs, a.maxRetryDelayMs);\n}\nfunction vi(a) {\n return xe(xe({}, a), {\n errorRetry: null,\n timeoutRetry: null\n });\n}\nfunction Ft(a, e, t, s) {\n return !!a && e < a.maxNumRetry && (Ea(s) || !!t);\n}\nfunction Ea(a) {\n return a === 0 && navigator.onLine === !1 || !!a && (a < 400 || a > 499);\n}\nconst Er = {\n /**\n * Searches for an item in an array which matches a certain condition.\n * This requires the condition to only match one item in the array,\n * and for the array to be ordered.\n *\n * @param list The array to search.\n * @param comparisonFn\n * Called and provided a candidate item as the first argument.\n * Should return:\n * > -1 if the item should be located at a lower index than the provided item.\n * > 1 if the item should be located at a higher index than the provided item.\n * > 0 if the item is the item you're looking for.\n *\n * @returns the object if found, otherwise returns null\n */\n search: function(a, e) {\n let t = 0, s = a.length - 1, i = null, r = null;\n for (; t <= s; ) {\n i = (t + s) / 2 | 0, r = a[i];\n const n = e(r);\n if (n > 0)\n t = i + 1;\n else if (n < 0)\n s = i - 1;\n else\n return r;\n }\n return null;\n }\n};\nfunction Sa(a, e, t) {\n if (e === null || !Array.isArray(a) || !a.length || !M(e))\n return null;\n const s = a[0].programDateTime;\n if (e < (s || 0))\n return null;\n const i = a[a.length - 1].endProgramDateTime;\n if (e >= (i || 0))\n return null;\n t = t || 0;\n for (let r = 0; r < a.length; ++r) {\n const n = a[r];\n if (ba(e, t, n))\n return n;\n }\n return null;\n}\nfunction pt(a, e, t = 0, s = 0) {\n let i = null;\n if (a ? i = e[a.sn - e[0].sn + 1] || null : t === 0 && e[0].start === 0 && (i = e[0]), i && Es(t, s, i) === 0)\n return i;\n const r = Er.search(e, Es.bind(null, t, s));\n return r && (r !== a || !i) ? r : i;\n}\nfunction Es(a = 0, e = 0, t) {\n if (t.start <= a && t.start + t.duration > a)\n return 0;\n const s = Math.min(e, t.duration + (t.deltaPTS ? t.deltaPTS : 0));\n return t.start + t.duration - s <= a ? 1 : t.start - s > a && t.start ? -1 : 0;\n}\nfunction ba(a, e, t) {\n const s = Math.min(e, t.duration + (t.deltaPTS ? t.deltaPTS : 0)) * 1e3;\n return (t.endProgramDateTime || 0) - s > a;\n}\nfunction La(a, e) {\n return Er.search(a, (t) => t.cc < e ? 1 : t.cc > e ? -1 : 0);\n}\nconst Aa = 3e5;\nvar ge = {\n DoNothing: 0,\n SendEndCallback: 1,\n SendAlternateToPenaltyBox: 2,\n RemoveAlternatePermanently: 3,\n InsertDiscontinuity: 4,\n RetryRequest: 5\n}, Re = {\n None: 0,\n MoveAllAlternatesMatchingHost: 1,\n MoveAllAlternatesMatchingHDCP: 2,\n SwitchToSDR: 4\n};\nclass Ra {\n constructor(e) {\n this.hls = void 0, this.playlistError = 0, this.penalizedRenditions = {}, this.log = void 0, this.warn = void 0, this.error = void 0, this.hls = e, this.log = x.log.bind(x, \"[info]:\"), this.warn = x.warn.bind(x, \"[warning]:\"), this.error = x.error.bind(x, \"[error]:\"), this.registerListeners();\n }\n registerListeners() {\n const e = this.hls;\n e.on(m.ERROR, this.onError, this), e.on(m.MANIFEST_LOADING, this.onManifestLoading, this), e.on(m.LEVEL_UPDATED, this.onLevelUpdated, this);\n }\n unregisterListeners() {\n const e = this.hls;\n e && (e.off(m.ERROR, this.onError, this), e.off(m.ERROR, this.onErrorOut, this), e.off(m.MANIFEST_LOADING, this.onManifestLoading, this), e.off(m.LEVEL_UPDATED, this.onLevelUpdated, this));\n }\n destroy() {\n this.unregisterListeners(), this.hls = null, this.penalizedRenditions = {};\n }\n startLoad(e) {\n this.playlistError = 0;\n }\n stopLoad() {\n }\n getVariantLevelIndex(e) {\n return (e == null ? void 0 : e.type) === B.MAIN ? e.level : this.hls.loadLevel;\n }\n onManifestLoading() {\n this.playlistError = 0, this.penalizedRenditions = {};\n }\n onLevelUpdated() {\n this.playlistError = 0;\n }\n onError(e, t) {\n var s, i;\n if (t.fatal)\n return;\n const r = this.hls, n = t.context;\n switch (t.details) {\n case L.FRAG_LOAD_ERROR:\n case L.FRAG_LOAD_TIMEOUT:\n case L.KEY_LOAD_ERROR:\n case L.KEY_LOAD_TIMEOUT:\n t.errorAction = this.getFragRetryOrSwitchAction(t);\n return;\n case L.FRAG_PARSING_ERROR:\n if ((s = t.frag) != null && s.gap) {\n t.errorAction = {\n action: ge.DoNothing,\n flags: Re.None\n };\n return;\n }\n case L.FRAG_GAP:\n case L.FRAG_DECRYPT_ERROR: {\n t.errorAction = this.getFragRetryOrSwitchAction(t), t.errorAction.action = ge.SendAlternateToPenaltyBox;\n return;\n }\n case L.LEVEL_EMPTY_ERROR:\n case L.LEVEL_PARSING_ERROR:\n {\n var o, l;\n const h = t.parent === B.MAIN ? t.level : r.loadLevel;\n t.details === L.LEVEL_EMPTY_ERROR && ((o = t.context) != null && (l = o.levelDetails) != null && l.live) ? t.errorAction = this.getPlaylistRetryOrSwitchAction(t, h) : (t.levelRetry = !1, t.errorAction = this.getLevelSwitchAction(t, h));\n }\n return;\n case L.LEVEL_LOAD_ERROR:\n case L.LEVEL_LOAD_TIMEOUT:\n typeof (n == null ? void 0 : n.level) == \"number\" && (t.errorAction = this.getPlaylistRetryOrSwitchAction(t, n.level));\n return;\n case L.AUDIO_TRACK_LOAD_ERROR:\n case L.AUDIO_TRACK_LOAD_TIMEOUT:\n case L.SUBTITLE_LOAD_ERROR:\n case L.SUBTITLE_TRACK_LOAD_TIMEOUT:\n if (n) {\n const h = r.levels[r.loadLevel];\n if (h && (n.type === K.AUDIO_TRACK && n.groupId === h.audioGroupId || n.type === K.SUBTITLE_TRACK && n.groupId === h.textGroupId)) {\n t.errorAction = this.getPlaylistRetryOrSwitchAction(t, r.loadLevel), t.errorAction.action = ge.SendAlternateToPenaltyBox, t.errorAction.flags = Re.MoveAllAlternatesMatchingHost;\n return;\n }\n }\n return;\n case L.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:\n {\n const h = r.levels[r.loadLevel], c = h == null ? void 0 : h.attrs[\"HDCP-LEVEL\"];\n c && (t.errorAction = {\n action: ge.SendAlternateToPenaltyBox,\n flags: Re.MoveAllAlternatesMatchingHDCP,\n hdcpLevel: c\n });\n }\n return;\n case L.BUFFER_ADD_CODEC_ERROR:\n case L.REMUX_ALLOC_ERROR:\n t.errorAction = this.getLevelSwitchAction(t, (i = t.level) != null ? i : r.loadLevel);\n return;\n case L.INTERNAL_EXCEPTION:\n case L.BUFFER_APPENDING_ERROR:\n case L.BUFFER_APPEND_ERROR:\n case L.BUFFER_FULL_ERROR:\n case L.LEVEL_SWITCH_ERROR:\n case L.BUFFER_STALLED_ERROR:\n case L.BUFFER_SEEK_OVER_HOLE:\n case L.BUFFER_NUDGE_ON_STALL:\n t.errorAction = {\n action: ge.DoNothing,\n flags: Re.None\n };\n return;\n }\n if (t.type === U.KEY_SYSTEM_ERROR) {\n const h = this.getVariantLevelIndex(t.frag);\n t.levelRetry = !1, t.errorAction = this.getLevelSwitchAction(t, h);\n return;\n }\n }\n getPlaylistRetryOrSwitchAction(e, t) {\n var s;\n const i = this.hls, r = yi(i.config.playlistLoadPolicy, e), n = this.playlistError++, o = (s = e.response) == null ? void 0 : s.code;\n if (Ft(r, n, Ot(e), o))\n return {\n action: ge.RetryRequest,\n flags: Re.None,\n retryConfig: r,\n retryCount: n\n };\n const h = this.getLevelSwitchAction(e, t);\n return r && (h.retryConfig = r, h.retryCount = n), h;\n }\n getFragRetryOrSwitchAction(e) {\n const t = this.hls, s = this.getVariantLevelIndex(e.frag), i = t.levels[s], {\n fragLoadPolicy: r,\n keyLoadPolicy: n\n } = t.config, o = yi(e.details.startsWith(\"key\") ? n : r, e), l = t.levels.reduce((d, u) => d + u.fragmentError, 0);\n if (i) {\n var h;\n e.details !== L.FRAG_GAP && i.fragmentError++;\n const d = (h = e.response) == null ? void 0 : h.code;\n if (Ft(o, l, Ot(e), d))\n return {\n action: ge.RetryRequest,\n flags: Re.None,\n retryConfig: o,\n retryCount: l\n };\n }\n const c = this.getLevelSwitchAction(e, s);\n return o && (c.retryConfig = o, c.retryCount = l), c;\n }\n getLevelSwitchAction(e, t) {\n const s = this.hls;\n t == null && (t = s.loadLevel);\n const i = this.hls.levels[t];\n if (i && (i.loadError++, s.autoLevelEnabled)) {\n var r, n;\n let o = -1;\n const {\n levels: l,\n loadLevel: h,\n minAutoLevel: c,\n maxAutoLevel: d\n } = s, u = (r = e.frag) == null ? void 0 : r.type, {\n type: f,\n groupId: g\n } = (n = e.context) != null ? n : {};\n for (let p = l.length; p--; ) {\n const y = (p + h) % l.length;\n if (y !== h && y >= c && y <= d && l[y].loadError === 0) {\n const v = l[y];\n if (e.details === L.FRAG_GAP && e.frag) {\n const E = l[y].details;\n if (E) {\n const T = pt(e.frag, E.fragments, e.frag.start);\n if (T != null && T.gap)\n continue;\n }\n } else {\n if (f === K.AUDIO_TRACK && g === v.audioGroupId || f === K.SUBTITLE_TRACK && g === v.textGroupId)\n continue;\n if (u === B.AUDIO && i.audioGroupId === v.audioGroupId || u === B.SUBTITLE && i.textGroupId === v.textGroupId)\n continue;\n }\n o = y;\n break;\n }\n }\n if (o > -1 && s.loadLevel !== o)\n return e.levelRetry = !0, this.playlistError = 0, {\n action: ge.SendAlternateToPenaltyBox,\n flags: Re.None,\n nextAutoLevel: o\n };\n }\n return {\n action: ge.SendAlternateToPenaltyBox,\n flags: Re.MoveAllAlternatesMatchingHost\n };\n }\n onErrorOut(e, t) {\n var s;\n switch ((s = t.errorAction) == null ? void 0 : s.action) {\n case ge.DoNothing:\n break;\n case ge.SendAlternateToPenaltyBox:\n this.sendAlternateToPenaltyBox(t), !t.errorAction.resolved && t.details !== L.FRAG_GAP && (t.fatal = !0);\n break;\n }\n if (t.fatal) {\n this.hls.stopLoad();\n return;\n }\n }\n sendAlternateToPenaltyBox(e) {\n const t = this.hls, s = e.errorAction;\n if (!s)\n return;\n const {\n flags: i,\n hdcpLevel: r,\n nextAutoLevel: n\n } = s;\n switch (i) {\n case Re.None:\n this.switchLevel(e, n);\n break;\n case Re.MoveAllAlternatesMatchingHost:\n s.resolved || (s.resolved = this.redundantFailover(e));\n break;\n case Re.MoveAllAlternatesMatchingHDCP:\n r && (t.maxHdcpLevel = Ts[Ts.indexOf(r) - 1], s.resolved = !0), this.warn(`Restricting playback to HDCP-LEVEL of \"${t.maxHdcpLevel}\" or lower`);\n break;\n }\n s.resolved || this.switchLevel(e, n);\n }\n switchLevel(e, t) {\n t !== void 0 && e.errorAction && (this.warn(`switching to level ${t} after ${e.details}`), this.hls.nextAutoLevel = t, e.errorAction.resolved = !0, this.hls.nextLoadLevel = this.hls.nextAutoLevel);\n }\n redundantFailover(e) {\n const {\n hls: t,\n penalizedRenditions: s\n } = this, i = e.parent === B.MAIN ? e.level : t.loadLevel, r = t.levels[i], n = r.url.length, o = e.frag ? e.frag.urlId : r.urlId;\n r.urlId === o && (!e.frag || r.details) && this.penalizeRendition(r, e);\n for (let l = 1; l < n; l++) {\n const h = (o + l) % n, c = s[h];\n if (!c || Ia(c, e, s[o]))\n return this.warn(`Switching to Redundant Stream ${h + 1}/${n}: \"${r.url[h]}\" after ${e.details}`), this.playlistError = 0, t.levels.forEach((d) => {\n d.urlId = h;\n }), t.nextLoadLevel = i, !0;\n }\n return !1;\n }\n penalizeRendition(e, t) {\n const {\n penalizedRenditions: s\n } = this, i = s[e.urlId] || {\n lastErrorPerfMs: 0,\n errors: [],\n details: void 0\n };\n i.lastErrorPerfMs = performance.now(), i.errors.push(t), i.details = e.details, s[e.urlId] = i;\n }\n}\nfunction Ia(a, e, t) {\n if (performance.now() - a.lastErrorPerfMs > Aa)\n return !0;\n const s = a.details;\n if (e.details === L.FRAG_GAP && s && e.frag) {\n const i = e.frag.start, r = pt(null, s.fragments, i);\n if (r && !r.gap)\n return !0;\n }\n if (t && a.errors.length < t.errors.length) {\n const i = a.errors[a.errors.length - 1];\n if (s && i.frag && e.frag && Math.abs(i.frag.start - e.frag.start) > s.targetduration * 3)\n return !0;\n }\n return !1;\n}\nclass Ps {\n constructor(e, t) {\n this.hls = void 0, this.timer = -1, this.requestScheduled = -1, this.canLoad = !1, this.log = void 0, this.warn = void 0, this.log = x.log.bind(x, `${t}:`), this.warn = x.warn.bind(x, `${t}:`), this.hls = e;\n }\n destroy() {\n this.clearTimer(), this.hls = this.log = this.warn = null;\n }\n clearTimer() {\n clearTimeout(this.timer), this.timer = -1;\n }\n startLoad() {\n this.canLoad = !0, this.requestScheduled = -1, this.loadPlaylist();\n }\n stopLoad() {\n this.canLoad = !1, this.clearTimer();\n }\n switchParams(e, t) {\n const s = t == null ? void 0 : t.renditionReports;\n if (s) {\n let i = -1;\n for (let r = 0; r < s.length; r++) {\n const n = s[r];\n let o;\n try {\n o = new self.URL(n.URI, t.url).href;\n } catch (l) {\n x.warn(`Could not construct new URL for Rendition Report: ${l}`), o = n.URI || \"\";\n }\n if (o === e) {\n i = r;\n break;\n } else\n o === e.substring(0, o.length) && (i = r);\n }\n if (i !== -1) {\n const r = s[i], n = parseInt(r[\"LAST-MSN\"]) || (t == null ? void 0 : t.lastPartSn);\n let o = parseInt(r[\"LAST-PART\"]) || (t == null ? void 0 : t.lastPartIndex);\n if (this.hls.config.lowLatencyMode) {\n const l = Math.min(t.age - t.partTarget, t.targetduration);\n o >= 0 && l > t.partTarget && (o += 1);\n }\n return new mi(n, o >= 0 ? o : void 0, ft.No);\n }\n }\n }\n loadPlaylist(e) {\n this.requestScheduled === -1 && (this.requestScheduled = self.performance.now());\n }\n shouldLoadPlaylist(e) {\n return this.canLoad && !!e && !!e.url && (!e.details || e.details.live);\n }\n shouldReloadPlaylist(e) {\n return this.timer === -1 && this.requestScheduled === -1 && this.shouldLoadPlaylist(e);\n }\n playlistLoaded(e, t, s) {\n const {\n details: i,\n stats: r\n } = t, n = self.performance.now(), o = r.loading.first ? Math.max(0, n - r.loading.first) : 0;\n if (i.advancedDateTime = Date.now() - o, i.live || s != null && s.live) {\n if (i.reloaded(s), s && this.log(`live playlist ${e} ${i.advanced ? \"REFRESHED \" + i.lastPartSn + \"-\" + i.lastPartIndex : i.updated ? \"UPDATED\" : \"MISSED\"}`), s && i.fragments.length > 0 && ma(s, i), !this.canLoad || !i.live)\n return;\n let l, h, c;\n if (i.canBlockReload && i.endSN && i.advanced) {\n const y = this.hls.config.lowLatencyMode, v = i.lastPartSn, E = i.endSN, T = i.lastPartIndex, A = T !== -1, b = v === E, D = y ? 0 : T;\n A ? (h = b ? E + 1 : v, c = b ? D : T + 1) : h = E + 1;\n const I = i.age, C = I + i.ageHeader;\n let _ = Math.min(C - i.partTarget, i.targetduration * 1.5);\n if (_ > 0) {\n if (s && _ > s.tuneInGoal)\n this.warn(`CDN Tune-in goal increased from: ${s.tuneInGoal} to: ${_} with playlist age: ${i.age}`), _ = 0;\n else {\n const R = Math.floor(_ / i.targetduration);\n if (h += R, c !== void 0) {\n const F = Math.round(_ % i.targetduration / i.partTarget);\n c += F;\n }\n this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${I.toFixed(2)}s goal: ${_} skip sn ${R} to part ${c}`);\n }\n i.tuneInGoal = _;\n }\n if (l = this.getDeliveryDirectives(i, t.deliveryDirectives, h, c), y || !b) {\n this.loadPlaylist(l);\n return;\n }\n } else\n (i.canBlockReload || i.canSkipUntil) && (l = this.getDeliveryDirectives(i, t.deliveryDirectives, h, c));\n const d = this.hls.mainForwardBufferInfo, u = d ? d.end - d.len : 0, f = (i.edge - u) * 1e3, g = Ta(i, f);\n i.updated && n > this.requestScheduled + g && (this.requestScheduled = r.loading.start), h !== void 0 && i.canBlockReload ? this.requestScheduled = r.loading.first + g - (i.partTarget * 1e3 || 1e3) : this.requestScheduled === -1 || this.requestScheduled + g < n ? this.requestScheduled = n : this.requestScheduled - n <= 0 && (this.requestScheduled += g);\n let p = this.requestScheduled - n;\n p = Math.max(0, p), this.log(`reload live playlist ${e} in ${Math.round(p)} ms`), this.timer = self.setTimeout(() => this.loadPlaylist(l), p);\n } else\n this.clearTimer();\n }\n getDeliveryDirectives(e, t, s, i) {\n let r = ga(e, s);\n return t != null && t.skip && e.deltaUpdateFailed && (s = t.msn, i = t.part, r = ft.No), new mi(s, i, r);\n }\n checkRetry(e) {\n const t = e.details, s = Ot(e), i = e.errorAction, {\n action: r,\n retryCount: n = 0,\n retryConfig: o\n } = i || {}, l = !!i && !!o && (r === ge.RetryRequest || !i.resolved && r === ge.SendAlternateToPenaltyBox);\n if (l) {\n var h;\n if (this.requestScheduled = -1, n >= o.maxNumRetry)\n return !1;\n if (s && (h = e.context) != null && h.deliveryDirectives)\n this.warn(`Retrying playlist loading ${n + 1}/${o.maxNumRetry} after \"${t}\" without delivery-directives`), this.loadPlaylist();\n else {\n const c = ks(o, n);\n this.timer = self.setTimeout(() => this.loadPlaylist(), c), this.warn(`Retrying playlist loading ${n + 1}/${o.maxNumRetry} after \"${t}\" in ${c}ms`);\n }\n e.levelRetry = !0, i.resolved = !0;\n }\n return l;\n }\n}\nlet es;\nclass wa extends Ps {\n constructor(e, t) {\n super(e, \"[level-controller]\"), this._levels = [], this._firstLevel = -1, this._startLevel = void 0, this.currentLevel = null, this.currentLevelIndex = -1, this.manualLevelIndex = -1, this.steering = void 0, this.onParsedComplete = void 0, this.steering = t, this._registerListeners();\n }\n _registerListeners() {\n const {\n hls: e\n } = this;\n e.on(m.MANIFEST_LOADING, this.onManifestLoading, this), e.on(m.MANIFEST_LOADED, this.onManifestLoaded, this), e.on(m.LEVEL_LOADED, this.onLevelLoaded, this), e.on(m.LEVELS_UPDATED, this.onLevelsUpdated, this), e.on(m.AUDIO_TRACK_SWITCHED, this.onAudioTrackSwitched, this), e.on(m.FRAG_LOADED, this.onFragLoaded, this), e.on(m.ERROR, this.onError, this);\n }\n _unregisterListeners() {\n const {\n hls: e\n } = this;\n e.off(m.MANIFEST_LOADING, this.onManifestLoading, this), e.off(m.MANIFEST_LOADED, this.onManifestLoaded, this), e.off(m.LEVEL_LOADED, this.onLevelLoaded, this), e.off(m.LEVELS_UPDATED, this.onLevelsUpdated, this), e.off(m.AUDIO_TRACK_SWITCHED, this.onAudioTrackSwitched, this), e.off(m.FRAG_LOADED, this.onFragLoaded, this), e.off(m.ERROR, this.onError, this);\n }\n destroy() {\n this._unregisterListeners(), this.steering = null, this.resetLevels(), super.destroy();\n }\n startLoad() {\n this._levels.forEach((t) => {\n t.loadError = 0, t.fragmentError = 0;\n }), super.startLoad();\n }\n resetLevels() {\n this._startLevel = void 0, this.manualLevelIndex = -1, this.currentLevelIndex = -1, this.currentLevel = null, this._levels = [];\n }\n onManifestLoading(e, t) {\n this.resetLevels();\n }\n onManifestLoaded(e, t) {\n const s = [], i = {};\n let r;\n t.levels.forEach((n) => {\n var o;\n const l = n.attrs;\n ((o = n.audioCodec) == null ? void 0 : o.indexOf(\"mp4a.40.34\")) !== -1 && (es || (es = /chrome|firefox/i.test(navigator.userAgent)), es && (n.audioCodec = void 0));\n const {\n AUDIO: h,\n CODECS: c,\n \"FRAME-RATE\": d,\n \"PATHWAY-ID\": u,\n RESOLUTION: f,\n SUBTITLES: g\n } = l, y = `${`${u || \".\"}-`}${n.bitrate}-${f}-${d}-${c}`;\n r = i[y], r ? r.addFallback(n) : (r = new mt(n), i[y] = r, s.push(r)), Mt(r, \"audio\", h), Mt(r, \"text\", g);\n }), this.filterAndSortMediaOptions(s, t);\n }\n filterAndSortMediaOptions(e, t) {\n let s = [], i = [], r = !1, n = !1, o = !1, l = e.filter(({\n audioCodec: f,\n videoCodec: g,\n width: p,\n height: y,\n unknownCodecs: v\n }) => (r || (r = !!(p && y)), n || (n = !!g), o || (o = !!f), !(v != null && v.length) && (!f || Xt(f, \"audio\")) && (!g || Xt(g, \"video\"))));\n if ((r || n) && o && (l = l.filter(({\n videoCodec: f,\n width: g,\n height: p\n }) => !!f || !!(g && p))), l.length === 0) {\n Promise.resolve().then(() => {\n if (this.hls) {\n const f = new Error(\"no level with compatible codecs found in manifest\");\n this.hls.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.MANIFEST_INCOMPATIBLE_CODECS_ERROR,\n fatal: !0,\n url: t.url,\n error: f,\n reason: f.message\n });\n }\n });\n return;\n }\n t.audioTracks && (s = t.audioTracks.filter((f) => !f.audioCodec || Xt(f.audioCodec, \"audio\")), Ti(s)), t.subtitles && (i = t.subtitles, Ti(i));\n const h = l.slice(0);\n l.sort((f, g) => f.attrs[\"HDCP-LEVEL\"] !== g.attrs[\"HDCP-LEVEL\"] ? (f.attrs[\"HDCP-LEVEL\"] || \"\") > (g.attrs[\"HDCP-LEVEL\"] || \"\") ? 1 : -1 : f.bitrate !== g.bitrate ? f.bitrate - g.bitrate : f.attrs[\"FRAME-RATE\"] !== g.attrs[\"FRAME-RATE\"] ? f.attrs.decimalFloatingPoint(\"FRAME-RATE\") - g.attrs.decimalFloatingPoint(\"FRAME-RATE\") : f.attrs.SCORE !== g.attrs.SCORE ? f.attrs.decimalFloatingPoint(\"SCORE\") - g.attrs.decimalFloatingPoint(\"SCORE\") : r && f.height !== g.height ? f.height - g.height : 0);\n let c = h[0];\n if (this.steering && (l = this.steering.filterParsedLevels(l), l.length !== h.length)) {\n for (let f = 0; f < h.length; f++)\n if (h[f].pathwayId === l[0].pathwayId) {\n c = h[f];\n break;\n }\n }\n this._levels = l;\n for (let f = 0; f < l.length; f++)\n if (l[f] === c) {\n this._firstLevel = f, this.log(`manifest loaded, ${l.length} level(s) found, first bitrate: ${c.bitrate}`);\n break;\n }\n const d = o && !n, u = {\n levels: l,\n audioTracks: s,\n subtitleTracks: i,\n sessionData: t.sessionData,\n sessionKeys: t.sessionKeys,\n firstLevel: this._firstLevel,\n stats: t.stats,\n audio: o,\n video: n,\n altAudio: !d && s.some((f) => !!f.url)\n };\n this.hls.trigger(m.MANIFEST_PARSED, u), (this.hls.config.autoStartLoad || this.hls.forceStartLoad) && this.hls.startLoad(this.hls.config.startPosition);\n }\n get levels() {\n return this._levels.length === 0 ? null : this._levels;\n }\n get level() {\n return this.currentLevelIndex;\n }\n set level(e) {\n const t = this._levels;\n if (t.length === 0)\n return;\n if (e < 0 || e >= t.length) {\n const c = new Error(\"invalid level idx\"), d = e < 0;\n if (this.hls.trigger(m.ERROR, {\n type: U.OTHER_ERROR,\n details: L.LEVEL_SWITCH_ERROR,\n level: e,\n fatal: d,\n error: c,\n reason: c.message\n }), d)\n return;\n e = Math.min(e, t.length - 1);\n }\n const s = this.currentLevelIndex, i = this.currentLevel, r = i ? i.attrs[\"PATHWAY-ID\"] : void 0, n = t[e], o = n.attrs[\"PATHWAY-ID\"];\n if (this.currentLevelIndex = e, this.currentLevel = n, s === e && n.details && i && r === o)\n return;\n this.log(`Switching to level ${e}${o ? \" with Pathway \" + o : \"\"} from level ${s}${r ? \" with Pathway \" + r : \"\"}`);\n const l = ne({}, n, {\n level: e,\n maxBitrate: n.maxBitrate,\n attrs: n.attrs,\n uri: n.uri,\n urlId: n.urlId\n });\n delete l._attrs, delete l._urlId, this.hls.trigger(m.LEVEL_SWITCHING, l);\n const h = n.details;\n if (!h || h.live) {\n const c = this.switchParams(n.uri, i == null ? void 0 : i.details);\n this.loadPlaylist(c);\n }\n }\n get manualLevel() {\n return this.manualLevelIndex;\n }\n set manualLevel(e) {\n this.manualLevelIndex = e, this._startLevel === void 0 && (this._startLevel = e), e !== -1 && (this.level = e);\n }\n get firstLevel() {\n return this._firstLevel;\n }\n set firstLevel(e) {\n this._firstLevel = e;\n }\n get startLevel() {\n if (this._startLevel === void 0) {\n const e = this.hls.config.startLevel;\n return e !== void 0 ? e : this._firstLevel;\n } else\n return this._startLevel;\n }\n set startLevel(e) {\n this._startLevel = e;\n }\n onError(e, t) {\n t.fatal || !t.context || t.context.type === K.LEVEL && t.context.level === this.level && this.checkRetry(t);\n }\n // reset errors on the successful load of a fragment\n onFragLoaded(e, {\n frag: t\n }) {\n if (t !== void 0 && t.type === B.MAIN) {\n const s = this._levels[t.level];\n s !== void 0 && (s.loadError = 0);\n }\n }\n onLevelLoaded(e, t) {\n var s;\n const {\n level: i,\n details: r\n } = t, n = this._levels[i];\n if (!n) {\n var o;\n this.warn(`Invalid level index ${i}`), (o = t.deliveryDirectives) != null && o.skip && (r.deltaUpdateFailed = !0);\n return;\n }\n i === this.currentLevelIndex ? (n.fragmentError === 0 && (n.loadError = 0), this.playlistLoaded(i, t, n.details)) : (s = t.deliveryDirectives) != null && s.skip && (r.deltaUpdateFailed = !0);\n }\n onAudioTrackSwitched(e, t) {\n const s = this.currentLevel;\n if (!s)\n return;\n const i = this.hls.audioTracks[t.id].groupId;\n if (s.audioGroupIds && s.audioGroupId !== i) {\n let r = -1;\n for (let n = 0; n < s.audioGroupIds.length; n++)\n if (s.audioGroupIds[n] === i) {\n r = n;\n break;\n }\n r !== -1 && r !== s.urlId && (s.urlId = r, this.canLoad && this.startLoad());\n }\n }\n loadPlaylist(e) {\n super.loadPlaylist();\n const t = this.currentLevelIndex, s = this.currentLevel;\n if (s && this.shouldLoadPlaylist(s)) {\n const i = s.urlId;\n let r = s.uri;\n if (e)\n try {\n r = e.addDirectives(r);\n } catch (o) {\n this.warn(`Could not construct new URL with HLS Delivery Directives: ${o}`);\n }\n const n = s.attrs[\"PATHWAY-ID\"];\n this.log(`Loading level index ${t}${(e == null ? void 0 : e.msn) !== void 0 ? \" at sn \" + e.msn + \" part \" + e.part : \"\"} with${n ? \" Pathway \" + n : \"\"} URI ${i + 1}/${s.url.length} ${r}`), this.clearTimer(), this.hls.trigger(m.LEVEL_LOADING, {\n url: r,\n level: t,\n id: i,\n deliveryDirectives: e || null\n });\n }\n }\n get nextLoadLevel() {\n return this.manualLevelIndex !== -1 ? this.manualLevelIndex : this.hls.nextAutoLevel;\n }\n set nextLoadLevel(e) {\n this.level = e, this.manualLevelIndex === -1 && (this.hls.nextAutoLevel = e);\n }\n removeLevel(e, t) {\n const s = (r, n) => n !== t, i = this._levels.filter((r, n) => n !== e ? !0 : r.url.length > 1 && t !== void 0 ? (r.url = r.url.filter(s), r.audioGroupIds && (r.audioGroupIds = r.audioGroupIds.filter(s)), r.textGroupIds && (r.textGroupIds = r.textGroupIds.filter(s)), r.urlId = 0, !0) : (this.steering && this.steering.removeLevel(r), !1));\n this.hls.trigger(m.LEVELS_UPDATED, {\n levels: i\n });\n }\n onLevelsUpdated(e, {\n levels: t\n }) {\n t.forEach((s, i) => {\n const {\n details: r\n } = s;\n r != null && r.fragments && r.fragments.forEach((n) => {\n n.level = i;\n });\n }), this._levels = t;\n }\n}\nfunction Mt(a, e, t) {\n t && (e === \"audio\" ? (a.audioGroupIds || (a.audioGroupIds = []), a.audioGroupIds[a.url.length - 1] = t) : e === \"text\" && (a.textGroupIds || (a.textGroupIds = []), a.textGroupIds[a.url.length - 1] = t));\n}\nfunction Ti(a) {\n const e = {};\n a.forEach((t) => {\n const s = t.groupId || \"\";\n t.id = e[s] = e[s] || 0, e[s]++;\n });\n}\nvar le = {\n NOT_LOADED: \"NOT_LOADED\",\n APPENDING: \"APPENDING\",\n PARTIAL: \"PARTIAL\",\n OK: \"OK\"\n};\nclass Ca {\n constructor(e) {\n this.activePartLists = /* @__PURE__ */ Object.create(null), this.endListFragments = /* @__PURE__ */ Object.create(null), this.fragments = /* @__PURE__ */ Object.create(null), this.timeRanges = /* @__PURE__ */ Object.create(null), this.bufferPadding = 0.2, this.hls = void 0, this.hasGaps = !1, this.hls = e, this._registerListeners();\n }\n _registerListeners() {\n const {\n hls: e\n } = this;\n e.on(m.BUFFER_APPENDED, this.onBufferAppended, this), e.on(m.FRAG_BUFFERED, this.onFragBuffered, this), e.on(m.FRAG_LOADED, this.onFragLoaded, this);\n }\n _unregisterListeners() {\n const {\n hls: e\n } = this;\n e.off(m.BUFFER_APPENDED, this.onBufferAppended, this), e.off(m.FRAG_BUFFERED, this.onFragBuffered, this), e.off(m.FRAG_LOADED, this.onFragLoaded, this);\n }\n destroy() {\n this._unregisterListeners(), this.fragments = // @ts-ignore\n this.activePartLists = // @ts-ignore\n this.endListFragments = this.timeRanges = null;\n }\n /**\n * Return a Fragment or Part with an appended range that matches the position and levelType\n * Otherwise, return null\n */\n getAppendedFrag(e, t) {\n const s = this.activePartLists[t];\n if (s)\n for (let i = s.length; i--; ) {\n const r = s[i];\n if (!r)\n break;\n const n = r.end;\n if (r.start <= e && n !== null && e <= n)\n return r;\n }\n return this.getBufferedFrag(e, t);\n }\n /**\n * Return a buffered Fragment that matches the position and levelType.\n * A buffered Fragment is one whose loading, parsing and appending is done (completed or \"partial\" meaning aborted).\n * If not found any Fragment, return null\n */\n getBufferedFrag(e, t) {\n const {\n fragments: s\n } = this, i = Object.keys(s);\n for (let r = i.length; r--; ) {\n const n = s[i[r]];\n if ((n == null ? void 0 : n.body.type) === t && n.buffered) {\n const o = n.body;\n if (o.start <= e && e <= o.end)\n return o;\n }\n }\n return null;\n }\n /**\n * Partial fragments effected by coded frame eviction will be removed\n * The browser will unload parts of the buffer to free up memory for new buffer data\n * Fragments will need to be reloaded when the buffer is freed up, removing partial fragments will allow them to reload(since there might be parts that are still playable)\n */\n detectEvictedFragments(e, t, s, i) {\n this.timeRanges && (this.timeRanges[e] = t);\n const r = (i == null ? void 0 : i.fragment.sn) || -1;\n Object.keys(this.fragments).forEach((n) => {\n const o = this.fragments[n];\n if (!o || r >= o.body.sn)\n return;\n if (!o.buffered && !o.loaded) {\n o.body.type === s && this.removeFragment(o.body);\n return;\n }\n const l = o.range[e];\n l && l.time.some((h) => {\n const c = !this.isTimeBuffered(h.startPTS, h.endPTS, t);\n return c && this.removeFragment(o.body), c;\n });\n });\n }\n /**\n * Checks if the fragment passed in is loaded in the buffer properly\n * Partially loaded fragments will be registered as a partial fragment\n */\n detectPartialFragments(e) {\n const t = this.timeRanges, {\n frag: s,\n part: i\n } = e;\n if (!t || s.sn === \"initSegment\")\n return;\n const r = et(s), n = this.fragments[r];\n if (!n || n.buffered && s.gap)\n return;\n const o = !s.relurl;\n Object.keys(t).forEach((l) => {\n const h = s.elementaryStreams[l];\n if (!h)\n return;\n const c = t[l], d = o || h.partial === !0;\n n.range[l] = this.getBufferedTimes(s, i, d, c);\n }), n.loaded = null, Object.keys(n.range).length ? (n.buffered = !0, (n.body.endList = s.endList || n.body.endList) && (this.endListFragments[n.body.type] = n), bt(n) || this.removeParts(s.sn - 1, s.type)) : this.removeFragment(n.body);\n }\n removeParts(e, t) {\n const s = this.activePartLists[t];\n s && (this.activePartLists[t] = s.filter((i) => i.fragment.sn >= e));\n }\n fragBuffered(e, t) {\n const s = et(e);\n let i = this.fragments[s];\n !i && t && (i = this.fragments[s] = {\n body: e,\n appendedPTS: null,\n loaded: null,\n buffered: !1,\n range: /* @__PURE__ */ Object.create(null)\n }, e.gap && (this.hasGaps = !0)), i && (i.loaded = null, i.buffered = !0);\n }\n getBufferedTimes(e, t, s, i) {\n const r = {\n time: [],\n partial: s\n }, n = e.start, o = e.end, l = e.minEndPTS || o, h = e.maxStartPTS || n;\n for (let c = 0; c < i.length; c++) {\n const d = i.start(c) - this.bufferPadding, u = i.end(c) + this.bufferPadding;\n if (h >= d && l <= u) {\n r.time.push({\n startPTS: Math.max(n, i.start(c)),\n endPTS: Math.min(o, i.end(c))\n });\n break;\n } else if (n < u && o > d)\n r.partial = !0, r.time.push({\n startPTS: Math.max(n, i.start(c)),\n endPTS: Math.min(o, i.end(c))\n });\n else if (o <= d)\n break;\n }\n return r;\n }\n /**\n * Gets the partial fragment for a certain time\n */\n getPartialFragment(e) {\n let t = null, s, i, r, n = 0;\n const {\n bufferPadding: o,\n fragments: l\n } = this;\n return Object.keys(l).forEach((h) => {\n const c = l[h];\n c && bt(c) && (i = c.body.start - o, r = c.body.end + o, e >= i && e <= r && (s = Math.min(e - i, r - e), n <= s && (t = c.body, n = s)));\n }), t;\n }\n isEndListAppended(e) {\n const t = this.endListFragments[e];\n return t !== void 0 && (t.buffered || bt(t));\n }\n getState(e) {\n const t = et(e), s = this.fragments[t];\n return s ? s.buffered ? bt(s) ? le.PARTIAL : le.OK : le.APPENDING : le.NOT_LOADED;\n }\n isTimeBuffered(e, t, s) {\n let i, r;\n for (let n = 0; n < s.length; n++) {\n if (i = s.start(n) - this.bufferPadding, r = s.end(n) + this.bufferPadding, e >= i && t <= r)\n return !0;\n if (t <= i)\n return !1;\n }\n return !1;\n }\n onFragLoaded(e, t) {\n const {\n frag: s,\n part: i\n } = t;\n if (s.sn === \"initSegment\" || s.bitrateTest)\n return;\n const r = i ? null : t, n = et(s);\n this.fragments[n] = {\n body: s,\n appendedPTS: null,\n loaded: r,\n buffered: !1,\n range: /* @__PURE__ */ Object.create(null)\n };\n }\n onBufferAppended(e, t) {\n const {\n frag: s,\n part: i,\n timeRanges: r\n } = t;\n if (s.sn === \"initSegment\")\n return;\n const n = s.type;\n if (i) {\n let o = this.activePartLists[n];\n o || (this.activePartLists[n] = o = []), o.push(i);\n }\n this.timeRanges = r, Object.keys(r).forEach((o) => {\n const l = r[o];\n this.detectEvictedFragments(o, l, n, i);\n });\n }\n onFragBuffered(e, t) {\n this.detectPartialFragments(t);\n }\n hasFragment(e) {\n const t = et(e);\n return !!this.fragments[t];\n }\n hasParts(e) {\n var t;\n return !!((t = this.activePartLists[e]) != null && t.length);\n }\n removeFragmentsInRange(e, t, s, i, r) {\n i && !this.hasGaps || Object.keys(this.fragments).forEach((n) => {\n const o = this.fragments[n];\n if (!o)\n return;\n const l = o.body;\n l.type !== s || i && !l.gap || l.start < t && l.end > e && (o.buffered || r) && this.removeFragment(l);\n });\n }\n removeFragment(e) {\n const t = et(e);\n e.stats.loaded = 0, e.clearElementaryStreamInfo();\n const s = this.activePartLists[e.type];\n if (s) {\n const i = e.sn;\n this.activePartLists[e.type] = s.filter((r) => r.fragment.sn !== i);\n }\n delete this.fragments[t], e.endList && delete this.endListFragments[e.type];\n }\n removeAllFragments() {\n this.fragments = /* @__PURE__ */ Object.create(null), this.endListFragments = /* @__PURE__ */ Object.create(null), this.activePartLists = /* @__PURE__ */ Object.create(null), this.hasGaps = !1;\n }\n}\nfunction bt(a) {\n var e, t, s;\n return a.buffered && (a.body.gap || ((e = a.range.video) == null ? void 0 : e.partial) || ((t = a.range.audio) == null ? void 0 : t.partial) || ((s = a.range.audiovideo) == null ? void 0 : s.partial));\n}\nfunction et(a) {\n return `${a.type}_${a.level}_${a.urlId}_${a.sn}`;\n}\nconst xi = Math.pow(2, 17);\nclass Da {\n constructor(e) {\n this.config = void 0, this.loader = null, this.partLoadTimeout = -1, this.config = e;\n }\n destroy() {\n this.loader && (this.loader.destroy(), this.loader = null);\n }\n abort() {\n this.loader && this.loader.abort();\n }\n load(e, t) {\n const s = e.url;\n if (!s)\n return Promise.reject(new Be({\n type: U.NETWORK_ERROR,\n details: L.FRAG_LOAD_ERROR,\n fatal: !1,\n frag: e,\n error: new Error(`Fragment does not have a ${s ? \"part list\" : \"url\"}`),\n networkDetails: null\n }));\n this.abort();\n const i = this.config, r = i.fLoader, n = i.loader;\n return new Promise((o, l) => {\n if (this.loader && this.loader.destroy(), e.gap)\n if (e.tagList.some((f) => f[0] === \"GAP\")) {\n l(Si(e));\n return;\n } else\n e.gap = !1;\n const h = this.loader = e.loader = r ? new r(i) : new n(i), c = Ei(e), d = vi(i.fragLoadPolicy.default), u = {\n loadPolicy: d,\n timeout: d.maxLoadTimeMs,\n maxRetry: 0,\n retryDelay: 0,\n maxRetryDelay: 0,\n highWaterMark: e.sn === \"initSegment\" ? 1 / 0 : xi\n };\n e.stats = h.stats, h.load(c, u, {\n onSuccess: (f, g, p, y) => {\n this.resetLoader(e, h);\n let v = f.data;\n p.resetIV && e.decryptdata && (e.decryptdata.iv = new Uint8Array(v.slice(0, 16)), v = v.slice(16)), o({\n frag: e,\n part: null,\n payload: v,\n networkDetails: y\n });\n },\n onError: (f, g, p, y) => {\n this.resetLoader(e, h), l(new Be({\n type: U.NETWORK_ERROR,\n details: L.FRAG_LOAD_ERROR,\n fatal: !1,\n frag: e,\n response: xe({\n url: s,\n data: void 0\n }, f),\n error: new Error(`HTTP Error ${f.code} ${f.text}`),\n networkDetails: p,\n stats: y\n }));\n },\n onAbort: (f, g, p) => {\n this.resetLoader(e, h), l(new Be({\n type: U.NETWORK_ERROR,\n details: L.INTERNAL_ABORTED,\n fatal: !1,\n frag: e,\n error: new Error(\"Aborted\"),\n networkDetails: p,\n stats: f\n }));\n },\n onTimeout: (f, g, p) => {\n this.resetLoader(e, h), l(new Be({\n type: U.NETWORK_ERROR,\n details: L.FRAG_LOAD_TIMEOUT,\n fatal: !1,\n frag: e,\n error: new Error(`Timeout after ${u.timeout}ms`),\n networkDetails: p,\n stats: f\n }));\n },\n onProgress: (f, g, p, y) => {\n t && t({\n frag: e,\n part: null,\n payload: p,\n networkDetails: y\n });\n }\n });\n });\n }\n loadPart(e, t, s) {\n this.abort();\n const i = this.config, r = i.fLoader, n = i.loader;\n return new Promise((o, l) => {\n if (this.loader && this.loader.destroy(), e.gap || t.gap) {\n l(Si(e, t));\n return;\n }\n const h = this.loader = e.loader = r ? new r(i) : new n(i), c = Ei(e, t), d = vi(i.fragLoadPolicy.default), u = {\n loadPolicy: d,\n timeout: d.maxLoadTimeMs,\n maxRetry: 0,\n retryDelay: 0,\n maxRetryDelay: 0,\n highWaterMark: xi\n };\n t.stats = h.stats, h.load(c, u, {\n onSuccess: (f, g, p, y) => {\n this.resetLoader(e, h), this.updateStatsFromPart(e, t);\n const v = {\n frag: e,\n part: t,\n payload: f.data,\n networkDetails: y\n };\n s(v), o(v);\n },\n onError: (f, g, p, y) => {\n this.resetLoader(e, h), l(new Be({\n type: U.NETWORK_ERROR,\n details: L.FRAG_LOAD_ERROR,\n fatal: !1,\n frag: e,\n part: t,\n response: xe({\n url: c.url,\n data: void 0\n }, f),\n error: new Error(`HTTP Error ${f.code} ${f.text}`),\n networkDetails: p,\n stats: y\n }));\n },\n onAbort: (f, g, p) => {\n e.stats.aborted = t.stats.aborted, this.resetLoader(e, h), l(new Be({\n type: U.NETWORK_ERROR,\n details: L.INTERNAL_ABORTED,\n fatal: !1,\n frag: e,\n part: t,\n error: new Error(\"Aborted\"),\n networkDetails: p,\n stats: f\n }));\n },\n onTimeout: (f, g, p) => {\n this.resetLoader(e, h), l(new Be({\n type: U.NETWORK_ERROR,\n details: L.FRAG_LOAD_TIMEOUT,\n fatal: !1,\n frag: e,\n part: t,\n error: new Error(`Timeout after ${u.timeout}ms`),\n networkDetails: p,\n stats: f\n }));\n }\n });\n });\n }\n updateStatsFromPart(e, t) {\n const s = e.stats, i = t.stats, r = i.total;\n if (s.loaded += i.loaded, r) {\n const l = Math.round(e.duration / t.duration), h = Math.min(Math.round(s.loaded / r), l), d = (l - h) * Math.round(s.loaded / h);\n s.total = s.loaded + d;\n } else\n s.total = Math.max(s.loaded, s.total);\n const n = s.loading, o = i.loading;\n n.start ? n.first += o.first - o.start : (n.start = o.start, n.first = o.first), n.end = o.end;\n }\n resetLoader(e, t) {\n e.loader = null, this.loader === t && (self.clearTimeout(this.partLoadTimeout), this.loader = null), t.destroy();\n }\n}\nfunction Ei(a, e = null) {\n const t = e || a, s = {\n frag: a,\n part: e,\n responseType: \"arraybuffer\",\n url: t.url,\n headers: {},\n rangeStart: 0,\n rangeEnd: 0\n }, i = t.byteRangeStartOffset, r = t.byteRangeEndOffset;\n if (M(i) && M(r)) {\n var n;\n let o = i, l = r;\n if (a.sn === \"initSegment\" && ((n = a.decryptdata) == null ? void 0 : n.method) === \"AES-128\") {\n const h = r - i;\n h % 16 && (l = r + (16 - h % 16)), i !== 0 && (s.resetIV = !0, o = i - 16);\n }\n s.rangeStart = o, s.rangeEnd = l;\n }\n return s;\n}\nfunction Si(a, e) {\n const t = new Error(`GAP ${a.gap ? \"tag\" : \"attribute\"} found`), s = {\n type: U.MEDIA_ERROR,\n details: L.FRAG_GAP,\n fatal: !1,\n frag: a,\n error: t,\n networkDetails: null\n };\n return e && (s.part = e), (e || a).stats.aborted = !0, new Be(s);\n}\nclass Be extends Error {\n constructor(e) {\n super(e.error.message), this.data = void 0, this.data = e;\n }\n}\nclass _a {\n constructor(e) {\n this.config = void 0, this.keyUriToKeyInfo = {}, this.emeController = null, this.config = e;\n }\n abort(e) {\n for (const t in this.keyUriToKeyInfo) {\n const s = this.keyUriToKeyInfo[t].loader;\n if (s) {\n if (e && e !== s.context.frag.type)\n return;\n s.abort();\n }\n }\n }\n detach() {\n for (const e in this.keyUriToKeyInfo) {\n const t = this.keyUriToKeyInfo[e];\n (t.mediaKeySessionContext || t.decryptdata.isCommonEncryption) && delete this.keyUriToKeyInfo[e];\n }\n }\n destroy() {\n this.detach();\n for (const e in this.keyUriToKeyInfo) {\n const t = this.keyUriToKeyInfo[e].loader;\n t && t.destroy();\n }\n this.keyUriToKeyInfo = {};\n }\n createKeyLoadError(e, t = L.KEY_LOAD_ERROR, s, i, r) {\n return new Be({\n type: U.NETWORK_ERROR,\n details: t,\n fatal: !1,\n frag: e,\n response: r,\n error: s,\n networkDetails: i\n });\n }\n loadClear(e, t) {\n if (this.emeController && this.config.emeEnabled) {\n const {\n sn: s,\n cc: i\n } = e;\n for (let r = 0; r < t.length; r++) {\n const n = t[r];\n if (i <= n.cc && (s === \"initSegment\" || n.sn === \"initSegment\" || s < n.sn)) {\n this.emeController.selectKeySystemFormat(n).then((o) => {\n n.setKeyFormat(o);\n });\n break;\n }\n }\n }\n }\n load(e) {\n return !e.decryptdata && e.encrypted && this.emeController ? this.emeController.selectKeySystemFormat(e).then((t) => this.loadInternal(e, t)) : this.loadInternal(e);\n }\n loadInternal(e, t) {\n var s, i;\n t && e.setKeyFormat(t);\n const r = e.decryptdata;\n if (!r) {\n const h = new Error(t ? `Expected frag.decryptdata to be defined after setting format ${t}` : \"Missing decryption data on fragment in onKeyLoading\");\n return Promise.reject(this.createKeyLoadError(e, L.KEY_LOAD_ERROR, h));\n }\n const n = r.uri;\n if (!n)\n return Promise.reject(this.createKeyLoadError(e, L.KEY_LOAD_ERROR, new Error(`Invalid key URI: \"${n}\"`)));\n let o = this.keyUriToKeyInfo[n];\n if ((s = o) != null && s.decryptdata.key)\n return r.key = o.decryptdata.key, Promise.resolve({\n frag: e,\n keyInfo: o\n });\n if ((i = o) != null && i.keyLoadPromise) {\n var l;\n switch ((l = o.mediaKeySessionContext) == null ? void 0 : l.keyStatus) {\n case void 0:\n case \"status-pending\":\n case \"usable\":\n case \"usable-in-future\":\n return o.keyLoadPromise.then((h) => (r.key = h.keyInfo.decryptdata.key, {\n frag: e,\n keyInfo: o\n }));\n }\n }\n switch (o = this.keyUriToKeyInfo[n] = {\n decryptdata: r,\n keyLoadPromise: null,\n loader: null,\n mediaKeySessionContext: null\n }, r.method) {\n case \"ISO-23001-7\":\n case \"SAMPLE-AES\":\n case \"SAMPLE-AES-CENC\":\n case \"SAMPLE-AES-CTR\":\n return r.keyFormat === \"identity\" ? this.loadKeyHTTP(o, e) : this.loadKeyEME(o, e);\n case \"AES-128\":\n return this.loadKeyHTTP(o, e);\n default:\n return Promise.reject(this.createKeyLoadError(e, L.KEY_LOAD_ERROR, new Error(`Key supplied with unsupported METHOD: \"${r.method}\"`)));\n }\n }\n loadKeyEME(e, t) {\n const s = {\n frag: t,\n keyInfo: e\n };\n if (this.emeController && this.config.emeEnabled) {\n const i = this.emeController.loadKey(s);\n if (i)\n return (e.keyLoadPromise = i.then((r) => (e.mediaKeySessionContext = r, s))).catch((r) => {\n throw e.keyLoadPromise = null, r;\n });\n }\n return Promise.resolve(s);\n }\n loadKeyHTTP(e, t) {\n const s = this.config, i = s.loader, r = new i(s);\n return t.keyLoader = e.loader = r, e.keyLoadPromise = new Promise((n, o) => {\n const l = {\n keyInfo: e,\n frag: t,\n responseType: \"arraybuffer\",\n url: e.decryptdata.uri\n }, h = s.keyLoadPolicy.default, c = {\n loadPolicy: h,\n timeout: h.maxLoadTimeMs,\n maxRetry: 0,\n retryDelay: 0,\n maxRetryDelay: 0\n }, d = {\n onSuccess: (u, f, g, p) => {\n const {\n frag: y,\n keyInfo: v,\n url: E\n } = g;\n if (!y.decryptdata || v !== this.keyUriToKeyInfo[E])\n return o(this.createKeyLoadError(y, L.KEY_LOAD_ERROR, new Error(\"after key load, decryptdata unset or changed\"), p));\n v.decryptdata.key = y.decryptdata.key = new Uint8Array(u.data), y.keyLoader = null, v.loader = null, n({\n frag: y,\n keyInfo: v\n });\n },\n onError: (u, f, g, p) => {\n this.resetLoader(f), o(this.createKeyLoadError(t, L.KEY_LOAD_ERROR, new Error(`HTTP Error ${u.code} loading key ${u.text}`), g, xe({\n url: l.url,\n data: void 0\n }, u)));\n },\n onTimeout: (u, f, g) => {\n this.resetLoader(f), o(this.createKeyLoadError(t, L.KEY_LOAD_TIMEOUT, new Error(\"key loading timed out\"), g));\n },\n onAbort: (u, f, g) => {\n this.resetLoader(f), o(this.createKeyLoadError(t, L.INTERNAL_ABORTED, new Error(\"key loading aborted\"), g));\n }\n };\n r.load(l, c, d);\n });\n }\n resetLoader(e) {\n const {\n frag: t,\n keyInfo: s,\n url: i\n } = e, r = s.loader;\n t.keyLoader === r && (t.keyLoader = null, s.loader = null), delete this.keyUriToKeyInfo[i], r && r.destroy();\n }\n}\nclass ka {\n constructor() {\n this._boundTick = void 0, this._tickTimer = null, this._tickInterval = null, this._tickCallCount = 0, this._boundTick = this.tick.bind(this);\n }\n destroy() {\n this.onHandlerDestroying(), this.onHandlerDestroyed();\n }\n onHandlerDestroying() {\n this.clearNextTick(), this.clearInterval();\n }\n onHandlerDestroyed() {\n }\n hasInterval() {\n return !!this._tickInterval;\n }\n hasNextTick() {\n return !!this._tickTimer;\n }\n /**\n * @param millis - Interval time (ms)\n * @eturns True when interval has been scheduled, false when already scheduled (no effect)\n */\n setInterval(e) {\n return this._tickInterval ? !1 : (this._tickCallCount = 0, this._tickInterval = self.setInterval(this._boundTick, e), !0);\n }\n /**\n * @returns True when interval was cleared, false when none was set (no effect)\n */\n clearInterval() {\n return this._tickInterval ? (self.clearInterval(this._tickInterval), this._tickInterval = null, !0) : !1;\n }\n /**\n * @returns True when timeout was cleared, false when none was set (no effect)\n */\n clearNextTick() {\n return this._tickTimer ? (self.clearTimeout(this._tickTimer), this._tickTimer = null, !0) : !1;\n }\n /**\n * Will call the subclass doTick implementation in this main loop tick\n * or in the next one (via setTimeout(,0)) in case it has already been called\n * in this tick (in case this is a re-entrant call).\n */\n tick() {\n this._tickCallCount++, this._tickCallCount === 1 && (this.doTick(), this._tickCallCount > 1 && this.tickImmediate(), this._tickCallCount = 0);\n }\n tickImmediate() {\n this.clearNextTick(), this._tickTimer = self.setTimeout(this._boundTick, 0);\n }\n /**\n * For subclass to implement task logic\n * @abstract\n */\n doTick() {\n }\n}\nconst Pa = {\n length: 0,\n start: () => 0,\n end: () => 0\n};\nclass J {\n /**\n * Return true if `media`'s buffered include `position`\n */\n static isBuffered(e, t) {\n try {\n if (e) {\n const s = J.getBuffered(e);\n for (let i = 0; i < s.length; i++)\n if (t >= s.start(i) && t <= s.end(i))\n return !0;\n }\n } catch {\n }\n return !1;\n }\n static bufferInfo(e, t, s) {\n try {\n if (e) {\n const i = J.getBuffered(e), r = [];\n let n;\n for (n = 0; n < i.length; n++)\n r.push({\n start: i.start(n),\n end: i.end(n)\n });\n return this.bufferedInfo(r, t, s);\n }\n } catch {\n }\n return {\n len: 0,\n start: t,\n end: t,\n nextStart: void 0\n };\n }\n static bufferedInfo(e, t, s) {\n t = Math.max(0, t), e.sort(function(h, c) {\n const d = h.start - c.start;\n return d || c.end - h.end;\n });\n let i = [];\n if (s)\n for (let h = 0; h < e.length; h++) {\n const c = i.length;\n if (c) {\n const d = i[c - 1].end;\n e[h].start - d < s ? e[h].end > d && (i[c - 1].end = e[h].end) : i.push(e[h]);\n } else\n i.push(e[h]);\n }\n else\n i = e;\n let r = 0, n, o = t, l = t;\n for (let h = 0; h < i.length; h++) {\n const c = i[h].start, d = i[h].end;\n if (t + s >= c && t < d)\n o = c, l = d, r = l - t;\n else if (t + s < c) {\n n = c;\n break;\n }\n }\n return {\n len: r,\n start: o || 0,\n end: l || 0,\n nextStart: n\n };\n }\n /**\n * Safe method to get buffered property.\n * SourceBuffer.buffered may throw if SourceBuffer is removed from it's MediaSource\n */\n static getBuffered(e) {\n try {\n return e.buffered;\n } catch (t) {\n return x.log(\"failed to get media.buffered\", t), Pa;\n }\n }\n}\nclass Os {\n constructor(e, t, s, i = 0, r = -1, n = !1) {\n this.level = void 0, this.sn = void 0, this.part = void 0, this.id = void 0, this.size = void 0, this.partial = void 0, this.transmuxing = Lt(), this.buffering = {\n audio: Lt(),\n video: Lt(),\n audiovideo: Lt()\n }, this.level = e, this.sn = t, this.id = s, this.size = i, this.part = r, this.partial = n;\n }\n}\nfunction Lt() {\n return {\n start: 0,\n executeStart: 0,\n executeEnd: 0,\n end: 0\n };\n}\nfunction Sr(a, e) {\n let t = null;\n for (let s = 0, i = a.length; s < i; s++) {\n const r = a[s];\n if (r && r.cc === e) {\n t = r;\n break;\n }\n }\n return t;\n}\nfunction Oa(a, e, t) {\n return !!(e.details && (t.endCC > t.startCC || a && a.cc < t.startCC));\n}\nfunction Fa(a, e, t = 0) {\n const s = a.fragments, i = e.fragments;\n if (!i.length || !s.length) {\n x.log(\"No fragments to align\");\n return;\n }\n const r = Sr(s, i[0].cc);\n if (!r || r && !r.startPTS) {\n x.log(\"No frag in previous level to align on\");\n return;\n }\n return r;\n}\nfunction bi(a, e) {\n if (a) {\n const t = a.start + e;\n a.start = a.startPTS = t, a.endPTS = t + a.duration;\n }\n}\nfunction Fs(a, e) {\n const t = e.fragments;\n for (let s = 0, i = t.length; s < i; s++)\n bi(t[s], a);\n e.fragmentHint && bi(e.fragmentHint, a), e.alignedSliding = !0;\n}\nfunction Ma(a, e, t) {\n e && (Na(a, t, e), !t.alignedSliding && e.details && Ua(t, e.details), !t.alignedSliding && e.details && !t.skippedSegments && Tr(e.details, t));\n}\nfunction Na(a, e, t) {\n if (Oa(a, t, e)) {\n const s = Fa(t.details, e);\n s && M(s.start) && (x.log(`Adjusting PTS using last level due to CC increase within current level ${e.url}`), Fs(s.start, e));\n }\n}\nfunction Ua(a, e) {\n if (!e.fragments.length || !a.hasProgramDateTime || !e.hasProgramDateTime)\n return;\n const t = e.fragments[0].programDateTime, s = a.fragments[0].programDateTime, i = (s - t) / 1e3 + e.fragments[0].start;\n i && M(i) && (x.log(`Adjusting PTS using programDateTime delta ${s - t}ms, sliding:${i.toFixed(3)} ${a.url} `), Fs(i, a));\n}\nfunction br(a, e) {\n if (!a.hasProgramDateTime || !e.hasProgramDateTime)\n return;\n const t = a.fragments, s = e.fragments;\n if (!t.length || !s.length)\n return;\n const i = Math.round(s.length / 2) - 1, r = s[i], n = Sr(t, r.cc) || t[Math.round(t.length / 2) - 1], o = r.programDateTime, l = n.programDateTime;\n if (o === null || l === null)\n return;\n const h = (l - o) / 1e3 - (n.start - r.start);\n Fs(h, a);\n}\nclass Ba {\n constructor(e, t) {\n this.subtle = void 0, this.aesIV = void 0, this.subtle = e, this.aesIV = t;\n }\n decrypt(e, t) {\n return this.subtle.decrypt({\n name: \"AES-CBC\",\n iv: this.aesIV\n }, t, e);\n }\n}\nclass $a {\n constructor(e, t) {\n this.subtle = void 0, this.key = void 0, this.subtle = e, this.key = t;\n }\n expandKey() {\n return this.subtle.importKey(\"raw\", this.key, {\n name: \"AES-CBC\"\n }, !1, [\"encrypt\", \"decrypt\"]);\n }\n}\nfunction Ga(a) {\n const e = a.byteLength, t = e && new DataView(a.buffer).getUint8(e - 1);\n return t ? Xe(a, 0, e - t) : a;\n}\nclass Va {\n constructor() {\n this.rcon = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], this.subMix = [new Uint32Array(256), new Uint32Array(256), new Uint32Array(256), new Uint32Array(256)], this.invSubMix = [new Uint32Array(256), new Uint32Array(256), new Uint32Array(256), new Uint32Array(256)], this.sBox = new Uint32Array(256), this.invSBox = new Uint32Array(256), this.key = new Uint32Array(0), this.ksRows = 0, this.keySize = 0, this.keySchedule = void 0, this.invKeySchedule = void 0, this.initTable();\n }\n // Using view.getUint32() also swaps the byte order.\n uint8ArrayToUint32Array_(e) {\n const t = new DataView(e), s = new Uint32Array(4);\n for (let i = 0; i < 4; i++)\n s[i] = t.getUint32(i * 4);\n return s;\n }\n initTable() {\n const e = this.sBox, t = this.invSBox, s = this.subMix, i = s[0], r = s[1], n = s[2], o = s[3], l = this.invSubMix, h = l[0], c = l[1], d = l[2], u = l[3], f = new Uint32Array(256);\n let g = 0, p = 0, y = 0;\n for (y = 0; y < 256; y++)\n y < 128 ? f[y] = y << 1 : f[y] = y << 1 ^ 283;\n for (y = 0; y < 256; y++) {\n let v = p ^ p << 1 ^ p << 2 ^ p << 3 ^ p << 4;\n v = v >>> 8 ^ v & 255 ^ 99, e[g] = v, t[v] = g;\n const E = f[g], T = f[E], A = f[T];\n let b = f[v] * 257 ^ v * 16843008;\n i[g] = b << 24 | b >>> 8, r[g] = b << 16 | b >>> 16, n[g] = b << 8 | b >>> 24, o[g] = b, b = A * 16843009 ^ T * 65537 ^ E * 257 ^ g * 16843008, h[v] = b << 24 | b >>> 8, c[v] = b << 16 | b >>> 16, d[v] = b << 8 | b >>> 24, u[v] = b, g ? (g = E ^ f[f[f[A ^ E]]], p ^= f[f[p]]) : g = p = 1;\n }\n }\n expandKey(e) {\n const t = this.uint8ArrayToUint32Array_(e);\n let s = !0, i = 0;\n for (; i < t.length && s; )\n s = t[i] === this.key[i], i++;\n if (s)\n return;\n this.key = t;\n const r = this.keySize = t.length;\n if (r !== 4 && r !== 6 && r !== 8)\n throw new Error(\"Invalid aes key size=\" + r);\n const n = this.ksRows = (r + 6 + 1) * 4;\n let o, l;\n const h = this.keySchedule = new Uint32Array(n), c = this.invKeySchedule = new Uint32Array(n), d = this.sBox, u = this.rcon, f = this.invSubMix, g = f[0], p = f[1], y = f[2], v = f[3];\n let E, T;\n for (o = 0; o < n; o++) {\n if (o < r) {\n E = h[o] = t[o];\n continue;\n }\n T = E, o % r === 0 ? (T = T << 8 | T >>> 24, T = d[T >>> 24] << 24 | d[T >>> 16 & 255] << 16 | d[T >>> 8 & 255] << 8 | d[T & 255], T ^= u[o / r | 0] << 24) : r > 6 && o % r === 4 && (T = d[T >>> 24] << 24 | d[T >>> 16 & 255] << 16 | d[T >>> 8 & 255] << 8 | d[T & 255]), h[o] = E = (h[o - r] ^ T) >>> 0;\n }\n for (l = 0; l < n; l++)\n o = n - l, l & 3 ? T = h[o] : T = h[o - 4], l < 4 || o <= 4 ? c[l] = T : c[l] = g[d[T >>> 24]] ^ p[d[T >>> 16 & 255]] ^ y[d[T >>> 8 & 255]] ^ v[d[T & 255]], c[l] = c[l] >>> 0;\n }\n // Adding this as a method greatly improves performance.\n networkToHostOrderSwap(e) {\n return e << 24 | (e & 65280) << 8 | (e & 16711680) >> 8 | e >>> 24;\n }\n decrypt(e, t, s) {\n const i = this.keySize + 6, r = this.invKeySchedule, n = this.invSBox, o = this.invSubMix, l = o[0], h = o[1], c = o[2], d = o[3], u = this.uint8ArrayToUint32Array_(s);\n let f = u[0], g = u[1], p = u[2], y = u[3];\n const v = new Int32Array(e), E = new Int32Array(v.length);\n let T, A, b, D, I, C, _, R, F, k, W, oe, V, Y;\n const q = this.networkToHostOrderSwap;\n for (; t < v.length; ) {\n for (F = q(v[t]), k = q(v[t + 1]), W = q(v[t + 2]), oe = q(v[t + 3]), I = F ^ r[0], C = oe ^ r[1], _ = W ^ r[2], R = k ^ r[3], V = 4, Y = 1; Y < i; Y++)\n T = l[I >>> 24] ^ h[C >> 16 & 255] ^ c[_ >> 8 & 255] ^ d[R & 255] ^ r[V], A = l[C >>> 24] ^ h[_ >> 16 & 255] ^ c[R >> 8 & 255] ^ d[I & 255] ^ r[V + 1], b = l[_ >>> 24] ^ h[R >> 16 & 255] ^ c[I >> 8 & 255] ^ d[C & 255] ^ r[V + 2], D = l[R >>> 24] ^ h[I >> 16 & 255] ^ c[C >> 8 & 255] ^ d[_ & 255] ^ r[V + 3], I = T, C = A, _ = b, R = D, V = V + 4;\n T = n[I >>> 24] << 24 ^ n[C >> 16 & 255] << 16 ^ n[_ >> 8 & 255] << 8 ^ n[R & 255] ^ r[V], A = n[C >>> 24] << 24 ^ n[_ >> 16 & 255] << 16 ^ n[R >> 8 & 255] << 8 ^ n[I & 255] ^ r[V + 1], b = n[_ >>> 24] << 24 ^ n[R >> 16 & 255] << 16 ^ n[I >> 8 & 255] << 8 ^ n[C & 255] ^ r[V + 2], D = n[R >>> 24] << 24 ^ n[I >> 16 & 255] << 16 ^ n[C >> 8 & 255] << 8 ^ n[_ & 255] ^ r[V + 3], E[t] = q(T ^ f), E[t + 1] = q(D ^ g), E[t + 2] = q(b ^ p), E[t + 3] = q(A ^ y), f = F, g = k, p = W, y = oe, t = t + 4;\n }\n return E.buffer;\n }\n}\nconst Ha = 16;\nclass Ms {\n constructor(e, {\n removePKCS7Padding: t = !0\n } = {}) {\n if (this.logEnabled = !0, this.removePKCS7Padding = void 0, this.subtle = null, this.softwareDecrypter = null, this.key = null, this.fastAesKey = null, this.remainderData = null, this.currentIV = null, this.currentResult = null, this.useSoftware = void 0, this.useSoftware = e.enableSoftwareAES, this.removePKCS7Padding = t, t)\n try {\n const s = self.crypto;\n s && (this.subtle = s.subtle || s.webkitSubtle);\n } catch {\n }\n this.subtle === null && (this.useSoftware = !0);\n }\n destroy() {\n this.subtle = null, this.softwareDecrypter = null, this.key = null, this.fastAesKey = null, this.remainderData = null, this.currentIV = null, this.currentResult = null;\n }\n isSync() {\n return this.useSoftware;\n }\n flush() {\n const {\n currentResult: e,\n remainderData: t\n } = this;\n if (!e || t)\n return this.reset(), null;\n const s = new Uint8Array(e);\n return this.reset(), this.removePKCS7Padding ? Ga(s) : s;\n }\n reset() {\n this.currentResult = null, this.currentIV = null, this.remainderData = null, this.softwareDecrypter && (this.softwareDecrypter = null);\n }\n decrypt(e, t, s) {\n return this.useSoftware ? new Promise((i, r) => {\n this.softwareDecrypt(new Uint8Array(e), t, s);\n const n = this.flush();\n n ? i(n.buffer) : r(new Error(\"[softwareDecrypt] Failed to decrypt data\"));\n }) : this.webCryptoDecrypt(new Uint8Array(e), t, s);\n }\n // Software decryption is progressive. Progressive decryption may not return a result on each call. Any cached\n // data is handled in the flush() call\n softwareDecrypt(e, t, s) {\n const {\n currentIV: i,\n currentResult: r,\n remainderData: n\n } = this;\n this.logOnce(\"JS AES decrypt\"), n && (e = Ze(n, e), this.remainderData = null);\n const o = this.getValidChunk(e);\n if (!o.length)\n return null;\n i && (s = i);\n let l = this.softwareDecrypter;\n l || (l = this.softwareDecrypter = new Va()), l.expandKey(t);\n const h = r;\n return this.currentResult = l.decrypt(o.buffer, 0, s), this.currentIV = Xe(o, -16).buffer, h || null;\n }\n webCryptoDecrypt(e, t, s) {\n const i = this.subtle;\n return (this.key !== t || !this.fastAesKey) && (this.key = t, this.fastAesKey = new $a(i, t)), this.fastAesKey.expandKey().then((r) => i ? (this.logOnce(\"WebCrypto AES decrypt\"), new Ba(i, new Uint8Array(s)).decrypt(e.buffer, r)) : Promise.reject(new Error(\"web crypto not initialized\"))).catch((r) => (x.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${r.name}: ${r.message}`), this.onWebCryptoError(e, t, s)));\n }\n onWebCryptoError(e, t, s) {\n this.useSoftware = !0, this.logEnabled = !0, this.softwareDecrypt(e, t, s);\n const i = this.flush();\n if (i)\n return i.buffer;\n throw new Error(\"WebCrypto and softwareDecrypt: failed to decrypt data\");\n }\n getValidChunk(e) {\n let t = e;\n const s = e.length - e.length % Ha;\n return s !== e.length && (t = Xe(e, 0, s), this.remainderData = Xe(e, s)), t;\n }\n logOnce(e) {\n this.logEnabled && (x.log(`[decrypter]: ${e}`), this.logEnabled = !1);\n }\n}\nconst Ka = {\n toString: function(a) {\n let e = \"\";\n const t = a.length;\n for (let s = 0; s < t; s++)\n e += `[${a.start(s).toFixed(3)}-${a.end(s).toFixed(3)}]`;\n return e;\n }\n}, w = {\n STOPPED: \"STOPPED\",\n IDLE: \"IDLE\",\n KEY_LOADING: \"KEY_LOADING\",\n FRAG_LOADING: \"FRAG_LOADING\",\n FRAG_LOADING_WAITING_RETRY: \"FRAG_LOADING_WAITING_RETRY\",\n WAITING_TRACK: \"WAITING_TRACK\",\n PARSING: \"PARSING\",\n PARSED: \"PARSED\",\n ENDED: \"ENDED\",\n ERROR: \"ERROR\",\n WAITING_INIT_PTS: \"WAITING_INIT_PTS\",\n WAITING_LEVEL: \"WAITING_LEVEL\"\n};\nclass Ns extends ka {\n constructor(e, t, s, i, r) {\n super(), this.hls = void 0, this.fragPrevious = null, this.fragCurrent = null, this.fragmentTracker = void 0, this.transmuxer = null, this._state = w.STOPPED, this.playlistType = void 0, this.media = null, this.mediaBuffer = null, this.config = void 0, this.bitrateTest = !1, this.lastCurrentTime = 0, this.nextLoadPosition = 0, this.startPosition = 0, this.startTimeOffset = null, this.loadedmetadata = !1, this.retryDate = 0, this.levels = null, this.fragmentLoader = void 0, this.keyLoader = void 0, this.levelLastLoaded = null, this.startFragRequested = !1, this.decrypter = void 0, this.initPTS = [], this.onvseeking = null, this.onvended = null, this.logPrefix = \"\", this.log = void 0, this.warn = void 0, this.playlistType = r, this.logPrefix = i, this.log = x.log.bind(x, `${i}:`), this.warn = x.warn.bind(x, `${i}:`), this.hls = e, this.fragmentLoader = new Da(e.config), this.keyLoader = s, this.fragmentTracker = t, this.config = e.config, this.decrypter = new Ms(e.config), e.on(m.MANIFEST_LOADED, this.onManifestLoaded, this);\n }\n doTick() {\n this.onTickEnd();\n }\n onTickEnd() {\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n startLoad(e) {\n }\n stopLoad() {\n this.fragmentLoader.abort(), this.keyLoader.abort(this.playlistType);\n const e = this.fragCurrent;\n e != null && e.loader && (e.abortRequests(), this.fragmentTracker.removeFragment(e)), this.resetTransmuxer(), this.fragCurrent = null, this.fragPrevious = null, this.clearInterval(), this.clearNextTick(), this.state = w.STOPPED;\n }\n _streamEnded(e, t) {\n if (t.live || e.nextStart || !e.end || !this.media)\n return !1;\n const s = t.partList;\n if (s != null && s.length) {\n const r = s[s.length - 1];\n return J.isBuffered(this.media, r.start + r.duration / 2);\n }\n const i = t.fragments[t.fragments.length - 1].type;\n return this.fragmentTracker.isEndListAppended(i);\n }\n getLevelDetails() {\n if (this.levels && this.levelLastLoaded !== null) {\n var e;\n return (e = this.levels[this.levelLastLoaded]) == null ? void 0 : e.details;\n }\n }\n onMediaAttached(e, t) {\n const s = this.media = this.mediaBuffer = t.media;\n this.onvseeking = this.onMediaSeeking.bind(this), this.onvended = this.onMediaEnded.bind(this), s.addEventListener(\"seeking\", this.onvseeking), s.addEventListener(\"ended\", this.onvended);\n const i = this.config;\n this.levels && i.autoStartLoad && this.state === w.STOPPED && this.startLoad(i.startPosition);\n }\n onMediaDetaching() {\n const e = this.media;\n e != null && e.ended && (this.log(\"MSE detaching and video ended, reset startPosition\"), this.startPosition = this.lastCurrentTime = 0), e && this.onvseeking && this.onvended && (e.removeEventListener(\"seeking\", this.onvseeking), e.removeEventListener(\"ended\", this.onvended), this.onvseeking = this.onvended = null), this.keyLoader && this.keyLoader.detach(), this.media = this.mediaBuffer = null, this.loadedmetadata = !1, this.fragmentTracker.removeAllFragments(), this.stopLoad();\n }\n onMediaSeeking() {\n const {\n config: e,\n fragCurrent: t,\n media: s,\n mediaBuffer: i,\n state: r\n } = this, n = s ? s.currentTime : 0, o = J.bufferInfo(i || s, n, e.maxBufferHole);\n if (this.log(`media seeking to ${M(n) ? n.toFixed(3) : n}, state: ${r}`), this.state === w.ENDED)\n this.resetLoadingState();\n else if (t) {\n const l = e.maxFragLookUpTolerance, h = t.start - l, c = t.start + t.duration + l;\n if (!o.len || c < o.start || h > o.end) {\n const d = n > c;\n (n < h || d) && (d && t.loader && (this.log(\"seeking outside of buffer while fragment load in progress, cancel fragment load\"), t.abortRequests(), this.resetLoadingState()), this.fragPrevious = null);\n }\n }\n s && (this.fragmentTracker.removeFragmentsInRange(n, 1 / 0, this.playlistType, !0), this.lastCurrentTime = n), !this.loadedmetadata && !o.len && (this.nextLoadPosition = this.startPosition = n), this.tickImmediate();\n }\n onMediaEnded() {\n this.startPosition = this.lastCurrentTime = 0;\n }\n onManifestLoaded(e, t) {\n this.startTimeOffset = t.startTimeOffset, this.initPTS = [];\n }\n onHandlerDestroying() {\n this.stopLoad(), super.onHandlerDestroying();\n }\n onHandlerDestroyed() {\n this.state = w.STOPPED, this.fragmentLoader && this.fragmentLoader.destroy(), this.keyLoader && this.keyLoader.destroy(), this.decrypter && this.decrypter.destroy(), this.hls = this.log = this.warn = this.decrypter = this.keyLoader = this.fragmentLoader = this.fragmentTracker = null, super.onHandlerDestroyed();\n }\n loadFragment(e, t, s) {\n this._loadFragForPlayback(e, t, s);\n }\n _loadFragForPlayback(e, t, s) {\n const i = (r) => {\n if (this.fragContextChanged(e)) {\n this.warn(`Fragment ${e.sn}${r.part ? \" p: \" + r.part.index : \"\"} of level ${e.level} was dropped during download.`), this.fragmentTracker.removeFragment(e);\n return;\n }\n e.stats.chunkCount++, this._handleFragmentLoadProgress(r);\n };\n this._doFragLoad(e, t, s, i).then((r) => {\n if (!r)\n return;\n const n = this.state;\n if (this.fragContextChanged(e)) {\n (n === w.FRAG_LOADING || !this.fragCurrent && n === w.PARSING) && (this.fragmentTracker.removeFragment(e), this.state = w.IDLE);\n return;\n }\n \"payload\" in r && (this.log(`Loaded fragment ${e.sn} of level ${e.level}`), this.hls.trigger(m.FRAG_LOADED, r)), this._handleFragmentLoadComplete(r);\n }).catch((r) => {\n this.state === w.STOPPED || this.state === w.ERROR || (this.warn(r), this.resetFragmentLoading(e));\n });\n }\n clearTrackerIfNeeded(e) {\n var t;\n const {\n fragmentTracker: s\n } = this;\n if (s.getState(e) === le.APPENDING) {\n const r = e.type, n = this.getFwdBufferInfo(this.mediaBuffer, r), o = Math.max(e.duration, n ? n.len : this.config.maxBufferLength);\n this.reduceMaxBufferLength(o) && s.removeFragment(e);\n } else\n ((t = this.mediaBuffer) == null ? void 0 : t.buffered.length) === 0 ? s.removeAllFragments() : s.hasParts(e.type) && (s.detectPartialFragments({\n frag: e,\n part: null,\n stats: e.stats,\n id: e.type\n }), s.getState(e) === le.PARTIAL && s.removeFragment(e));\n }\n checkLiveUpdate(e) {\n if (e.updated && !e.live) {\n const t = e.fragments[e.fragments.length - 1];\n this.fragmentTracker.detectPartialFragments({\n frag: t,\n part: null,\n stats: t.stats,\n id: t.type\n });\n }\n e.fragments[0] || (e.deltaUpdateFailed = !0);\n }\n flushMainBuffer(e, t, s = null) {\n if (!(e - t))\n return;\n const i = {\n startOffset: e,\n endOffset: t,\n type: s\n };\n this.hls.trigger(m.BUFFER_FLUSHING, i);\n }\n _loadInitSegment(e, t) {\n this._doFragLoad(e, t).then((s) => {\n if (!s || this.fragContextChanged(e) || !this.levels)\n throw new Error(\"init load aborted\");\n return s;\n }).then((s) => {\n const {\n hls: i\n } = this, {\n payload: r\n } = s, n = e.decryptdata;\n if (r && r.byteLength > 0 && n && n.key && n.iv && n.method === \"AES-128\") {\n const o = self.performance.now();\n return this.decrypter.decrypt(new Uint8Array(r), n.key.buffer, n.iv.buffer).catch((l) => {\n throw i.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.FRAG_DECRYPT_ERROR,\n fatal: !1,\n error: l,\n reason: l.message,\n frag: e\n }), l;\n }).then((l) => {\n const h = self.performance.now();\n return i.trigger(m.FRAG_DECRYPTED, {\n frag: e,\n payload: l,\n stats: {\n tstart: o,\n tdecrypt: h\n }\n }), s.payload = l, s;\n });\n }\n return s;\n }).then((s) => {\n const {\n fragCurrent: i,\n hls: r,\n levels: n\n } = this;\n if (!n)\n throw new Error(\"init load aborted, missing levels\");\n const o = e.stats;\n this.state = w.IDLE, t.fragmentError = 0, e.data = new Uint8Array(s.payload), o.parsing.start = o.buffering.start = self.performance.now(), o.parsing.end = o.buffering.end = self.performance.now(), s.frag === i && r.trigger(m.FRAG_BUFFERED, {\n stats: o,\n frag: i,\n part: null,\n id: e.type\n }), this.tick();\n }).catch((s) => {\n this.state === w.STOPPED || this.state === w.ERROR || (this.warn(s), this.resetFragmentLoading(e));\n });\n }\n fragContextChanged(e) {\n const {\n fragCurrent: t\n } = this;\n return !e || !t || e.level !== t.level || e.sn !== t.sn || e.urlId !== t.urlId;\n }\n fragBufferedComplete(e, t) {\n var s, i, r, n;\n const o = this.mediaBuffer ? this.mediaBuffer : this.media;\n this.log(`Buffered ${e.type} sn: ${e.sn}${t ? \" part: \" + t.index : \"\"} of ${this.playlistType === B.MAIN ? \"level\" : \"track\"} ${e.level} (frag:[${((s = e.startPTS) != null ? s : NaN).toFixed(3)}-${((i = e.endPTS) != null ? i : NaN).toFixed(3)}] > buffer:${o ? Ka.toString(J.getBuffered(o)) : \"(detached)\"})`), this.state = w.IDLE, o && (!this.loadedmetadata && e.type == B.MAIN && o.buffered.length && ((r = this.fragCurrent) == null ? void 0 : r.sn) === ((n = this.fragPrevious) == null ? void 0 : n.sn) && (this.loadedmetadata = !0, this.seekToStartPos()), this.tick());\n }\n seekToStartPos() {\n }\n _handleFragmentLoadComplete(e) {\n const {\n transmuxer: t\n } = this;\n if (!t)\n return;\n const {\n frag: s,\n part: i,\n partsLoaded: r\n } = e, n = !r || r.length === 0 || r.some((l) => !l), o = new Os(s.level, s.sn, s.stats.chunkCount + 1, 0, i ? i.index : -1, !n);\n t.flush(o);\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _handleFragmentLoadProgress(e) {\n }\n _doFragLoad(e, t, s = null, i) {\n var r;\n const n = t == null ? void 0 : t.details;\n if (!this.levels || !n)\n throw new Error(`frag load aborted, missing level${n ? \"\" : \" detail\"}s`);\n let o = null;\n if (e.encrypted && !((r = e.decryptdata) != null && r.key) ? (this.log(`Loading key for ${e.sn} of [${n.startSN}-${n.endSN}], ${this.logPrefix === \"[stream-controller]\" ? \"level\" : \"track\"} ${e.level}`), this.state = w.KEY_LOADING, this.fragCurrent = e, o = this.keyLoader.load(e).then((c) => {\n if (!this.fragContextChanged(c.frag))\n return this.hls.trigger(m.KEY_LOADED, c), this.state === w.KEY_LOADING && (this.state = w.IDLE), c;\n }), this.hls.trigger(m.KEY_LOADING, {\n frag: e\n }), this.fragCurrent === null && (o = Promise.reject(new Error(\"frag load aborted, context changed in KEY_LOADING\")))) : !e.encrypted && n.encryptedFragments.length && this.keyLoader.loadClear(e, n.encryptedFragments), s = Math.max(e.start, s || 0), this.config.lowLatencyMode && e.sn !== \"initSegment\") {\n const c = n.partList;\n if (c && i) {\n s > e.end && n.fragmentHint && (e = n.fragmentHint);\n const d = this.getNextPart(c, e, s);\n if (d > -1) {\n const u = c[d];\n this.log(`Loading part sn: ${e.sn} p: ${u.index} cc: ${e.cc} of playlist [${n.startSN}-${n.endSN}] parts [0-${d}-${c.length - 1}] ${this.logPrefix === \"[stream-controller]\" ? \"level\" : \"track\"}: ${e.level}, target: ${parseFloat(s.toFixed(3))}`), this.nextLoadPosition = u.start + u.duration, this.state = w.FRAG_LOADING;\n let f;\n return o ? f = o.then((g) => !g || this.fragContextChanged(g.frag) ? null : this.doFragPartsLoad(e, u, t, i)).catch((g) => this.handleFragLoadError(g)) : f = this.doFragPartsLoad(e, u, t, i).catch((g) => this.handleFragLoadError(g)), this.hls.trigger(m.FRAG_LOADING, {\n frag: e,\n part: u,\n targetBufferTime: s\n }), this.fragCurrent === null ? Promise.reject(new Error(\"frag load aborted, context changed in FRAG_LOADING parts\")) : f;\n } else if (!e.url || this.loadedEndOfParts(c, s))\n return Promise.resolve(null);\n }\n }\n this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${n ? \"of [\" + n.startSN + \"-\" + n.endSN + \"] \" : \"\"}${this.logPrefix === \"[stream-controller]\" ? \"level\" : \"track\"}: ${e.level}, target: ${parseFloat(s.toFixed(3))}`), M(e.sn) && !this.bitrateTest && (this.nextLoadPosition = e.start + e.duration), this.state = w.FRAG_LOADING;\n const l = this.config.progressive;\n let h;\n return l && o ? h = o.then((c) => !c || this.fragContextChanged(c == null ? void 0 : c.frag) ? null : this.fragmentLoader.load(e, i)).catch((c) => this.handleFragLoadError(c)) : h = Promise.all([this.fragmentLoader.load(e, l ? i : void 0), o]).then(([c]) => (!l && c && i && i(c), c)).catch((c) => this.handleFragLoadError(c)), this.hls.trigger(m.FRAG_LOADING, {\n frag: e,\n targetBufferTime: s\n }), this.fragCurrent === null ? Promise.reject(new Error(\"frag load aborted, context changed in FRAG_LOADING\")) : h;\n }\n doFragPartsLoad(e, t, s, i) {\n return new Promise((r, n) => {\n var o;\n const l = [], h = (o = s.details) == null ? void 0 : o.partList, c = (d) => {\n this.fragmentLoader.loadPart(e, d, i).then((u) => {\n l[d.index] = u;\n const f = u.part;\n this.hls.trigger(m.FRAG_LOADED, u);\n const g = pi(s, e.sn, d.index + 1) || xr(h, e.sn, d.index + 1);\n if (g)\n c(g);\n else\n return r({\n frag: e,\n part: f,\n partsLoaded: l\n });\n }).catch(n);\n };\n c(t);\n });\n }\n handleFragLoadError(e) {\n if (\"data\" in e) {\n const t = e.data;\n e.data && t.details === L.INTERNAL_ABORTED ? this.handleFragLoadAborted(t.frag, t.part) : this.hls.trigger(m.ERROR, t);\n } else\n this.hls.trigger(m.ERROR, {\n type: U.OTHER_ERROR,\n details: L.INTERNAL_EXCEPTION,\n err: e,\n error: e,\n fatal: !0\n });\n return null;\n }\n _handleTransmuxerFlush(e) {\n const t = this.getCurrentContext(e);\n if (!t || this.state !== w.PARSING) {\n !this.fragCurrent && this.state !== w.STOPPED && this.state !== w.ERROR && (this.state = w.IDLE);\n return;\n }\n const {\n frag: s,\n part: i,\n level: r\n } = t, n = self.performance.now();\n s.stats.parsing.end = n, i && (i.stats.parsing.end = n), this.updateLevelTiming(s, i, r, e.partial);\n }\n getCurrentContext(e) {\n const {\n levels: t,\n fragCurrent: s\n } = this, {\n level: i,\n sn: r,\n part: n\n } = e;\n if (!(t != null && t[i]))\n return this.warn(`Levels object was unset while buffering fragment ${r} of level ${i}. The current chunk will not be buffered.`), null;\n const o = t[i], l = n > -1 ? pi(o, r, n) : null, h = l ? l.fragment : xa(o, r, s);\n return h ? (s && s !== h && (h.stats = s.stats), {\n frag: h,\n part: l,\n level: o\n }) : null;\n }\n bufferFragmentData(e, t, s, i, r) {\n var n;\n if (!e || this.state !== w.PARSING)\n return;\n const {\n data1: o,\n data2: l\n } = e;\n let h = o;\n if (o && l && (h = Ze(o, l)), !((n = h) != null && n.length))\n return;\n const c = {\n type: e.type,\n frag: t,\n part: s,\n chunkMeta: i,\n parent: t.type,\n data: h\n };\n if (this.hls.trigger(m.BUFFER_APPENDING, c), e.dropped && e.independent && !s) {\n if (r)\n return;\n this.flushBufferGap(t);\n }\n }\n flushBufferGap(e) {\n const t = this.media;\n if (!t)\n return;\n if (!J.isBuffered(t, t.currentTime)) {\n this.flushMainBuffer(0, e.start);\n return;\n }\n const s = t.currentTime, i = J.bufferInfo(t, s, 0), r = e.duration, n = Math.min(this.config.maxFragLookUpTolerance * 2, r * 0.25), o = Math.max(Math.min(e.start - n, i.end - n), s + n);\n e.start - o > n && this.flushMainBuffer(o, e.start);\n }\n getFwdBufferInfo(e, t) {\n const s = this.getLoadPosition();\n return M(s) ? this.getFwdBufferInfoAtPos(e, s, t) : null;\n }\n getFwdBufferInfoAtPos(e, t, s) {\n const {\n config: {\n maxBufferHole: i\n }\n } = this, r = J.bufferInfo(e, t, i);\n if (r.len === 0 && r.nextStart !== void 0) {\n const n = this.fragmentTracker.getBufferedFrag(t, s);\n if (n && r.nextStart < n.end)\n return J.bufferInfo(e, t, Math.max(r.nextStart, i));\n }\n return r;\n }\n getMaxBufferLength(e) {\n const {\n config: t\n } = this;\n let s;\n return e ? s = Math.max(8 * t.maxBufferSize / e, t.maxBufferLength) : s = t.maxBufferLength, Math.min(s, t.maxMaxBufferLength);\n }\n reduceMaxBufferLength(e) {\n const t = this.config, s = e || t.maxBufferLength;\n return t.maxMaxBufferLength >= s ? (t.maxMaxBufferLength /= 2, this.warn(`Reduce max buffer length to ${t.maxMaxBufferLength}s`), !0) : !1;\n }\n getAppendedFrag(e, t = B.MAIN) {\n const s = this.fragmentTracker.getAppendedFrag(e, B.MAIN);\n return s && \"fragment\" in s ? s.fragment : s;\n }\n getNextFragment(e, t) {\n const s = t.fragments, i = s.length;\n if (!i)\n return null;\n const {\n config: r\n } = this, n = s[0].start;\n let o;\n if (t.live) {\n const l = r.initialLiveManifestSize;\n if (i < l)\n return this.warn(`Not enough fragments to start playback (have: ${i}, need: ${l})`), null;\n !t.PTSKnown && !this.startFragRequested && this.startPosition === -1 && (o = this.getInitialLiveFragment(t, s), this.startPosition = o ? this.hls.liveSyncPosition || o.start : e);\n } else\n e <= n && (o = s[0]);\n if (!o) {\n const l = r.lowLatencyMode ? t.partEnd : t.fragmentEnd;\n o = this.getFragmentAtPosition(e, l, t);\n }\n return this.mapToInitFragWhenRequired(o);\n }\n isLoopLoading(e, t) {\n const s = this.fragmentTracker.getState(e);\n return (s === le.OK || s === le.PARTIAL && !!e.gap) && this.nextLoadPosition > t;\n }\n getNextFragmentLoopLoading(e, t, s, i, r) {\n const n = e.gap, o = this.getNextFragment(this.nextLoadPosition, t);\n if (o === null)\n return o;\n if (e = o, n && e && !e.gap && s.nextStart) {\n const l = this.getFwdBufferInfoAtPos(this.mediaBuffer ? this.mediaBuffer : this.media, s.nextStart, i);\n if (l !== null && s.len + l.len >= r)\n return this.log(`buffer full after gaps in \"${i}\" playlist starting at sn: ${e.sn}`), null;\n }\n return e;\n }\n mapToInitFragWhenRequired(e) {\n return e != null && e.initSegment && !(e != null && e.initSegment.data) && !this.bitrateTest ? e.initSegment : e;\n }\n getNextPart(e, t, s) {\n let i = -1, r = !1, n = !0;\n for (let o = 0, l = e.length; o < l; o++) {\n const h = e[o];\n if (n = n && !h.independent, i > -1 && s < h.start)\n break;\n const c = h.loaded;\n c ? i = -1 : (r || h.independent || n) && h.fragment === t && (i = o), r = c;\n }\n return i;\n }\n loadedEndOfParts(e, t) {\n const s = e[e.length - 1];\n return s && t > s.start && s.loaded;\n }\n /*\n This method is used find the best matching first fragment for a live playlist. This fragment is used to calculate the\n \"sliding\" of the playlist, which is its offset from the start of playback. After sliding we can compute the real\n start and end times for each fragment in the playlist (after which this method will not need to be called).\n */\n getInitialLiveFragment(e, t) {\n const s = this.fragPrevious;\n let i = null;\n if (s) {\n if (e.hasProgramDateTime && (this.log(`Live playlist, switching playlist, load frag with same PDT: ${s.programDateTime}`), i = Sa(t, s.endProgramDateTime, this.config.maxFragLookUpTolerance)), !i) {\n const r = s.sn + 1;\n if (r >= e.startSN && r <= e.endSN) {\n const n = t[r - e.startSN];\n s.cc === n.cc && (i = n, this.log(`Live playlist, switching playlist, load frag with next SN: ${i.sn}`));\n }\n i || (i = La(t, s.cc), i && this.log(`Live playlist, switching playlist, load frag with same CC: ${i.sn}`));\n }\n } else {\n const r = this.hls.liveSyncPosition;\n r !== null && (i = this.getFragmentAtPosition(r, this.bitrateTest ? e.fragmentEnd : e.edge, e));\n }\n return i;\n }\n /*\n This method finds the best matching fragment given the provided position.\n */\n getFragmentAtPosition(e, t, s) {\n const {\n config: i\n } = this;\n let {\n fragPrevious: r\n } = this, {\n fragments: n,\n endSN: o\n } = s;\n const {\n fragmentHint: l\n } = s, h = i.maxFragLookUpTolerance, c = s.partList, d = !!(i.lowLatencyMode && c != null && c.length && l);\n d && l && !this.bitrateTest && (n = n.concat(l), o = l.sn);\n let u;\n if (e < t) {\n const f = e > t - h ? 0 : h;\n u = pt(r, n, e, f);\n } else\n u = n[n.length - 1];\n if (u) {\n const f = u.sn - s.startSN, g = this.fragmentTracker.getState(u);\n if ((g === le.OK || g === le.PARTIAL && u.gap) && (r = u), r && u.sn === r.sn && (!d || c[0].fragment.sn > u.sn) && r && u.level === r.level) {\n const y = n[f + 1];\n u.sn < o && this.fragmentTracker.getState(y) !== le.OK ? u = y : u = null;\n }\n }\n return u;\n }\n synchronizeToLiveEdge(e) {\n const {\n config: t,\n media: s\n } = this;\n if (!s)\n return;\n const i = this.hls.liveSyncPosition, r = s.currentTime, n = e.fragments[0].start, o = e.edge, l = r >= n - t.maxFragLookUpTolerance && r <= o;\n if (i !== null && s.duration > i && (r < i || !l)) {\n const h = t.liveMaxLatencyDuration !== void 0 ? t.liveMaxLatencyDuration : t.liveMaxLatencyDurationCount * e.targetduration;\n (!l && s.readyState < 4 || r < o - h) && (this.loadedmetadata || (this.nextLoadPosition = i), s.readyState && (this.warn(`Playback: ${r.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${i.toFixed(3)}`), s.currentTime = i));\n }\n }\n alignPlaylists(e, t) {\n const {\n levels: s,\n levelLastLoaded: i,\n fragPrevious: r\n } = this, n = i !== null ? s[i] : null, o = e.fragments.length;\n if (!o)\n return this.warn(\"No fragments in live playlist\"), 0;\n const l = e.fragments[0].start, h = !t, c = e.alignedSliding && M(l);\n if (h || !c && !l) {\n Ma(r, n, e);\n const d = e.fragments[0].start;\n return this.log(`Live playlist sliding: ${d.toFixed(2)} start-sn: ${t ? t.startSN : \"na\"}->${e.startSN} prev-sn: ${r ? r.sn : \"na\"} fragments: ${o}`), d;\n }\n return l;\n }\n waitForCdnTuneIn(e) {\n return e.live && e.canBlockReload && e.partTarget && e.tuneInGoal > Math.max(e.partHoldBack, e.partTarget * 3);\n }\n setStartPosition(e, t) {\n let s = this.startPosition;\n if (s < t && (s = -1), s === -1 || this.lastCurrentTime === -1) {\n const i = this.startTimeOffset !== null, r = i ? this.startTimeOffset : e.startTimeOffset;\n r !== null && M(r) ? (s = t + r, r < 0 && (s += e.totalduration), s = Math.min(Math.max(t, s), t + e.totalduration), this.log(`Start time offset ${r} found in ${i ? \"multivariant\" : \"media\"} playlist, adjust startPosition to ${s}`), this.startPosition = s) : e.live ? s = this.hls.liveSyncPosition || t : this.startPosition = s = 0, this.lastCurrentTime = s;\n }\n this.nextLoadPosition = s;\n }\n getLoadPosition() {\n const {\n media: e\n } = this;\n let t = 0;\n return this.loadedmetadata && e ? t = e.currentTime : this.nextLoadPosition && (t = this.nextLoadPosition), t;\n }\n handleFragLoadAborted(e, t) {\n this.transmuxer && e.sn !== \"initSegment\" && e.stats.aborted && (this.warn(`Fragment ${e.sn}${t ? \" part \" + t.index : \"\"} of level ${e.level} was aborted`), this.resetFragmentLoading(e));\n }\n resetFragmentLoading(e) {\n (!this.fragCurrent || !this.fragContextChanged(e) && this.state !== w.FRAG_LOADING_WAITING_RETRY) && (this.state = w.IDLE);\n }\n onFragmentOrKeyLoadError(e, t) {\n if (t.chunkMeta && !t.frag) {\n const d = this.getCurrentContext(t.chunkMeta);\n d && (t.frag = d.frag);\n }\n const s = t.frag;\n if (!s || s.type !== e || !this.levels)\n return;\n if (this.fragContextChanged(s)) {\n var i;\n this.warn(`Frag load error must match current frag to retry ${s.url} > ${(i = this.fragCurrent) == null ? void 0 : i.url}`);\n return;\n }\n const r = t.details === L.FRAG_GAP;\n r && this.fragmentTracker.fragBuffered(s, !0);\n const n = t.errorAction, {\n action: o,\n retryCount: l = 0,\n retryConfig: h\n } = n || {};\n if (n && o === ge.RetryRequest && h) {\n var c;\n this.resetStartWhenNotLoaded((c = this.levelLastLoaded) != null ? c : s.level);\n const d = ks(h, l);\n this.warn(`Fragment ${s.sn} of ${e} ${s.level} errored with ${t.details}, retrying loading ${l + 1}/${h.maxNumRetry} in ${d}ms`), n.resolved = !0, this.retryDate = self.performance.now() + d, this.state = w.FRAG_LOADING_WAITING_RETRY;\n } else\n h && n ? (this.resetFragmentErrors(e), l < h.maxNumRetry ? r || (n.resolved = !0) : x.warn(`${t.details} reached or exceeded max retry (${l})`)) : (n == null ? void 0 : n.action) === ge.SendAlternateToPenaltyBox ? this.state = w.WAITING_LEVEL : this.state = w.ERROR;\n this.tickImmediate();\n }\n reduceLengthAndFlushBuffer(e) {\n if (this.state === w.PARSING || this.state === w.PARSED) {\n const t = e.parent, s = this.getFwdBufferInfo(this.mediaBuffer, t), i = s && s.len > 0.5;\n i && this.reduceMaxBufferLength(s.len);\n const r = !i;\n return r && this.warn(`Buffer full error while media.currentTime is not buffered, flush ${t} buffer`), e.frag && (this.fragmentTracker.removeFragment(e.frag), this.nextLoadPosition = e.frag.start), this.resetLoadingState(), r;\n }\n return !1;\n }\n resetFragmentErrors(e) {\n e === B.AUDIO && (this.fragCurrent = null), this.loadedmetadata || (this.startFragRequested = !1), this.state !== w.STOPPED && (this.state = w.IDLE);\n }\n afterBufferFlushed(e, t, s) {\n if (!e)\n return;\n const i = J.getBuffered(e);\n this.fragmentTracker.detectEvictedFragments(t, i, s), this.state === w.ENDED && this.resetLoadingState();\n }\n resetLoadingState() {\n this.log(\"Reset loading state\"), this.fragCurrent = null, this.fragPrevious = null, this.state = w.IDLE;\n }\n resetStartWhenNotLoaded(e) {\n if (!this.loadedmetadata) {\n this.startFragRequested = !1;\n const t = this.levels ? this.levels[e].details : null;\n t != null && t.live ? (this.startPosition = -1, this.setStartPosition(t, 0), this.resetLoadingState()) : this.nextLoadPosition = this.startPosition;\n }\n }\n resetWhenMissingContext(e) {\n var t;\n this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`), this.removeUnbufferedFrags(), this.resetStartWhenNotLoaded((t = this.levelLastLoaded) != null ? t : e.level), this.resetLoadingState();\n }\n removeUnbufferedFrags(e = 0) {\n this.fragmentTracker.removeFragmentsInRange(e, 1 / 0, this.playlistType, !1, !0);\n }\n updateLevelTiming(e, t, s, i) {\n var r;\n const n = s.details;\n if (!n) {\n this.warn(\"level.details undefined\");\n return;\n }\n if (Object.keys(e.elementaryStreams).reduce((l, h) => {\n const c = e.elementaryStreams[h];\n if (c) {\n const d = c.endPTS - c.startPTS;\n if (d <= 0)\n return this.warn(`Could not parse fragment ${e.sn} ${h} duration reliably (${d})`), l || !1;\n const u = i ? 0 : vr(n, e, c.startPTS, c.endPTS, c.startDTS, c.endDTS);\n return this.hls.trigger(m.LEVEL_PTS_UPDATED, {\n details: n,\n level: s,\n drift: u,\n type: h,\n frag: e,\n start: c.startPTS,\n end: c.endPTS\n }), !0;\n }\n return l;\n }, !1))\n s.fragmentError = 0;\n else if (((r = this.transmuxer) == null ? void 0 : r.error) === null) {\n const l = new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);\n if (s.fragmentError === 0 && (s.fragmentError++, e.gap = !0, this.fragmentTracker.removeFragment(e), this.fragmentTracker.fragBuffered(e, !0)), this.warn(l.message), this.hls.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.FRAG_PARSING_ERROR,\n fatal: !1,\n error: l,\n frag: e,\n reason: `Found no media in msn ${e.sn} of level \"${s.url}\"`\n }), !this.hls)\n return;\n this.resetTransmuxer();\n }\n this.state = w.PARSED, this.hls.trigger(m.FRAG_PARSED, {\n frag: e,\n part: t\n });\n }\n resetTransmuxer() {\n this.transmuxer && (this.transmuxer.destroy(), this.transmuxer = null);\n }\n recoverWorkerError(e) {\n if (e.event === \"demuxerWorker\") {\n var t, s, i;\n this.fragmentTracker.removeAllFragments(), this.resetTransmuxer(), this.resetStartWhenNotLoaded((t = (s = this.levelLastLoaded) != null ? s : (i = this.fragCurrent) == null ? void 0 : i.level) != null ? t : 0), this.resetLoadingState();\n }\n }\n set state(e) {\n const t = this._state;\n t !== e && (this._state = e, this.log(`${t}->${e}`));\n }\n get state() {\n return this._state;\n }\n}\nfunction Lr() {\n return self.SourceBuffer || self.WebKitSourceBuffer;\n}\nfunction Wa() {\n const a = Ht();\n if (!a)\n return !1;\n const e = Lr(), t = a && typeof a.isTypeSupported == \"function\" && a.isTypeSupported('video/mp4; codecs=\"avc1.42E01E,mp4a.40.2\"'), s = !e || e.prototype && typeof e.prototype.appendBuffer == \"function\" && typeof e.prototype.remove == \"function\";\n return !!t && !!s;\n}\nfunction Ya() {\n var a;\n const e = Lr();\n return typeof (e == null || (a = e.prototype) == null ? void 0 : a.changeType) == \"function\";\n}\nfunction za() {\n return typeof __HLS_WORKER_BUNDLE__ == \"function\";\n}\nfunction ja() {\n const a = new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`], {\n type: \"text/javascript\"\n }), e = self.URL.createObjectURL(a);\n return {\n worker: new self.Worker(e),\n objectURL: e\n };\n}\nfunction qa(a) {\n const e = new self.URL(a, self.location.href).href;\n return {\n worker: new self.Worker(e),\n scriptURL: e\n };\n}\nfunction Oe(a = \"\", e = 9e4) {\n return {\n type: a,\n id: -1,\n pid: -1,\n inputTimeScale: e,\n sequenceNumber: -1,\n samples: [],\n dropped: 0\n };\n}\nclass Ar {\n constructor() {\n this._audioTrack = void 0, this._id3Track = void 0, this.frameIndex = 0, this.cachedData = null, this.basePTS = null, this.initPTS = null, this.lastPTS = null;\n }\n resetInitSegment(e, t, s, i) {\n this._id3Track = {\n type: \"id3\",\n id: 3,\n pid: -1,\n inputTimeScale: 9e4,\n sequenceNumber: 0,\n samples: [],\n dropped: 0\n };\n }\n resetTimeStamp(e) {\n this.initPTS = e, this.resetContiguity();\n }\n resetContiguity() {\n this.basePTS = null, this.lastPTS = null, this.frameIndex = 0;\n }\n canParse(e, t) {\n return !1;\n }\n appendFrame(e, t, s) {\n }\n // feed incoming data to the front of the parsing pipeline\n demux(e, t) {\n this.cachedData && (e = Ze(this.cachedData, e), this.cachedData = null);\n let s = kt(e, 0), i = s ? s.length : 0, r;\n const n = this._audioTrack, o = this._id3Track, l = s ? _n(s) : void 0, h = e.length;\n for ((this.basePTS === null || this.frameIndex === 0 && M(l)) && (this.basePTS = Xa(l, t, this.initPTS), this.lastPTS = this.basePTS), this.lastPTS === null && (this.lastPTS = this.basePTS), s && s.length > 0 && o.samples.push({\n pts: this.lastPTS,\n dts: this.lastPTS,\n data: s,\n type: De.audioId3,\n duration: Number.POSITIVE_INFINITY\n }); i < h; ) {\n if (this.canParse(e, i)) {\n const c = this.appendFrame(n, e, i);\n c ? (this.frameIndex++, this.lastPTS = c.sample.pts, i += c.length, r = i) : i = h;\n } else\n Dn(e, i) ? (s = kt(e, i), o.samples.push({\n pts: this.lastPTS,\n dts: this.lastPTS,\n data: s,\n type: De.audioId3,\n duration: Number.POSITIVE_INFINITY\n }), i += s.length, r = i) : i++;\n if (i === h && r !== h) {\n const c = Xe(e, r);\n this.cachedData ? this.cachedData = Ze(this.cachedData, c) : this.cachedData = c;\n }\n }\n return {\n audioTrack: n,\n videoTrack: Oe(),\n id3Track: o,\n textTrack: Oe()\n };\n }\n demuxSampleAes(e, t, s) {\n return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`));\n }\n flush(e) {\n const t = this.cachedData;\n return t && (this.cachedData = null, this.demux(t, 0)), {\n audioTrack: this._audioTrack,\n videoTrack: Oe(),\n id3Track: this._id3Track,\n textTrack: Oe()\n };\n }\n destroy() {\n }\n}\nconst Xa = (a, e, t) => {\n if (M(a))\n return a * 90;\n const s = t ? t.baseTime * 9e4 / t.timescale : 0;\n return e * 9e4 + s;\n};\nfunction Za(a, e, t, s) {\n let i, r, n, o;\n const l = navigator.userAgent.toLowerCase(), h = s, c = [96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3, 7350];\n i = ((e[t + 2] & 192) >>> 6) + 1;\n const d = (e[t + 2] & 60) >>> 2;\n if (d > c.length - 1) {\n a.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.FRAG_PARSING_ERROR,\n fatal: !0,\n reason: `invalid ADTS sampling index:${d}`\n });\n return;\n }\n return n = (e[t + 2] & 1) << 2, n |= (e[t + 3] & 192) >>> 6, x.log(`manifest codec:${s}, ADTS type:${i}, samplingIndex:${d}`), /firefox/i.test(l) ? d >= 6 ? (i = 5, o = new Array(4), r = d - 3) : (i = 2, o = new Array(2), r = d) : l.indexOf(\"android\") !== -1 ? (i = 2, o = new Array(2), r = d) : (i = 5, o = new Array(4), s && (s.indexOf(\"mp4a.40.29\") !== -1 || s.indexOf(\"mp4a.40.5\") !== -1) || !s && d >= 6 ? r = d - 3 : ((s && s.indexOf(\"mp4a.40.2\") !== -1 && (d >= 6 && n === 1 || /vivaldi/i.test(l)) || !s && n === 1) && (i = 2, o = new Array(2)), r = d)), o[0] = i << 3, o[0] |= (d & 14) >> 1, o[1] |= (d & 1) << 7, o[1] |= n << 3, i === 5 && (o[1] |= (r & 14) >> 1, o[2] = (r & 1) << 7, o[2] |= 8, o[3] = 0), {\n config: o,\n samplerate: c[d],\n channelCount: n,\n codec: \"mp4a.40.\" + i,\n manifestCodec: h\n };\n}\nfunction Rr(a, e) {\n return a[e] === 255 && (a[e + 1] & 246) === 240;\n}\nfunction Ir(a, e) {\n return a[e + 1] & 1 ? 7 : 9;\n}\nfunction Us(a, e) {\n return (a[e + 3] & 3) << 11 | a[e + 4] << 3 | (a[e + 5] & 224) >>> 5;\n}\nfunction Qa(a, e) {\n return e + 5 < a.length;\n}\nfunction Nt(a, e) {\n return e + 1 < a.length && Rr(a, e);\n}\nfunction Ja(a, e) {\n return Qa(a, e) && Rr(a, e) && Us(a, e) <= a.length - e;\n}\nfunction eo(a, e) {\n if (Nt(a, e)) {\n const t = Ir(a, e);\n if (e + t >= a.length)\n return !1;\n const s = Us(a, e);\n if (s <= t)\n return !1;\n const i = e + s;\n return i === a.length || Nt(a, i);\n }\n return !1;\n}\nfunction wr(a, e, t, s, i) {\n if (!a.samplerate) {\n const r = Za(e, t, s, i);\n if (!r)\n return;\n a.config = r.config, a.samplerate = r.samplerate, a.channelCount = r.channelCount, a.codec = r.codec, a.manifestCodec = r.manifestCodec, x.log(`parsed codec:${a.codec}, rate:${r.samplerate}, channels:${r.channelCount}`);\n }\n}\nfunction Cr(a) {\n return 1024 * 9e4 / a;\n}\nfunction to(a, e) {\n const t = Ir(a, e);\n if (e + t <= a.length) {\n const s = Us(a, e) - t;\n if (s > 0)\n return {\n headerLength: t,\n frameLength: s\n };\n }\n}\nfunction Dr(a, e, t, s, i) {\n const r = Cr(a.samplerate), n = s + i * r, o = to(e, t);\n let l;\n if (o) {\n const {\n frameLength: d,\n headerLength: u\n } = o, f = u + d, g = Math.max(0, t + f - e.length);\n g ? (l = new Uint8Array(f - u), l.set(e.subarray(t + u, e.length), 0)) : l = e.subarray(t + u, t + f);\n const p = {\n unit: l,\n pts: n\n };\n return g || a.samples.push(p), {\n sample: p,\n length: f,\n missing: g\n };\n }\n const h = e.length - t;\n return l = new Uint8Array(h), l.set(e.subarray(t, e.length), 0), {\n sample: {\n unit: l,\n pts: n\n },\n length: h,\n missing: -1\n };\n}\nclass so extends Ar {\n constructor(e, t) {\n super(), this.observer = void 0, this.config = void 0, this.observer = e, this.config = t;\n }\n resetInitSegment(e, t, s, i) {\n super.resetInitSegment(e, t, s, i), this._audioTrack = {\n container: \"audio/adts\",\n type: \"audio\",\n id: 2,\n pid: -1,\n sequenceNumber: 0,\n segmentCodec: \"aac\",\n samples: [],\n manifestCodec: t,\n duration: i,\n inputTimeScale: 9e4,\n dropped: 0\n };\n }\n // Source for probe info - https://wiki.multimedia.cx/index.php?title=ADTS\n static probe(e) {\n if (!e)\n return !1;\n let s = (kt(e, 0) || []).length;\n for (let i = e.length; s < i; s++)\n if (eo(e, s))\n return x.log(\"ADTS sync word found !\"), !0;\n return !1;\n }\n canParse(e, t) {\n return Ja(e, t);\n }\n appendFrame(e, t, s) {\n wr(e, this.observer, t, s, e.manifestCodec);\n const i = Dr(e, t, s, this.basePTS, this.frameIndex);\n if (i && i.missing === 0)\n return i;\n }\n}\nconst io = /\\/emsg[-/]ID3/i;\nclass ro {\n constructor(e, t) {\n this.remainderData = null, this.timeOffset = 0, this.config = void 0, this.videoTrack = void 0, this.audioTrack = void 0, this.id3Track = void 0, this.txtTrack = void 0, this.config = t;\n }\n resetTimeStamp() {\n }\n resetInitSegment(e, t, s, i) {\n const r = this.videoTrack = Oe(\"video\", 1), n = this.audioTrack = Oe(\"audio\", 1), o = this.txtTrack = Oe(\"text\", 1);\n if (this.id3Track = Oe(\"id3\", 1), this.timeOffset = 0, !(e != null && e.byteLength))\n return;\n const l = dr(e);\n if (l.video) {\n const {\n id: h,\n timescale: c,\n codec: d\n } = l.video;\n r.id = h, r.timescale = o.timescale = c, r.codec = d;\n }\n if (l.audio) {\n const {\n id: h,\n timescale: c,\n codec: d\n } = l.audio;\n n.id = h, n.timescale = c, n.codec = d;\n }\n o.id = lr.text, r.sampleDuration = 0, r.duration = n.duration = i;\n }\n resetContiguity() {\n this.remainderData = null;\n }\n static probe(e) {\n return e = e.length > 16384 ? e.subarray(0, 16384) : e, H(e, [\"moof\"]).length > 0;\n }\n demux(e, t) {\n this.timeOffset = t;\n let s = e;\n const i = this.videoTrack, r = this.txtTrack;\n if (this.config.progressive) {\n this.remainderData && (s = Ze(this.remainderData, e));\n const o = Yn(s);\n this.remainderData = o.remainder, i.samples = o.valid || new Uint8Array();\n } else\n i.samples = s;\n const n = this.extractID3Track(i, t);\n return r.samples = ti(t, i), {\n videoTrack: i,\n audioTrack: this.audioTrack,\n id3Track: n,\n textTrack: this.txtTrack\n };\n }\n flush() {\n const e = this.timeOffset, t = this.videoTrack, s = this.txtTrack;\n t.samples = this.remainderData || new Uint8Array(), this.remainderData = null;\n const i = this.extractID3Track(t, this.timeOffset);\n return s.samples = ti(e, t), {\n videoTrack: t,\n audioTrack: Oe(),\n id3Track: i,\n textTrack: Oe()\n };\n }\n extractID3Track(e, t) {\n const s = this.id3Track;\n if (e.samples.length) {\n const i = H(e.samples, [\"emsg\"]);\n i && i.forEach((r) => {\n const n = qn(r);\n if (io.test(n.schemeIdUri)) {\n const o = M(n.presentationTime) ? n.presentationTime / n.timeScale : t + n.presentationTimeDelta / n.timeScale;\n let l = n.eventDuration === 4294967295 ? Number.POSITIVE_INFINITY : n.eventDuration / n.timeScale;\n l <= 1e-3 && (l = Number.POSITIVE_INFINITY);\n const h = n.payload;\n s.samples.push({\n data: h,\n len: h.byteLength,\n dts: o,\n pts: o,\n type: De.emsg,\n duration: l\n });\n }\n });\n }\n return s;\n }\n demuxSampleAes(e, t, s) {\n return Promise.reject(new Error(\"The MP4 demuxer does not support SAMPLE-AES decryption\"));\n }\n destroy() {\n }\n}\nlet At = null;\nconst no = [32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160], ao = [44100, 48e3, 32e3, 22050, 24e3, 16e3, 11025, 12e3, 8e3], oo = [\n // MPEG 2.5\n [\n 0,\n // Reserved\n 72,\n // Layer3\n 144,\n // Layer2\n 12\n // Layer1\n ],\n // Reserved\n [\n 0,\n // Reserved\n 0,\n // Layer3\n 0,\n // Layer2\n 0\n // Layer1\n ],\n // MPEG 2\n [\n 0,\n // Reserved\n 72,\n // Layer3\n 144,\n // Layer2\n 12\n // Layer1\n ],\n // MPEG 1\n [\n 0,\n // Reserved\n 144,\n // Layer3\n 144,\n // Layer2\n 12\n // Layer1\n ]\n], lo = [\n 0,\n // Reserved\n 1,\n // Layer3\n 1,\n // Layer2\n 4\n // Layer1\n];\nfunction _r(a, e, t, s, i) {\n if (t + 24 > e.length)\n return;\n const r = kr(e, t);\n if (r && t + r.frameLength <= e.length) {\n const n = r.samplesPerFrame * 9e4 / r.sampleRate, o = s + i * n, l = {\n unit: e.subarray(t, t + r.frameLength),\n pts: o,\n dts: o\n };\n return a.config = [], a.channelCount = r.channelCount, a.samplerate = r.sampleRate, a.samples.push(l), {\n sample: l,\n length: r.frameLength,\n missing: 0\n };\n }\n}\nfunction kr(a, e) {\n const t = a[e + 1] >> 3 & 3, s = a[e + 1] >> 1 & 3, i = a[e + 2] >> 4 & 15, r = a[e + 2] >> 2 & 3;\n if (t !== 1 && i !== 0 && i !== 15 && r !== 3) {\n const n = a[e + 2] >> 1 & 1, o = a[e + 3] >> 6, l = t === 3 ? 3 - s : s === 3 ? 3 : 4, h = no[l * 14 + i - 1] * 1e3, d = ao[(t === 3 ? 0 : t === 2 ? 1 : 2) * 3 + r], u = o === 3 ? 1 : 2, f = oo[t][s], g = lo[s], p = f * 8 * g, y = Math.floor(f * h / d + n) * g;\n if (At === null) {\n const T = (navigator.userAgent || \"\").match(/Chrome\\/(\\d+)/i);\n At = T ? parseInt(T[1]) : 0;\n }\n return !!At && At <= 87 && s === 2 && h >= 224e3 && o === 0 && (a[e + 3] = a[e + 3] | 128), {\n sampleRate: d,\n channelCount: u,\n frameLength: y,\n samplesPerFrame: p\n };\n }\n}\nfunction Bs(a, e) {\n return a[e] === 255 && (a[e + 1] & 224) === 224 && (a[e + 1] & 6) !== 0;\n}\nfunction Pr(a, e) {\n return e + 1 < a.length && Bs(a, e);\n}\nfunction ho(a, e) {\n return Bs(a, e) && 4 <= a.length - e;\n}\nfunction co(a, e) {\n if (e + 1 < a.length && Bs(a, e)) {\n const s = kr(a, e);\n let i = 4;\n s != null && s.frameLength && (i = s.frameLength);\n const r = e + i;\n return r === a.length || Pr(a, r);\n }\n return !1;\n}\nclass Li {\n constructor(e) {\n this.data = void 0, this.bytesAvailable = void 0, this.word = void 0, this.bitsAvailable = void 0, this.data = e, this.bytesAvailable = e.byteLength, this.word = 0, this.bitsAvailable = 0;\n }\n // ():void\n loadWord() {\n const e = this.data, t = this.bytesAvailable, s = e.byteLength - t, i = new Uint8Array(4), r = Math.min(4, t);\n if (r === 0)\n throw new Error(\"no bytes available\");\n i.set(e.subarray(s, s + r)), this.word = new DataView(i.buffer).getUint32(0), this.bitsAvailable = r * 8, this.bytesAvailable -= r;\n }\n // (count:int):void\n skipBits(e) {\n let t;\n e = Math.min(e, this.bytesAvailable * 8 + this.bitsAvailable), this.bitsAvailable > e ? (this.word <<= e, this.bitsAvailable -= e) : (e -= this.bitsAvailable, t = e >> 3, e -= t << 3, this.bytesAvailable -= t, this.loadWord(), this.word <<= e, this.bitsAvailable -= e);\n }\n // (size:int):uint\n readBits(e) {\n let t = Math.min(this.bitsAvailable, e);\n const s = this.word >>> 32 - t;\n if (e > 32 && x.error(\"Cannot read more than 32 bits at a time\"), this.bitsAvailable -= t, this.bitsAvailable > 0)\n this.word <<= t;\n else if (this.bytesAvailable > 0)\n this.loadWord();\n else\n throw new Error(\"no bits available\");\n return t = e - t, t > 0 && this.bitsAvailable ? s << t | this.readBits(t) : s;\n }\n // ():uint\n skipLZ() {\n let e;\n for (e = 0; e < this.bitsAvailable; ++e)\n if (this.word & 2147483648 >>> e)\n return this.word <<= e, this.bitsAvailable -= e, e;\n return this.loadWord(), e + this.skipLZ();\n }\n // ():void\n skipUEG() {\n this.skipBits(1 + this.skipLZ());\n }\n // ():void\n skipEG() {\n this.skipBits(1 + this.skipLZ());\n }\n // ():uint\n readUEG() {\n const e = this.skipLZ();\n return this.readBits(e + 1) - 1;\n }\n // ():int\n readEG() {\n const e = this.readUEG();\n return 1 & e ? 1 + e >>> 1 : -1 * (e >>> 1);\n }\n // Some convenience functions\n // :Boolean\n readBoolean() {\n return this.readBits(1) === 1;\n }\n // ():int\n readUByte() {\n return this.readBits(8);\n }\n // ():int\n readUShort() {\n return this.readBits(16);\n }\n // ():int\n readUInt() {\n return this.readBits(32);\n }\n /**\n * Advance the ExpGolomb decoder past a scaling list. The scaling\n * list is optionally transmitted as part of a sequence parameter\n * set and is not relevant to transmuxing.\n * @param count the number of entries in this scaling list\n * @see Recommendation ITU-T H.264, Section 7.3.2.1.1.1\n */\n skipScalingList(e) {\n let t = 8, s = 8, i;\n for (let r = 0; r < e; r++)\n s !== 0 && (i = this.readEG(), s = (t + i + 256) % 256), t = s === 0 ? t : s;\n }\n /**\n * Read a sequence parameter set and return some interesting video\n * properties. A sequence parameter set is the H264 metadata that\n * describes the properties of upcoming video frames.\n * @returns an object with configuration parsed from the\n * sequence parameter set, including the dimensions of the\n * associated video frames.\n */\n readSPS() {\n let e = 0, t = 0, s = 0, i = 0, r, n, o;\n const l = this.readUByte.bind(this), h = this.readBits.bind(this), c = this.readUEG.bind(this), d = this.readBoolean.bind(this), u = this.skipBits.bind(this), f = this.skipEG.bind(this), g = this.skipUEG.bind(this), p = this.skipScalingList.bind(this);\n l();\n const y = l();\n if (h(5), u(3), l(), g(), y === 100 || y === 110 || y === 122 || y === 244 || y === 44 || y === 83 || y === 86 || y === 118 || y === 128) {\n const D = c();\n if (D === 3 && u(1), g(), g(), u(1), d())\n for (n = D !== 3 ? 8 : 12, o = 0; o < n; o++)\n d() && (o < 6 ? p(16) : p(64));\n }\n g();\n const v = c();\n if (v === 0)\n c();\n else if (v === 1)\n for (u(1), f(), f(), r = c(), o = 0; o < r; o++)\n f();\n g(), u(1);\n const E = c(), T = c(), A = h(1);\n A === 0 && u(1), u(1), d() && (e = c(), t = c(), s = c(), i = c());\n let b = [1, 1];\n if (d() && d())\n switch (l()) {\n case 1:\n b = [1, 1];\n break;\n case 2:\n b = [12, 11];\n break;\n case 3:\n b = [10, 11];\n break;\n case 4:\n b = [16, 11];\n break;\n case 5:\n b = [40, 33];\n break;\n case 6:\n b = [24, 11];\n break;\n case 7:\n b = [20, 11];\n break;\n case 8:\n b = [32, 11];\n break;\n case 9:\n b = [80, 33];\n break;\n case 10:\n b = [18, 11];\n break;\n case 11:\n b = [15, 11];\n break;\n case 12:\n b = [64, 33];\n break;\n case 13:\n b = [160, 99];\n break;\n case 14:\n b = [4, 3];\n break;\n case 15:\n b = [3, 2];\n break;\n case 16:\n b = [2, 1];\n break;\n case 255: {\n b = [l() << 8 | l(), l() << 8 | l()];\n break;\n }\n }\n return {\n width: Math.ceil((E + 1) * 16 - e * 2 - t * 2),\n height: (2 - A) * (T + 1) * 16 - (A ? 2 : 4) * (s + i),\n pixelRatio: b\n };\n }\n readSliceType() {\n return this.readUByte(), this.readUEG(), this.readUEG();\n }\n}\nclass uo {\n constructor(e, t, s) {\n this.keyData = void 0, this.decrypter = void 0, this.keyData = s, this.decrypter = new Ms(t, {\n removePKCS7Padding: !1\n });\n }\n decryptBuffer(e) {\n return this.decrypter.decrypt(e, this.keyData.key.buffer, this.keyData.iv.buffer);\n }\n // AAC - encrypt all full 16 bytes blocks starting from offset 16\n decryptAacSample(e, t, s) {\n const i = e[t].unit;\n if (i.length <= 16)\n return;\n const r = i.subarray(16, i.length - i.length % 16), n = r.buffer.slice(r.byteOffset, r.byteOffset + r.length);\n this.decryptBuffer(n).then((o) => {\n const l = new Uint8Array(o);\n i.set(l, 16), this.decrypter.isSync() || this.decryptAacSamples(e, t + 1, s);\n });\n }\n decryptAacSamples(e, t, s) {\n for (; ; t++) {\n if (t >= e.length) {\n s();\n return;\n }\n if (!(e[t].unit.length < 32) && (this.decryptAacSample(e, t, s), !this.decrypter.isSync()))\n return;\n }\n }\n // AVC - encrypt one 16 bytes block out of ten, starting from offset 32\n getAvcEncryptedData(e) {\n const t = Math.floor((e.length - 48) / 160) * 16 + 16, s = new Int8Array(t);\n let i = 0;\n for (let r = 32; r < e.length - 16; r += 160, i += 16)\n s.set(e.subarray(r, r + 16), i);\n return s;\n }\n getAvcDecryptedUnit(e, t) {\n const s = new Uint8Array(t);\n let i = 0;\n for (let r = 32; r < e.length - 16; r += 160, i += 16)\n e.set(s.subarray(i, i + 16), r);\n return e;\n }\n decryptAvcSample(e, t, s, i, r) {\n const n = gr(r.data), o = this.getAvcEncryptedData(n);\n this.decryptBuffer(o.buffer).then((l) => {\n r.data = this.getAvcDecryptedUnit(n, l), this.decrypter.isSync() || this.decryptAvcSamples(e, t, s + 1, i);\n });\n }\n decryptAvcSamples(e, t, s, i) {\n if (e instanceof Uint8Array)\n throw new Error(\"Cannot decrypt samples of type Uint8Array\");\n for (; ; t++, s = 0) {\n if (t >= e.length) {\n i();\n return;\n }\n const r = e[t].units;\n for (; !(s >= r.length); s++) {\n const n = r[s];\n if (!(n.data.length <= 48 || n.type !== 1 && n.type !== 5) && (this.decryptAvcSample(e, t, s, i, n), !this.decrypter.isSync()))\n return;\n }\n }\n }\n}\nconst fe = 188;\nclass He {\n constructor(e, t, s) {\n this.observer = void 0, this.config = void 0, this.typeSupported = void 0, this.sampleAes = null, this.pmtParsed = !1, this.audioCodec = void 0, this.videoCodec = void 0, this._duration = 0, this._pmtId = -1, this._avcTrack = void 0, this._audioTrack = void 0, this._id3Track = void 0, this._txtTrack = void 0, this.aacOverFlow = null, this.avcSample = null, this.remainderData = null, this.observer = e, this.config = t, this.typeSupported = s;\n }\n static probe(e) {\n const t = He.syncOffset(e);\n return t > 0 && x.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`), t !== -1;\n }\n static syncOffset(e) {\n const t = e.length;\n let s = Math.min(fe * 5, e.length - fe) + 1, i = 0;\n for (; i < s; ) {\n let r = !1, n = -1, o = 0;\n for (let l = i; l < t; l += fe)\n if (e[l] === 71) {\n if (o++, n === -1 && (n = l, n !== 0 && (s = Math.min(n + fe * 99, e.length - fe) + 1)), r || (r = Ss(e, l) === 0), r && o > 1 && (n === 0 && o > 2 || l + fe > s))\n return n;\n } else {\n if (o)\n return -1;\n break;\n }\n i++;\n }\n return -1;\n }\n /**\n * Creates a track model internal to demuxer used to drive remuxing input\n */\n static createTrack(e, t) {\n return {\n container: e === \"video\" || e === \"audio\" ? \"video/mp2t\" : void 0,\n type: e,\n id: lr[e],\n pid: -1,\n inputTimeScale: 9e4,\n sequenceNumber: 0,\n samples: [],\n dropped: 0,\n duration: e === \"audio\" ? t : void 0\n };\n }\n /**\n * Initializes a new init segment on the demuxer/remuxer interface. Needed for discontinuities/track-switches (or at stream start)\n * Resets all internal track instances of the demuxer.\n */\n resetInitSegment(e, t, s, i) {\n this.pmtParsed = !1, this._pmtId = -1, this._avcTrack = He.createTrack(\"video\"), this._audioTrack = He.createTrack(\"audio\", i), this._id3Track = He.createTrack(\"id3\"), this._txtTrack = He.createTrack(\"text\"), this._audioTrack.segmentCodec = \"aac\", this.aacOverFlow = null, this.avcSample = null, this.remainderData = null, this.audioCodec = t, this.videoCodec = s, this._duration = i;\n }\n resetTimeStamp() {\n }\n resetContiguity() {\n const {\n _audioTrack: e,\n _avcTrack: t,\n _id3Track: s\n } = this;\n e && (e.pesData = null), t && (t.pesData = null), s && (s.pesData = null), this.aacOverFlow = null, this.avcSample = null, this.remainderData = null;\n }\n demux(e, t, s = !1, i = !1) {\n s || (this.sampleAes = null);\n let r;\n const n = this._avcTrack, o = this._audioTrack, l = this._id3Track, h = this._txtTrack;\n let c = n.pid, d = n.pesData, u = o.pid, f = l.pid, g = o.pesData, p = l.pesData, y = null, v = this.pmtParsed, E = this._pmtId, T = e.length;\n if (this.remainderData && (e = Ze(this.remainderData, e), T = e.length, this.remainderData = null), T < fe && !i)\n return this.remainderData = e, {\n audioTrack: o,\n videoTrack: n,\n id3Track: l,\n textTrack: h\n };\n const A = Math.max(0, He.syncOffset(e));\n T -= (T - A) % fe, T < e.byteLength && !i && (this.remainderData = new Uint8Array(e.buffer, T, e.buffer.byteLength - T));\n let b = 0;\n for (let I = A; I < T; I += fe)\n if (e[I] === 71) {\n const C = !!(e[I + 1] & 64), _ = Ss(e, I), R = (e[I + 3] & 48) >> 4;\n let F;\n if (R > 1) {\n if (F = I + 5 + e[I + 4], F === I + fe)\n continue;\n } else\n F = I + 4;\n switch (_) {\n case c:\n C && (d && (r = tt(d)) && this.parseAVCPES(n, h, r, !1), d = {\n data: [],\n size: 0\n }), d && (d.data.push(e.subarray(F, I + fe)), d.size += I + fe - F);\n break;\n case u:\n if (C) {\n if (g && (r = tt(g)))\n switch (o.segmentCodec) {\n case \"aac\":\n this.parseAACPES(o, r);\n break;\n case \"mp3\":\n this.parseMPEGPES(o, r);\n break;\n }\n g = {\n data: [],\n size: 0\n };\n }\n g && (g.data.push(e.subarray(F, I + fe)), g.size += I + fe - F);\n break;\n case f:\n C && (p && (r = tt(p)) && this.parseID3PES(l, r), p = {\n data: [],\n size: 0\n }), p && (p.data.push(e.subarray(F, I + fe)), p.size += I + fe - F);\n break;\n case 0:\n C && (F += e[F] + 1), E = this._pmtId = fo(e, F);\n break;\n case E: {\n C && (F += e[F] + 1);\n const k = go(e, F, this.typeSupported, s);\n c = k.avc, c > 0 && (n.pid = c), u = k.audio, u > 0 && (o.pid = u, o.segmentCodec = k.segmentCodec), f = k.id3, f > 0 && (l.pid = f), y !== null && !v && (x.warn(`MPEG-TS PMT found at ${I} after unknown PID '${y}'. Backtracking to sync byte @${A} to parse all TS packets.`), y = null, I = A - 188), v = this.pmtParsed = !0;\n break;\n }\n case 17:\n case 8191:\n break;\n default:\n y = _;\n break;\n }\n } else\n b++;\n if (b > 0) {\n const I = new Error(`Found ${b} TS packet/s that do not start with 0x47`);\n this.observer.emit(m.ERROR, m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.FRAG_PARSING_ERROR,\n fatal: !1,\n error: I,\n reason: I.message\n });\n }\n n.pesData = d, o.pesData = g, l.pesData = p;\n const D = {\n audioTrack: o,\n videoTrack: n,\n id3Track: l,\n textTrack: h\n };\n return i && this.extractRemainingSamples(D), D;\n }\n flush() {\n const {\n remainderData: e\n } = this;\n this.remainderData = null;\n let t;\n return e ? t = this.demux(e, -1, !1, !0) : t = {\n videoTrack: this._avcTrack,\n audioTrack: this._audioTrack,\n id3Track: this._id3Track,\n textTrack: this._txtTrack\n }, this.extractRemainingSamples(t), this.sampleAes ? this.decrypt(t, this.sampleAes) : t;\n }\n extractRemainingSamples(e) {\n const {\n audioTrack: t,\n videoTrack: s,\n id3Track: i,\n textTrack: r\n } = e, n = s.pesData, o = t.pesData, l = i.pesData;\n let h;\n if (n && (h = tt(n)) ? (this.parseAVCPES(s, r, h, !0), s.pesData = null) : s.pesData = n, o && (h = tt(o))) {\n switch (t.segmentCodec) {\n case \"aac\":\n this.parseAACPES(t, h);\n break;\n case \"mp3\":\n this.parseMPEGPES(t, h);\n break;\n }\n t.pesData = null;\n } else\n o != null && o.size && x.log(\"last AAC PES packet truncated,might overlap between fragments\"), t.pesData = o;\n l && (h = tt(l)) ? (this.parseID3PES(i, h), i.pesData = null) : i.pesData = l;\n }\n demuxSampleAes(e, t, s) {\n const i = this.demux(e, s, !0, !this.config.progressive), r = this.sampleAes = new uo(this.observer, this.config, t);\n return this.decrypt(i, r);\n }\n decrypt(e, t) {\n return new Promise((s) => {\n const {\n audioTrack: i,\n videoTrack: r\n } = e;\n i.samples && i.segmentCodec === \"aac\" ? t.decryptAacSamples(i.samples, 0, () => {\n r.samples ? t.decryptAvcSamples(r.samples, 0, 0, () => {\n s(e);\n }) : s(e);\n }) : r.samples && t.decryptAvcSamples(r.samples, 0, 0, () => {\n s(e);\n });\n });\n }\n destroy() {\n this._duration = 0;\n }\n parseAVCPES(e, t, s, i) {\n const r = this.parseAVCNALu(e, s.data);\n let n = this.avcSample, o, l = !1;\n s.data = null, n && r.length && !e.audFound && (ht(n, e), n = this.avcSample = Rt(!1, s.pts, s.dts, \"\")), r.forEach((h) => {\n var c;\n switch (h.type) {\n case 1: {\n let u = !1;\n o = !0;\n const f = h.data;\n if (l && f.length > 4) {\n const g = new Li(f).readSliceType();\n (g === 2 || g === 4 || g === 7 || g === 9) && (u = !0);\n }\n if (u) {\n var d;\n (d = n) != null && d.frame && !n.key && (ht(n, e), n = this.avcSample = null);\n }\n n || (n = this.avcSample = Rt(!0, s.pts, s.dts, \"\")), n.frame = !0, n.key = u;\n break;\n }\n case 5:\n o = !0, (c = n) != null && c.frame && !n.key && (ht(n, e), n = this.avcSample = null), n || (n = this.avcSample = Rt(!0, s.pts, s.dts, \"\")), n.key = !0, n.frame = !0;\n break;\n case 6: {\n o = !0, fr(h.data, 1, s.pts, t.samples);\n break;\n }\n case 7:\n if (o = !0, l = !0, !e.sps) {\n const u = h.data, g = new Li(u).readSPS();\n e.width = g.width, e.height = g.height, e.pixelRatio = g.pixelRatio, e.sps = [u], e.duration = this._duration;\n const p = u.subarray(1, 4);\n let y = \"avc1.\";\n for (let v = 0; v < 3; v++) {\n let E = p[v].toString(16);\n E.length < 2 && (E = \"0\" + E), y += E;\n }\n e.codec = y;\n }\n break;\n case 8:\n o = !0, e.pps || (e.pps = [h.data]);\n break;\n case 9:\n o = !1, e.audFound = !0, n && ht(n, e), n = this.avcSample = Rt(!1, s.pts, s.dts, \"\");\n break;\n case 12:\n o = !0;\n break;\n default:\n o = !1, n && (n.debug += \"unknown NAL \" + h.type + \" \");\n break;\n }\n n && o && n.units.push(h);\n }), i && n && (ht(n, e), this.avcSample = null);\n }\n getLastNalUnit(e) {\n var t;\n let s = this.avcSample, i;\n if ((!s || s.units.length === 0) && (s = e[e.length - 1]), (t = s) != null && t.units) {\n const r = s.units;\n i = r[r.length - 1];\n }\n return i;\n }\n parseAVCNALu(e, t) {\n const s = t.byteLength;\n let i = e.naluState || 0;\n const r = i, n = [];\n let o = 0, l, h, c, d = -1, u = 0;\n for (i === -1 && (d = 0, u = t[0] & 31, i = 0, o = 1); o < s; ) {\n if (l = t[o++], !i) {\n i = l ? 0 : 1;\n continue;\n }\n if (i === 1) {\n i = l ? 0 : 2;\n continue;\n }\n if (!l)\n i = 3;\n else if (l === 1) {\n if (d >= 0) {\n const f = {\n data: t.subarray(d, o - i - 1),\n type: u\n };\n n.push(f);\n } else {\n const f = this.getLastNalUnit(e.samples);\n if (f && (r && o <= 4 - r && f.state && (f.data = f.data.subarray(0, f.data.byteLength - r)), h = o - i - 1, h > 0)) {\n const g = new Uint8Array(f.data.byteLength + h);\n g.set(f.data, 0), g.set(t.subarray(0, h), f.data.byteLength), f.data = g, f.state = 0;\n }\n }\n o < s ? (c = t[o] & 31, d = o, u = c, i = 0) : i = -1;\n } else\n i = 0;\n }\n if (d >= 0 && i >= 0) {\n const f = {\n data: t.subarray(d, s),\n type: u,\n state: i\n };\n n.push(f);\n }\n if (n.length === 0) {\n const f = this.getLastNalUnit(e.samples);\n if (f) {\n const g = new Uint8Array(f.data.byteLength + t.byteLength);\n g.set(f.data, 0), g.set(t, f.data.byteLength), f.data = g;\n }\n }\n return e.naluState = i, n;\n }\n parseAACPES(e, t) {\n let s = 0;\n const i = this.aacOverFlow;\n let r = t.data;\n if (i) {\n this.aacOverFlow = null;\n const d = i.missing, u = i.sample.unit.byteLength;\n if (d === -1) {\n const f = new Uint8Array(u + r.byteLength);\n f.set(i.sample.unit, 0), f.set(r, u), r = f;\n } else {\n const f = u - d;\n i.sample.unit.set(r.subarray(0, d), f), e.samples.push(i.sample), s = i.missing;\n }\n }\n let n, o;\n for (n = s, o = r.length; n < o - 1 && !Nt(r, n); n++)\n ;\n if (n !== s) {\n let d;\n const u = n < o - 1;\n u ? d = `AAC PES did not start with ADTS header,offset:${n}` : d = \"No ADTS header found in AAC PES\";\n const f = new Error(d);\n if (x.warn(`parsing error: ${d}`), this.observer.emit(m.ERROR, m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.FRAG_PARSING_ERROR,\n fatal: !1,\n levelRetry: u,\n error: f,\n reason: d\n }), !u)\n return;\n }\n wr(e, this.observer, r, n, this.audioCodec);\n let l;\n if (t.pts !== void 0)\n l = t.pts;\n else if (i) {\n const d = Cr(e.samplerate);\n l = i.sample.pts + d;\n } else {\n x.warn(\"[tsdemuxer]: AAC PES unknown PTS\");\n return;\n }\n let h = 0, c;\n for (; n < o; )\n if (c = Dr(e, r, n, l, h), n += c.length, c.missing) {\n this.aacOverFlow = c;\n break;\n } else\n for (h++; n < o - 1 && !Nt(r, n); n++)\n ;\n }\n parseMPEGPES(e, t) {\n const s = t.data, i = s.length;\n let r = 0, n = 0;\n const o = t.pts;\n if (o === void 0) {\n x.warn(\"[tsdemuxer]: MPEG PES unknown PTS\");\n return;\n }\n for (; n < i; )\n if (Pr(s, n)) {\n const l = _r(e, s, n, o, r);\n if (l)\n n += l.length, r++;\n else\n break;\n } else\n n++;\n }\n parseID3PES(e, t) {\n if (t.pts === void 0) {\n x.warn(\"[tsdemuxer]: ID3 PES unknown PTS\");\n return;\n }\n const s = ne({}, t, {\n type: this._avcTrack ? De.emsg : De.audioId3,\n duration: Number.POSITIVE_INFINITY\n });\n e.samples.push(s);\n }\n}\nfunction Rt(a, e, t, s) {\n return {\n key: a,\n frame: !1,\n pts: e,\n dts: t,\n units: [],\n debug: s,\n length: 0\n };\n}\nfunction Ss(a, e) {\n return ((a[e + 1] & 31) << 8) + a[e + 2];\n}\nfunction fo(a, e) {\n return (a[e + 10] & 31) << 8 | a[e + 11];\n}\nfunction go(a, e, t, s) {\n const i = {\n audio: -1,\n avc: -1,\n id3: -1,\n segmentCodec: \"aac\"\n }, r = (a[e + 1] & 15) << 8 | a[e + 2], n = e + 3 + r - 4, o = (a[e + 10] & 15) << 8 | a[e + 11];\n for (e += 12 + o; e < n; ) {\n const l = Ss(a, e);\n switch (a[e]) {\n case 207:\n if (!s) {\n x.log(\"ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream\");\n break;\n }\n case 15:\n i.audio === -1 && (i.audio = l);\n break;\n case 21:\n i.id3 === -1 && (i.id3 = l);\n break;\n case 219:\n if (!s) {\n x.log(\"H.264 with AES-128-CBC slice encryption found in unencrypted stream\");\n break;\n }\n case 27:\n i.avc === -1 && (i.avc = l);\n break;\n case 3:\n case 4:\n t.mpeg !== !0 && t.mp3 !== !0 ? x.log(\"MPEG audio found, not supported in this browser\") : i.audio === -1 && (i.audio = l, i.segmentCodec = \"mp3\");\n break;\n case 36:\n x.warn(\"Unsupported HEVC stream type found\");\n break;\n }\n e += ((a[e + 3] & 15) << 8 | a[e + 4]) + 5;\n }\n return i;\n}\nfunction tt(a) {\n let e = 0, t, s, i, r, n;\n const o = a.data;\n if (!a || a.size === 0)\n return null;\n for (; o[0].length < 19 && o.length > 1; ) {\n const h = new Uint8Array(o[0].length + o[1].length);\n h.set(o[0]), h.set(o[1], o[0].length), o[0] = h, o.splice(1, 1);\n }\n if (t = o[0], (t[0] << 16) + (t[1] << 8) + t[2] === 1) {\n if (s = (t[4] << 8) + t[5], s && s > a.size - 6)\n return null;\n const h = t[7];\n h & 192 && (r = (t[9] & 14) * 536870912 + // 1 << 29\n (t[10] & 255) * 4194304 + // 1 << 22\n (t[11] & 254) * 16384 + // 1 << 14\n (t[12] & 255) * 128 + // 1 << 7\n (t[13] & 254) / 2, h & 64 ? (n = (t[14] & 14) * 536870912 + // 1 << 29\n (t[15] & 255) * 4194304 + // 1 << 22\n (t[16] & 254) * 16384 + // 1 << 14\n (t[17] & 255) * 128 + // 1 << 7\n (t[18] & 254) / 2, r - n > 60 * 9e4 && (x.warn(`${Math.round((r - n) / 9e4)}s delta between PTS and DTS, align them`), r = n)) : n = r), i = t[8];\n let c = i + 9;\n if (a.size <= c)\n return null;\n a.size -= c;\n const d = new Uint8Array(a.size);\n for (let u = 0, f = o.length; u < f; u++) {\n t = o[u];\n let g = t.byteLength;\n if (c)\n if (c > g) {\n c -= g;\n continue;\n } else\n t = t.subarray(c), g -= c, c = 0;\n d.set(t, e), e += g;\n }\n return s && (s -= i + 3), {\n data: d,\n pts: r,\n dts: n,\n len: s\n };\n }\n return null;\n}\nfunction ht(a, e) {\n if (a.units.length && a.frame) {\n if (a.pts === void 0) {\n const t = e.samples, s = t.length;\n if (s) {\n const i = t[s - 1];\n a.pts = i.pts, a.dts = i.dts;\n } else {\n e.dropped++;\n return;\n }\n }\n e.samples.push(a);\n }\n a.debug.length && x.log(a.pts + \"/\" + a.dts + \":\" + a.debug);\n}\nclass mo extends Ar {\n resetInitSegment(e, t, s, i) {\n super.resetInitSegment(e, t, s, i), this._audioTrack = {\n container: \"audio/mpeg\",\n type: \"audio\",\n id: 2,\n pid: -1,\n sequenceNumber: 0,\n segmentCodec: \"mp3\",\n samples: [],\n manifestCodec: t,\n duration: i,\n inputTimeScale: 9e4,\n dropped: 0\n };\n }\n static probe(e) {\n if (!e)\n return !1;\n let s = (kt(e, 0) || []).length;\n for (let i = e.length; s < i; s++)\n if (co(e, s))\n return x.log(\"MPEG Audio sync word found !\"), !0;\n return !1;\n }\n canParse(e, t) {\n return ho(e, t);\n }\n appendFrame(e, t, s) {\n if (this.basePTS !== null)\n return _r(e, t, s, this.basePTS, this.frameIndex);\n }\n}\nclass Ai {\n static getSilentFrame(e, t) {\n switch (e) {\n case \"mp4a.40.2\":\n if (t === 1)\n return new Uint8Array([0, 200, 0, 128, 35, 128]);\n if (t === 2)\n return new Uint8Array([33, 0, 73, 144, 2, 25, 0, 35, 128]);\n if (t === 3)\n return new Uint8Array([0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 142]);\n if (t === 4)\n return new Uint8Array([0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 128, 44, 128, 8, 2, 56]);\n if (t === 5)\n return new Uint8Array([0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4, 153, 0, 33, 144, 2, 56]);\n if (t === 6)\n return new Uint8Array([0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4, 153, 0, 33, 144, 2, 0, 178, 0, 32, 8, 224]);\n break;\n default:\n if (t === 1)\n return new Uint8Array([1, 64, 34, 128, 163, 78, 230, 128, 186, 8, 0, 0, 0, 28, 6, 241, 193, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94]);\n if (t === 2)\n return new Uint8Array([1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0, 6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94]);\n if (t === 3)\n return new Uint8Array([1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0, 6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94]);\n break;\n }\n }\n}\nconst Ve = Math.pow(2, 32) - 1;\nclass S {\n static init() {\n S.types = {\n avc1: [],\n // codingname\n avcC: [],\n btrt: [],\n dinf: [],\n dref: [],\n esds: [],\n ftyp: [],\n hdlr: [],\n mdat: [],\n mdhd: [],\n mdia: [],\n mfhd: [],\n minf: [],\n moof: [],\n moov: [],\n mp4a: [],\n \".mp3\": [],\n mvex: [],\n mvhd: [],\n pasp: [],\n sdtp: [],\n stbl: [],\n stco: [],\n stsc: [],\n stsd: [],\n stsz: [],\n stts: [],\n tfdt: [],\n tfhd: [],\n traf: [],\n trak: [],\n trun: [],\n trex: [],\n tkhd: [],\n vmhd: [],\n smhd: []\n };\n let e;\n for (e in S.types)\n S.types.hasOwnProperty(e) && (S.types[e] = [e.charCodeAt(0), e.charCodeAt(1), e.charCodeAt(2), e.charCodeAt(3)]);\n const t = new Uint8Array([\n 0,\n // version 0\n 0,\n 0,\n 0,\n // flags\n 0,\n 0,\n 0,\n 0,\n // pre_defined\n 118,\n 105,\n 100,\n 101,\n // handler_type: 'vide'\n 0,\n 0,\n 0,\n 0,\n // reserved\n 0,\n 0,\n 0,\n 0,\n // reserved\n 0,\n 0,\n 0,\n 0,\n // reserved\n 86,\n 105,\n 100,\n 101,\n 111,\n 72,\n 97,\n 110,\n 100,\n 108,\n 101,\n 114,\n 0\n // name: 'VideoHandler'\n ]), s = new Uint8Array([\n 0,\n // version 0\n 0,\n 0,\n 0,\n // flags\n 0,\n 0,\n 0,\n 0,\n // pre_defined\n 115,\n 111,\n 117,\n 110,\n // handler_type: 'soun'\n 0,\n 0,\n 0,\n 0,\n // reserved\n 0,\n 0,\n 0,\n 0,\n // reserved\n 0,\n 0,\n 0,\n 0,\n // reserved\n 83,\n 111,\n 117,\n 110,\n 100,\n 72,\n 97,\n 110,\n 100,\n 108,\n 101,\n 114,\n 0\n // name: 'SoundHandler'\n ]);\n S.HDLR_TYPES = {\n video: t,\n audio: s\n };\n const i = new Uint8Array([\n 0,\n // version 0\n 0,\n 0,\n 0,\n // flags\n 0,\n 0,\n 0,\n 1,\n // entry_count\n 0,\n 0,\n 0,\n 12,\n // entry_size\n 117,\n 114,\n 108,\n 32,\n // 'url' type\n 0,\n // version 0\n 0,\n 0,\n 1\n // entry_flags\n ]), r = new Uint8Array([\n 0,\n // version\n 0,\n 0,\n 0,\n // flags\n 0,\n 0,\n 0,\n 0\n // entry_count\n ]);\n S.STTS = S.STSC = S.STCO = r, S.STSZ = new Uint8Array([\n 0,\n // version\n 0,\n 0,\n 0,\n // flags\n 0,\n 0,\n 0,\n 0,\n // sample_size\n 0,\n 0,\n 0,\n 0\n // sample_count\n ]), S.VMHD = new Uint8Array([\n 0,\n // version\n 0,\n 0,\n 1,\n // flags\n 0,\n 0,\n // graphicsmode\n 0,\n 0,\n 0,\n 0,\n 0,\n 0\n // opcolor\n ]), S.SMHD = new Uint8Array([\n 0,\n // version\n 0,\n 0,\n 0,\n // flags\n 0,\n 0,\n // balance\n 0,\n 0\n // reserved\n ]), S.STSD = new Uint8Array([\n 0,\n // version 0\n 0,\n 0,\n 0,\n // flags\n 0,\n 0,\n 0,\n 1\n ]);\n const n = new Uint8Array([105, 115, 111, 109]), o = new Uint8Array([97, 118, 99, 49]), l = new Uint8Array([0, 0, 0, 1]);\n S.FTYP = S.box(S.types.ftyp, n, l, n, o), S.DINF = S.box(S.types.dinf, S.box(S.types.dref, i));\n }\n static box(e, ...t) {\n let s = 8, i = t.length;\n const r = i;\n for (; i--; )\n s += t[i].byteLength;\n const n = new Uint8Array(s);\n for (n[0] = s >> 24 & 255, n[1] = s >> 16 & 255, n[2] = s >> 8 & 255, n[3] = s & 255, n.set(e, 4), i = 0, s = 8; i < r; i++)\n n.set(t[i], s), s += t[i].byteLength;\n return n;\n }\n static hdlr(e) {\n return S.box(S.types.hdlr, S.HDLR_TYPES[e]);\n }\n static mdat(e) {\n return S.box(S.types.mdat, e);\n }\n static mdhd(e, t) {\n t *= e;\n const s = Math.floor(t / (Ve + 1)), i = Math.floor(t % (Ve + 1));\n return S.box(S.types.mdhd, new Uint8Array([\n 1,\n // version 1\n 0,\n 0,\n 0,\n // flags\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 2,\n // creation_time\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 3,\n // modification_time\n e >> 24 & 255,\n e >> 16 & 255,\n e >> 8 & 255,\n e & 255,\n // timescale\n s >> 24,\n s >> 16 & 255,\n s >> 8 & 255,\n s & 255,\n i >> 24,\n i >> 16 & 255,\n i >> 8 & 255,\n i & 255,\n 85,\n 196,\n // 'und' language (undetermined)\n 0,\n 0\n ]));\n }\n static mdia(e) {\n return S.box(S.types.mdia, S.mdhd(e.timescale, e.duration), S.hdlr(e.type), S.minf(e));\n }\n static mfhd(e) {\n return S.box(S.types.mfhd, new Uint8Array([\n 0,\n 0,\n 0,\n 0,\n // flags\n e >> 24,\n e >> 16 & 255,\n e >> 8 & 255,\n e & 255\n // sequence_number\n ]));\n }\n static minf(e) {\n return e.type === \"audio\" ? S.box(S.types.minf, S.box(S.types.smhd, S.SMHD), S.DINF, S.stbl(e)) : S.box(S.types.minf, S.box(S.types.vmhd, S.VMHD), S.DINF, S.stbl(e));\n }\n static moof(e, t, s) {\n return S.box(S.types.moof, S.mfhd(e), S.traf(s, t));\n }\n static moov(e) {\n let t = e.length;\n const s = [];\n for (; t--; )\n s[t] = S.trak(e[t]);\n return S.box.apply(null, [S.types.moov, S.mvhd(e[0].timescale, e[0].duration)].concat(s).concat(S.mvex(e)));\n }\n static mvex(e) {\n let t = e.length;\n const s = [];\n for (; t--; )\n s[t] = S.trex(e[t]);\n return S.box.apply(null, [S.types.mvex, ...s]);\n }\n static mvhd(e, t) {\n t *= e;\n const s = Math.floor(t / (Ve + 1)), i = Math.floor(t % (Ve + 1)), r = new Uint8Array([\n 1,\n // version 1\n 0,\n 0,\n 0,\n // flags\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 2,\n // creation_time\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 3,\n // modification_time\n e >> 24 & 255,\n e >> 16 & 255,\n e >> 8 & 255,\n e & 255,\n // timescale\n s >> 24,\n s >> 16 & 255,\n s >> 8 & 255,\n s & 255,\n i >> 24,\n i >> 16 & 255,\n i >> 8 & 255,\n i & 255,\n 0,\n 1,\n 0,\n 0,\n // 1.0 rate\n 1,\n 0,\n // 1.0 volume\n 0,\n 0,\n // reserved\n 0,\n 0,\n 0,\n 0,\n // reserved\n 0,\n 0,\n 0,\n 0,\n // reserved\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 64,\n 0,\n 0,\n 0,\n // transformation: unity matrix\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n // pre_defined\n 255,\n 255,\n 255,\n 255\n // next_track_ID\n ]);\n return S.box(S.types.mvhd, r);\n }\n static sdtp(e) {\n const t = e.samples || [], s = new Uint8Array(4 + t.length);\n let i, r;\n for (i = 0; i < t.length; i++)\n r = t[i].flags, s[i + 4] = r.dependsOn << 4 | r.isDependedOn << 2 | r.hasRedundancy;\n return S.box(S.types.sdtp, s);\n }\n static stbl(e) {\n return S.box(S.types.stbl, S.stsd(e), S.box(S.types.stts, S.STTS), S.box(S.types.stsc, S.STSC), S.box(S.types.stsz, S.STSZ), S.box(S.types.stco, S.STCO));\n }\n static avc1(e) {\n let t = [], s = [], i, r, n;\n for (i = 0; i < e.sps.length; i++)\n r = e.sps[i], n = r.byteLength, t.push(n >>> 8 & 255), t.push(n & 255), t = t.concat(Array.prototype.slice.call(r));\n for (i = 0; i < e.pps.length; i++)\n r = e.pps[i], n = r.byteLength, s.push(n >>> 8 & 255), s.push(n & 255), s = s.concat(Array.prototype.slice.call(r));\n const o = S.box(S.types.avcC, new Uint8Array([\n 1,\n // version\n t[3],\n // profile\n t[4],\n // profile compat\n t[5],\n // level\n 255,\n // lengthSizeMinusOne, hard-coded to 4 bytes\n 224 | e.sps.length\n // 3bit reserved (111) + numOfSequenceParameterSets\n ].concat(t).concat([\n e.pps.length\n // numOfPictureParameterSets\n ]).concat(s))), l = e.width, h = e.height, c = e.pixelRatio[0], d = e.pixelRatio[1];\n return S.box(\n S.types.avc1,\n new Uint8Array([\n 0,\n 0,\n 0,\n // reserved\n 0,\n 0,\n 0,\n // reserved\n 0,\n 1,\n // data_reference_index\n 0,\n 0,\n // pre_defined\n 0,\n 0,\n // reserved\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n // pre_defined\n l >> 8 & 255,\n l & 255,\n // width\n h >> 8 & 255,\n h & 255,\n // height\n 0,\n 72,\n 0,\n 0,\n // horizresolution\n 0,\n 72,\n 0,\n 0,\n // vertresolution\n 0,\n 0,\n 0,\n 0,\n // reserved\n 0,\n 1,\n // frame_count\n 18,\n 100,\n 97,\n 105,\n 108,\n // dailymotion/hls.js\n 121,\n 109,\n 111,\n 116,\n 105,\n 111,\n 110,\n 47,\n 104,\n 108,\n 115,\n 46,\n 106,\n 115,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n // compressorname\n 0,\n 24,\n // depth = 24\n 17,\n 17\n ]),\n // pre_defined = -1\n o,\n S.box(S.types.btrt, new Uint8Array([\n 0,\n 28,\n 156,\n 128,\n // bufferSizeDB\n 0,\n 45,\n 198,\n 192,\n // maxBitrate\n 0,\n 45,\n 198,\n 192\n ])),\n // avgBitrate\n S.box(S.types.pasp, new Uint8Array([\n c >> 24,\n // hSpacing\n c >> 16 & 255,\n c >> 8 & 255,\n c & 255,\n d >> 24,\n // vSpacing\n d >> 16 & 255,\n d >> 8 & 255,\n d & 255\n ]))\n );\n }\n static esds(e) {\n const t = e.config.length;\n return new Uint8Array([\n 0,\n // version 0\n 0,\n 0,\n 0,\n // flags\n 3,\n // descriptor_type\n 23 + t,\n // length\n 0,\n 1,\n // es_id\n 0,\n // stream_priority\n 4,\n // descriptor_type\n 15 + t,\n // length\n 64,\n // codec : mpeg4_audio\n 21,\n // stream_type\n 0,\n 0,\n 0,\n // buffer_size\n 0,\n 0,\n 0,\n 0,\n // maxBitrate\n 0,\n 0,\n 0,\n 0,\n // avgBitrate\n 5\n // descriptor_type\n ].concat([t]).concat(e.config).concat([6, 1, 2]));\n }\n static mp4a(e) {\n const t = e.samplerate;\n return S.box(S.types.mp4a, new Uint8Array([\n 0,\n 0,\n 0,\n // reserved\n 0,\n 0,\n 0,\n // reserved\n 0,\n 1,\n // data_reference_index\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n // reserved\n 0,\n e.channelCount,\n // channelcount\n 0,\n 16,\n // sampleSize:16bits\n 0,\n 0,\n 0,\n 0,\n // reserved2\n t >> 8 & 255,\n t & 255,\n //\n 0,\n 0\n ]), S.box(S.types.esds, S.esds(e)));\n }\n static mp3(e) {\n const t = e.samplerate;\n return S.box(S.types[\".mp3\"], new Uint8Array([\n 0,\n 0,\n 0,\n // reserved\n 0,\n 0,\n 0,\n // reserved\n 0,\n 1,\n // data_reference_index\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n // reserved\n 0,\n e.channelCount,\n // channelcount\n 0,\n 16,\n // sampleSize:16bits\n 0,\n 0,\n 0,\n 0,\n // reserved2\n t >> 8 & 255,\n t & 255,\n //\n 0,\n 0\n ]));\n }\n static stsd(e) {\n return e.type === \"audio\" ? e.segmentCodec === \"mp3\" && e.codec === \"mp3\" ? S.box(S.types.stsd, S.STSD, S.mp3(e)) : S.box(S.types.stsd, S.STSD, S.mp4a(e)) : S.box(S.types.stsd, S.STSD, S.avc1(e));\n }\n static tkhd(e) {\n const t = e.id, s = e.duration * e.timescale, i = e.width, r = e.height, n = Math.floor(s / (Ve + 1)), o = Math.floor(s % (Ve + 1));\n return S.box(S.types.tkhd, new Uint8Array([\n 1,\n // version 1\n 0,\n 0,\n 7,\n // flags\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 2,\n // creation_time\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 3,\n // modification_time\n t >> 24 & 255,\n t >> 16 & 255,\n t >> 8 & 255,\n t & 255,\n // track_ID\n 0,\n 0,\n 0,\n 0,\n // reserved\n n >> 24,\n n >> 16 & 255,\n n >> 8 & 255,\n n & 255,\n o >> 24,\n o >> 16 & 255,\n o >> 8 & 255,\n o & 255,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n // reserved\n 0,\n 0,\n // layer\n 0,\n 0,\n // alternate_group\n 0,\n 0,\n // non-audio track volume\n 0,\n 0,\n // reserved\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 64,\n 0,\n 0,\n 0,\n // transformation: unity matrix\n i >> 8 & 255,\n i & 255,\n 0,\n 0,\n // width\n r >> 8 & 255,\n r & 255,\n 0,\n 0\n // height\n ]));\n }\n static traf(e, t) {\n const s = S.sdtp(e), i = e.id, r = Math.floor(t / (Ve + 1)), n = Math.floor(t % (Ve + 1));\n return S.box(\n S.types.traf,\n S.box(S.types.tfhd, new Uint8Array([\n 0,\n // version 0\n 0,\n 0,\n 0,\n // flags\n i >> 24,\n i >> 16 & 255,\n i >> 8 & 255,\n i & 255\n // track_ID\n ])),\n S.box(S.types.tfdt, new Uint8Array([\n 1,\n // version 1\n 0,\n 0,\n 0,\n // flags\n r >> 24,\n r >> 16 & 255,\n r >> 8 & 255,\n r & 255,\n n >> 24,\n n >> 16 & 255,\n n >> 8 & 255,\n n & 255\n ])),\n S.trun(e, s.length + 16 + // tfhd\n 20 + // tfdt\n 8 + // traf header\n 16 + // mfhd\n 8 + // moof header\n 8),\n // mdat header\n s\n );\n }\n /**\n * Generate a track box.\n * @param track a track definition\n */\n static trak(e) {\n return e.duration = e.duration || 4294967295, S.box(S.types.trak, S.tkhd(e), S.mdia(e));\n }\n static trex(e) {\n const t = e.id;\n return S.box(S.types.trex, new Uint8Array([\n 0,\n // version 0\n 0,\n 0,\n 0,\n // flags\n t >> 24,\n t >> 16 & 255,\n t >> 8 & 255,\n t & 255,\n // track_ID\n 0,\n 0,\n 0,\n 1,\n // default_sample_description_index\n 0,\n 0,\n 0,\n 0,\n // default_sample_duration\n 0,\n 0,\n 0,\n 0,\n // default_sample_size\n 0,\n 1,\n 0,\n 1\n // default_sample_flags\n ]));\n }\n static trun(e, t) {\n const s = e.samples || [], i = s.length, r = 12 + 16 * i, n = new Uint8Array(r);\n let o, l, h, c, d, u;\n for (t += 8 + r, n.set([\n e.type === \"video\" ? 1 : 0,\n // version 1 for video with signed-int sample_composition_time_offset\n 0,\n 15,\n 1,\n // flags\n i >>> 24 & 255,\n i >>> 16 & 255,\n i >>> 8 & 255,\n i & 255,\n // sample_count\n t >>> 24 & 255,\n t >>> 16 & 255,\n t >>> 8 & 255,\n t & 255\n // data_offset\n ], 0), o = 0; o < i; o++)\n l = s[o], h = l.duration, c = l.size, d = l.flags, u = l.cts, n.set([\n h >>> 24 & 255,\n h >>> 16 & 255,\n h >>> 8 & 255,\n h & 255,\n // sample_duration\n c >>> 24 & 255,\n c >>> 16 & 255,\n c >>> 8 & 255,\n c & 255,\n // sample_size\n d.isLeading << 2 | d.dependsOn,\n d.isDependedOn << 6 | d.hasRedundancy << 4 | d.paddingValue << 1 | d.isNonSync,\n d.degradPrio & 61440,\n d.degradPrio & 15,\n // sample_flags\n u >>> 24 & 255,\n u >>> 16 & 255,\n u >>> 8 & 255,\n u & 255\n // sample_composition_time_offset\n ], 12 + 16 * o);\n return S.box(S.types.trun, n);\n }\n static initSegment(e) {\n S.types || S.init();\n const t = S.moov(e), s = new Uint8Array(S.FTYP.byteLength + t.byteLength);\n return s.set(S.FTYP), s.set(t, S.FTYP.byteLength), s;\n }\n}\nS.types = void 0;\nS.HDLR_TYPES = void 0;\nS.STTS = void 0;\nS.STSC = void 0;\nS.STCO = void 0;\nS.STSZ = void 0;\nS.VMHD = void 0;\nS.SMHD = void 0;\nS.STSD = void 0;\nS.FTYP = void 0;\nS.DINF = void 0;\nconst Or = 9e4;\nfunction $s(a, e, t = 1, s = !1) {\n const i = a * e * t;\n return s ? Math.round(i) : i;\n}\nfunction po(a, e, t = 1, s = !1) {\n return $s(a, e, 1 / t, s);\n}\nfunction ct(a, e = !1) {\n return $s(a, 1e3, 1 / Or, e);\n}\nfunction yo(a, e = 1) {\n return $s(a, Or, 1 / e);\n}\nconst vo = 10 * 1e3, Ri = 1024, To = 1152;\nlet It = null, ts = null;\nclass ss {\n constructor(e, t, s, i = \"\") {\n if (this.observer = void 0, this.config = void 0, this.typeSupported = void 0, this.ISGenerated = !1, this._initPTS = null, this._initDTS = null, this.nextAvcDts = null, this.nextAudioPts = null, this.videoSampleDuration = null, this.isAudioContiguous = !1, this.isVideoContiguous = !1, this.observer = e, this.config = t, this.typeSupported = s, this.ISGenerated = !1, It === null) {\n const n = (navigator.userAgent || \"\").match(/Chrome\\/(\\d+)/i);\n It = n ? parseInt(n[1]) : 0;\n }\n if (ts === null) {\n const r = navigator.userAgent.match(/Safari\\/(\\d+)/i);\n ts = r ? parseInt(r[1]) : 0;\n }\n }\n destroy() {\n }\n resetTimeStamp(e) {\n x.log(\"[mp4-remuxer]: initPTS & initDTS reset\"), this._initPTS = this._initDTS = e;\n }\n resetNextTimestamp() {\n x.log(\"[mp4-remuxer]: reset next timestamp\"), this.isVideoContiguous = !1, this.isAudioContiguous = !1;\n }\n resetInitSegment() {\n x.log(\"[mp4-remuxer]: ISGenerated flag reset\"), this.ISGenerated = !1;\n }\n getVideoStartPts(e) {\n let t = !1;\n const s = e.reduce((i, r) => {\n const n = r.pts - i;\n return n < -4294967296 ? (t = !0, Ie(i, r.pts)) : n > 0 ? i : r.pts;\n }, e[0].pts);\n return t && x.debug(\"PTS rollover detected\"), s;\n }\n remux(e, t, s, i, r, n, o, l) {\n let h, c, d, u, f, g, p = r, y = r;\n const v = e.pid > -1, E = t.pid > -1, T = t.samples.length, A = e.samples.length > 0, b = o && T > 0 || T > 1;\n if ((!v || A) && (!E || b) || this.ISGenerated || o) {\n this.ISGenerated || (d = this.generateIS(e, t, r, n));\n const I = this.isVideoContiguous;\n let C = -1, _;\n if (b && (C = xo(t.samples), !I && this.config.forceKeyFrameOnDiscontinuity))\n if (g = !0, C > 0) {\n x.warn(`[mp4-remuxer]: Dropped ${C} out of ${T} video samples due to a missing keyframe`);\n const R = this.getVideoStartPts(t.samples);\n t.samples = t.samples.slice(C), t.dropped += C, y += (t.samples[0].pts - R) / t.inputTimeScale, _ = y;\n } else\n C === -1 && (x.warn(`[mp4-remuxer]: No keyframe found out of ${T} video samples`), g = !1);\n if (this.ISGenerated) {\n if (A && b) {\n const R = this.getVideoStartPts(t.samples), k = (Ie(e.samples[0].pts, R) - R) / t.inputTimeScale;\n p += Math.max(0, k), y += Math.max(0, -k);\n }\n if (A) {\n if (e.samplerate || (x.warn(\"[mp4-remuxer]: regenerate InitSegment as audio detected\"), d = this.generateIS(e, t, r, n)), c = this.remuxAudio(e, p, this.isAudioContiguous, n, E || b || l === B.AUDIO ? y : void 0), b) {\n const R = c ? c.endPTS - c.startPTS : 0;\n t.inputTimeScale || (x.warn(\"[mp4-remuxer]: regenerate InitSegment as video detected\"), d = this.generateIS(e, t, r, n)), h = this.remuxVideo(t, y, I, R);\n }\n } else\n b && (h = this.remuxVideo(t, y, I, 0));\n h && (h.firstKeyFrame = C, h.independent = C !== -1, h.firstKeyFramePTS = _);\n }\n }\n return this.ISGenerated && this._initPTS && this._initDTS && (s.samples.length && (f = Fr(s, r, this._initPTS, this._initDTS)), i.samples.length && (u = Mr(i, r, this._initPTS))), {\n audio: c,\n video: h,\n initSegment: d,\n independent: g,\n text: u,\n id3: f\n };\n }\n generateIS(e, t, s, i) {\n const r = e.samples, n = t.samples, o = this.typeSupported, l = {}, h = this._initPTS;\n let c = !h || i, d = \"audio/mp4\", u, f, g;\n if (c && (u = f = 1 / 0), e.config && r.length) {\n switch (e.timescale = e.samplerate, e.segmentCodec) {\n case \"mp3\":\n o.mpeg ? (d = \"audio/mpeg\", e.codec = \"\") : o.mp3 && (e.codec = \"mp3\");\n break;\n }\n l.audio = {\n id: \"audio\",\n container: d,\n codec: e.codec,\n initSegment: e.segmentCodec === \"mp3\" && o.mpeg ? new Uint8Array(0) : S.initSegment([e]),\n metadata: {\n channelCount: e.channelCount\n }\n }, c && (g = e.inputTimeScale, !h || g !== h.timescale ? u = f = r[0].pts - Math.round(g * s) : c = !1);\n }\n if (t.sps && t.pps && n.length && (t.timescale = t.inputTimeScale, l.video = {\n id: \"main\",\n container: \"video/mp4\",\n codec: t.codec,\n initSegment: S.initSegment([t]),\n metadata: {\n width: t.width,\n height: t.height\n }\n }, c))\n if (g = t.inputTimeScale, !h || g !== h.timescale) {\n const p = this.getVideoStartPts(n), y = Math.round(g * s);\n f = Math.min(f, Ie(n[0].dts, p) - y), u = Math.min(u, p - y);\n } else\n c = !1;\n if (Object.keys(l).length)\n return this.ISGenerated = !0, c ? (this._initPTS = {\n baseTime: u,\n timescale: g\n }, this._initDTS = {\n baseTime: f,\n timescale: g\n }) : u = g = void 0, {\n tracks: l,\n initPTS: u,\n timescale: g\n };\n }\n remuxVideo(e, t, s, i) {\n const r = e.inputTimeScale, n = e.samples, o = [], l = n.length, h = this._initPTS;\n let c = this.nextAvcDts, d = 8, u = this.videoSampleDuration, f, g, p = Number.POSITIVE_INFINITY, y = Number.NEGATIVE_INFINITY, v = !1;\n if (!s || c === null) {\n const O = t * r, N = n[0].pts - Ie(n[0].dts, n[0].pts);\n c = O - N;\n }\n const E = h.baseTime * r / h.timescale;\n for (let O = 0; O < l; O++) {\n const N = n[O];\n N.pts = Ie(N.pts - E, c), N.dts = Ie(N.dts - E, c), N.dts < n[O > 0 ? O - 1 : O].dts && (v = !0);\n }\n v && n.sort(function(O, N) {\n const X = O.dts - N.dts, Q = O.pts - N.pts;\n return X || Q;\n }), f = n[0].dts, g = n[n.length - 1].dts;\n const T = g - f, A = T ? Math.round(T / (l - 1)) : u || e.inputTimeScale / 30;\n if (s) {\n const O = f - c, N = O > A, X = O < -1;\n if ((N || X) && (N ? x.warn(`AVC: ${ct(O, !0)} ms (${O}dts) hole between fragments detected, filling it`) : x.warn(`AVC: ${ct(-O, !0)} ms (${O}dts) overlapping between fragments detected`), !X || c >= n[0].pts)) {\n f = c;\n const Q = n[0].pts - O;\n n[0].dts = f, n[0].pts = Q, x.log(`Video: First PTS/DTS adjusted: ${ct(Q, !0)}/${ct(f, !0)}, delta: ${ct(O, !0)} ms`);\n }\n }\n f = Math.max(0, f);\n let b = 0, D = 0;\n for (let O = 0; O < l; O++) {\n const N = n[O], X = N.units, Q = X.length;\n let z = 0;\n for (let re = 0; re < Q; re++)\n z += X[re].data.length;\n D += z, b += Q, N.length = z, N.dts = Math.max(N.dts, f), p = Math.min(N.pts, p), y = Math.max(N.pts, y);\n }\n g = n[l - 1].dts;\n const I = D + 4 * b + 8;\n let C;\n try {\n C = new Uint8Array(I);\n } catch (O) {\n this.observer.emit(m.ERROR, m.ERROR, {\n type: U.MUX_ERROR,\n details: L.REMUX_ALLOC_ERROR,\n fatal: !1,\n error: O,\n bytes: I,\n reason: `fail allocating video mdat ${I}`\n });\n return;\n }\n const _ = new DataView(C.buffer);\n _.setUint32(0, I), C.set(S.types.mdat, 4);\n let R = !1, F = Number.POSITIVE_INFINITY, k = Number.POSITIVE_INFINITY, W = Number.NEGATIVE_INFINITY, oe = Number.NEGATIVE_INFINITY;\n for (let O = 0; O < l; O++) {\n const N = n[O], X = N.units;\n let Q = 0;\n for (let be = 0, we = X.length; be < we; be++) {\n const Le = X[be], ze = Le.data, Wt = Le.data.byteLength;\n _.setUint32(d, Wt), d += 4, C.set(ze, d), d += Wt, Q += 4 + Wt;\n }\n let z;\n if (O < l - 1)\n u = n[O + 1].dts - N.dts, z = n[O + 1].pts - N.pts;\n else {\n const be = this.config, we = O > 0 ? N.dts - n[O - 1].dts : A;\n if (z = O > 0 ? N.pts - n[O - 1].pts : A, be.stretchShortVideoTrack && this.nextAudioPts !== null) {\n const Le = Math.floor(be.maxBufferHole * r), ze = (i ? p + i * r : this.nextAudioPts) - N.pts;\n ze > Le ? (u = ze - we, u < 0 ? u = we : R = !0, x.log(`[mp4-remuxer]: It is approximately ${ze / 90} ms to the next segment; using duration ${u / 90} ms for the last video frame.`)) : u = we;\n } else\n u = we;\n }\n const re = Math.round(N.pts - N.dts);\n F = Math.min(F, u), W = Math.max(W, u), k = Math.min(k, z), oe = Math.max(oe, z), o.push(new Ii(N.key, u, Q, re));\n }\n if (o.length) {\n if (It) {\n if (It < 70) {\n const O = o[0].flags;\n O.dependsOn = 2, O.isNonSync = 0;\n }\n } else if (ts && oe - k < W - F && A / W < 0.025 && o[0].cts === 0) {\n x.warn(\"Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.\");\n let O = f;\n for (let N = 0, X = o.length; N < X; N++) {\n const Q = O + o[N].duration, z = O + o[N].cts;\n if (N < X - 1) {\n const re = Q + o[N + 1].cts;\n o[N].duration = re - z;\n } else\n o[N].duration = N ? o[N - 1].duration : A;\n o[N].cts = 0, O = Q;\n }\n }\n }\n u = R || !u ? A : u, this.nextAvcDts = c = g + u, this.videoSampleDuration = u, this.isVideoContiguous = !0;\n const V = S.moof(e.sequenceNumber++, f, ne({}, e, {\n samples: o\n })), Y = \"video\", q = {\n data1: V,\n data2: C,\n startPTS: p / r,\n endPTS: (y + u) / r,\n startDTS: f / r,\n endDTS: c / r,\n type: Y,\n hasAudio: !1,\n hasVideo: !0,\n nb: o.length,\n dropped: e.dropped\n };\n return e.samples = [], e.dropped = 0, q;\n }\n remuxAudio(e, t, s, i, r) {\n const n = e.inputTimeScale, o = e.samplerate ? e.samplerate : n, l = n / o, h = e.segmentCodec === \"aac\" ? Ri : To, c = h * l, d = this._initPTS, u = e.segmentCodec === \"mp3\" && this.typeSupported.mpeg, f = [], g = r !== void 0;\n let p = e.samples, y = u ? 0 : 8, v = this.nextAudioPts || -1;\n const E = t * n, T = d.baseTime * n / d.timescale;\n if (this.isAudioContiguous = s = s || p.length && v > 0 && (i && Math.abs(E - v) < 9e3 || Math.abs(Ie(p[0].pts - T, E) - v) < 20 * c), p.forEach(function(Y) {\n Y.pts = Ie(Y.pts - T, E);\n }), !s || v < 0) {\n if (p = p.filter((Y) => Y.pts >= 0), !p.length)\n return;\n r === 0 ? v = 0 : i && !g ? v = Math.max(0, E) : v = p[0].pts;\n }\n if (e.segmentCodec === \"aac\") {\n const Y = this.config.maxAudioFramesDrift;\n for (let q = 0, O = v; q < p.length; q++) {\n const N = p[q], X = N.pts, Q = X - O, z = Math.abs(1e3 * Q / n);\n if (Q <= -Y * c && g)\n q === 0 && (x.warn(`Audio frame @ ${(X / n).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3 * Q / n)} ms.`), this.nextAudioPts = v = O = X);\n else if (Q >= Y * c && z < vo && g) {\n let re = Math.round(Q / c);\n O = X - re * c, O < 0 && (re--, O += c), q === 0 && (this.nextAudioPts = v = O), x.warn(`[mp4-remuxer]: Injecting ${re} audio frame @ ${(O / n).toFixed(3)}s due to ${Math.round(1e3 * Q / n)} ms gap.`);\n for (let be = 0; be < re; be++) {\n const we = Math.max(O, 0);\n let Le = Ai.getSilentFrame(e.manifestCodec || e.codec, e.channelCount);\n Le || (x.log(\"[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead.\"), Le = N.unit.subarray()), p.splice(q, 0, {\n unit: Le,\n pts: we\n }), O += c, q++;\n }\n }\n N.pts = O, O += c;\n }\n }\n let A = null, b = null, D, I = 0, C = p.length;\n for (; C--; )\n I += p[C].unit.byteLength;\n for (let Y = 0, q = p.length; Y < q; Y++) {\n const O = p[Y], N = O.unit;\n let X = O.pts;\n if (b !== null) {\n const z = f[Y - 1];\n z.duration = Math.round((X - b) / l);\n } else if (s && e.segmentCodec === \"aac\" && (X = v), A = X, I > 0) {\n I += y;\n try {\n D = new Uint8Array(I);\n } catch (z) {\n this.observer.emit(m.ERROR, m.ERROR, {\n type: U.MUX_ERROR,\n details: L.REMUX_ALLOC_ERROR,\n fatal: !1,\n error: z,\n bytes: I,\n reason: `fail allocating audio mdat ${I}`\n });\n return;\n }\n u || (new DataView(D.buffer).setUint32(0, I), D.set(S.types.mdat, 4));\n } else\n return;\n D.set(N, y);\n const Q = N.byteLength;\n y += Q, f.push(new Ii(!0, h, Q, 0)), b = X;\n }\n const _ = f.length;\n if (!_)\n return;\n const R = f[f.length - 1];\n this.nextAudioPts = v = b + l * R.duration;\n const F = u ? new Uint8Array(0) : S.moof(e.sequenceNumber++, A / l, ne({}, e, {\n samples: f\n }));\n e.samples = [];\n const k = A / n, W = v / n, V = {\n data1: F,\n data2: D,\n startPTS: k,\n endPTS: W,\n startDTS: k,\n endDTS: W,\n type: \"audio\",\n hasAudio: !0,\n hasVideo: !1,\n nb: _\n };\n return this.isAudioContiguous = !0, V;\n }\n remuxEmptyAudio(e, t, s, i) {\n const r = e.inputTimeScale, n = e.samplerate ? e.samplerate : r, o = r / n, l = this.nextAudioPts, h = this._initDTS, c = h.baseTime * 9e4 / h.timescale, d = (l !== null ? l : i.startDTS * r) + c, u = i.endDTS * r + c, f = o * Ri, g = Math.ceil((u - d) / f), p = Ai.getSilentFrame(e.manifestCodec || e.codec, e.channelCount);\n if (x.warn(\"[mp4-remuxer]: remux empty Audio\"), !p) {\n x.trace(\"[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec\");\n return;\n }\n const y = [];\n for (let v = 0; v < g; v++) {\n const E = d + v * f;\n y.push({\n unit: p,\n pts: E,\n dts: E\n });\n }\n return e.samples = y, this.remuxAudio(e, t, s, !1);\n }\n}\nfunction Ie(a, e) {\n let t;\n if (e === null)\n return a;\n for (e < a ? t = -8589934592 : t = 8589934592; Math.abs(a - e) > 4294967296; )\n a += t;\n return a;\n}\nfunction xo(a) {\n for (let e = 0; e < a.length; e++)\n if (a[e].key)\n return e;\n return -1;\n}\nfunction Fr(a, e, t, s) {\n const i = a.samples.length;\n if (!i)\n return;\n const r = a.inputTimeScale;\n for (let o = 0; o < i; o++) {\n const l = a.samples[o];\n l.pts = Ie(l.pts - t.baseTime * r / t.timescale, e * r) / r, l.dts = Ie(l.dts - s.baseTime * r / s.timescale, e * r) / r;\n }\n const n = a.samples;\n return a.samples = [], {\n samples: n\n };\n}\nfunction Mr(a, e, t) {\n const s = a.samples.length;\n if (!s)\n return;\n const i = a.inputTimeScale;\n for (let n = 0; n < s; n++) {\n const o = a.samples[n];\n o.pts = Ie(o.pts - t.baseTime * i / t.timescale, e * i) / i;\n }\n a.samples.sort((n, o) => n.pts - o.pts);\n const r = a.samples;\n return a.samples = [], {\n samples: r\n };\n}\nclass Ii {\n constructor(e, t, s, i) {\n this.size = void 0, this.duration = void 0, this.cts = void 0, this.flags = void 0, this.duration = t, this.size = s, this.cts = i, this.flags = new Eo(e);\n }\n}\nclass Eo {\n constructor(e) {\n this.isLeading = 0, this.isDependedOn = 0, this.hasRedundancy = 0, this.degradPrio = 0, this.dependsOn = 1, this.isNonSync = 1, this.dependsOn = e ? 2 : 1, this.isNonSync = e ? 0 : 1;\n }\n}\nclass So {\n constructor() {\n this.emitInitSegment = !1, this.audioCodec = void 0, this.videoCodec = void 0, this.initData = void 0, this.initPTS = null, this.initTracks = void 0, this.lastEndTime = null;\n }\n destroy() {\n }\n resetTimeStamp(e) {\n this.initPTS = e, this.lastEndTime = null;\n }\n resetNextTimestamp() {\n this.lastEndTime = null;\n }\n resetInitSegment(e, t, s, i) {\n this.audioCodec = t, this.videoCodec = s, this.generateInitSegment(Gn(e, i)), this.emitInitSegment = !0;\n }\n generateInitSegment(e) {\n let {\n audioCodec: t,\n videoCodec: s\n } = this;\n if (!(e != null && e.byteLength)) {\n this.initTracks = void 0, this.initData = void 0;\n return;\n }\n const i = this.initData = dr(e);\n t || (t = wi(i.audio, j.AUDIO)), s || (s = wi(i.video, j.VIDEO));\n const r = {};\n i.audio && i.video ? r.audiovideo = {\n container: \"video/mp4\",\n codec: t + \",\" + s,\n initSegment: e,\n id: \"main\"\n } : i.audio ? r.audio = {\n container: \"audio/mp4\",\n codec: t,\n initSegment: e,\n id: \"audio\"\n } : i.video ? r.video = {\n container: \"video/mp4\",\n codec: s,\n initSegment: e,\n id: \"main\"\n } : x.warn(\"[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes.\"), this.initTracks = r;\n }\n remux(e, t, s, i, r, n) {\n var o, l;\n let {\n initPTS: h,\n lastEndTime: c\n } = this;\n const d = {\n audio: void 0,\n video: void 0,\n text: i,\n id3: s,\n initSegment: void 0\n };\n M(c) || (c = this.lastEndTime = r || 0);\n const u = t.samples;\n if (!(u != null && u.length))\n return d;\n const f = {\n initPTS: void 0,\n timescale: 1\n };\n let g = this.initData;\n if ((o = g) != null && o.length || (this.generateInitSegment(u), g = this.initData), !((l = g) != null && l.length))\n return x.warn(\"[passthrough-remuxer.ts]: Failed to generate initSegment.\"), d;\n this.emitInitSegment && (f.tracks = this.initTracks, this.emitInitSegment = !1);\n const p = Hn(u, g), y = Vn(g, u), v = y === null ? r : y;\n (bo(h, v, r, p) || f.timescale !== h.timescale && n) && (f.initPTS = v - r, h && h.timescale === 1 && x.warn(`Adjusting initPTS by ${f.initPTS - h.baseTime}`), this.initPTS = h = {\n baseTime: f.initPTS,\n timescale: 1\n });\n const E = e ? v - h.baseTime / h.timescale : c, T = E + p;\n Wn(g, u, h.baseTime / h.timescale), p > 0 ? this.lastEndTime = T : (x.warn(\"Duration parsed from mp4 should be greater than zero\"), this.resetNextTimestamp());\n const A = !!g.audio, b = !!g.video;\n let D = \"\";\n A && (D += \"audio\"), b && (D += \"video\");\n const I = {\n data1: u,\n startPTS: E,\n startDTS: E,\n endPTS: T,\n endDTS: T,\n type: D,\n hasAudio: A,\n hasVideo: b,\n nb: 1,\n dropped: 0\n };\n return d.audio = I.type === \"audio\" ? I : void 0, d.video = I.type !== \"audio\" ? I : void 0, d.initSegment = f, d.id3 = Fr(s, r, h, h), i.samples.length && (d.text = Mr(i, r, h)), d;\n }\n}\nfunction bo(a, e, t, s) {\n if (a === null)\n return !0;\n const i = Math.max(s, 1), r = e - a.baseTime / a.timescale;\n return Math.abs(r - t) > i;\n}\nfunction wi(a, e) {\n const t = a == null ? void 0 : a.codec;\n return t && t.length > 4 ? t : t === \"hvc1\" || t === \"hev1\" ? \"hvc1.1.6.L120.90\" : t === \"av01\" ? \"av01.0.04M.08\" : t === \"avc1\" || e === j.VIDEO ? \"avc1.42e01e\" : \"mp4a.40.5\";\n}\nlet $e;\ntry {\n $e = self.performance.now.bind(self.performance);\n} catch {\n x.debug(\"Unable to use Performance API on this environment\"), $e = typeof self < \"u\" && self.Date.now;\n}\nconst is = [{\n demux: ro,\n remux: So\n}, {\n demux: He,\n remux: ss\n}, {\n demux: so,\n remux: ss\n}, {\n demux: mo,\n remux: ss\n}];\nclass Ci {\n constructor(e, t, s, i, r) {\n this.async = !1, this.observer = void 0, this.typeSupported = void 0, this.config = void 0, this.vendor = void 0, this.id = void 0, this.demuxer = void 0, this.remuxer = void 0, this.decrypter = void 0, this.probe = void 0, this.decryptionPromise = null, this.transmuxConfig = void 0, this.currentTransmuxState = void 0, this.observer = e, this.typeSupported = t, this.config = s, this.vendor = i, this.id = r;\n }\n configure(e) {\n this.transmuxConfig = e, this.decrypter && this.decrypter.reset();\n }\n push(e, t, s, i) {\n const r = s.transmuxing;\n r.executeStart = $e();\n let n = new Uint8Array(e);\n const {\n currentTransmuxState: o,\n transmuxConfig: l\n } = this;\n i && (this.currentTransmuxState = i);\n const {\n contiguous: h,\n discontinuity: c,\n trackSwitch: d,\n accurateTimeOffset: u,\n timeOffset: f,\n initSegmentChange: g\n } = i || o, {\n audioCodec: p,\n videoCodec: y,\n defaultInitPts: v,\n duration: E,\n initSegmentData: T\n } = l, A = Lo(n, t);\n if (A && A.method === \"AES-128\") {\n const C = this.getDecrypter();\n if (C.isSync()) {\n let _ = C.softwareDecrypt(n, A.key.buffer, A.iv.buffer);\n if (s.part > -1 && (_ = C.flush()), !_)\n return r.executeEnd = $e(), rs(s);\n n = new Uint8Array(_);\n } else\n return this.decryptionPromise = C.webCryptoDecrypt(n, A.key.buffer, A.iv.buffer).then((_) => {\n const R = this.push(_, null, s);\n return this.decryptionPromise = null, R;\n }), this.decryptionPromise;\n }\n const b = this.needsProbing(c, d);\n if (b) {\n const C = this.configureTransmuxer(n);\n if (C)\n return x.warn(`[transmuxer] ${C.message}`), this.observer.emit(m.ERROR, m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.FRAG_PARSING_ERROR,\n fatal: !1,\n error: C,\n reason: C.message\n }), r.executeEnd = $e(), rs(s);\n }\n (c || d || g || b) && this.resetInitSegment(T, p, y, E, t), (c || g || b) && this.resetInitialTimestamp(v), h || this.resetContiguity();\n const D = this.transmux(n, A, f, u, s), I = this.currentTransmuxState;\n return I.contiguous = !0, I.discontinuity = !1, I.trackSwitch = !1, r.executeEnd = $e(), D;\n }\n // Due to data caching, flush calls can produce more than one TransmuxerResult (hence the Array type)\n flush(e) {\n const t = e.transmuxing;\n t.executeStart = $e();\n const {\n decrypter: s,\n currentTransmuxState: i,\n decryptionPromise: r\n } = this;\n if (r)\n return r.then(() => this.flush(e));\n const n = [], {\n timeOffset: o\n } = i;\n if (s) {\n const d = s.flush();\n d && n.push(this.push(d, null, e));\n }\n const {\n demuxer: l,\n remuxer: h\n } = this;\n if (!l || !h)\n return t.executeEnd = $e(), [rs(e)];\n const c = l.flush(o);\n return _t(c) ? c.then((d) => (this.flushRemux(n, d, e), n)) : (this.flushRemux(n, c, e), n);\n }\n flushRemux(e, t, s) {\n const {\n audioTrack: i,\n videoTrack: r,\n id3Track: n,\n textTrack: o\n } = t, {\n accurateTimeOffset: l,\n timeOffset: h\n } = this.currentTransmuxState;\n x.log(`[transmuxer.ts]: Flushed fragment ${s.sn}${s.part > -1 ? \" p: \" + s.part : \"\"} of level ${s.level}`);\n const c = this.remuxer.remux(i, r, n, o, h, l, !0, this.id);\n e.push({\n remuxResult: c,\n chunkMeta: s\n }), s.transmuxing.executeEnd = $e();\n }\n resetInitialTimestamp(e) {\n const {\n demuxer: t,\n remuxer: s\n } = this;\n !t || !s || (t.resetTimeStamp(e), s.resetTimeStamp(e));\n }\n resetContiguity() {\n const {\n demuxer: e,\n remuxer: t\n } = this;\n !e || !t || (e.resetContiguity(), t.resetNextTimestamp());\n }\n resetInitSegment(e, t, s, i, r) {\n const {\n demuxer: n,\n remuxer: o\n } = this;\n !n || !o || (n.resetInitSegment(e, t, s, i), o.resetInitSegment(e, t, s, r));\n }\n destroy() {\n this.demuxer && (this.demuxer.destroy(), this.demuxer = void 0), this.remuxer && (this.remuxer.destroy(), this.remuxer = void 0);\n }\n transmux(e, t, s, i, r) {\n let n;\n return t && t.method === \"SAMPLE-AES\" ? n = this.transmuxSampleAes(e, t, s, i, r) : n = this.transmuxUnencrypted(e, s, i, r), n;\n }\n transmuxUnencrypted(e, t, s, i) {\n const {\n audioTrack: r,\n videoTrack: n,\n id3Track: o,\n textTrack: l\n } = this.demuxer.demux(e, t, !1, !this.config.progressive);\n return {\n remuxResult: this.remuxer.remux(r, n, o, l, t, s, !1, this.id),\n chunkMeta: i\n };\n }\n transmuxSampleAes(e, t, s, i, r) {\n return this.demuxer.demuxSampleAes(e, t, s).then((n) => ({\n remuxResult: this.remuxer.remux(n.audioTrack, n.videoTrack, n.id3Track, n.textTrack, s, i, !1, this.id),\n chunkMeta: r\n }));\n }\n configureTransmuxer(e) {\n const {\n config: t,\n observer: s,\n typeSupported: i,\n vendor: r\n } = this;\n let n;\n for (let d = 0, u = is.length; d < u; d++)\n if (is[d].demux.probe(e)) {\n n = is[d];\n break;\n }\n if (!n)\n return new Error(\"Failed to find demuxer by probing fragment data\");\n const o = this.demuxer, l = this.remuxer, h = n.remux, c = n.demux;\n (!l || !(l instanceof h)) && (this.remuxer = new h(s, t, i, r)), (!o || !(o instanceof c)) && (this.demuxer = new c(s, t, i), this.probe = c.probe);\n }\n needsProbing(e, t) {\n return !this.demuxer || !this.remuxer || e || t;\n }\n getDecrypter() {\n let e = this.decrypter;\n return e || (e = this.decrypter = new Ms(this.config)), e;\n }\n}\nfunction Lo(a, e) {\n let t = null;\n return a.byteLength > 0 && e != null && e.key != null && e.iv !== null && e.method != null && (t = e), t;\n}\nconst rs = (a) => ({\n remuxResult: {},\n chunkMeta: a\n});\nfunction _t(a) {\n return \"then\" in a && a.then instanceof Function;\n}\nclass Ao {\n constructor(e, t, s, i, r) {\n this.audioCodec = void 0, this.videoCodec = void 0, this.initSegmentData = void 0, this.duration = void 0, this.defaultInitPts = void 0, this.audioCodec = e, this.videoCodec = t, this.initSegmentData = s, this.duration = i, this.defaultInitPts = r || null;\n }\n}\nclass Ro {\n constructor(e, t, s, i, r, n) {\n this.discontinuity = void 0, this.contiguous = void 0, this.accurateTimeOffset = void 0, this.trackSwitch = void 0, this.timeOffset = void 0, this.initSegmentChange = void 0, this.discontinuity = e, this.contiguous = t, this.accurateTimeOffset = s, this.trackSwitch = i, this.timeOffset = r, this.initSegmentChange = n;\n }\n}\nvar Nr = { exports: {} };\n(function(a) {\n var e = Object.prototype.hasOwnProperty, t = \"~\";\n function s() {\n }\n Object.create && (s.prototype = /* @__PURE__ */ Object.create(null), new s().__proto__ || (t = !1));\n function i(l, h, c) {\n this.fn = l, this.context = h, this.once = c || !1;\n }\n function r(l, h, c, d, u) {\n if (typeof c != \"function\")\n throw new TypeError(\"The listener must be a function\");\n var f = new i(c, d || l, u), g = t ? t + h : h;\n return l._events[g] ? l._events[g].fn ? l._events[g] = [l._events[g], f] : l._events[g].push(f) : (l._events[g] = f, l._eventsCount++), l;\n }\n function n(l, h) {\n --l._eventsCount === 0 ? l._events = new s() : delete l._events[h];\n }\n function o() {\n this._events = new s(), this._eventsCount = 0;\n }\n o.prototype.eventNames = function() {\n var h = [], c, d;\n if (this._eventsCount === 0)\n return h;\n for (d in c = this._events)\n e.call(c, d) && h.push(t ? d.slice(1) : d);\n return Object.getOwnPropertySymbols ? h.concat(Object.getOwnPropertySymbols(c)) : h;\n }, o.prototype.listeners = function(h) {\n var c = t ? t + h : h, d = this._events[c];\n if (!d)\n return [];\n if (d.fn)\n return [d.fn];\n for (var u = 0, f = d.length, g = new Array(f); u < f; u++)\n g[u] = d[u].fn;\n return g;\n }, o.prototype.listenerCount = function(h) {\n var c = t ? t + h : h, d = this._events[c];\n return d ? d.fn ? 1 : d.length : 0;\n }, o.prototype.emit = function(h, c, d, u, f, g) {\n var p = t ? t + h : h;\n if (!this._events[p])\n return !1;\n var y = this._events[p], v = arguments.length, E, T;\n if (y.fn) {\n switch (y.once && this.removeListener(h, y.fn, void 0, !0), v) {\n case 1:\n return y.fn.call(y.context), !0;\n case 2:\n return y.fn.call(y.context, c), !0;\n case 3:\n return y.fn.call(y.context, c, d), !0;\n case 4:\n return y.fn.call(y.context, c, d, u), !0;\n case 5:\n return y.fn.call(y.context, c, d, u, f), !0;\n case 6:\n return y.fn.call(y.context, c, d, u, f, g), !0;\n }\n for (T = 1, E = new Array(v - 1); T < v; T++)\n E[T - 1] = arguments[T];\n y.fn.apply(y.context, E);\n } else {\n var A = y.length, b;\n for (T = 0; T < A; T++)\n switch (y[T].once && this.removeListener(h, y[T].fn, void 0, !0), v) {\n case 1:\n y[T].fn.call(y[T].context);\n break;\n case 2:\n y[T].fn.call(y[T].context, c);\n break;\n case 3:\n y[T].fn.call(y[T].context, c, d);\n break;\n case 4:\n y[T].fn.call(y[T].context, c, d, u);\n break;\n default:\n if (!E)\n for (b = 1, E = new Array(v - 1); b < v; b++)\n E[b - 1] = arguments[b];\n y[T].fn.apply(y[T].context, E);\n }\n }\n return !0;\n }, o.prototype.on = function(h, c, d) {\n return r(this, h, c, d, !1);\n }, o.prototype.once = function(h, c, d) {\n return r(this, h, c, d, !0);\n }, o.prototype.removeListener = function(h, c, d, u) {\n var f = t ? t + h : h;\n if (!this._events[f])\n return this;\n if (!c)\n return n(this, f), this;\n var g = this._events[f];\n if (g.fn)\n g.fn === c && (!u || g.once) && (!d || g.context === d) && n(this, f);\n else {\n for (var p = 0, y = [], v = g.length; p < v; p++)\n (g[p].fn !== c || u && !g[p].once || d && g[p].context !== d) && y.push(g[p]);\n y.length ? this._events[f] = y.length === 1 ? y[0] : y : n(this, f);\n }\n return this;\n }, o.prototype.removeAllListeners = function(h) {\n var c;\n return h ? (c = t ? t + h : h, this._events[c] && n(this, c)) : (this._events = new s(), this._eventsCount = 0), this;\n }, o.prototype.off = o.prototype.removeListener, o.prototype.addListener = o.prototype.on, o.prefixed = t, o.EventEmitter = o, a.exports = o;\n})(Nr);\nvar Io = Nr.exports, Gs = /* @__PURE__ */ dn(Io);\nconst ns = Ht() || {\n isTypeSupported: () => !1\n};\nclass Ur {\n constructor(e, t, s, i) {\n this.error = null, this.hls = void 0, this.id = void 0, this.observer = void 0, this.frag = null, this.part = null, this.useWorker = void 0, this.workerContext = null, this.onwmsg = void 0, this.transmuxer = null, this.onTransmuxComplete = void 0, this.onFlush = void 0;\n const r = e.config;\n this.hls = e, this.id = t, this.useWorker = !!r.enableWorker, this.onTransmuxComplete = s, this.onFlush = i;\n const n = (h, c) => {\n c = c || {}, c.frag = this.frag, c.id = this.id, h === m.ERROR && (this.error = c.error), this.hls.trigger(h, c);\n };\n this.observer = new Gs(), this.observer.on(m.FRAG_DECRYPTED, n), this.observer.on(m.ERROR, n);\n const o = {\n mp4: ns.isTypeSupported(\"video/mp4\"),\n mpeg: ns.isTypeSupported(\"audio/mpeg\"),\n mp3: ns.isTypeSupported('audio/mp4; codecs=\"mp3\"')\n }, l = navigator.vendor;\n if (this.useWorker && typeof Worker < \"u\" && (r.workerPath || za())) {\n try {\n r.workerPath ? (x.log(`loading Web Worker ${r.workerPath} for \"${t}\"`), this.workerContext = qa(r.workerPath)) : (x.log(`injecting Web Worker for \"${t}\"`), this.workerContext = ja()), this.onwmsg = (d) => this.onWorkerMessage(d);\n const {\n worker: c\n } = this.workerContext;\n c.addEventListener(\"message\", this.onwmsg), c.onerror = (d) => {\n const u = new Error(`${d.message} (${d.filename}:${d.lineno})`);\n r.enableWorker = !1, x.warn(`Error in \"${t}\" Web Worker, fallback to inline`), this.hls.trigger(m.ERROR, {\n type: U.OTHER_ERROR,\n details: L.INTERNAL_EXCEPTION,\n fatal: !1,\n event: \"demuxerWorker\",\n error: u\n });\n }, c.postMessage({\n cmd: \"init\",\n typeSupported: o,\n vendor: l,\n id: t,\n config: JSON.stringify(r)\n });\n } catch (c) {\n x.warn(`Error setting up \"${t}\" Web Worker, fallback to inline`, c), this.resetWorker(), this.error = null, this.transmuxer = new Ci(this.observer, o, r, l, t);\n }\n return;\n }\n this.transmuxer = new Ci(this.observer, o, r, l, t);\n }\n resetWorker() {\n if (this.workerContext) {\n const {\n worker: e,\n objectURL: t\n } = this.workerContext;\n t && self.URL.revokeObjectURL(t), e.removeEventListener(\"message\", this.onwmsg), e.onerror = null, e.terminate(), this.workerContext = null;\n }\n }\n destroy() {\n if (this.workerContext)\n this.resetWorker(), this.onwmsg = void 0;\n else {\n const t = this.transmuxer;\n t && (t.destroy(), this.transmuxer = null);\n }\n const e = this.observer;\n e && e.removeAllListeners(), this.frag = null, this.observer = null, this.hls = null;\n }\n push(e, t, s, i, r, n, o, l, h, c) {\n var d, u;\n h.transmuxing.start = self.performance.now();\n const {\n transmuxer: f\n } = this, g = n ? n.start : r.start, p = r.decryptdata, y = this.frag, v = !(y && r.cc === y.cc), E = !(y && h.level === y.level), T = y ? h.sn - y.sn : -1, A = this.part ? h.part - this.part.index : -1, b = T === 0 && h.id > 1 && h.id === (y == null ? void 0 : y.stats.chunkCount), D = !E && (T === 1 || T === 0 && (A === 1 || b && A <= 0)), I = self.performance.now();\n (E || T || r.stats.parsing.start === 0) && (r.stats.parsing.start = I), n && (A || !D) && (n.stats.parsing.start = I);\n const C = !(y && ((d = r.initSegment) == null ? void 0 : d.url) === ((u = y.initSegment) == null ? void 0 : u.url)), _ = new Ro(v, D, l, E, g, C);\n if (!D || v || C) {\n x.log(`[transmuxer-interface, ${r.type}]: Starting new transmux session for sn: ${h.sn} p: ${h.part} level: ${h.level} id: ${h.id}\n discontinuity: ${v}\n trackSwitch: ${E}\n contiguous: ${D}\n accurateTimeOffset: ${l}\n timeOffset: ${g}\n initSegmentChange: ${C}`);\n const R = new Ao(s, i, t, o, c);\n this.configureTransmuxer(R);\n }\n if (this.frag = r, this.part = n, this.workerContext)\n this.workerContext.worker.postMessage({\n cmd: \"demux\",\n data: e,\n decryptdata: p,\n chunkMeta: h,\n state: _\n }, e instanceof ArrayBuffer ? [e] : []);\n else if (f) {\n const R = f.push(e, p, h, _);\n _t(R) ? (f.async = !0, R.then((F) => {\n this.handleTransmuxComplete(F);\n }).catch((F) => {\n this.transmuxerError(F, h, \"transmuxer-interface push error\");\n })) : (f.async = !1, this.handleTransmuxComplete(R));\n }\n }\n flush(e) {\n e.transmuxing.start = self.performance.now();\n const {\n transmuxer: t\n } = this;\n if (this.workerContext)\n this.workerContext.worker.postMessage({\n cmd: \"flush\",\n chunkMeta: e\n });\n else if (t) {\n let s = t.flush(e);\n _t(s) || t.async ? (_t(s) || (s = Promise.resolve(s)), s.then((r) => {\n this.handleFlushResult(r, e);\n }).catch((r) => {\n this.transmuxerError(r, e, \"transmuxer-interface flush error\");\n })) : this.handleFlushResult(s, e);\n }\n }\n transmuxerError(e, t, s) {\n this.hls && (this.error = e, this.hls.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.FRAG_PARSING_ERROR,\n chunkMeta: t,\n fatal: !1,\n error: e,\n err: e,\n reason: s\n }));\n }\n handleFlushResult(e, t) {\n e.forEach((s) => {\n this.handleTransmuxComplete(s);\n }), this.onFlush(t);\n }\n onWorkerMessage(e) {\n const t = e.data, s = this.hls;\n switch (t.event) {\n case \"init\": {\n var i;\n const r = (i = this.workerContext) == null ? void 0 : i.objectURL;\n r && self.URL.revokeObjectURL(r);\n break;\n }\n case \"transmuxComplete\": {\n this.handleTransmuxComplete(t.data);\n break;\n }\n case \"flush\": {\n this.onFlush(t.data);\n break;\n }\n case \"workerLog\":\n x[t.data.logType] && x[t.data.logType](t.data.message);\n break;\n default: {\n t.data = t.data || {}, t.data.frag = this.frag, t.data.id = this.id, s.trigger(t.event, t.data);\n break;\n }\n }\n }\n configureTransmuxer(e) {\n const {\n transmuxer: t\n } = this;\n this.workerContext ? this.workerContext.worker.postMessage({\n cmd: \"configure\",\n config: e\n }) : t && t.configure(e);\n }\n handleTransmuxComplete(e) {\n e.chunkMeta.transmuxing.end = self.performance.now(), this.onTransmuxComplete(e);\n }\n}\nconst wo = 250, as = 2, Co = 0.1, Do = 0.05;\nclass _o {\n constructor(e, t, s, i) {\n this.config = void 0, this.media = null, this.fragmentTracker = void 0, this.hls = void 0, this.nudgeRetry = 0, this.stallReported = !1, this.stalled = null, this.moved = !1, this.seeking = !1, this.config = e, this.media = t, this.fragmentTracker = s, this.hls = i;\n }\n destroy() {\n this.media = null, this.hls = this.fragmentTracker = null;\n }\n /**\n * Checks if the playhead is stuck within a gap, and if so, attempts to free it.\n * A gap is an unbuffered range between two buffered ranges (or the start and the first buffered range).\n *\n * @param lastCurrentTime - Previously read playhead position\n */\n poll(e, t) {\n const {\n config: s,\n media: i,\n stalled: r\n } = this;\n if (i === null)\n return;\n const {\n currentTime: n,\n seeking: o\n } = i, l = this.seeking && !o, h = !this.seeking && o;\n if (this.seeking = o, n !== e) {\n if (this.moved = !0, r !== null) {\n if (this.stallReported) {\n const v = self.performance.now() - r;\n x.warn(`playback not stuck anymore @${n}, after ${Math.round(v)}ms`), this.stallReported = !1;\n }\n this.stalled = null, this.nudgeRetry = 0;\n }\n return;\n }\n if (h || l) {\n this.stalled = null;\n return;\n }\n if (i.paused && !o || i.ended || i.playbackRate === 0 || !J.getBuffered(i).length)\n return;\n const c = J.bufferInfo(i, n, 0), d = c.len > 0, u = c.nextStart || 0;\n if (!d && !u)\n return;\n if (o) {\n const v = c.len > as, E = !u || t && t.start <= n || u - n > as && !this.fragmentTracker.getPartialFragment(n);\n if (v || E)\n return;\n this.moved = !1;\n }\n if (!this.moved && this.stalled !== null) {\n var f;\n const v = Math.max(u, c.start || 0) - n, E = this.hls.levels ? this.hls.levels[this.hls.currentLevel] : null, A = (E == null || (f = E.details) == null ? void 0 : f.live) ? E.details.targetduration * 2 : as, b = this.fragmentTracker.getPartialFragment(n);\n if (v > 0 && (v <= A || b)) {\n this._trySkipBufferHole(b);\n return;\n }\n }\n const g = self.performance.now();\n if (r === null) {\n this.stalled = g;\n return;\n }\n const p = g - r;\n if (!o && p >= wo && (this._reportStall(c), !this.media))\n return;\n const y = J.bufferInfo(i, n, s.maxBufferHole);\n this._tryFixBufferStall(y, p);\n }\n /**\n * Detects and attempts to fix known buffer stalling issues.\n * @param bufferInfo - The properties of the current buffer.\n * @param stalledDurationMs - The amount of time Hls.js has been stalling for.\n * @private\n */\n _tryFixBufferStall(e, t) {\n const {\n config: s,\n fragmentTracker: i,\n media: r\n } = this;\n if (r === null)\n return;\n const n = r.currentTime, o = i.getPartialFragment(n);\n o && (this._trySkipBufferHole(o) || !this.media) || (e.len > s.maxBufferHole || e.nextStart && e.nextStart - n < s.maxBufferHole) && t > s.highBufferWatchdogPeriod * 1e3 && (x.warn(\"Trying to nudge playhead over buffer-hole\"), this.stalled = null, this._tryNudgeBuffer());\n }\n /**\n * Triggers a BUFFER_STALLED_ERROR event, but only once per stall period.\n * @param bufferLen - The playhead distance from the end of the current buffer segment.\n * @private\n */\n _reportStall(e) {\n const {\n hls: t,\n media: s,\n stallReported: i\n } = this;\n if (!i && s) {\n this.stallReported = !0;\n const r = new Error(`Playback stalling at @${s.currentTime} due to low buffer (${JSON.stringify(e)})`);\n x.warn(r.message), t.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.BUFFER_STALLED_ERROR,\n fatal: !1,\n error: r,\n buffer: e.len\n });\n }\n }\n /**\n * Attempts to fix buffer stalls by jumping over known gaps caused by partial fragments\n * @param partial - The partial fragment found at the current time (where playback is stalling).\n * @private\n */\n _trySkipBufferHole(e) {\n const {\n config: t,\n hls: s,\n media: i\n } = this;\n if (i === null)\n return 0;\n const r = i.currentTime, n = J.bufferInfo(i, r, 0), o = r < n.start ? n.start : n.nextStart;\n if (o) {\n const l = n.len <= t.maxBufferHole, h = n.len > 0 && n.len < 1 && i.readyState < 3, c = o - r;\n if (c > 0 && (l || h)) {\n if (c > t.maxBufferHole) {\n const {\n fragmentTracker: u\n } = this;\n let f = !1;\n if (r === 0) {\n const g = u.getAppendedFrag(0, B.MAIN);\n g && o < g.end && (f = !0);\n }\n if (!f) {\n const g = e || u.getAppendedFrag(r, B.MAIN);\n if (g) {\n let p = !1, y = g.end;\n for (; y < o; ) {\n const v = u.getPartialFragment(y);\n if (v)\n y += v.duration;\n else {\n p = !0;\n break;\n }\n }\n if (p)\n return 0;\n }\n }\n }\n const d = Math.max(o + Do, r + Co);\n if (x.warn(`skipping hole, adjusting currentTime from ${r} to ${d}`), this.moved = !0, this.stalled = null, i.currentTime = d, e && !e.gap) {\n const u = new Error(`fragment loaded with buffer holes, seeking from ${r} to ${d}`);\n s.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.BUFFER_SEEK_OVER_HOLE,\n fatal: !1,\n error: u,\n reason: u.message,\n frag: e\n });\n }\n return d;\n }\n }\n return 0;\n }\n /**\n * Attempts to fix buffer stalls by advancing the mediaElement's current time by a small amount.\n * @private\n */\n _tryNudgeBuffer() {\n const {\n config: e,\n hls: t,\n media: s,\n nudgeRetry: i\n } = this;\n if (s === null)\n return;\n const r = s.currentTime;\n if (this.nudgeRetry++, i < e.nudgeMaxRetry) {\n const n = r + (i + 1) * e.nudgeOffset, o = new Error(`Nudging 'currentTime' from ${r} to ${n}`);\n x.warn(o.message), s.currentTime = n, t.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.BUFFER_NUDGE_ON_STALL,\n error: o,\n fatal: !1\n });\n } else {\n const n = new Error(`Playhead still not moving while enough data buffered @${r} after ${e.nudgeMaxRetry} nudges`);\n x.error(n.message), t.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.BUFFER_STALLED_ERROR,\n error: n,\n fatal: !0\n });\n }\n }\n}\nconst ko = 100;\nclass Po extends Ns {\n constructor(e, t, s) {\n super(e, t, s, \"[stream-controller]\", B.MAIN), this.audioCodecSwap = !1, this.gapController = null, this.level = -1, this._forceStartLoad = !1, this.altAudio = !1, this.audioOnly = !1, this.fragPlaying = null, this.onvplaying = null, this.onvseeked = null, this.fragLastKbps = 0, this.couldBacktrack = !1, this.backtrackFragment = null, this.audioCodecSwitch = !1, this.videoBuffer = null, this._registerListeners();\n }\n _registerListeners() {\n const {\n hls: e\n } = this;\n e.on(m.MEDIA_ATTACHED, this.onMediaAttached, this), e.on(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.on(m.MANIFEST_LOADING, this.onManifestLoading, this), e.on(m.MANIFEST_PARSED, this.onManifestParsed, this), e.on(m.LEVEL_LOADING, this.onLevelLoading, this), e.on(m.LEVEL_LOADED, this.onLevelLoaded, this), e.on(m.FRAG_LOAD_EMERGENCY_ABORTED, this.onFragLoadEmergencyAborted, this), e.on(m.ERROR, this.onError, this), e.on(m.AUDIO_TRACK_SWITCHING, this.onAudioTrackSwitching, this), e.on(m.AUDIO_TRACK_SWITCHED, this.onAudioTrackSwitched, this), e.on(m.BUFFER_CREATED, this.onBufferCreated, this), e.on(m.BUFFER_FLUSHED, this.onBufferFlushed, this), e.on(m.LEVELS_UPDATED, this.onLevelsUpdated, this), e.on(m.FRAG_BUFFERED, this.onFragBuffered, this);\n }\n _unregisterListeners() {\n const {\n hls: e\n } = this;\n e.off(m.MEDIA_ATTACHED, this.onMediaAttached, this), e.off(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.off(m.MANIFEST_LOADING, this.onManifestLoading, this), e.off(m.MANIFEST_PARSED, this.onManifestParsed, this), e.off(m.LEVEL_LOADED, this.onLevelLoaded, this), e.off(m.FRAG_LOAD_EMERGENCY_ABORTED, this.onFragLoadEmergencyAborted, this), e.off(m.ERROR, this.onError, this), e.off(m.AUDIO_TRACK_SWITCHING, this.onAudioTrackSwitching, this), e.off(m.AUDIO_TRACK_SWITCHED, this.onAudioTrackSwitched, this), e.off(m.BUFFER_CREATED, this.onBufferCreated, this), e.off(m.BUFFER_FLUSHED, this.onBufferFlushed, this), e.off(m.LEVELS_UPDATED, this.onLevelsUpdated, this), e.off(m.FRAG_BUFFERED, this.onFragBuffered, this);\n }\n onHandlerDestroying() {\n this._unregisterListeners(), this.onMediaDetaching();\n }\n startLoad(e) {\n if (this.levels) {\n const {\n lastCurrentTime: t,\n hls: s\n } = this;\n if (this.stopLoad(), this.setInterval(ko), this.level = -1, !this.startFragRequested) {\n let i = s.startLevel;\n i === -1 && (s.config.testBandwidth && this.levels.length > 1 ? (i = 0, this.bitrateTest = !0) : i = s.nextAutoLevel), this.level = s.nextLoadLevel = i, this.loadedmetadata = !1;\n }\n t > 0 && e === -1 && (this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`), e = t), this.state = w.IDLE, this.nextLoadPosition = this.startPosition = this.lastCurrentTime = e, this.tick();\n } else\n this._forceStartLoad = !0, this.state = w.STOPPED;\n }\n stopLoad() {\n this._forceStartLoad = !1, super.stopLoad();\n }\n doTick() {\n switch (this.state) {\n case w.WAITING_LEVEL: {\n var e;\n const {\n levels: s,\n level: i\n } = this, r = s == null || (e = s[i]) == null ? void 0 : e.details;\n if (r && (!r.live || this.levelLastLoaded === this.level)) {\n if (this.waitForCdnTuneIn(r))\n break;\n this.state = w.IDLE;\n break;\n } else if (this.hls.nextLoadLevel !== this.level) {\n this.state = w.IDLE;\n break;\n }\n break;\n }\n case w.FRAG_LOADING_WAITING_RETRY:\n {\n var t;\n const s = self.performance.now(), i = this.retryDate;\n (!i || s >= i || (t = this.media) != null && t.seeking) && (this.resetStartWhenNotLoaded(this.level), this.state = w.IDLE);\n }\n break;\n }\n this.state === w.IDLE && this.doTickIdle(), this.onTickEnd();\n }\n onTickEnd() {\n super.onTickEnd(), this.checkBuffer(), this.checkFragmentChanged();\n }\n doTickIdle() {\n const {\n hls: e,\n levelLastLoaded: t,\n levels: s,\n media: i\n } = this, {\n config: r,\n nextLoadLevel: n\n } = e;\n if (t === null || !i && (this.startFragRequested || !r.startFragPrefetch) || this.altAudio && this.audioOnly || !(s != null && s[n]))\n return;\n const o = s[n], l = this.getMainFwdBufferInfo();\n if (l === null)\n return;\n const h = this.getLevelDetails();\n if (h && this._streamEnded(l, h)) {\n const y = {};\n this.altAudio && (y.type = \"video\"), this.hls.trigger(m.BUFFER_EOS, y), this.state = w.ENDED;\n return;\n }\n e.loadLevel !== n && e.manualLevel === -1 && this.log(`Adapting to level ${n} from level ${this.level}`), this.level = e.nextLoadLevel = n;\n const c = o.details;\n if (!c || this.state === w.WAITING_LEVEL || c.live && this.levelLastLoaded !== n) {\n this.level = n, this.state = w.WAITING_LEVEL;\n return;\n }\n const d = l.len, u = this.getMaxBufferLength(o.maxBitrate);\n if (d >= u)\n return;\n this.backtrackFragment && this.backtrackFragment.start > l.end && (this.backtrackFragment = null);\n const f = this.backtrackFragment ? this.backtrackFragment.start : l.end;\n let g = this.getNextFragment(f, c);\n if (this.couldBacktrack && !this.fragPrevious && g && g.sn !== \"initSegment\" && this.fragmentTracker.getState(g) !== le.OK) {\n var p;\n const v = ((p = this.backtrackFragment) != null ? p : g).sn - c.startSN, E = c.fragments[v - 1];\n E && g.cc === E.cc && (g = E, this.fragmentTracker.removeFragment(E));\n } else\n this.backtrackFragment && l.len && (this.backtrackFragment = null);\n if (g && this.isLoopLoading(g, f)) {\n if (!g.gap) {\n const v = this.audioOnly && !this.altAudio ? j.AUDIO : j.VIDEO, E = (v === j.VIDEO ? this.videoBuffer : this.mediaBuffer) || this.media;\n E && this.afterBufferFlushed(E, v, B.MAIN);\n }\n g = this.getNextFragmentLoopLoading(g, c, l, B.MAIN, u);\n }\n g && (g.initSegment && !g.initSegment.data && !this.bitrateTest && (g = g.initSegment), this.loadFragment(g, o, f));\n }\n loadFragment(e, t, s) {\n const i = this.fragmentTracker.getState(e);\n this.fragCurrent = e, i === le.NOT_LOADED || i === le.PARTIAL ? e.sn === \"initSegment\" ? this._loadInitSegment(e, t) : this.bitrateTest ? (this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`), this._loadBitrateTestFrag(e, t)) : (this.startFragRequested = !0, super.loadFragment(e, t, s)) : this.clearTrackerIfNeeded(e);\n }\n getBufferedFrag(e) {\n return this.fragmentTracker.getBufferedFrag(e, B.MAIN);\n }\n followingBufferedFrag(e) {\n return e ? this.getBufferedFrag(e.end + 0.5) : null;\n }\n /*\n on immediate level switch :\n - pause playback if playing\n - cancel any pending load request\n - and trigger a buffer flush\n */\n immediateLevelSwitch() {\n this.abortCurrentFrag(), this.flushMainBuffer(0, Number.POSITIVE_INFINITY);\n }\n /**\n * try to switch ASAP without breaking video playback:\n * in order to ensure smooth but quick level switching,\n * we need to find the next flushable buffer range\n * we should take into account new segment fetch time\n */\n nextLevelSwitch() {\n const {\n levels: e,\n media: t\n } = this;\n if (t != null && t.readyState) {\n let s;\n const i = this.getAppendedFrag(t.currentTime);\n i && i.start > 1 && this.flushMainBuffer(0, i.start - 1);\n const r = this.getLevelDetails();\n if (r != null && r.live) {\n const o = this.getMainFwdBufferInfo();\n if (!o || o.len < r.targetduration * 2)\n return;\n }\n if (!t.paused && e) {\n const o = this.hls.nextLoadLevel, l = e[o], h = this.fragLastKbps;\n h && this.fragCurrent ? s = this.fragCurrent.duration * l.maxBitrate / (1e3 * h) + 1 : s = 0;\n } else\n s = 0;\n const n = this.getBufferedFrag(t.currentTime + s);\n if (n) {\n const o = this.followingBufferedFrag(n);\n if (o) {\n this.abortCurrentFrag();\n const l = o.maxStartPTS ? o.maxStartPTS : o.start, h = o.duration, c = Math.max(n.end, l + Math.min(Math.max(h - this.config.maxFragLookUpTolerance, h * 0.5), h * 0.75));\n this.flushMainBuffer(c, Number.POSITIVE_INFINITY);\n }\n }\n }\n }\n abortCurrentFrag() {\n const e = this.fragCurrent;\n switch (this.fragCurrent = null, this.backtrackFragment = null, e && (e.abortRequests(), this.fragmentTracker.removeFragment(e)), this.state) {\n case w.KEY_LOADING:\n case w.FRAG_LOADING:\n case w.FRAG_LOADING_WAITING_RETRY:\n case w.PARSING:\n case w.PARSED:\n this.state = w.IDLE;\n break;\n }\n this.nextLoadPosition = this.getLoadPosition();\n }\n flushMainBuffer(e, t) {\n super.flushMainBuffer(e, t, this.altAudio ? \"video\" : null);\n }\n onMediaAttached(e, t) {\n super.onMediaAttached(e, t);\n const s = t.media;\n this.onvplaying = this.onMediaPlaying.bind(this), this.onvseeked = this.onMediaSeeked.bind(this), s.addEventListener(\"playing\", this.onvplaying), s.addEventListener(\"seeked\", this.onvseeked), this.gapController = new _o(this.config, s, this.fragmentTracker, this.hls);\n }\n onMediaDetaching() {\n const {\n media: e\n } = this;\n e && this.onvplaying && this.onvseeked && (e.removeEventListener(\"playing\", this.onvplaying), e.removeEventListener(\"seeked\", this.onvseeked), this.onvplaying = this.onvseeked = null, this.videoBuffer = null), this.fragPlaying = null, this.gapController && (this.gapController.destroy(), this.gapController = null), super.onMediaDetaching();\n }\n onMediaPlaying() {\n this.tick();\n }\n onMediaSeeked() {\n const e = this.media, t = e ? e.currentTime : null;\n M(t) && this.log(`Media seeked to ${t.toFixed(3)}`);\n const s = this.getMainFwdBufferInfo();\n if (s === null || s.len === 0) {\n this.warn(`Main forward buffer length on \"seeked\" event ${s ? s.len : \"empty\"})`);\n return;\n }\n this.tick();\n }\n onManifestLoading() {\n this.log(\"Trigger BUFFER_RESET\"), this.hls.trigger(m.BUFFER_RESET, void 0), this.fragmentTracker.removeAllFragments(), this.couldBacktrack = !1, this.startPosition = this.lastCurrentTime = 0, this.levels = this.fragPlaying = this.backtrackFragment = null, this.altAudio = this.audioOnly = !1;\n }\n onManifestParsed(e, t) {\n let s = !1, i = !1, r;\n t.levels.forEach((n) => {\n r = n.audioCodec, r && (r.indexOf(\"mp4a.40.2\") !== -1 && (s = !0), r.indexOf(\"mp4a.40.5\") !== -1 && (i = !0));\n }), this.audioCodecSwitch = s && i && !Ya(), this.audioCodecSwitch && this.log(\"Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC\"), this.levels = t.levels, this.startFragRequested = !1;\n }\n onLevelLoading(e, t) {\n const {\n levels: s\n } = this;\n if (!s || this.state !== w.IDLE)\n return;\n const i = s[t.level];\n (!i.details || i.details.live && this.levelLastLoaded !== t.level || this.waitForCdnTuneIn(i.details)) && (this.state = w.WAITING_LEVEL);\n }\n onLevelLoaded(e, t) {\n var s;\n const {\n levels: i\n } = this, r = t.level, n = t.details, o = n.totalduration;\n if (!i) {\n this.warn(`Levels were reset while loading level ${r}`);\n return;\n }\n this.log(`Level ${r} loaded [${n.startSN},${n.endSN}]${n.lastPartSn ? `[part-${n.lastPartSn}-${n.lastPartIndex}]` : \"\"}, cc [${n.startCC}, ${n.endCC}] duration:${o}`);\n const l = i[r], h = this.fragCurrent;\n h && (this.state === w.FRAG_LOADING || this.state === w.FRAG_LOADING_WAITING_RETRY) && (h.level !== t.level || h.urlId !== l.urlId) && h.loader && this.abortCurrentFrag();\n let c = 0;\n if (n.live || (s = l.details) != null && s.live) {\n if (this.checkLiveUpdate(n), n.deltaUpdateFailed)\n return;\n c = this.alignPlaylists(n, l.details);\n }\n if (l.details = n, this.levelLastLoaded = r, this.hls.trigger(m.LEVEL_UPDATED, {\n details: n,\n level: r\n }), this.state === w.WAITING_LEVEL) {\n if (this.waitForCdnTuneIn(n))\n return;\n this.state = w.IDLE;\n }\n this.startFragRequested ? n.live && this.synchronizeToLiveEdge(n) : this.setStartPosition(n, c), this.tick();\n }\n _handleFragmentLoadProgress(e) {\n var t;\n const {\n frag: s,\n part: i,\n payload: r\n } = e, {\n levels: n\n } = this;\n if (!n) {\n this.warn(`Levels were reset while fragment load was in progress. Fragment ${s.sn} of level ${s.level} will not be buffered`);\n return;\n }\n const o = n[s.level], l = o.details;\n if (!l) {\n this.warn(`Dropping fragment ${s.sn} of level ${s.level} after level details were reset`), this.fragmentTracker.removeFragment(s);\n return;\n }\n const h = o.videoCodec, c = l.PTSKnown || !l.live, d = (t = s.initSegment) == null ? void 0 : t.data, u = this._getAudioCodec(o), f = this.transmuxer = this.transmuxer || new Ur(this.hls, B.MAIN, this._handleTransmuxComplete.bind(this), this._handleTransmuxerFlush.bind(this)), g = i ? i.index : -1, p = g !== -1, y = new Os(s.level, s.sn, s.stats.chunkCount, r.byteLength, g, p), v = this.initPTS[s.cc];\n f.push(r, d, u, h, s, i, l.totalduration, c, y, v);\n }\n onAudioTrackSwitching(e, t) {\n const s = this.altAudio;\n if (!!!t.url) {\n if (this.mediaBuffer !== this.media) {\n this.log(\"Switching on main audio, use media.buffered to schedule main fragment loading\"), this.mediaBuffer = this.media;\n const n = this.fragCurrent;\n n && (this.log(\"Switching to main audio track, cancel main fragment load\"), n.abortRequests(), this.fragmentTracker.removeFragment(n)), this.resetTransmuxer(), this.resetLoadingState();\n } else\n this.audioOnly && this.resetTransmuxer();\n const r = this.hls;\n s && (r.trigger(m.BUFFER_FLUSHING, {\n startOffset: 0,\n endOffset: Number.POSITIVE_INFINITY,\n type: null\n }), this.fragmentTracker.removeAllFragments()), r.trigger(m.AUDIO_TRACK_SWITCHED, t);\n }\n }\n onAudioTrackSwitched(e, t) {\n const s = t.id, i = !!this.hls.audioTracks[s].url;\n if (i) {\n const r = this.videoBuffer;\n r && this.mediaBuffer !== r && (this.log(\"Switching on alternate audio, use video.buffered to schedule main fragment loading\"), this.mediaBuffer = r);\n }\n this.altAudio = i, this.tick();\n }\n onBufferCreated(e, t) {\n const s = t.tracks;\n let i, r, n = !1;\n for (const o in s) {\n const l = s[o];\n if (l.id === \"main\") {\n if (r = o, i = l, o === \"video\") {\n const h = s[o];\n h && (this.videoBuffer = h.buffer);\n }\n } else\n n = !0;\n }\n n && i ? (this.log(`Alternate track found, use ${r}.buffered to schedule main fragment loading`), this.mediaBuffer = i.buffer) : this.mediaBuffer = this.media;\n }\n onFragBuffered(e, t) {\n const {\n frag: s,\n part: i\n } = t;\n if (s && s.type !== B.MAIN)\n return;\n if (this.fragContextChanged(s)) {\n this.warn(`Fragment ${s.sn}${i ? \" p: \" + i.index : \"\"} of level ${s.level} finished buffering, but was aborted. state: ${this.state}`), this.state === w.PARSED && (this.state = w.IDLE);\n return;\n }\n const r = i ? i.stats : s.stats;\n this.fragLastKbps = Math.round(8 * r.total / (r.buffering.end - r.loading.first)), s.sn !== \"initSegment\" && (this.fragPrevious = s), this.fragBufferedComplete(s, i);\n }\n onError(e, t) {\n var s;\n if (t.fatal) {\n this.state = w.ERROR;\n return;\n }\n switch (t.details) {\n case L.FRAG_GAP:\n case L.FRAG_PARSING_ERROR:\n case L.FRAG_DECRYPT_ERROR:\n case L.FRAG_LOAD_ERROR:\n case L.FRAG_LOAD_TIMEOUT:\n case L.KEY_LOAD_ERROR:\n case L.KEY_LOAD_TIMEOUT:\n this.onFragmentOrKeyLoadError(B.MAIN, t);\n break;\n case L.LEVEL_LOAD_ERROR:\n case L.LEVEL_LOAD_TIMEOUT:\n case L.LEVEL_PARSING_ERROR:\n !t.levelRetry && this.state === w.WAITING_LEVEL && ((s = t.context) == null ? void 0 : s.type) === K.LEVEL && (this.state = w.IDLE);\n break;\n case L.BUFFER_FULL_ERROR:\n if (!t.parent || t.parent !== \"main\")\n return;\n this.reduceLengthAndFlushBuffer(t) && this.flushMainBuffer(0, Number.POSITIVE_INFINITY);\n break;\n case L.INTERNAL_EXCEPTION:\n this.recoverWorkerError(t);\n break;\n }\n }\n // Checks the health of the buffer and attempts to resolve playback stalls.\n checkBuffer() {\n const {\n media: e,\n gapController: t\n } = this;\n if (!(!e || !t || !e.readyState)) {\n if (this.loadedmetadata || !J.getBuffered(e).length) {\n const s = this.state !== w.IDLE ? this.fragCurrent : null;\n t.poll(this.lastCurrentTime, s);\n }\n this.lastCurrentTime = e.currentTime;\n }\n }\n onFragLoadEmergencyAborted() {\n this.state = w.IDLE, this.loadedmetadata || (this.startFragRequested = !1, this.nextLoadPosition = this.startPosition), this.tickImmediate();\n }\n onBufferFlushed(e, {\n type: t\n }) {\n if (t !== j.AUDIO || this.audioOnly && !this.altAudio) {\n const s = (t === j.VIDEO ? this.videoBuffer : this.mediaBuffer) || this.media;\n this.afterBufferFlushed(s, t, B.MAIN);\n }\n }\n onLevelsUpdated(e, t) {\n this.levels = t.levels;\n }\n swapAudioCodec() {\n this.audioCodecSwap = !this.audioCodecSwap;\n }\n /**\n * Seeks to the set startPosition if not equal to the mediaElement's current time.\n */\n seekToStartPos() {\n const {\n media: e\n } = this;\n if (!e)\n return;\n const t = e.currentTime;\n let s = this.startPosition;\n if (s >= 0 && t < s) {\n if (e.seeking) {\n this.log(`could not seek to ${s}, already seeking at ${t}`);\n return;\n }\n const i = J.getBuffered(e), n = (i.length ? i.start(0) : 0) - s;\n n > 0 && (n < this.config.maxBufferHole || n < this.config.maxFragLookUpTolerance) && (this.log(`adjusting start position by ${n} to match buffer start`), s += n, this.startPosition = s), this.log(`seek to target start position ${s} from current time ${t}`), e.currentTime = s;\n }\n }\n _getAudioCodec(e) {\n let t = this.config.defaultAudioCodec || e.audioCodec;\n return this.audioCodecSwap && t && (this.log(\"Swapping audio codec\"), t.indexOf(\"mp4a.40.5\") !== -1 ? t = \"mp4a.40.2\" : t = \"mp4a.40.5\"), t;\n }\n _loadBitrateTestFrag(e, t) {\n e.bitrateTest = !0, this._doFragLoad(e, t).then((s) => {\n const {\n hls: i\n } = this;\n if (!s || this.fragContextChanged(e))\n return;\n t.fragmentError = 0, this.state = w.IDLE, this.startFragRequested = !1, this.bitrateTest = !1;\n const r = e.stats;\n r.parsing.start = r.parsing.end = r.buffering.start = r.buffering.end = self.performance.now(), i.trigger(m.FRAG_LOADED, s), e.bitrateTest = !1;\n });\n }\n _handleTransmuxComplete(e) {\n var t;\n const s = \"main\", {\n hls: i\n } = this, {\n remuxResult: r,\n chunkMeta: n\n } = e, o = this.getCurrentContext(n);\n if (!o) {\n this.resetWhenMissingContext(n);\n return;\n }\n const {\n frag: l,\n part: h,\n level: c\n } = o, {\n video: d,\n text: u,\n id3: f,\n initSegment: g\n } = r, {\n details: p\n } = c, y = this.altAudio ? void 0 : r.audio;\n if (this.fragContextChanged(l)) {\n this.fragmentTracker.removeFragment(l);\n return;\n }\n if (this.state = w.PARSING, g) {\n if (g != null && g.tracks) {\n const T = l.initSegment || l;\n this._bufferInitSegment(c, g.tracks, T, n), i.trigger(m.FRAG_PARSING_INIT_SEGMENT, {\n frag: T,\n id: s,\n tracks: g.tracks\n });\n }\n const v = g.initPTS, E = g.timescale;\n M(v) && (this.initPTS[l.cc] = {\n baseTime: v,\n timescale: E\n }, i.trigger(m.INIT_PTS_FOUND, {\n frag: l,\n id: s,\n initPTS: v,\n timescale: E\n }));\n }\n if (d && p && l.sn !== \"initSegment\") {\n const v = p.fragments[l.sn - 1 - p.startSN], E = l.sn === p.startSN, T = !v || l.cc > v.cc;\n if (r.independent !== !1) {\n const {\n startPTS: A,\n endPTS: b,\n startDTS: D,\n endDTS: I\n } = d;\n if (h)\n h.elementaryStreams[d.type] = {\n startPTS: A,\n endPTS: b,\n startDTS: D,\n endDTS: I\n };\n else if (d.firstKeyFrame && d.independent && n.id === 1 && !T && (this.couldBacktrack = !0), d.dropped && d.independent) {\n const C = this.getMainFwdBufferInfo(), _ = (C ? C.end : this.getLoadPosition()) + this.config.maxBufferHole, R = d.firstKeyFramePTS ? d.firstKeyFramePTS : A;\n if (!E && _ < R - this.config.maxBufferHole && !T) {\n this.backtrack(l);\n return;\n } else\n T && (l.gap = !0);\n l.setElementaryStreamInfo(d.type, l.start, b, l.start, I, !0);\n }\n l.setElementaryStreamInfo(d.type, A, b, D, I), this.backtrackFragment && (this.backtrackFragment = l), this.bufferFragmentData(d, l, h, n, E || T);\n } else if (E || T)\n l.gap = !0;\n else {\n this.backtrack(l);\n return;\n }\n }\n if (y) {\n const {\n startPTS: v,\n endPTS: E,\n startDTS: T,\n endDTS: A\n } = y;\n h && (h.elementaryStreams[j.AUDIO] = {\n startPTS: v,\n endPTS: E,\n startDTS: T,\n endDTS: A\n }), l.setElementaryStreamInfo(j.AUDIO, v, E, T, A), this.bufferFragmentData(y, l, h, n);\n }\n if (p && f != null && (t = f.samples) != null && t.length) {\n const v = {\n id: s,\n frag: l,\n details: p,\n samples: f.samples\n };\n i.trigger(m.FRAG_PARSING_METADATA, v);\n }\n if (p && u) {\n const v = {\n id: s,\n frag: l,\n details: p,\n samples: u.samples\n };\n i.trigger(m.FRAG_PARSING_USERDATA, v);\n }\n }\n _bufferInitSegment(e, t, s, i) {\n if (this.state !== w.PARSING)\n return;\n this.audioOnly = !!t.audio && !t.video, this.altAudio && !this.audioOnly && delete t.audio;\n const {\n audio: r,\n video: n,\n audiovideo: o\n } = t;\n if (r) {\n let l = e.audioCodec;\n const h = navigator.userAgent.toLowerCase();\n this.audioCodecSwitch && (l && (l.indexOf(\"mp4a.40.5\") !== -1 ? l = \"mp4a.40.2\" : l = \"mp4a.40.5\"), r.metadata.channelCount !== 1 && h.indexOf(\"firefox\") === -1 && (l = \"mp4a.40.5\")), h.indexOf(\"android\") !== -1 && r.container !== \"audio/mpeg\" && (l = \"mp4a.40.2\", this.log(`Android: force audio codec to ${l}`)), e.audioCodec && e.audioCodec !== l && this.log(`Swapping manifest audio codec \"${e.audioCodec}\" for \"${l}\"`), r.levelCodec = l, r.id = \"main\", this.log(`Init audio buffer, container:${r.container}, codecs[selected/level/parsed]=[${l || \"\"}/${e.audioCodec || \"\"}/${r.codec}]`);\n }\n n && (n.levelCodec = e.videoCodec, n.id = \"main\", this.log(`Init video buffer, container:${n.container}, codecs[level/parsed]=[${e.videoCodec || \"\"}/${n.codec}]`)), o && this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.attrs.CODECS || \"\"}/${o.codec}]`), this.hls.trigger(m.BUFFER_CODECS, t), Object.keys(t).forEach((l) => {\n const c = t[l].initSegment;\n c != null && c.byteLength && this.hls.trigger(m.BUFFER_APPENDING, {\n type: l,\n data: c,\n frag: s,\n part: null,\n chunkMeta: i,\n parent: s.type\n });\n }), this.tick();\n }\n getMainFwdBufferInfo() {\n return this.getFwdBufferInfo(this.mediaBuffer ? this.mediaBuffer : this.media, B.MAIN);\n }\n backtrack(e) {\n this.couldBacktrack = !0, this.backtrackFragment = e, this.resetTransmuxer(), this.flushBufferGap(e), this.fragmentTracker.removeFragment(e), this.fragPrevious = null, this.nextLoadPosition = e.start, this.state = w.IDLE;\n }\n checkFragmentChanged() {\n const e = this.media;\n let t = null;\n if (e && e.readyState > 1 && e.seeking === !1) {\n const s = e.currentTime;\n if (J.isBuffered(e, s) ? t = this.getAppendedFrag(s) : J.isBuffered(e, s + 0.1) && (t = this.getAppendedFrag(s + 0.1)), t) {\n this.backtrackFragment = null;\n const i = this.fragPlaying, r = t.level;\n (!i || t.sn !== i.sn || i.level !== r || t.urlId !== i.urlId) && (this.fragPlaying = t, this.hls.trigger(m.FRAG_CHANGED, {\n frag: t\n }), (!i || i.level !== r) && this.hls.trigger(m.LEVEL_SWITCHED, {\n level: r\n }));\n }\n }\n }\n get nextLevel() {\n const e = this.nextBufferedFrag;\n return e ? e.level : -1;\n }\n get currentFrag() {\n const e = this.media;\n return e ? this.fragPlaying || this.getAppendedFrag(e.currentTime) : null;\n }\n get currentProgramDateTime() {\n const e = this.media;\n if (e) {\n const t = e.currentTime, s = this.currentFrag;\n if (s && M(t) && M(s.programDateTime)) {\n const i = s.programDateTime + (t - s.start) * 1e3;\n return new Date(i);\n }\n }\n return null;\n }\n get currentLevel() {\n const e = this.currentFrag;\n return e ? e.level : -1;\n }\n get nextBufferedFrag() {\n const e = this.currentFrag;\n return e ? this.followingBufferedFrag(e) : null;\n }\n get forceStartLoad() {\n return this._forceStartLoad;\n }\n}\nclass st {\n // About half of the estimated value will be from the last |halfLife| samples by weight.\n constructor(e, t = 0, s = 0) {\n this.halfLife = void 0, this.alpha_ = void 0, this.estimate_ = void 0, this.totalWeight_ = void 0, this.halfLife = e, this.alpha_ = e ? Math.exp(Math.log(0.5) / e) : 0, this.estimate_ = t, this.totalWeight_ = s;\n }\n sample(e, t) {\n const s = Math.pow(this.alpha_, e);\n this.estimate_ = t * (1 - s) + s * this.estimate_, this.totalWeight_ += e;\n }\n getTotalWeight() {\n return this.totalWeight_;\n }\n getEstimate() {\n if (this.alpha_) {\n const e = 1 - Math.pow(this.alpha_, this.totalWeight_);\n if (e)\n return this.estimate_ / e;\n }\n return this.estimate_;\n }\n}\nclass Oo {\n constructor(e, t, s, i = 100) {\n this.defaultEstimate_ = void 0, this.minWeight_ = void 0, this.minDelayMs_ = void 0, this.slow_ = void 0, this.fast_ = void 0, this.defaultTTFB_ = void 0, this.ttfb_ = void 0, this.defaultEstimate_ = s, this.minWeight_ = 1e-3, this.minDelayMs_ = 50, this.slow_ = new st(e), this.fast_ = new st(t), this.defaultTTFB_ = i, this.ttfb_ = new st(e);\n }\n update(e, t) {\n const {\n slow_: s,\n fast_: i,\n ttfb_: r\n } = this;\n s.halfLife !== e && (this.slow_ = new st(e, s.getEstimate(), s.getTotalWeight())), i.halfLife !== t && (this.fast_ = new st(t, i.getEstimate(), i.getTotalWeight())), r.halfLife !== e && (this.ttfb_ = new st(e, r.getEstimate(), r.getTotalWeight()));\n }\n sample(e, t) {\n e = Math.max(e, this.minDelayMs_);\n const s = 8 * t, i = e / 1e3, r = s / i;\n this.fast_.sample(i, r), this.slow_.sample(i, r);\n }\n sampleTTFB(e) {\n const t = e / 1e3, s = Math.sqrt(2) * Math.exp(-Math.pow(t, 2) / 2);\n this.ttfb_.sample(s, Math.max(e, 5));\n }\n canEstimate() {\n return this.fast_.getTotalWeight() >= this.minWeight_;\n }\n getEstimate() {\n return this.canEstimate() ? Math.min(this.fast_.getEstimate(), this.slow_.getEstimate()) : this.defaultEstimate_;\n }\n getEstimateTTFB() {\n return this.ttfb_.getTotalWeight() >= this.minWeight_ ? this.ttfb_.getEstimate() : this.defaultTTFB_;\n }\n destroy() {\n }\n}\nclass Fo {\n constructor(e) {\n this.hls = void 0, this.lastLevelLoadSec = 0, this.lastLoadedFragLevel = 0, this._nextAutoLevel = -1, this.timer = -1, this.onCheck = this._abandonRulesCheck.bind(this), this.fragCurrent = null, this.partCurrent = null, this.bitrateTestDelay = 0, this.bwEstimator = void 0, this.hls = e;\n const t = e.config;\n this.bwEstimator = new Oo(t.abrEwmaSlowVoD, t.abrEwmaFastVoD, t.abrEwmaDefaultEstimate), this.registerListeners();\n }\n registerListeners() {\n const {\n hls: e\n } = this;\n e.on(m.FRAG_LOADING, this.onFragLoading, this), e.on(m.FRAG_LOADED, this.onFragLoaded, this), e.on(m.FRAG_BUFFERED, this.onFragBuffered, this), e.on(m.LEVEL_SWITCHING, this.onLevelSwitching, this), e.on(m.LEVEL_LOADED, this.onLevelLoaded, this);\n }\n unregisterListeners() {\n const {\n hls: e\n } = this;\n e.off(m.FRAG_LOADING, this.onFragLoading, this), e.off(m.FRAG_LOADED, this.onFragLoaded, this), e.off(m.FRAG_BUFFERED, this.onFragBuffered, this), e.off(m.LEVEL_SWITCHING, this.onLevelSwitching, this), e.off(m.LEVEL_LOADED, this.onLevelLoaded, this);\n }\n destroy() {\n this.unregisterListeners(), this.clearTimer(), this.hls = this.onCheck = null, this.fragCurrent = this.partCurrent = null;\n }\n onFragLoading(e, t) {\n var s;\n const i = t.frag;\n this.ignoreFragment(i) || (this.fragCurrent = i, this.partCurrent = (s = t.part) != null ? s : null, this.clearTimer(), this.timer = self.setInterval(this.onCheck, 100));\n }\n onLevelSwitching(e, t) {\n this.clearTimer();\n }\n getTimeToLoadFrag(e, t, s, i) {\n const r = e + s / t, n = i ? this.lastLevelLoadSec : 0;\n return r + n;\n }\n onLevelLoaded(e, t) {\n const s = this.hls.config, {\n total: i,\n bwEstimate: r\n } = t.stats;\n M(i) && M(r) && (this.lastLevelLoadSec = 8 * i / r), t.details.live ? this.bwEstimator.update(s.abrEwmaSlowLive, s.abrEwmaFastLive) : this.bwEstimator.update(s.abrEwmaSlowVoD, s.abrEwmaFastVoD);\n }\n /*\n This method monitors the download rate of the current fragment, and will downswitch if that fragment will not load\n quickly enough to prevent underbuffering\n */\n _abandonRulesCheck() {\n const {\n fragCurrent: e,\n partCurrent: t,\n hls: s\n } = this, {\n autoLevelEnabled: i,\n media: r\n } = s;\n if (!e || !r)\n return;\n const n = performance.now(), o = t ? t.stats : e.stats, l = t ? t.duration : e.duration, h = n - o.loading.start;\n if (o.aborted || o.loaded && o.loaded === o.total || e.level === 0) {\n this.clearTimer(), this._nextAutoLevel = -1;\n return;\n }\n if (!i || r.paused || !r.playbackRate || !r.readyState)\n return;\n const c = s.mainForwardBufferInfo;\n if (c === null)\n return;\n const d = this.bwEstimator.getEstimateTTFB(), u = Math.abs(r.playbackRate);\n if (h <= Math.max(d, 1e3 * (l / (u * 2))))\n return;\n const f = c.len / u;\n if (f >= 2 * l / u)\n return;\n const g = o.loading.first ? o.loading.first - o.loading.start : -1, p = o.loaded && g > -1, y = this.bwEstimator.getEstimate(), {\n levels: v,\n minAutoLevel: E\n } = s, T = v[e.level], A = o.total || Math.max(o.loaded, Math.round(l * T.maxBitrate / 8));\n let b = h - g;\n b < 1 && p && (b = Math.min(h, o.loaded * 8 / y));\n const D = p ? o.loaded * 1e3 / b : 0, I = D ? (A - o.loaded) / D : A * 8 / y + d / 1e3;\n if (I <= f)\n return;\n const C = D ? D * 8 : y;\n let _ = Number.POSITIVE_INFINITY, R;\n for (R = e.level - 1; R > E; R--) {\n const F = v[R].maxBitrate;\n if (_ = this.getTimeToLoadFrag(d / 1e3, C, l * F, !v[R].details), _ < f)\n break;\n }\n _ >= I || _ > l * 10 || (s.nextLoadLevel = R, p ? this.bwEstimator.sample(h - Math.min(d, g), o.loaded) : this.bwEstimator.sampleTTFB(h), this.clearTimer(), x.warn(`[abr] Fragment ${e.sn}${t ? \" part \" + t.index : \"\"} of level ${e.level} is loading too slowly;\n Time to underbuffer: ${f.toFixed(3)} s\n Estimated load time for current fragment: ${I.toFixed(3)} s\n Estimated load time for down switch fragment: ${_.toFixed(3)} s\n TTFB estimate: ${g}\n Current BW estimate: ${M(y) ? (y / 1024).toFixed(3) : \"Unknown\"} Kb/s\n New BW estimate: ${(this.bwEstimator.getEstimate() / 1024).toFixed(3)} Kb/s\n Aborting and switching to level ${R}`), e.loader && (this.fragCurrent = this.partCurrent = null, e.abortRequests()), s.trigger(m.FRAG_LOAD_EMERGENCY_ABORTED, {\n frag: e,\n part: t,\n stats: o\n }));\n }\n onFragLoaded(e, {\n frag: t,\n part: s\n }) {\n const i = s ? s.stats : t.stats;\n if (t.type === B.MAIN && this.bwEstimator.sampleTTFB(i.loading.first - i.loading.start), !this.ignoreFragment(t)) {\n if (this.clearTimer(), this.lastLoadedFragLevel = t.level, this._nextAutoLevel = -1, this.hls.config.abrMaxWithRealBitrate) {\n const r = s ? s.duration : t.duration, n = this.hls.levels[t.level], o = (n.loaded ? n.loaded.bytes : 0) + i.loaded, l = (n.loaded ? n.loaded.duration : 0) + r;\n n.loaded = {\n bytes: o,\n duration: l\n }, n.realBitrate = Math.round(8 * o / l);\n }\n if (t.bitrateTest) {\n const r = {\n stats: i,\n frag: t,\n part: s,\n id: t.type\n };\n this.onFragBuffered(m.FRAG_BUFFERED, r), t.bitrateTest = !1;\n }\n }\n }\n onFragBuffered(e, t) {\n const {\n frag: s,\n part: i\n } = t, r = i != null && i.stats.loaded ? i.stats : s.stats;\n if (r.aborted || this.ignoreFragment(s))\n return;\n const n = r.parsing.end - r.loading.start - Math.min(r.loading.first - r.loading.start, this.bwEstimator.getEstimateTTFB());\n this.bwEstimator.sample(n, r.loaded), r.bwEstimate = this.bwEstimator.getEstimate(), s.bitrateTest ? this.bitrateTestDelay = n / 1e3 : this.bitrateTestDelay = 0;\n }\n ignoreFragment(e) {\n return e.type !== B.MAIN || e.sn === \"initSegment\";\n }\n clearTimer() {\n self.clearInterval(this.timer);\n }\n // return next auto level\n get nextAutoLevel() {\n const e = this._nextAutoLevel, t = this.bwEstimator;\n if (e !== -1 && !t.canEstimate())\n return e;\n let s = this.getNextABRAutoLevel();\n if (e !== -1) {\n const i = this.hls.levels;\n if (i.length > Math.max(e, s) && i[e].loadError <= i[s].loadError)\n return e;\n }\n return e !== -1 && (s = Math.min(e, s)), s;\n }\n getNextABRAutoLevel() {\n const {\n fragCurrent: e,\n partCurrent: t,\n hls: s\n } = this, {\n maxAutoLevel: i,\n config: r,\n minAutoLevel: n,\n media: o\n } = s, l = t ? t.duration : e ? e.duration : 0, h = o && o.playbackRate !== 0 ? Math.abs(o.playbackRate) : 1, c = this.bwEstimator ? this.bwEstimator.getEstimate() : r.abrEwmaDefaultEstimate, d = s.mainForwardBufferInfo, u = (d ? d.len : 0) / h;\n let f = this.findBestLevel(c, n, i, u, r.abrBandWidthFactor, r.abrBandWidthUpFactor);\n if (f >= 0)\n return f;\n x.trace(`[abr] ${u ? \"rebuffering expected\" : \"buffer is empty\"}, finding optimal quality level`);\n let g = l ? Math.min(l, r.maxStarvationDelay) : r.maxStarvationDelay, p = r.abrBandWidthFactor, y = r.abrBandWidthUpFactor;\n if (!u) {\n const v = this.bitrateTestDelay;\n v && (g = (l ? Math.min(l, r.maxLoadingDelay) : r.maxLoadingDelay) - v, x.trace(`[abr] bitrate test took ${Math.round(1e3 * v)}ms, set first fragment max fetchDuration to ${Math.round(1e3 * g)} ms`), p = y = 1);\n }\n return f = this.findBestLevel(c, n, i, u + g, p, y), Math.max(f, 0);\n }\n findBestLevel(e, t, s, i, r, n) {\n var o;\n const {\n fragCurrent: l,\n partCurrent: h,\n lastLoadedFragLevel: c\n } = this, {\n levels: d\n } = this.hls, u = d[c], f = !!(u != null && (o = u.details) != null && o.live), g = u == null ? void 0 : u.codecSet, p = h ? h.duration : l ? l.duration : 0, y = this.bwEstimator.getEstimateTTFB() / 1e3;\n let v = t, E = -1;\n for (let T = s; T >= t; T--) {\n const A = d[T];\n if (!A || g && A.codecSet !== g) {\n A && (v = Math.min(T, v), E = Math.max(T, E));\n continue;\n }\n E !== -1 && x.trace(`[abr] Skipped level(s) ${v}-${E} with CODECS:\"${d[E].attrs.CODECS}\"; not compatible with \"${u.attrs.CODECS}\"`);\n const b = A.details, D = (h ? b == null ? void 0 : b.partTarget : b == null ? void 0 : b.averagetargetduration) || p;\n let I;\n T <= c ? I = r * e : I = n * e;\n const C = d[T].maxBitrate, _ = this.getTimeToLoadFrag(y, I, C * D, b === void 0);\n if (x.trace(`[abr] level:${T} adjustedbw-bitrate:${Math.round(I - C)} avgDuration:${D.toFixed(1)} maxFetchDuration:${i.toFixed(1)} fetchDuration:${_.toFixed(1)}`), I > C && // fragment fetchDuration unknown OR live stream OR fragment fetchDuration less than max allowed fetch duration, then this level matches\n // we don't account for max Fetch Duration for live streams, this is to avoid switching down when near the edge of live sliding window ...\n // special case to support startLevel = -1 (bitrateTest) on live streams : in that case we should not exit loop so that findBestLevel will return -1\n (_ === 0 || !M(_) || f && !this.bitrateTestDelay || _ < i))\n return T;\n }\n return -1;\n }\n set nextAutoLevel(e) {\n this._nextAutoLevel = e;\n }\n}\nclass Br {\n constructor() {\n this.chunks = [], this.dataLength = 0;\n }\n push(e) {\n this.chunks.push(e), this.dataLength += e.length;\n }\n flush() {\n const {\n chunks: e,\n dataLength: t\n } = this;\n let s;\n if (e.length)\n e.length === 1 ? s = e[0] : s = Mo(e, t);\n else\n return new Uint8Array(0);\n return this.reset(), s;\n }\n reset() {\n this.chunks.length = 0, this.dataLength = 0;\n }\n}\nfunction Mo(a, e) {\n const t = new Uint8Array(e);\n let s = 0;\n for (let i = 0; i < a.length; i++) {\n const r = a[i];\n t.set(r, s), s += r.length;\n }\n return t;\n}\nconst Di = 100;\nclass No extends Ns {\n constructor(e, t, s) {\n super(e, t, s, \"[audio-stream-controller]\", B.AUDIO), this.videoBuffer = null, this.videoTrackCC = -1, this.waitingVideoCC = -1, this.bufferedTrack = null, this.switchingTrack = null, this.trackId = -1, this.waitingData = null, this.mainDetails = null, this.bufferFlushed = !1, this.cachedTrackLoadedData = null, this._registerListeners();\n }\n onHandlerDestroying() {\n this._unregisterListeners(), this.mainDetails = null, this.bufferedTrack = null, this.switchingTrack = null;\n }\n _registerListeners() {\n const {\n hls: e\n } = this;\n e.on(m.MEDIA_ATTACHED, this.onMediaAttached, this), e.on(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.on(m.MANIFEST_LOADING, this.onManifestLoading, this), e.on(m.LEVEL_LOADED, this.onLevelLoaded, this), e.on(m.AUDIO_TRACKS_UPDATED, this.onAudioTracksUpdated, this), e.on(m.AUDIO_TRACK_SWITCHING, this.onAudioTrackSwitching, this), e.on(m.AUDIO_TRACK_LOADED, this.onAudioTrackLoaded, this), e.on(m.ERROR, this.onError, this), e.on(m.BUFFER_RESET, this.onBufferReset, this), e.on(m.BUFFER_CREATED, this.onBufferCreated, this), e.on(m.BUFFER_FLUSHED, this.onBufferFlushed, this), e.on(m.INIT_PTS_FOUND, this.onInitPtsFound, this), e.on(m.FRAG_BUFFERED, this.onFragBuffered, this);\n }\n _unregisterListeners() {\n const {\n hls: e\n } = this;\n e.off(m.MEDIA_ATTACHED, this.onMediaAttached, this), e.off(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.off(m.MANIFEST_LOADING, this.onManifestLoading, this), e.off(m.LEVEL_LOADED, this.onLevelLoaded, this), e.off(m.AUDIO_TRACKS_UPDATED, this.onAudioTracksUpdated, this), e.off(m.AUDIO_TRACK_SWITCHING, this.onAudioTrackSwitching, this), e.off(m.AUDIO_TRACK_LOADED, this.onAudioTrackLoaded, this), e.off(m.ERROR, this.onError, this), e.off(m.BUFFER_RESET, this.onBufferReset, this), e.off(m.BUFFER_CREATED, this.onBufferCreated, this), e.off(m.BUFFER_FLUSHED, this.onBufferFlushed, this), e.off(m.INIT_PTS_FOUND, this.onInitPtsFound, this), e.off(m.FRAG_BUFFERED, this.onFragBuffered, this);\n }\n // INIT_PTS_FOUND is triggered when the video track parsed in the stream-controller has a new PTS value\n onInitPtsFound(e, {\n frag: t,\n id: s,\n initPTS: i,\n timescale: r\n }) {\n if (s === \"main\") {\n const n = t.cc;\n this.initPTS[t.cc] = {\n baseTime: i,\n timescale: r\n }, this.log(`InitPTS for cc: ${n} found from main: ${i}`), this.videoTrackCC = n, this.state === w.WAITING_INIT_PTS && this.tick();\n }\n }\n startLoad(e) {\n if (!this.levels) {\n this.startPosition = e, this.state = w.STOPPED;\n return;\n }\n const t = this.lastCurrentTime;\n this.stopLoad(), this.setInterval(Di), t > 0 && e === -1 ? (this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`), e = t, this.state = w.IDLE) : (this.loadedmetadata = !1, this.state = w.WAITING_TRACK), this.nextLoadPosition = this.startPosition = this.lastCurrentTime = e, this.tick();\n }\n doTick() {\n switch (this.state) {\n case w.IDLE:\n this.doTickIdle();\n break;\n case w.WAITING_TRACK: {\n var e;\n const {\n levels: s,\n trackId: i\n } = this, r = s == null || (e = s[i]) == null ? void 0 : e.details;\n if (r) {\n if (this.waitForCdnTuneIn(r))\n break;\n this.state = w.WAITING_INIT_PTS;\n }\n break;\n }\n case w.FRAG_LOADING_WAITING_RETRY: {\n var t;\n const s = performance.now(), i = this.retryDate;\n (!i || s >= i || (t = this.media) != null && t.seeking) && (this.log(\"RetryDate reached, switch back to IDLE state\"), this.resetStartWhenNotLoaded(this.trackId), this.state = w.IDLE);\n break;\n }\n case w.WAITING_INIT_PTS: {\n const s = this.waitingData;\n if (s) {\n const {\n frag: i,\n part: r,\n cache: n,\n complete: o\n } = s;\n if (this.initPTS[i.cc] !== void 0) {\n this.waitingData = null, this.waitingVideoCC = -1, this.state = w.FRAG_LOADING;\n const l = n.flush(), h = {\n frag: i,\n part: r,\n payload: l,\n networkDetails: null\n };\n this._handleFragmentLoadProgress(h), o && super._handleFragmentLoadComplete(h);\n } else if (this.videoTrackCC !== this.waitingVideoCC)\n this.log(`Waiting fragment cc (${i.cc}) cancelled because video is at cc ${this.videoTrackCC}`), this.clearWaitingFragment();\n else {\n const l = this.getLoadPosition(), h = J.bufferInfo(this.mediaBuffer, l, this.config.maxBufferHole);\n Es(h.end, this.config.maxFragLookUpTolerance, i) < 0 && (this.log(`Waiting fragment cc (${i.cc}) @ ${i.start} cancelled because another fragment at ${h.end} is needed`), this.clearWaitingFragment());\n }\n } else\n this.state = w.IDLE;\n }\n }\n this.onTickEnd();\n }\n clearWaitingFragment() {\n const e = this.waitingData;\n e && (this.fragmentTracker.removeFragment(e.frag), this.waitingData = null, this.waitingVideoCC = -1, this.state = w.IDLE);\n }\n resetLoadingState() {\n this.clearWaitingFragment(), super.resetLoadingState();\n }\n onTickEnd() {\n const {\n media: e\n } = this;\n e != null && e.readyState && (this.lastCurrentTime = e.currentTime);\n }\n doTickIdle() {\n const {\n hls: e,\n levels: t,\n media: s,\n trackId: i\n } = this, r = e.config;\n if (!(t != null && t[i]) || !s && (this.startFragRequested || !r.startFragPrefetch))\n return;\n const n = t[i], o = n.details;\n if (!o || o.live && this.levelLastLoaded !== i || this.waitForCdnTuneIn(o)) {\n this.state = w.WAITING_TRACK;\n return;\n }\n const l = this.mediaBuffer ? this.mediaBuffer : this.media;\n this.bufferFlushed && l && (this.bufferFlushed = !1, this.afterBufferFlushed(l, j.AUDIO, B.AUDIO));\n const h = this.getFwdBufferInfo(l, B.AUDIO);\n if (h === null)\n return;\n const {\n bufferedTrack: c,\n switchingTrack: d\n } = this;\n if (!d && this._streamEnded(h, o)) {\n e.trigger(m.BUFFER_EOS, {\n type: \"audio\"\n }), this.state = w.ENDED;\n return;\n }\n const u = this.getFwdBufferInfo(this.videoBuffer ? this.videoBuffer : this.media, B.MAIN), f = h.len, g = this.getMaxBufferLength(u == null ? void 0 : u.len);\n if (f >= g && !d)\n return;\n const y = o.fragments[0].start;\n let v = h.end;\n if (d && s) {\n const b = this.getLoadPosition();\n c && d.attrs !== c.attrs && (v = b), o.PTSKnown && b < y && (h.end > y || h.nextStart) && (this.log(\"Alt audio track ahead of main track, seek to start of alt audio track\"), s.currentTime = y + 0.05);\n }\n let E = this.getNextFragment(v, o), T = !1;\n if (E && this.isLoopLoading(E, v) && (T = !!E.gap, E = this.getNextFragmentLoopLoading(E, o, h, B.MAIN, g)), !E) {\n this.bufferFlushed = !0;\n return;\n }\n const A = u && E.start > u.end + o.targetduration;\n if (A || // Or wait for main buffer after buffing some audio\n !(u != null && u.len) && h.len) {\n const b = this.getAppendedFrag(E.start, B.MAIN);\n if (b === null || (T || (T = !!b.gap || !!A && u.len === 0), A && !T || T && h.nextStart && h.nextStart < b.end))\n return;\n }\n this.loadFragment(E, n, v);\n }\n getMaxBufferLength(e) {\n const t = super.getMaxBufferLength();\n return e ? Math.min(Math.max(t, e), this.config.maxMaxBufferLength) : t;\n }\n onMediaDetaching() {\n this.videoBuffer = null, super.onMediaDetaching();\n }\n onAudioTracksUpdated(e, {\n audioTracks: t\n }) {\n this.resetTransmuxer(), this.levels = t.map((s) => new mt(s));\n }\n onAudioTrackSwitching(e, t) {\n const s = !!t.url;\n this.trackId = t.id;\n const {\n fragCurrent: i\n } = this;\n i && (i.abortRequests(), this.removeUnbufferedFrags(i.start)), this.resetLoadingState(), s ? this.setInterval(Di) : this.resetTransmuxer(), s ? (this.switchingTrack = t, this.state = w.IDLE) : (this.switchingTrack = null, this.bufferedTrack = t, this.state = w.STOPPED), this.tick();\n }\n onManifestLoading() {\n this.fragmentTracker.removeAllFragments(), this.startPosition = this.lastCurrentTime = 0, this.bufferFlushed = !1, this.levels = this.mainDetails = this.waitingData = this.bufferedTrack = this.cachedTrackLoadedData = this.switchingTrack = null, this.startFragRequested = !1, this.trackId = this.videoTrackCC = this.waitingVideoCC = -1;\n }\n onLevelLoaded(e, t) {\n this.mainDetails = t.details, this.cachedTrackLoadedData !== null && (this.hls.trigger(m.AUDIO_TRACK_LOADED, this.cachedTrackLoadedData), this.cachedTrackLoadedData = null);\n }\n onAudioTrackLoaded(e, t) {\n var s;\n if (this.mainDetails == null) {\n this.cachedTrackLoadedData = t;\n return;\n }\n const {\n levels: i\n } = this, {\n details: r,\n id: n\n } = t;\n if (!i) {\n this.warn(`Audio tracks were reset while loading level ${n}`);\n return;\n }\n this.log(`Track ${n} loaded [${r.startSN},${r.endSN}]${r.lastPartSn ? `[part-${r.lastPartSn}-${r.lastPartIndex}]` : \"\"},duration:${r.totalduration}`);\n const o = i[n];\n let l = 0;\n if (r.live || (s = o.details) != null && s.live) {\n this.checkLiveUpdate(r);\n const h = this.mainDetails;\n if (r.deltaUpdateFailed || !h)\n return;\n !o.details && r.hasProgramDateTime && h.hasProgramDateTime ? (br(r, h), l = r.fragments[0].start) : l = this.alignPlaylists(r, o.details);\n }\n o.details = r, this.levelLastLoaded = n, !this.startFragRequested && (this.mainDetails || !r.live) && this.setStartPosition(o.details, l), this.state === w.WAITING_TRACK && !this.waitForCdnTuneIn(r) && (this.state = w.IDLE), this.tick();\n }\n _handleFragmentLoadProgress(e) {\n var t;\n const {\n frag: s,\n part: i,\n payload: r\n } = e, {\n config: n,\n trackId: o,\n levels: l\n } = this;\n if (!l) {\n this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${s.sn} of level ${s.level} will not be buffered`);\n return;\n }\n const h = l[o];\n if (!h) {\n this.warn(\"Audio track is undefined on fragment load progress\");\n return;\n }\n const c = h.details;\n if (!c) {\n this.warn(\"Audio track details undefined on fragment load progress\"), this.removeUnbufferedFrags(s.start);\n return;\n }\n const d = n.defaultAudioCodec || h.audioCodec || \"mp4a.40.2\";\n let u = this.transmuxer;\n u || (u = this.transmuxer = new Ur(this.hls, B.AUDIO, this._handleTransmuxComplete.bind(this), this._handleTransmuxerFlush.bind(this)));\n const f = this.initPTS[s.cc], g = (t = s.initSegment) == null ? void 0 : t.data;\n if (f !== void 0) {\n const y = i ? i.index : -1, v = y !== -1, E = new Os(s.level, s.sn, s.stats.chunkCount, r.byteLength, y, v);\n u.push(r, g, d, \"\", s, i, c.totalduration, !1, E, f);\n } else {\n this.log(`Unknown video PTS for cc ${s.cc}, waiting for video PTS before demuxing audio frag ${s.sn} of [${c.startSN} ,${c.endSN}],track ${o}`);\n const {\n cache: p\n } = this.waitingData = this.waitingData || {\n frag: s,\n part: i,\n cache: new Br(),\n complete: !1\n };\n p.push(new Uint8Array(r)), this.waitingVideoCC = this.videoTrackCC, this.state = w.WAITING_INIT_PTS;\n }\n }\n _handleFragmentLoadComplete(e) {\n if (this.waitingData) {\n this.waitingData.complete = !0;\n return;\n }\n super._handleFragmentLoadComplete(e);\n }\n onBufferReset() {\n this.mediaBuffer = this.videoBuffer = null, this.loadedmetadata = !1;\n }\n onBufferCreated(e, t) {\n const s = t.tracks.audio;\n s && (this.mediaBuffer = s.buffer || null), t.tracks.video && (this.videoBuffer = t.tracks.video.buffer || null);\n }\n onFragBuffered(e, t) {\n const {\n frag: s,\n part: i\n } = t;\n if (s.type !== B.AUDIO) {\n if (!this.loadedmetadata && s.type === B.MAIN) {\n const r = this.videoBuffer || this.media;\n r && J.getBuffered(r).length && (this.loadedmetadata = !0);\n }\n return;\n }\n if (this.fragContextChanged(s)) {\n this.warn(`Fragment ${s.sn}${i ? \" p: \" + i.index : \"\"} of level ${s.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack ? this.switchingTrack.name : \"false\"}`);\n return;\n }\n if (s.sn !== \"initSegment\") {\n this.fragPrevious = s;\n const r = this.switchingTrack;\n r && (this.bufferedTrack = r, this.switchingTrack = null, this.hls.trigger(m.AUDIO_TRACK_SWITCHED, xe({}, r)));\n }\n this.fragBufferedComplete(s, i);\n }\n onError(e, t) {\n var s;\n if (t.fatal) {\n this.state = w.ERROR;\n return;\n }\n switch (t.details) {\n case L.FRAG_GAP:\n case L.FRAG_PARSING_ERROR:\n case L.FRAG_DECRYPT_ERROR:\n case L.FRAG_LOAD_ERROR:\n case L.FRAG_LOAD_TIMEOUT:\n case L.KEY_LOAD_ERROR:\n case L.KEY_LOAD_TIMEOUT:\n this.onFragmentOrKeyLoadError(B.AUDIO, t);\n break;\n case L.AUDIO_TRACK_LOAD_ERROR:\n case L.AUDIO_TRACK_LOAD_TIMEOUT:\n case L.LEVEL_PARSING_ERROR:\n !t.levelRetry && this.state === w.WAITING_TRACK && ((s = t.context) == null ? void 0 : s.type) === K.AUDIO_TRACK && (this.state = w.IDLE);\n break;\n case L.BUFFER_FULL_ERROR:\n if (!t.parent || t.parent !== \"audio\")\n return;\n this.reduceLengthAndFlushBuffer(t) && (this.bufferedTrack = null, super.flushMainBuffer(0, Number.POSITIVE_INFINITY, \"audio\"));\n break;\n case L.INTERNAL_EXCEPTION:\n this.recoverWorkerError(t);\n break;\n }\n }\n onBufferFlushed(e, {\n type: t\n }) {\n t === j.AUDIO && (this.bufferFlushed = !0, this.state === w.ENDED && (this.state = w.IDLE));\n }\n _handleTransmuxComplete(e) {\n var t;\n const s = \"audio\", {\n hls: i\n } = this, {\n remuxResult: r,\n chunkMeta: n\n } = e, o = this.getCurrentContext(n);\n if (!o) {\n this.resetWhenMissingContext(n);\n return;\n }\n const {\n frag: l,\n part: h,\n level: c\n } = o, {\n details: d\n } = c, {\n audio: u,\n text: f,\n id3: g,\n initSegment: p\n } = r;\n if (this.fragContextChanged(l) || !d) {\n this.fragmentTracker.removeFragment(l);\n return;\n }\n if (this.state = w.PARSING, this.switchingTrack && u && this.completeAudioSwitch(this.switchingTrack), p != null && p.tracks) {\n const y = l.initSegment || l;\n this._bufferInitSegment(p.tracks, y, n), i.trigger(m.FRAG_PARSING_INIT_SEGMENT, {\n frag: y,\n id: s,\n tracks: p.tracks\n });\n }\n if (u) {\n const {\n startPTS: y,\n endPTS: v,\n startDTS: E,\n endDTS: T\n } = u;\n h && (h.elementaryStreams[j.AUDIO] = {\n startPTS: y,\n endPTS: v,\n startDTS: E,\n endDTS: T\n }), l.setElementaryStreamInfo(j.AUDIO, y, v, E, T), this.bufferFragmentData(u, l, h, n);\n }\n if (g != null && (t = g.samples) != null && t.length) {\n const y = ne({\n id: s,\n frag: l,\n details: d\n }, g);\n i.trigger(m.FRAG_PARSING_METADATA, y);\n }\n if (f) {\n const y = ne({\n id: s,\n frag: l,\n details: d\n }, f);\n i.trigger(m.FRAG_PARSING_USERDATA, y);\n }\n }\n _bufferInitSegment(e, t, s) {\n if (this.state !== w.PARSING)\n return;\n e.video && delete e.video;\n const i = e.audio;\n if (!i)\n return;\n i.levelCodec = i.codec, i.id = \"audio\", this.log(`Init audio buffer, container:${i.container}, codecs[parsed]=[${i.codec}]`), this.hls.trigger(m.BUFFER_CODECS, e);\n const r = i.initSegment;\n if (r != null && r.byteLength) {\n const n = {\n type: \"audio\",\n frag: t,\n part: null,\n chunkMeta: s,\n parent: t.type,\n data: r\n };\n this.hls.trigger(m.BUFFER_APPENDING, n);\n }\n this.tick();\n }\n loadFragment(e, t, s) {\n const i = this.fragmentTracker.getState(e);\n if (this.fragCurrent = e, this.switchingTrack || i === le.NOT_LOADED || i === le.PARTIAL) {\n var r;\n e.sn === \"initSegment\" ? this._loadInitSegment(e, t) : (r = t.details) != null && r.live && !this.initPTS[e.cc] ? (this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`), this.state = w.WAITING_INIT_PTS) : (this.startFragRequested = !0, super.loadFragment(e, t, s));\n } else\n this.clearTrackerIfNeeded(e);\n }\n completeAudioSwitch(e) {\n const {\n hls: t,\n media: s,\n bufferedTrack: i\n } = this, r = i == null ? void 0 : i.attrs, n = e.attrs;\n s && r && (r.CHANNELS !== n.CHANNELS || r.NAME !== n.NAME || r.LANGUAGE !== n.LANGUAGE) && (this.log(\"Switching audio track : flushing all audio\"), super.flushMainBuffer(0, Number.POSITIVE_INFINITY, \"audio\")), this.bufferedTrack = e, this.switchingTrack = null, t.trigger(m.AUDIO_TRACK_SWITCHED, xe({}, e));\n }\n}\nclass Uo extends Ps {\n constructor(e) {\n super(e, \"[audio-track-controller]\"), this.tracks = [], this.groupId = null, this.tracksInGroup = [], this.trackId = -1, this.currentTrack = null, this.selectDefaultTrack = !0, this.registerListeners();\n }\n registerListeners() {\n const {\n hls: e\n } = this;\n e.on(m.MANIFEST_LOADING, this.onManifestLoading, this), e.on(m.MANIFEST_PARSED, this.onManifestParsed, this), e.on(m.LEVEL_LOADING, this.onLevelLoading, this), e.on(m.LEVEL_SWITCHING, this.onLevelSwitching, this), e.on(m.AUDIO_TRACK_LOADED, this.onAudioTrackLoaded, this), e.on(m.ERROR, this.onError, this);\n }\n unregisterListeners() {\n const {\n hls: e\n } = this;\n e.off(m.MANIFEST_LOADING, this.onManifestLoading, this), e.off(m.MANIFEST_PARSED, this.onManifestParsed, this), e.off(m.LEVEL_LOADING, this.onLevelLoading, this), e.off(m.LEVEL_SWITCHING, this.onLevelSwitching, this), e.off(m.AUDIO_TRACK_LOADED, this.onAudioTrackLoaded, this), e.off(m.ERROR, this.onError, this);\n }\n destroy() {\n this.unregisterListeners(), this.tracks.length = 0, this.tracksInGroup.length = 0, this.currentTrack = null, super.destroy();\n }\n onManifestLoading() {\n this.tracks = [], this.groupId = null, this.tracksInGroup = [], this.trackId = -1, this.currentTrack = null, this.selectDefaultTrack = !0;\n }\n onManifestParsed(e, t) {\n this.tracks = t.audioTracks || [];\n }\n onAudioTrackLoaded(e, t) {\n const {\n id: s,\n groupId: i,\n details: r\n } = t, n = this.tracksInGroup[s];\n if (!n || n.groupId !== i) {\n this.warn(`Track with id:${s} and group:${i} not found in active group ${n.groupId}`);\n return;\n }\n const o = n.details;\n n.details = t.details, this.log(`audio-track ${s} \"${n.name}\" lang:${n.lang} group:${i} loaded [${r.startSN}-${r.endSN}]`), s === this.trackId && this.playlistLoaded(s, t, o);\n }\n onLevelLoading(e, t) {\n this.switchLevel(t.level);\n }\n onLevelSwitching(e, t) {\n this.switchLevel(t.level);\n }\n switchLevel(e) {\n const t = this.hls.levels[e];\n if (!(t != null && t.audioGroupIds))\n return;\n const s = t.audioGroupIds[t.urlId];\n if (this.groupId !== s) {\n this.groupId = s || null;\n const i = this.tracks.filter((n) => !s || n.groupId === s);\n this.selectDefaultTrack && !i.some((n) => n.default) && (this.selectDefaultTrack = !1), this.tracksInGroup = i;\n const r = {\n audioTracks: i\n };\n this.log(`Updating audio tracks, ${i.length} track(s) found in group:${s}`), this.hls.trigger(m.AUDIO_TRACKS_UPDATED, r), this.selectInitialTrack();\n } else\n this.shouldReloadPlaylist(this.currentTrack) && this.setAudioTrack(this.trackId);\n }\n onError(e, t) {\n t.fatal || !t.context || t.context.type === K.AUDIO_TRACK && t.context.id === this.trackId && t.context.groupId === this.groupId && (this.requestScheduled = -1, this.checkRetry(t));\n }\n get audioTracks() {\n return this.tracksInGroup;\n }\n get audioTrack() {\n return this.trackId;\n }\n set audioTrack(e) {\n this.selectDefaultTrack = !1, this.setAudioTrack(e);\n }\n setAudioTrack(e) {\n const t = this.tracksInGroup;\n if (e < 0 || e >= t.length) {\n this.warn(\"Invalid id passed to audio-track controller\");\n return;\n }\n this.clearTimer();\n const s = this.currentTrack;\n t[this.trackId];\n const i = t[e], {\n groupId: r,\n name: n\n } = i;\n if (this.log(`Switching to audio-track ${e} \"${n}\" lang:${i.lang} group:${r}`), this.trackId = e, this.currentTrack = i, this.selectDefaultTrack = !1, this.hls.trigger(m.AUDIO_TRACK_SWITCHING, xe({}, i)), i.details && !i.details.live)\n return;\n const o = this.switchParams(i.url, s == null ? void 0 : s.details);\n this.loadPlaylist(o);\n }\n selectInitialTrack() {\n const e = this.tracksInGroup, t = this.findTrackId(this.currentTrack) | this.findTrackId(null);\n if (t !== -1)\n this.setAudioTrack(t);\n else {\n const s = new Error(`No track found for running audio group-ID: ${this.groupId} track count: ${e.length}`);\n this.warn(s.message), this.hls.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.AUDIO_TRACK_LOAD_ERROR,\n fatal: !0,\n error: s\n });\n }\n }\n findTrackId(e) {\n const t = this.tracksInGroup;\n for (let s = 0; s < t.length; s++) {\n const i = t[s];\n if ((!this.selectDefaultTrack || i.default) && (!e || e.attrs[\"STABLE-RENDITION-ID\"] !== void 0 && e.attrs[\"STABLE-RENDITION-ID\"] === i.attrs[\"STABLE-RENDITION-ID\"] || e.name === i.name && e.lang === i.lang))\n return i.id;\n }\n return -1;\n }\n loadPlaylist(e) {\n super.loadPlaylist();\n const t = this.tracksInGroup[this.trackId];\n if (this.shouldLoadPlaylist(t)) {\n const s = t.id, i = t.groupId;\n let r = t.url;\n if (e)\n try {\n r = e.addDirectives(r);\n } catch (n) {\n this.warn(`Could not construct new URL with HLS Delivery Directives: ${n}`);\n }\n this.log(`loading audio-track playlist ${s} \"${t.name}\" lang:${t.lang} group:${i}`), this.clearTimer(), this.hls.trigger(m.AUDIO_TRACK_LOADING, {\n url: r,\n id: s,\n groupId: i,\n deliveryDirectives: e || null\n });\n }\n }\n}\nfunction $r(a, e) {\n if (a.length !== e.length)\n return !1;\n for (let t = 0; t < a.length; t++)\n if (!Bo(a[t].attrs, e[t].attrs))\n return !1;\n return !0;\n}\nfunction Bo(a, e) {\n const t = a[\"STABLE-RENDITION-ID\"];\n return t ? t === e[\"STABLE-RENDITION-ID\"] : ![\"LANGUAGE\", \"NAME\", \"CHARACTERISTICS\", \"AUTOSELECT\", \"DEFAULT\", \"FORCED\"].some((s) => a[s] !== e[s]);\n}\nconst _i = 500;\nclass $o extends Ns {\n constructor(e, t, s) {\n super(e, t, s, \"[subtitle-stream-controller]\", B.SUBTITLE), this.levels = [], this.currentTrackId = -1, this.tracksBuffered = [], this.mainDetails = null, this._registerListeners();\n }\n onHandlerDestroying() {\n this._unregisterListeners(), this.mainDetails = null;\n }\n _registerListeners() {\n const {\n hls: e\n } = this;\n e.on(m.MEDIA_ATTACHED, this.onMediaAttached, this), e.on(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.on(m.MANIFEST_LOADING, this.onManifestLoading, this), e.on(m.LEVEL_LOADED, this.onLevelLoaded, this), e.on(m.ERROR, this.onError, this), e.on(m.SUBTITLE_TRACKS_UPDATED, this.onSubtitleTracksUpdated, this), e.on(m.SUBTITLE_TRACK_SWITCH, this.onSubtitleTrackSwitch, this), e.on(m.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this), e.on(m.SUBTITLE_FRAG_PROCESSED, this.onSubtitleFragProcessed, this), e.on(m.BUFFER_FLUSHING, this.onBufferFlushing, this), e.on(m.FRAG_BUFFERED, this.onFragBuffered, this);\n }\n _unregisterListeners() {\n const {\n hls: e\n } = this;\n e.off(m.MEDIA_ATTACHED, this.onMediaAttached, this), e.off(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.off(m.MANIFEST_LOADING, this.onManifestLoading, this), e.off(m.LEVEL_LOADED, this.onLevelLoaded, this), e.off(m.ERROR, this.onError, this), e.off(m.SUBTITLE_TRACKS_UPDATED, this.onSubtitleTracksUpdated, this), e.off(m.SUBTITLE_TRACK_SWITCH, this.onSubtitleTrackSwitch, this), e.off(m.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this), e.off(m.SUBTITLE_FRAG_PROCESSED, this.onSubtitleFragProcessed, this), e.off(m.BUFFER_FLUSHING, this.onBufferFlushing, this), e.off(m.FRAG_BUFFERED, this.onFragBuffered, this);\n }\n startLoad(e) {\n this.stopLoad(), this.state = w.IDLE, this.setInterval(_i), this.nextLoadPosition = this.startPosition = this.lastCurrentTime = e, this.tick();\n }\n onManifestLoading() {\n this.mainDetails = null, this.fragmentTracker.removeAllFragments();\n }\n onMediaDetaching() {\n this.tracksBuffered = [], super.onMediaDetaching();\n }\n onLevelLoaded(e, t) {\n this.mainDetails = t.details;\n }\n onSubtitleFragProcessed(e, t) {\n const {\n frag: s,\n success: i\n } = t;\n if (this.fragPrevious = s, this.state = w.IDLE, !i)\n return;\n const r = this.tracksBuffered[this.currentTrackId];\n if (!r)\n return;\n let n;\n const o = s.start;\n for (let h = 0; h < r.length; h++)\n if (o >= r[h].start && o <= r[h].end) {\n n = r[h];\n break;\n }\n const l = s.start + s.duration;\n n ? n.end = l : (n = {\n start: o,\n end: l\n }, r.push(n)), this.fragmentTracker.fragBuffered(s);\n }\n onBufferFlushing(e, t) {\n const {\n startOffset: s,\n endOffset: i\n } = t;\n if (s === 0 && i !== Number.POSITIVE_INFINITY) {\n const r = i - 1;\n if (r <= 0)\n return;\n t.endOffsetSubtitles = Math.max(0, r), this.tracksBuffered.forEach((n) => {\n for (let o = 0; o < n.length; ) {\n if (n[o].end <= r) {\n n.shift();\n continue;\n } else if (n[o].start < r)\n n[o].start = r;\n else\n break;\n o++;\n }\n }), this.fragmentTracker.removeFragmentsInRange(s, r, B.SUBTITLE);\n }\n }\n onFragBuffered(e, t) {\n if (!this.loadedmetadata && t.frag.type === B.MAIN) {\n var s;\n (s = this.media) != null && s.buffered.length && (this.loadedmetadata = !0);\n }\n }\n // If something goes wrong, proceed to next frag, if we were processing one.\n onError(e, t) {\n const s = t.frag;\n (s == null ? void 0 : s.type) === B.SUBTITLE && (this.fragCurrent && this.fragCurrent.abortRequests(), this.state !== w.STOPPED && (this.state = w.IDLE));\n }\n // Got all new subtitle levels.\n onSubtitleTracksUpdated(e, {\n subtitleTracks: t\n }) {\n if ($r(this.levels, t)) {\n this.levels = t.map((s) => new mt(s));\n return;\n }\n this.tracksBuffered = [], this.levels = t.map((s) => {\n const i = new mt(s);\n return this.tracksBuffered[i.id] = [], i;\n }), this.fragmentTracker.removeFragmentsInRange(0, Number.POSITIVE_INFINITY, B.SUBTITLE), this.fragPrevious = null, this.mediaBuffer = null;\n }\n onSubtitleTrackSwitch(e, t) {\n if (this.currentTrackId = t.id, !this.levels.length || this.currentTrackId === -1) {\n this.clearInterval();\n return;\n }\n const s = this.levels[this.currentTrackId];\n s != null && s.details ? this.mediaBuffer = this.mediaBufferTimeRanges : this.mediaBuffer = null, s && this.setInterval(_i);\n }\n // Got a new set of subtitle fragments.\n onSubtitleTrackLoaded(e, t) {\n var s;\n const {\n details: i,\n id: r\n } = t, {\n currentTrackId: n,\n levels: o\n } = this;\n if (!o.length)\n return;\n const l = o[n];\n if (r >= o.length || r !== n || !l)\n return;\n this.mediaBuffer = this.mediaBufferTimeRanges;\n let h = 0;\n if (i.live || (s = l.details) != null && s.live) {\n const c = this.mainDetails;\n if (i.deltaUpdateFailed || !c)\n return;\n const d = c.fragments[0];\n l.details ? (h = this.alignPlaylists(i, l.details), h === 0 && d && (h = d.start, xs(i, h))) : i.hasProgramDateTime && c.hasProgramDateTime ? (br(i, c), h = i.fragments[0].start) : d && (h = d.start, xs(i, h));\n }\n l.details = i, this.levelLastLoaded = r, !this.startFragRequested && (this.mainDetails || !i.live) && this.setStartPosition(l.details, h), this.tick(), i.live && !this.fragCurrent && this.media && this.state === w.IDLE && (pt(null, i.fragments, this.media.currentTime, 0) || (this.warn(\"Subtitle playlist not aligned with playback\"), l.details = void 0));\n }\n _handleFragmentLoadComplete(e) {\n const {\n frag: t,\n payload: s\n } = e, i = t.decryptdata, r = this.hls;\n if (!this.fragContextChanged(t) && s && s.byteLength > 0 && i && i.key && i.iv && i.method === \"AES-128\") {\n const n = performance.now();\n this.decrypter.decrypt(new Uint8Array(s), i.key.buffer, i.iv.buffer).catch((o) => {\n throw r.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.FRAG_DECRYPT_ERROR,\n fatal: !1,\n error: o,\n reason: o.message,\n frag: t\n }), o;\n }).then((o) => {\n const l = performance.now();\n r.trigger(m.FRAG_DECRYPTED, {\n frag: t,\n payload: o,\n stats: {\n tstart: n,\n tdecrypt: l\n }\n });\n }).catch((o) => {\n this.warn(`${o.name}: ${o.message}`), this.state = w.IDLE;\n });\n }\n }\n doTick() {\n if (!this.media) {\n this.state = w.IDLE;\n return;\n }\n if (this.state === w.IDLE) {\n const {\n currentTrackId: e,\n levels: t\n } = this, s = t[e];\n if (!t.length || !s || !s.details)\n return;\n const {\n config: i\n } = this, r = this.getLoadPosition(), n = J.bufferedInfo(this.tracksBuffered[this.currentTrackId] || [], r, i.maxBufferHole), {\n end: o,\n len: l\n } = n, h = this.getFwdBufferInfo(this.media, B.MAIN), c = s.details, d = this.getMaxBufferLength(h == null ? void 0 : h.len) + c.levelTargetDuration;\n if (l > d)\n return;\n const u = c.fragments, f = u.length, g = c.edge;\n let p = null;\n const y = this.fragPrevious;\n if (o < g) {\n const v = i.maxFragLookUpTolerance, E = o > g - v ? 0 : v;\n p = pt(y, u, Math.max(u[0].start, o), E), !p && y && y.start < u[0].start && (p = u[0]);\n } else\n p = u[f - 1];\n if (!p)\n return;\n if (p = this.mapToInitFragWhenRequired(p), p.sn !== \"initSegment\") {\n const v = p.sn - c.startSN, E = u[v - 1];\n E && E.cc === p.cc && this.fragmentTracker.getState(E) === le.NOT_LOADED && (p = E);\n }\n this.fragmentTracker.getState(p) === le.NOT_LOADED && this.loadFragment(p, s, o);\n }\n }\n getMaxBufferLength(e) {\n const t = super.getMaxBufferLength();\n return e ? Math.max(t, e) : t;\n }\n loadFragment(e, t, s) {\n this.fragCurrent = e, e.sn === \"initSegment\" ? this._loadInitSegment(e, t) : (this.startFragRequested = !0, super.loadFragment(e, t, s));\n }\n get mediaBufferTimeRanges() {\n return new Go(this.tracksBuffered[this.currentTrackId] || []);\n }\n}\nclass Go {\n constructor(e) {\n this.buffered = void 0;\n const t = (s, i, r) => {\n if (i = i >>> 0, i > r - 1)\n throw new DOMException(`Failed to execute '${s}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${r})`);\n return e[i][s];\n };\n this.buffered = {\n get length() {\n return e.length;\n },\n end(s) {\n return t(\"end\", s, e.length);\n },\n start(s) {\n return t(\"start\", s, e.length);\n }\n };\n }\n}\nclass Vo extends Ps {\n constructor(e) {\n super(e, \"[subtitle-track-controller]\"), this.media = null, this.tracks = [], this.groupId = null, this.tracksInGroup = [], this.trackId = -1, this.selectDefaultTrack = !0, this.queuedDefaultTrack = -1, this.trackChangeListener = () => this.onTextTracksChanged(), this.asyncPollTrackChange = () => this.pollTrackChange(0), this.useTextTrackPolling = !1, this.subtitlePollingInterval = -1, this._subtitleDisplay = !0, this.registerListeners();\n }\n destroy() {\n this.unregisterListeners(), this.tracks.length = 0, this.tracksInGroup.length = 0, this.trackChangeListener = this.asyncPollTrackChange = null, super.destroy();\n }\n get subtitleDisplay() {\n return this._subtitleDisplay;\n }\n set subtitleDisplay(e) {\n this._subtitleDisplay = e, this.trackId > -1 && this.toggleTrackModes(this.trackId);\n }\n registerListeners() {\n const {\n hls: e\n } = this;\n e.on(m.MEDIA_ATTACHED, this.onMediaAttached, this), e.on(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.on(m.MANIFEST_LOADING, this.onManifestLoading, this), e.on(m.MANIFEST_PARSED, this.onManifestParsed, this), e.on(m.LEVEL_LOADING, this.onLevelLoading, this), e.on(m.LEVEL_SWITCHING, this.onLevelSwitching, this), e.on(m.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this), e.on(m.ERROR, this.onError, this);\n }\n unregisterListeners() {\n const {\n hls: e\n } = this;\n e.off(m.MEDIA_ATTACHED, this.onMediaAttached, this), e.off(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.off(m.MANIFEST_LOADING, this.onManifestLoading, this), e.off(m.MANIFEST_PARSED, this.onManifestParsed, this), e.off(m.LEVEL_LOADING, this.onLevelLoading, this), e.off(m.LEVEL_SWITCHING, this.onLevelSwitching, this), e.off(m.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this), e.off(m.ERROR, this.onError, this);\n }\n // Listen for subtitle track change, then extract the current track ID.\n onMediaAttached(e, t) {\n this.media = t.media, this.media && (this.queuedDefaultTrack > -1 && (this.subtitleTrack = this.queuedDefaultTrack, this.queuedDefaultTrack = -1), this.useTextTrackPolling = !(this.media.textTracks && \"onchange\" in this.media.textTracks), this.useTextTrackPolling ? this.pollTrackChange(500) : this.media.textTracks.addEventListener(\"change\", this.asyncPollTrackChange));\n }\n pollTrackChange(e) {\n self.clearInterval(this.subtitlePollingInterval), this.subtitlePollingInterval = self.setInterval(this.trackChangeListener, e);\n }\n onMediaDetaching() {\n if (!this.media)\n return;\n self.clearInterval(this.subtitlePollingInterval), this.useTextTrackPolling || this.media.textTracks.removeEventListener(\"change\", this.asyncPollTrackChange), this.trackId > -1 && (this.queuedDefaultTrack = this.trackId), os(this.media.textTracks).forEach((t) => {\n rt(t);\n }), this.subtitleTrack = -1, this.media = null;\n }\n onManifestLoading() {\n this.tracks = [], this.groupId = null, this.tracksInGroup = [], this.trackId = -1, this.selectDefaultTrack = !0;\n }\n // Fired whenever a new manifest is loaded.\n onManifestParsed(e, t) {\n this.tracks = t.subtitleTracks;\n }\n onSubtitleTrackLoaded(e, t) {\n const {\n id: s,\n details: i\n } = t, {\n trackId: r\n } = this, n = this.tracksInGroup[r];\n if (!n) {\n this.warn(`Invalid subtitle track id ${s}`);\n return;\n }\n const o = n.details;\n n.details = t.details, this.log(`subtitle track ${s} loaded [${i.startSN}-${i.endSN}]`), s === this.trackId && this.playlistLoaded(s, t, o);\n }\n onLevelLoading(e, t) {\n this.switchLevel(t.level);\n }\n onLevelSwitching(e, t) {\n this.switchLevel(t.level);\n }\n switchLevel(e) {\n const t = this.hls.levels[e];\n if (!(t != null && t.textGroupIds))\n return;\n const s = t.textGroupIds[t.urlId], i = this.tracksInGroup ? this.tracksInGroup[this.trackId] : void 0;\n if (this.groupId !== s) {\n const r = this.tracks.filter((l) => !s || l.groupId === s);\n this.tracksInGroup = r;\n const n = this.findTrackId(i == null ? void 0 : i.name) || this.findTrackId();\n this.groupId = s || null;\n const o = {\n subtitleTracks: r\n };\n this.log(`Updating subtitle tracks, ${r.length} track(s) found in \"${s}\" group-id`), this.hls.trigger(m.SUBTITLE_TRACKS_UPDATED, o), n !== -1 && this.setSubtitleTrack(n, i);\n } else\n this.shouldReloadPlaylist(i) && this.setSubtitleTrack(this.trackId, i);\n }\n findTrackId(e) {\n const t = this.tracksInGroup;\n for (let s = 0; s < t.length; s++) {\n const i = t[s];\n if ((!this.selectDefaultTrack || i.default) && (!e || e === i.name))\n return i.id;\n }\n return -1;\n }\n onError(e, t) {\n t.fatal || !t.context || t.context.type === K.SUBTITLE_TRACK && t.context.id === this.trackId && t.context.groupId === this.groupId && this.checkRetry(t);\n }\n /** get alternate subtitle tracks list from playlist **/\n get subtitleTracks() {\n return this.tracksInGroup;\n }\n /** get/set index of the selected subtitle track (based on index in subtitle track lists) **/\n get subtitleTrack() {\n return this.trackId;\n }\n set subtitleTrack(e) {\n this.selectDefaultTrack = !1;\n const t = this.tracksInGroup ? this.tracksInGroup[this.trackId] : void 0;\n this.setSubtitleTrack(e, t);\n }\n loadPlaylist(e) {\n super.loadPlaylist();\n const t = this.tracksInGroup[this.trackId];\n if (this.shouldLoadPlaylist(t)) {\n const s = t.id, i = t.groupId;\n let r = t.url;\n if (e)\n try {\n r = e.addDirectives(r);\n } catch (n) {\n this.warn(`Could not construct new URL with HLS Delivery Directives: ${n}`);\n }\n this.log(`Loading subtitle playlist for id ${s}`), this.hls.trigger(m.SUBTITLE_TRACK_LOADING, {\n url: r,\n id: s,\n groupId: i,\n deliveryDirectives: e || null\n });\n }\n }\n /**\n * Disables the old subtitleTrack and sets current mode on the next subtitleTrack.\n * This operates on the DOM textTracks.\n * A value of -1 will disable all subtitle tracks.\n */\n toggleTrackModes(e) {\n const {\n media: t,\n trackId: s\n } = this;\n if (!t)\n return;\n const i = os(t.textTracks), r = i.filter((o) => o.groupId === this.groupId);\n if (e === -1)\n [].slice.call(i).forEach((o) => {\n o.mode = \"disabled\";\n });\n else {\n const o = r[s];\n o && (o.mode = \"disabled\");\n }\n const n = r[e];\n n && (n.mode = this.subtitleDisplay ? \"showing\" : \"hidden\");\n }\n /**\n * This method is responsible for validating the subtitle index and periodically reloading if live.\n * Dispatches the SUBTITLE_TRACK_SWITCH event, which instructs the subtitle-stream-controller to load the selected track.\n */\n setSubtitleTrack(e, t) {\n var s;\n const i = this.tracksInGroup;\n if (!this.media) {\n this.queuedDefaultTrack = e;\n return;\n }\n if (this.trackId !== e && this.toggleTrackModes(e), this.trackId === e && (e === -1 || (s = i[e]) != null && s.details) || e < -1 || e >= i.length)\n return;\n this.clearTimer();\n const r = i[e];\n if (this.log(`Switching to subtitle-track ${e}` + (r ? ` \"${r.name}\" lang:${r.lang} group:${r.groupId}` : \"\")), this.trackId = e, r) {\n const {\n id: n,\n groupId: o = \"\",\n name: l,\n type: h,\n url: c\n } = r;\n this.hls.trigger(m.SUBTITLE_TRACK_SWITCH, {\n id: n,\n groupId: o,\n name: l,\n type: h,\n url: c\n });\n const d = this.switchParams(r.url, t == null ? void 0 : t.details);\n this.loadPlaylist(d);\n } else\n this.hls.trigger(m.SUBTITLE_TRACK_SWITCH, {\n id: e\n });\n }\n onTextTracksChanged() {\n if (this.useTextTrackPolling || self.clearInterval(this.subtitlePollingInterval), !this.media || !this.hls.config.renderTextTracksNatively)\n return;\n let e = -1;\n const t = os(this.media.textTracks);\n for (let s = 0; s < t.length; s++)\n if (t[s].mode === \"hidden\")\n e = s;\n else if (t[s].mode === \"showing\") {\n e = s;\n break;\n }\n this.subtitleTrack !== e && (this.subtitleTrack = e);\n }\n}\nfunction os(a) {\n const e = [];\n for (let t = 0; t < a.length; t++) {\n const s = a[t];\n (s.kind === \"subtitles\" || s.kind === \"captions\") && s.label && e.push(a[t]);\n }\n return e;\n}\nclass Ho {\n constructor(e) {\n this.buffers = void 0, this.queues = {\n video: [],\n audio: [],\n audiovideo: []\n }, this.buffers = e;\n }\n append(e, t) {\n const s = this.queues[t];\n s.push(e), s.length === 1 && this.buffers[t] && this.executeNext(t);\n }\n insertAbort(e, t) {\n this.queues[t].unshift(e), this.executeNext(t);\n }\n appendBlocker(e) {\n let t;\n const s = new Promise((r) => {\n t = r;\n }), i = {\n execute: t,\n onStart: () => {\n },\n onComplete: () => {\n },\n onError: () => {\n }\n };\n return this.append(i, e), s;\n }\n executeNext(e) {\n const {\n buffers: t,\n queues: s\n } = this, i = t[e], r = s[e];\n if (r.length) {\n const n = r[0];\n try {\n n.execute();\n } catch (o) {\n x.warn(\"[buffer-operation-queue]: Unhandled exception executing the current operation\"), n.onError(o), i != null && i.updating || (r.shift(), this.executeNext(e));\n }\n }\n }\n shiftAndExecuteNext(e) {\n this.queues[e].shift(), this.executeNext(e);\n }\n current(e) {\n return this.queues[e][0];\n }\n}\nconst ki = Ht(), Pi = /([ha]vc.)(?:\\.[^.,]+)+/;\nclass Ko {\n // The level details used to determine duration, target-duration and live\n // cache the self generated object url to detect hijack of video tag\n // A queue of buffer operations which require the SourceBuffer to not be updating upon execution\n // References to event listeners for each SourceBuffer, so that they can be referenced for event removal\n // The number of BUFFER_CODEC events received before any sourceBuffers are created\n // The total number of BUFFER_CODEC events received\n // A reference to the attached media element\n // A reference to the active media source\n // Last MP3 audio chunk appended\n // counters\n constructor(e) {\n this.details = null, this._objectUrl = null, this.operationQueue = void 0, this.listeners = void 0, this.hls = void 0, this.bufferCodecEventsExpected = 0, this._bufferCodecEventsTotal = 0, this.media = null, this.mediaSource = null, this.lastMpegAudioChunk = null, this.appendError = 0, this.tracks = {}, this.pendingTracks = {}, this.sourceBuffer = void 0, this._onMediaSourceOpen = () => {\n const {\n media: t,\n mediaSource: s\n } = this;\n x.log(\"[buffer-controller]: Media source opened\"), t && (t.removeEventListener(\"emptied\", this._onMediaEmptied), this.updateMediaElementDuration(), this.hls.trigger(m.MEDIA_ATTACHED, {\n media: t\n })), s && s.removeEventListener(\"sourceopen\", this._onMediaSourceOpen), this.checkPendingTracks();\n }, this._onMediaSourceClose = () => {\n x.log(\"[buffer-controller]: Media source closed\");\n }, this._onMediaSourceEnded = () => {\n x.log(\"[buffer-controller]: Media source ended\");\n }, this._onMediaEmptied = () => {\n const {\n media: t,\n _objectUrl: s\n } = this;\n t && t.src !== s && x.error(`Media element src was set while attaching MediaSource (${s} > ${t.src})`);\n }, this.hls = e, this._initSourceBuffer(), this.registerListeners();\n }\n hasSourceTypes() {\n return this.getSourceBufferTypes().length > 0 || Object.keys(this.pendingTracks).length > 0;\n }\n destroy() {\n this.unregisterListeners(), this.details = null, this.lastMpegAudioChunk = null;\n }\n registerListeners() {\n const {\n hls: e\n } = this;\n e.on(m.MEDIA_ATTACHING, this.onMediaAttaching, this), e.on(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.on(m.MANIFEST_LOADING, this.onManifestLoading, this), e.on(m.MANIFEST_PARSED, this.onManifestParsed, this), e.on(m.BUFFER_RESET, this.onBufferReset, this), e.on(m.BUFFER_APPENDING, this.onBufferAppending, this), e.on(m.BUFFER_CODECS, this.onBufferCodecs, this), e.on(m.BUFFER_EOS, this.onBufferEos, this), e.on(m.BUFFER_FLUSHING, this.onBufferFlushing, this), e.on(m.LEVEL_UPDATED, this.onLevelUpdated, this), e.on(m.FRAG_PARSED, this.onFragParsed, this), e.on(m.FRAG_CHANGED, this.onFragChanged, this);\n }\n unregisterListeners() {\n const {\n hls: e\n } = this;\n e.off(m.MEDIA_ATTACHING, this.onMediaAttaching, this), e.off(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.off(m.MANIFEST_LOADING, this.onManifestLoading, this), e.off(m.MANIFEST_PARSED, this.onManifestParsed, this), e.off(m.BUFFER_RESET, this.onBufferReset, this), e.off(m.BUFFER_APPENDING, this.onBufferAppending, this), e.off(m.BUFFER_CODECS, this.onBufferCodecs, this), e.off(m.BUFFER_EOS, this.onBufferEos, this), e.off(m.BUFFER_FLUSHING, this.onBufferFlushing, this), e.off(m.LEVEL_UPDATED, this.onLevelUpdated, this), e.off(m.FRAG_PARSED, this.onFragParsed, this), e.off(m.FRAG_CHANGED, this.onFragChanged, this);\n }\n _initSourceBuffer() {\n this.sourceBuffer = {}, this.operationQueue = new Ho(this.sourceBuffer), this.listeners = {\n audio: [],\n video: [],\n audiovideo: []\n }, this.lastMpegAudioChunk = null;\n }\n onManifestLoading() {\n this.bufferCodecEventsExpected = this._bufferCodecEventsTotal = 0, this.details = null;\n }\n onManifestParsed(e, t) {\n let s = 2;\n (t.audio && !t.video || !t.altAudio) && (s = 1), this.bufferCodecEventsExpected = this._bufferCodecEventsTotal = s, x.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`);\n }\n onMediaAttaching(e, t) {\n const s = this.media = t.media;\n if (s && ki) {\n const i = this.mediaSource = new ki();\n i.addEventListener(\"sourceopen\", this._onMediaSourceOpen), i.addEventListener(\"sourceended\", this._onMediaSourceEnded), i.addEventListener(\"sourceclose\", this._onMediaSourceClose), s.src = self.URL.createObjectURL(i), this._objectUrl = s.src, s.addEventListener(\"emptied\", this._onMediaEmptied);\n }\n }\n onMediaDetaching() {\n const {\n media: e,\n mediaSource: t,\n _objectUrl: s\n } = this;\n if (t) {\n if (x.log(\"[buffer-controller]: media source detaching\"), t.readyState === \"open\")\n try {\n t.endOfStream();\n } catch (i) {\n x.warn(`[buffer-controller]: onMediaDetaching: ${i.message} while calling endOfStream`);\n }\n this.onBufferReset(), t.removeEventListener(\"sourceopen\", this._onMediaSourceOpen), t.removeEventListener(\"sourceended\", this._onMediaSourceEnded), t.removeEventListener(\"sourceclose\", this._onMediaSourceClose), e && (e.removeEventListener(\"emptied\", this._onMediaEmptied), s && self.URL.revokeObjectURL(s), e.src === s ? (e.removeAttribute(\"src\"), e.load()) : x.warn(\"[buffer-controller]: media.src was changed by a third party - skip cleanup\")), this.mediaSource = null, this.media = null, this._objectUrl = null, this.bufferCodecEventsExpected = this._bufferCodecEventsTotal, this.pendingTracks = {}, this.tracks = {};\n }\n this.hls.trigger(m.MEDIA_DETACHED, void 0);\n }\n onBufferReset() {\n this.getSourceBufferTypes().forEach((e) => {\n const t = this.sourceBuffer[e];\n try {\n t && (this.removeBufferListeners(e), this.mediaSource && this.mediaSource.removeSourceBuffer(t), this.sourceBuffer[e] = void 0);\n } catch (s) {\n x.warn(`[buffer-controller]: Failed to reset the ${e} buffer`, s);\n }\n }), this._initSourceBuffer();\n }\n onBufferCodecs(e, t) {\n const s = this.getSourceBufferTypes().length;\n Object.keys(t).forEach((i) => {\n if (s) {\n const r = this.tracks[i];\n if (r && typeof r.buffer.changeType == \"function\") {\n const {\n id: n,\n codec: o,\n levelCodec: l,\n container: h,\n metadata: c\n } = t[i], d = (r.levelCodec || r.codec).replace(Pi, \"$1\"), u = (l || o).replace(Pi, \"$1\");\n if (d !== u) {\n const f = `${h};codecs=${l || o}`;\n this.appendChangeType(i, f), x.log(`[buffer-controller]: switching codec ${d} to ${u}`), this.tracks[i] = {\n buffer: r.buffer,\n codec: o,\n container: h,\n levelCodec: l,\n metadata: c,\n id: n\n };\n }\n }\n } else\n this.pendingTracks[i] = t[i];\n }), !s && (this.bufferCodecEventsExpected = Math.max(this.bufferCodecEventsExpected - 1, 0), this.mediaSource && this.mediaSource.readyState === \"open\" && this.checkPendingTracks());\n }\n appendChangeType(e, t) {\n const {\n operationQueue: s\n } = this, i = {\n execute: () => {\n const r = this.sourceBuffer[e];\n r && (x.log(`[buffer-controller]: changing ${e} sourceBuffer type to ${t}`), r.changeType(t)), s.shiftAndExecuteNext(e);\n },\n onStart: () => {\n },\n onComplete: () => {\n },\n onError: (r) => {\n x.warn(`[buffer-controller]: Failed to change ${e} SourceBuffer type`, r);\n }\n };\n s.append(i, e);\n }\n onBufferAppending(e, t) {\n const {\n hls: s,\n operationQueue: i,\n tracks: r\n } = this, {\n data: n,\n type: o,\n frag: l,\n part: h,\n chunkMeta: c\n } = t, d = c.buffering[o], u = self.performance.now();\n d.start = u;\n const f = l.stats.buffering, g = h ? h.stats.buffering : null;\n f.start === 0 && (f.start = u), g && g.start === 0 && (g.start = u);\n const p = r.audio;\n let y = !1;\n o === \"audio\" && (p == null ? void 0 : p.container) === \"audio/mpeg\" && (y = !this.lastMpegAudioChunk || c.id === 1 || this.lastMpegAudioChunk.sn !== c.sn, this.lastMpegAudioChunk = c);\n const v = l.start, E = {\n execute: () => {\n if (d.executeStart = self.performance.now(), y) {\n const T = this.sourceBuffer[o];\n if (T) {\n const A = v - T.timestampOffset;\n Math.abs(A) >= 0.1 && (x.log(`[buffer-controller]: Updating audio SourceBuffer timestampOffset to ${v} (delta: ${A}) sn: ${l.sn})`), T.timestampOffset = v);\n }\n }\n this.appendExecutor(n, o);\n },\n onStart: () => {\n },\n onComplete: () => {\n const T = self.performance.now();\n d.executeEnd = d.end = T, f.first === 0 && (f.first = T), g && g.first === 0 && (g.first = T);\n const {\n sourceBuffer: A\n } = this, b = {};\n for (const D in A)\n b[D] = J.getBuffered(A[D]);\n this.appendError = 0, this.hls.trigger(m.BUFFER_APPENDED, {\n type: o,\n frag: l,\n part: h,\n chunkMeta: c,\n parent: l.type,\n timeRanges: b\n });\n },\n onError: (T) => {\n x.error(`[buffer-controller]: Error encountered while trying to append to the ${o} SourceBuffer`, T);\n const A = {\n type: U.MEDIA_ERROR,\n parent: l.type,\n details: L.BUFFER_APPEND_ERROR,\n frag: l,\n part: h,\n chunkMeta: c,\n error: T,\n err: T,\n fatal: !1\n };\n T.code === DOMException.QUOTA_EXCEEDED_ERR ? A.details = L.BUFFER_FULL_ERROR : (this.appendError++, A.details = L.BUFFER_APPEND_ERROR, this.appendError > s.config.appendErrorMaxRetry && (x.error(`[buffer-controller]: Failed ${s.config.appendErrorMaxRetry} times to append segment in sourceBuffer`), A.fatal = !0)), s.trigger(m.ERROR, A);\n }\n };\n i.append(E, o);\n }\n onBufferFlushing(e, t) {\n const {\n operationQueue: s\n } = this, i = (r) => ({\n execute: this.removeExecutor.bind(this, r, t.startOffset, t.endOffset),\n onStart: () => {\n },\n onComplete: () => {\n this.hls.trigger(m.BUFFER_FLUSHED, {\n type: r\n });\n },\n onError: (n) => {\n x.warn(`[buffer-controller]: Failed to remove from ${r} SourceBuffer`, n);\n }\n });\n t.type ? s.append(i(t.type), t.type) : this.getSourceBufferTypes().forEach((r) => {\n s.append(i(r), r);\n });\n }\n onFragParsed(e, t) {\n const {\n frag: s,\n part: i\n } = t, r = [], n = i ? i.elementaryStreams : s.elementaryStreams;\n n[j.AUDIOVIDEO] ? r.push(\"audiovideo\") : (n[j.AUDIO] && r.push(\"audio\"), n[j.VIDEO] && r.push(\"video\"));\n const o = () => {\n const l = self.performance.now();\n s.stats.buffering.end = l, i && (i.stats.buffering.end = l);\n const h = i ? i.stats : s.stats;\n this.hls.trigger(m.FRAG_BUFFERED, {\n frag: s,\n part: i,\n stats: h,\n id: s.type\n });\n };\n r.length === 0 && x.warn(`Fragments must have at least one ElementaryStreamType set. type: ${s.type} level: ${s.level} sn: ${s.sn}`), this.blockBuffers(o, r);\n }\n onFragChanged(e, t) {\n this.flushBackBuffer();\n }\n // on BUFFER_EOS mark matching sourcebuffer(s) as ended and trigger checkEos()\n // an undefined data.type will mark all buffers as EOS.\n onBufferEos(e, t) {\n this.getSourceBufferTypes().reduce((i, r) => {\n const n = this.sourceBuffer[r];\n return n && (!t.type || t.type === r) && (n.ending = !0, n.ended || (n.ended = !0, x.log(`[buffer-controller]: ${r} sourceBuffer now EOS`))), i && !!(!n || n.ended);\n }, !0) && (x.log(\"[buffer-controller]: Queueing mediaSource.endOfStream()\"), this.blockBuffers(() => {\n this.getSourceBufferTypes().forEach((r) => {\n const n = this.sourceBuffer[r];\n n && (n.ending = !1);\n });\n const {\n mediaSource: i\n } = this;\n if (!i || i.readyState !== \"open\") {\n i && x.info(`[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: ${i.readyState}`);\n return;\n }\n x.log(\"[buffer-controller]: Calling mediaSource.endOfStream()\"), i.endOfStream();\n }));\n }\n onLevelUpdated(e, {\n details: t\n }) {\n t.fragments.length && (this.details = t, this.getSourceBufferTypes().length ? this.blockBuffers(this.updateMediaElementDuration.bind(this)) : this.updateMediaElementDuration());\n }\n flushBackBuffer() {\n const {\n hls: e,\n details: t,\n media: s,\n sourceBuffer: i\n } = this;\n if (!s || t === null)\n return;\n const r = this.getSourceBufferTypes();\n if (!r.length)\n return;\n const n = t.live && e.config.liveBackBufferLength !== null ? e.config.liveBackBufferLength : e.config.backBufferLength;\n if (!M(n) || n < 0)\n return;\n const o = s.currentTime, l = t.levelTargetDuration, h = Math.max(n, l), c = Math.floor(o / l) * l - h;\n r.forEach((d) => {\n const u = i[d];\n if (u) {\n const f = J.getBuffered(u);\n if (f.length > 0 && c > f.start(0)) {\n if (e.trigger(m.BACK_BUFFER_REACHED, {\n bufferEnd: c\n }), t.live)\n e.trigger(m.LIVE_BACK_BUFFER_REACHED, {\n bufferEnd: c\n });\n else if (u.ended && f.end(f.length - 1) - o < l * 2) {\n x.info(`[buffer-controller]: Cannot flush ${d} back buffer while SourceBuffer is in ended state`);\n return;\n }\n e.trigger(m.BUFFER_FLUSHING, {\n startOffset: 0,\n endOffset: c,\n type: d\n });\n }\n }\n });\n }\n /**\n * Update Media Source duration to current level duration or override to Infinity if configuration parameter\n * 'liveDurationInfinity` is set to `true`\n * More details: https://github.com/video-dev/hls.js/issues/355\n */\n updateMediaElementDuration() {\n if (!this.details || !this.media || !this.mediaSource || this.mediaSource.readyState !== \"open\")\n return;\n const {\n details: e,\n hls: t,\n media: s,\n mediaSource: i\n } = this, r = e.fragments[0].start + e.totalduration, n = s.duration, o = M(i.duration) ? i.duration : 0;\n e.live && t.config.liveDurationInfinity ? (x.log(\"[buffer-controller]: Media Source duration is set to Infinity\"), i.duration = 1 / 0, this.updateSeekableRange(e)) : (r > o && r > n || !M(n)) && (x.log(`[buffer-controller]: Updating Media Source duration to ${r.toFixed(3)}`), i.duration = r);\n }\n updateSeekableRange(e) {\n const t = this.mediaSource, s = e.fragments;\n if (s.length && e.live && t != null && t.setLiveSeekableRange) {\n const r = Math.max(0, s[0].start), n = Math.max(r, r + e.totalduration);\n t.setLiveSeekableRange(r, n);\n }\n }\n checkPendingTracks() {\n const {\n bufferCodecEventsExpected: e,\n operationQueue: t,\n pendingTracks: s\n } = this, i = Object.keys(s).length;\n if (i && !e || i === 2) {\n this.createSourceBuffers(s), this.pendingTracks = {};\n const r = this.getSourceBufferTypes();\n if (r.length)\n this.hls.trigger(m.BUFFER_CREATED, {\n tracks: this.tracks\n }), r.forEach((n) => {\n t.executeNext(n);\n });\n else {\n const n = new Error(\"could not create source buffer for media codec(s)\");\n this.hls.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.BUFFER_INCOMPATIBLE_CODECS_ERROR,\n fatal: !0,\n error: n,\n reason: n.message\n });\n }\n }\n }\n createSourceBuffers(e) {\n const {\n sourceBuffer: t,\n mediaSource: s\n } = this;\n if (!s)\n throw Error(\"createSourceBuffers called when mediaSource was null\");\n for (const i in e)\n if (!t[i]) {\n const r = e[i];\n if (!r)\n throw Error(`source buffer exists for track ${i}, however track does not`);\n const n = r.levelCodec || r.codec, o = `${r.container};codecs=${n}`;\n x.log(`[buffer-controller]: creating sourceBuffer(${o})`);\n try {\n const l = t[i] = s.addSourceBuffer(o), h = i;\n this.addBufferListener(h, \"updatestart\", this._onSBUpdateStart), this.addBufferListener(h, \"updateend\", this._onSBUpdateEnd), this.addBufferListener(h, \"error\", this._onSBUpdateError), this.tracks[i] = {\n buffer: l,\n codec: n,\n container: r.container,\n levelCodec: r.levelCodec,\n metadata: r.metadata,\n id: r.id\n };\n } catch (l) {\n x.error(`[buffer-controller]: error while trying to add sourceBuffer: ${l.message}`), this.hls.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.BUFFER_ADD_CODEC_ERROR,\n fatal: !1,\n error: l,\n mimeType: o\n });\n }\n }\n }\n _onSBUpdateStart(e) {\n const {\n operationQueue: t\n } = this;\n t.current(e).onStart();\n }\n _onSBUpdateEnd(e) {\n const {\n operationQueue: t\n } = this;\n t.current(e).onComplete(), t.shiftAndExecuteNext(e);\n }\n _onSBUpdateError(e, t) {\n const s = new Error(`${e} SourceBuffer error`);\n x.error(`[buffer-controller]: ${s}`, t), this.hls.trigger(m.ERROR, {\n type: U.MEDIA_ERROR,\n details: L.BUFFER_APPENDING_ERROR,\n error: s,\n fatal: !1\n });\n const i = this.operationQueue.current(e);\n i && i.onError(t);\n }\n // This method must result in an updateend event; if remove is not called, _onSBUpdateEnd must be called manually\n removeExecutor(e, t, s) {\n const {\n media: i,\n mediaSource: r,\n operationQueue: n,\n sourceBuffer: o\n } = this, l = o[e];\n if (!i || !r || !l) {\n x.warn(`[buffer-controller]: Attempting to remove from the ${e} SourceBuffer, but it does not exist`), n.shiftAndExecuteNext(e);\n return;\n }\n const h = M(i.duration) ? i.duration : 1 / 0, c = M(r.duration) ? r.duration : 1 / 0, d = Math.max(0, t), u = Math.min(s, h, c);\n u > d && !l.ending ? (l.ended = !1, x.log(`[buffer-controller]: Removing [${d},${u}] from the ${e} SourceBuffer`), l.remove(d, u)) : n.shiftAndExecuteNext(e);\n }\n // This method must result in an updateend event; if append is not called, _onSBUpdateEnd must be called manually\n appendExecutor(e, t) {\n const {\n operationQueue: s,\n sourceBuffer: i\n } = this, r = i[t];\n if (!r) {\n x.warn(`[buffer-controller]: Attempting to append to the ${t} SourceBuffer, but it does not exist`), s.shiftAndExecuteNext(t);\n return;\n }\n r.ended = !1, r.appendBuffer(e);\n }\n // Enqueues an operation to each SourceBuffer queue which, upon execution, resolves a promise. When all promises\n // resolve, the onUnblocked function is executed. Functions calling this method do not need to unblock the queue\n // upon completion, since we already do it here\n blockBuffers(e, t = this.getSourceBufferTypes()) {\n if (!t.length) {\n x.log(\"[buffer-controller]: Blocking operation requested, but no SourceBuffers exist\"), Promise.resolve().then(e);\n return;\n }\n const {\n operationQueue: s\n } = this, i = t.map((r) => s.appendBlocker(r));\n Promise.all(i).then(() => {\n e(), t.forEach((r) => {\n const n = this.sourceBuffer[r];\n n != null && n.updating || s.shiftAndExecuteNext(r);\n });\n });\n }\n getSourceBufferTypes() {\n return Object.keys(this.sourceBuffer);\n }\n addBufferListener(e, t, s) {\n const i = this.sourceBuffer[e];\n if (!i)\n return;\n const r = s.bind(this, e);\n this.listeners[e].push({\n event: t,\n listener: r\n }), i.addEventListener(t, r);\n }\n removeBufferListeners(e) {\n const t = this.sourceBuffer[e];\n t && this.listeners[e].forEach((s) => {\n t.removeEventListener(s.event, s.listener);\n });\n }\n}\nconst Oi = {\n 42: 225,\n // lowercase a, acute accent\n 92: 233,\n // lowercase e, acute accent\n 94: 237,\n // lowercase i, acute accent\n 95: 243,\n // lowercase o, acute accent\n 96: 250,\n // lowercase u, acute accent\n 123: 231,\n // lowercase c with cedilla\n 124: 247,\n // division symbol\n 125: 209,\n // uppercase N tilde\n 126: 241,\n // lowercase n tilde\n 127: 9608,\n // Full block\n // THIS BLOCK INCLUDES THE 16 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n // THAT COME FROM HI BYTE=0x11 AND LOW BETWEEN 0x30 AND 0x3F\n // THIS MEANS THAT \\x50 MUST BE ADDED TO THE VALUES\n 128: 174,\n // Registered symbol (R)\n 129: 176,\n // degree sign\n 130: 189,\n // 1/2 symbol\n 131: 191,\n // Inverted (open) question mark\n 132: 8482,\n // Trademark symbol (TM)\n 133: 162,\n // Cents symbol\n 134: 163,\n // Pounds sterling\n 135: 9834,\n // Music 8'th note\n 136: 224,\n // lowercase a, grave accent\n 137: 32,\n // transparent space (regular)\n 138: 232,\n // lowercase e, grave accent\n 139: 226,\n // lowercase a, circumflex accent\n 140: 234,\n // lowercase e, circumflex accent\n 141: 238,\n // lowercase i, circumflex accent\n 142: 244,\n // lowercase o, circumflex accent\n 143: 251,\n // lowercase u, circumflex accent\n // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n // THAT COME FROM HI BYTE=0x12 AND LOW BETWEEN 0x20 AND 0x3F\n 144: 193,\n // capital letter A with acute\n 145: 201,\n // capital letter E with acute\n 146: 211,\n // capital letter O with acute\n 147: 218,\n // capital letter U with acute\n 148: 220,\n // capital letter U with diaresis\n 149: 252,\n // lowercase letter U with diaeresis\n 150: 8216,\n // opening single quote\n 151: 161,\n // inverted exclamation mark\n 152: 42,\n // asterisk\n 153: 8217,\n // closing single quote\n 154: 9473,\n // box drawings heavy horizontal\n 155: 169,\n // copyright sign\n 156: 8480,\n // Service mark\n 157: 8226,\n // (round) bullet\n 158: 8220,\n // Left double quotation mark\n 159: 8221,\n // Right double quotation mark\n 160: 192,\n // uppercase A, grave accent\n 161: 194,\n // uppercase A, circumflex\n 162: 199,\n // uppercase C with cedilla\n 163: 200,\n // uppercase E, grave accent\n 164: 202,\n // uppercase E, circumflex\n 165: 203,\n // capital letter E with diaresis\n 166: 235,\n // lowercase letter e with diaresis\n 167: 206,\n // uppercase I, circumflex\n 168: 207,\n // uppercase I, with diaresis\n 169: 239,\n // lowercase i, with diaresis\n 170: 212,\n // uppercase O, circumflex\n 171: 217,\n // uppercase U, grave accent\n 172: 249,\n // lowercase u, grave accent\n 173: 219,\n // uppercase U, circumflex\n 174: 171,\n // left-pointing double angle quotation mark\n 175: 187,\n // right-pointing double angle quotation mark\n // THIS BLOCK INCLUDES THE 32 EXTENDED (TWO-BYTE) LINE 21 CHARACTERS\n // THAT COME FROM HI BYTE=0x13 AND LOW BETWEEN 0x20 AND 0x3F\n 176: 195,\n // Uppercase A, tilde\n 177: 227,\n // Lowercase a, tilde\n 178: 205,\n // Uppercase I, acute accent\n 179: 204,\n // Uppercase I, grave accent\n 180: 236,\n // Lowercase i, grave accent\n 181: 210,\n // Uppercase O, grave accent\n 182: 242,\n // Lowercase o, grave accent\n 183: 213,\n // Uppercase O, tilde\n 184: 245,\n // Lowercase o, tilde\n 185: 123,\n // Open curly brace\n 186: 125,\n // Closing curly brace\n 187: 92,\n // Backslash\n 188: 94,\n // Caret\n 189: 95,\n // Underscore\n 190: 124,\n // Pipe (vertical line)\n 191: 8764,\n // Tilde operator\n 192: 196,\n // Uppercase A, umlaut\n 193: 228,\n // Lowercase A, umlaut\n 194: 214,\n // Uppercase O, umlaut\n 195: 246,\n // Lowercase o, umlaut\n 196: 223,\n // Esszett (sharp S)\n 197: 165,\n // Yen symbol\n 198: 164,\n // Generic currency sign\n 199: 9475,\n // Box drawings heavy vertical\n 200: 197,\n // Uppercase A, ring\n 201: 229,\n // Lowercase A, ring\n 202: 216,\n // Uppercase O, stroke\n 203: 248,\n // Lowercase o, strok\n 204: 9487,\n // Box drawings heavy down and right\n 205: 9491,\n // Box drawings heavy down and left\n 206: 9495,\n // Box drawings heavy up and right\n 207: 9499\n // Box drawings heavy up and left\n}, Gr = function(e) {\n let t = e;\n return Oi.hasOwnProperty(e) && (t = Oi[e]), String.fromCharCode(t);\n}, Ce = 15, Ue = 100, Wo = {\n 17: 1,\n 18: 3,\n 21: 5,\n 22: 7,\n 23: 9,\n 16: 11,\n 19: 12,\n 20: 14\n}, Yo = {\n 17: 2,\n 18: 4,\n 21: 6,\n 22: 8,\n 23: 10,\n 19: 13,\n 20: 15\n}, zo = {\n 25: 1,\n 26: 3,\n 29: 5,\n 30: 7,\n 31: 9,\n 24: 11,\n 27: 12,\n 28: 14\n}, jo = {\n 25: 2,\n 26: 4,\n 29: 6,\n 30: 8,\n 31: 10,\n 27: 13,\n 28: 15\n}, qo = [\"white\", \"green\", \"blue\", \"cyan\", \"red\", \"yellow\", \"magenta\", \"black\", \"transparent\"];\nclass Xo {\n constructor() {\n this.time = null, this.verboseLevel = 0;\n }\n log(e, t) {\n if (this.verboseLevel >= e) {\n const s = typeof t == \"function\" ? t() : t;\n x.log(`${this.time} [${e}] ${s}`);\n }\n }\n}\nconst je = function(e) {\n const t = [];\n for (let s = 0; s < e.length; s++)\n t.push(e[s].toString(16));\n return t;\n};\nclass Vr {\n constructor(e, t, s, i, r) {\n this.foreground = void 0, this.underline = void 0, this.italics = void 0, this.background = void 0, this.flash = void 0, this.foreground = e || \"white\", this.underline = t || !1, this.italics = s || !1, this.background = i || \"black\", this.flash = r || !1;\n }\n reset() {\n this.foreground = \"white\", this.underline = !1, this.italics = !1, this.background = \"black\", this.flash = !1;\n }\n setStyles(e) {\n const t = [\"foreground\", \"underline\", \"italics\", \"background\", \"flash\"];\n for (let s = 0; s < t.length; s++) {\n const i = t[s];\n e.hasOwnProperty(i) && (this[i] = e[i]);\n }\n }\n isDefault() {\n return this.foreground === \"white\" && !this.underline && !this.italics && this.background === \"black\" && !this.flash;\n }\n equals(e) {\n return this.foreground === e.foreground && this.underline === e.underline && this.italics === e.italics && this.background === e.background && this.flash === e.flash;\n }\n copy(e) {\n this.foreground = e.foreground, this.underline = e.underline, this.italics = e.italics, this.background = e.background, this.flash = e.flash;\n }\n toString() {\n return \"color=\" + this.foreground + \", underline=\" + this.underline + \", italics=\" + this.italics + \", background=\" + this.background + \", flash=\" + this.flash;\n }\n}\nclass Zo {\n constructor(e, t, s, i, r, n) {\n this.uchar = void 0, this.penState = void 0, this.uchar = e || \" \", this.penState = new Vr(t, s, i, r, n);\n }\n reset() {\n this.uchar = \" \", this.penState.reset();\n }\n setChar(e, t) {\n this.uchar = e, this.penState.copy(t);\n }\n setPenState(e) {\n this.penState.copy(e);\n }\n equals(e) {\n return this.uchar === e.uchar && this.penState.equals(e.penState);\n }\n copy(e) {\n this.uchar = e.uchar, this.penState.copy(e.penState);\n }\n isEmpty() {\n return this.uchar === \" \" && this.penState.isDefault();\n }\n}\nclass Qo {\n constructor(e) {\n this.chars = void 0, this.pos = void 0, this.currPenState = void 0, this.cueStartTime = void 0, this.logger = void 0, this.chars = [];\n for (let t = 0; t < Ue; t++)\n this.chars.push(new Zo());\n this.logger = e, this.pos = 0, this.currPenState = new Vr();\n }\n equals(e) {\n let t = !0;\n for (let s = 0; s < Ue; s++)\n if (!this.chars[s].equals(e.chars[s])) {\n t = !1;\n break;\n }\n return t;\n }\n copy(e) {\n for (let t = 0; t < Ue; t++)\n this.chars[t].copy(e.chars[t]);\n }\n isEmpty() {\n let e = !0;\n for (let t = 0; t < Ue; t++)\n if (!this.chars[t].isEmpty()) {\n e = !1;\n break;\n }\n return e;\n }\n /**\n * Set the cursor to a valid column.\n */\n setCursor(e) {\n this.pos !== e && (this.pos = e), this.pos < 0 ? (this.logger.log(3, \"Negative cursor position \" + this.pos), this.pos = 0) : this.pos > Ue && (this.logger.log(3, \"Too large cursor position \" + this.pos), this.pos = Ue);\n }\n /**\n * Move the cursor relative to current position.\n */\n moveCursor(e) {\n const t = this.pos + e;\n if (e > 1)\n for (let s = this.pos + 1; s < t + 1; s++)\n this.chars[s].setPenState(this.currPenState);\n this.setCursor(t);\n }\n /**\n * Backspace, move one step back and clear character.\n */\n backSpace() {\n this.moveCursor(-1), this.chars[this.pos].setChar(\" \", this.currPenState);\n }\n insertChar(e) {\n e >= 144 && this.backSpace();\n const t = Gr(e);\n if (this.pos >= Ue) {\n this.logger.log(0, () => \"Cannot insert \" + e.toString(16) + \" (\" + t + \") at position \" + this.pos + \". Skipping it!\");\n return;\n }\n this.chars[this.pos].setChar(t, this.currPenState), this.moveCursor(1);\n }\n clearFromPos(e) {\n let t;\n for (t = e; t < Ue; t++)\n this.chars[t].reset();\n }\n clear() {\n this.clearFromPos(0), this.pos = 0, this.currPenState.reset();\n }\n clearToEndOfRow() {\n this.clearFromPos(this.pos);\n }\n getTextString() {\n const e = [];\n let t = !0;\n for (let s = 0; s < Ue; s++) {\n const i = this.chars[s].uchar;\n i !== \" \" && (t = !1), e.push(i);\n }\n return t ? \"\" : e.join(\"\");\n }\n setPenStyles(e) {\n this.currPenState.setStyles(e), this.chars[this.pos].setPenState(this.currPenState);\n }\n}\nclass ls {\n constructor(e) {\n this.rows = void 0, this.currRow = void 0, this.nrRollUpRows = void 0, this.lastOutputScreen = void 0, this.logger = void 0, this.rows = [];\n for (let t = 0; t < Ce; t++)\n this.rows.push(new Qo(e));\n this.logger = e, this.currRow = Ce - 1, this.nrRollUpRows = null, this.lastOutputScreen = null, this.reset();\n }\n reset() {\n for (let e = 0; e < Ce; e++)\n this.rows[e].clear();\n this.currRow = Ce - 1;\n }\n equals(e) {\n let t = !0;\n for (let s = 0; s < Ce; s++)\n if (!this.rows[s].equals(e.rows[s])) {\n t = !1;\n break;\n }\n return t;\n }\n copy(e) {\n for (let t = 0; t < Ce; t++)\n this.rows[t].copy(e.rows[t]);\n }\n isEmpty() {\n let e = !0;\n for (let t = 0; t < Ce; t++)\n if (!this.rows[t].isEmpty()) {\n e = !1;\n break;\n }\n return e;\n }\n backSpace() {\n this.rows[this.currRow].backSpace();\n }\n clearToEndOfRow() {\n this.rows[this.currRow].clearToEndOfRow();\n }\n /**\n * Insert a character (without styling) in the current row.\n */\n insertChar(e) {\n this.rows[this.currRow].insertChar(e);\n }\n setPen(e) {\n this.rows[this.currRow].setPenStyles(e);\n }\n moveCursor(e) {\n this.rows[this.currRow].moveCursor(e);\n }\n setCursor(e) {\n this.logger.log(2, \"setCursor: \" + e), this.rows[this.currRow].setCursor(e);\n }\n setPAC(e) {\n this.logger.log(2, () => \"pacData = \" + JSON.stringify(e));\n let t = e.row - 1;\n if (this.nrRollUpRows && t < this.nrRollUpRows - 1 && (t = this.nrRollUpRows - 1), this.nrRollUpRows && this.currRow !== t) {\n for (let o = 0; o < Ce; o++)\n this.rows[o].clear();\n const r = this.currRow + 1 - this.nrRollUpRows, n = this.lastOutputScreen;\n if (n) {\n const o = n.rows[r].cueStartTime, l = this.logger.time;\n if (o && l !== null && o < l)\n for (let h = 0; h < this.nrRollUpRows; h++)\n this.rows[t - this.nrRollUpRows + h + 1].copy(n.rows[r + h]);\n }\n }\n this.currRow = t;\n const s = this.rows[this.currRow];\n if (e.indent !== null) {\n const r = e.indent, n = Math.max(r - 1, 0);\n s.setCursor(e.indent), e.color = s.chars[n].penState.foreground;\n }\n const i = {\n foreground: e.color,\n underline: e.underline,\n italics: e.italics,\n background: \"black\",\n flash: !1\n };\n this.setPen(i);\n }\n /**\n * Set background/extra foreground, but first do back_space, and then insert space (backwards compatibility).\n */\n setBkgData(e) {\n this.logger.log(2, () => \"bkgData = \" + JSON.stringify(e)), this.backSpace(), this.setPen(e), this.insertChar(32);\n }\n setRollUpRows(e) {\n this.nrRollUpRows = e;\n }\n rollUp() {\n if (this.nrRollUpRows === null) {\n this.logger.log(3, \"roll_up but nrRollUpRows not set yet\");\n return;\n }\n this.logger.log(1, () => this.getDisplayText());\n const e = this.currRow + 1 - this.nrRollUpRows, t = this.rows.splice(e, 1)[0];\n t.clear(), this.rows.splice(this.currRow, 0, t), this.logger.log(2, \"Rolling up\");\n }\n /**\n * Get all non-empty rows with as unicode text.\n */\n getDisplayText(e) {\n e = e || !1;\n const t = [];\n let s = \"\", i = -1;\n for (let r = 0; r < Ce; r++) {\n const n = this.rows[r].getTextString();\n n && (i = r + 1, e ? t.push(\"Row \" + i + \": '\" + n + \"'\") : t.push(n.trim()));\n }\n return t.length > 0 && (e ? s = \"[\" + t.join(\" | \") + \"]\" : s = t.join(`\n`)), s;\n }\n getTextAndFormat() {\n return this.rows;\n }\n}\nclass Fi {\n constructor(e, t, s) {\n this.chNr = void 0, this.outputFilter = void 0, this.mode = void 0, this.verbose = void 0, this.displayedMemory = void 0, this.nonDisplayedMemory = void 0, this.lastOutputScreen = void 0, this.currRollUpRow = void 0, this.writeScreen = void 0, this.cueStartTime = void 0, this.logger = void 0, this.chNr = e, this.outputFilter = t, this.mode = null, this.verbose = 0, this.displayedMemory = new ls(s), this.nonDisplayedMemory = new ls(s), this.lastOutputScreen = new ls(s), this.currRollUpRow = this.displayedMemory.rows[Ce - 1], this.writeScreen = this.displayedMemory, this.mode = null, this.cueStartTime = null, this.logger = s;\n }\n reset() {\n this.mode = null, this.displayedMemory.reset(), this.nonDisplayedMemory.reset(), this.lastOutputScreen.reset(), this.outputFilter.reset(), this.currRollUpRow = this.displayedMemory.rows[Ce - 1], this.writeScreen = this.displayedMemory, this.mode = null, this.cueStartTime = null;\n }\n getHandler() {\n return this.outputFilter;\n }\n setHandler(e) {\n this.outputFilter = e;\n }\n setPAC(e) {\n this.writeScreen.setPAC(e);\n }\n setBkgData(e) {\n this.writeScreen.setBkgData(e);\n }\n setMode(e) {\n e !== this.mode && (this.mode = e, this.logger.log(2, () => \"MODE=\" + e), this.mode === \"MODE_POP-ON\" ? this.writeScreen = this.nonDisplayedMemory : (this.writeScreen = this.displayedMemory, this.writeScreen.reset()), this.mode !== \"MODE_ROLL-UP\" && (this.displayedMemory.nrRollUpRows = null, this.nonDisplayedMemory.nrRollUpRows = null), this.mode = e);\n }\n insertChars(e) {\n for (let s = 0; s < e.length; s++)\n this.writeScreen.insertChar(e[s]);\n const t = this.writeScreen === this.displayedMemory ? \"DISP\" : \"NON_DISP\";\n this.logger.log(2, () => t + \": \" + this.writeScreen.getDisplayText(!0)), (this.mode === \"MODE_PAINT-ON\" || this.mode === \"MODE_ROLL-UP\") && (this.logger.log(1, () => \"DISPLAYED: \" + this.displayedMemory.getDisplayText(!0)), this.outputDataUpdate());\n }\n ccRCL() {\n this.logger.log(2, \"RCL - Resume Caption Loading\"), this.setMode(\"MODE_POP-ON\");\n }\n ccBS() {\n this.logger.log(2, \"BS - BackSpace\"), this.mode !== \"MODE_TEXT\" && (this.writeScreen.backSpace(), this.writeScreen === this.displayedMemory && this.outputDataUpdate());\n }\n ccAOF() {\n }\n ccAON() {\n }\n ccDER() {\n this.logger.log(2, \"DER- Delete to End of Row\"), this.writeScreen.clearToEndOfRow(), this.outputDataUpdate();\n }\n ccRU(e) {\n this.logger.log(2, \"RU(\" + e + \") - Roll Up\"), this.writeScreen = this.displayedMemory, this.setMode(\"MODE_ROLL-UP\"), this.writeScreen.setRollUpRows(e);\n }\n ccFON() {\n this.logger.log(2, \"FON - Flash On\"), this.writeScreen.setPen({\n flash: !0\n });\n }\n ccRDC() {\n this.logger.log(2, \"RDC - Resume Direct Captioning\"), this.setMode(\"MODE_PAINT-ON\");\n }\n ccTR() {\n this.logger.log(2, \"TR\"), this.setMode(\"MODE_TEXT\");\n }\n ccRTD() {\n this.logger.log(2, \"RTD\"), this.setMode(\"MODE_TEXT\");\n }\n ccEDM() {\n this.logger.log(2, \"EDM - Erase Displayed Memory\"), this.displayedMemory.reset(), this.outputDataUpdate(!0);\n }\n ccCR() {\n this.logger.log(2, \"CR - Carriage Return\"), this.writeScreen.rollUp(), this.outputDataUpdate(!0);\n }\n ccENM() {\n this.logger.log(2, \"ENM - Erase Non-displayed Memory\"), this.nonDisplayedMemory.reset();\n }\n ccEOC() {\n if (this.logger.log(2, \"EOC - End Of Caption\"), this.mode === \"MODE_POP-ON\") {\n const e = this.displayedMemory;\n this.displayedMemory = this.nonDisplayedMemory, this.nonDisplayedMemory = e, this.writeScreen = this.nonDisplayedMemory, this.logger.log(1, () => \"DISP: \" + this.displayedMemory.getDisplayText());\n }\n this.outputDataUpdate(!0);\n }\n ccTO(e) {\n this.logger.log(2, \"TO(\" + e + \") - Tab Offset\"), this.writeScreen.moveCursor(e);\n }\n ccMIDROW(e) {\n const t = {\n flash: !1\n };\n if (t.underline = e % 2 === 1, t.italics = e >= 46, t.italics)\n t.foreground = \"white\";\n else {\n const s = Math.floor(e / 2) - 16, i = [\"white\", \"green\", \"blue\", \"cyan\", \"red\", \"yellow\", \"magenta\"];\n t.foreground = i[s];\n }\n this.logger.log(2, \"MIDROW: \" + JSON.stringify(t)), this.writeScreen.setPen(t);\n }\n outputDataUpdate(e = !1) {\n const t = this.logger.time;\n t !== null && this.outputFilter && (this.cueStartTime === null && !this.displayedMemory.isEmpty() ? this.cueStartTime = t : this.displayedMemory.equals(this.lastOutputScreen) || (this.outputFilter.newCue(this.cueStartTime, t, this.lastOutputScreen), e && this.outputFilter.dispatchCue && this.outputFilter.dispatchCue(), this.cueStartTime = this.displayedMemory.isEmpty() ? null : t), this.lastOutputScreen.copy(this.displayedMemory));\n }\n cueSplitAtTime(e) {\n this.outputFilter && (this.displayedMemory.isEmpty() || (this.outputFilter.newCue && this.outputFilter.newCue(this.cueStartTime, e, this.displayedMemory), this.cueStartTime = e));\n }\n}\nclass Mi {\n constructor(e, t, s) {\n this.channels = void 0, this.currentChannel = 0, this.cmdHistory = void 0, this.logger = void 0;\n const i = new Xo();\n this.channels = [null, new Fi(e, t, i), new Fi(e + 1, s, i)], this.cmdHistory = Ui(), this.logger = i;\n }\n getHandler(e) {\n return this.channels[e].getHandler();\n }\n setHandler(e, t) {\n this.channels[e].setHandler(t);\n }\n /**\n * Add data for time t in forms of list of bytes (unsigned ints). The bytes are treated as pairs.\n */\n addData(e, t) {\n let s, i, r, n = !1;\n this.logger.time = e;\n for (let o = 0; o < t.length; o += 2)\n if (i = t[o] & 127, r = t[o + 1] & 127, !(i === 0 && r === 0)) {\n if (this.logger.log(3, \"[\" + je([t[o], t[o + 1]]) + \"] -> (\" + je([i, r]) + \")\"), s = this.parseCmd(i, r), s || (s = this.parseMidrow(i, r)), s || (s = this.parsePAC(i, r)), s || (s = this.parseBackgroundAttributes(i, r)), !s && (n = this.parseChars(i, r), n)) {\n const l = this.currentChannel;\n l && l > 0 ? this.channels[l].insertChars(n) : this.logger.log(2, \"No channel found yet. TEXT-MODE?\");\n }\n !s && !n && this.logger.log(2, \"Couldn't parse cleaned data \" + je([i, r]) + \" orig: \" + je([t[o], t[o + 1]]));\n }\n }\n /**\n * Parse Command.\n * @returns True if a command was found\n */\n parseCmd(e, t) {\n const {\n cmdHistory: s\n } = this, i = (e === 20 || e === 28 || e === 21 || e === 29) && t >= 32 && t <= 47, r = (e === 23 || e === 31) && t >= 33 && t <= 35;\n if (!(i || r))\n return !1;\n if (Ni(e, t, s))\n return it(null, null, s), this.logger.log(3, \"Repeated command (\" + je([e, t]) + \") is dropped\"), !0;\n const n = e === 20 || e === 21 || e === 23 ? 1 : 2, o = this.channels[n];\n return e === 20 || e === 21 || e === 28 || e === 29 ? t === 32 ? o.ccRCL() : t === 33 ? o.ccBS() : t === 34 ? o.ccAOF() : t === 35 ? o.ccAON() : t === 36 ? o.ccDER() : t === 37 ? o.ccRU(2) : t === 38 ? o.ccRU(3) : t === 39 ? o.ccRU(4) : t === 40 ? o.ccFON() : t === 41 ? o.ccRDC() : t === 42 ? o.ccTR() : t === 43 ? o.ccRTD() : t === 44 ? o.ccEDM() : t === 45 ? o.ccCR() : t === 46 ? o.ccENM() : t === 47 && o.ccEOC() : o.ccTO(t - 32), it(e, t, s), this.currentChannel = n, !0;\n }\n /**\n * Parse midrow styling command\n */\n parseMidrow(e, t) {\n let s = 0;\n if ((e === 17 || e === 25) && t >= 32 && t <= 47) {\n if (e === 17 ? s = 1 : s = 2, s !== this.currentChannel)\n return this.logger.log(0, \"Mismatch channel in midrow parsing\"), !1;\n const i = this.channels[s];\n return i ? (i.ccMIDROW(t), this.logger.log(3, \"MIDROW (\" + je([e, t]) + \")\"), !0) : !1;\n }\n return !1;\n }\n /**\n * Parse Preable Access Codes (Table 53).\n * @returns {Boolean} Tells if PAC found\n */\n parsePAC(e, t) {\n let s;\n const i = this.cmdHistory, r = (e >= 17 && e <= 23 || e >= 25 && e <= 31) && t >= 64 && t <= 127, n = (e === 16 || e === 24) && t >= 64 && t <= 95;\n if (!(r || n))\n return !1;\n if (Ni(e, t, i))\n return it(null, null, i), !0;\n const o = e <= 23 ? 1 : 2;\n t >= 64 && t <= 95 ? s = o === 1 ? Wo[e] : zo[e] : s = o === 1 ? Yo[e] : jo[e];\n const l = this.channels[o];\n return l ? (l.setPAC(this.interpretPAC(s, t)), it(e, t, i), this.currentChannel = o, !0) : !1;\n }\n /**\n * Interpret the second byte of the pac, and return the information.\n * @returns pacData with style parameters\n */\n interpretPAC(e, t) {\n let s;\n const i = {\n color: null,\n italics: !1,\n indent: null,\n underline: !1,\n row: e\n };\n return t > 95 ? s = t - 96 : s = t - 64, i.underline = (s & 1) === 1, s <= 13 ? i.color = [\"white\", \"green\", \"blue\", \"cyan\", \"red\", \"yellow\", \"magenta\", \"white\"][Math.floor(s / 2)] : s <= 15 ? (i.italics = !0, i.color = \"white\") : i.indent = Math.floor((s - 16) / 2) * 4, i;\n }\n /**\n * Parse characters.\n * @returns An array with 1 to 2 codes corresponding to chars, if found. null otherwise.\n */\n parseChars(e, t) {\n let s, i = null, r = null;\n if (e >= 25 ? (s = 2, r = e - 8) : (s = 1, r = e), r >= 17 && r <= 19) {\n let n;\n r === 17 ? n = t + 80 : r === 18 ? n = t + 112 : n = t + 144, this.logger.log(2, \"Special char '\" + Gr(n) + \"' in channel \" + s), i = [n];\n } else\n e >= 32 && e <= 127 && (i = t === 0 ? [e] : [e, t]);\n if (i) {\n const n = je(i);\n this.logger.log(3, \"Char codes = \" + n.join(\",\")), it(e, t, this.cmdHistory);\n }\n return i;\n }\n /**\n * Parse extended background attributes as well as new foreground color black.\n * @returns True if background attributes are found\n */\n parseBackgroundAttributes(e, t) {\n const s = (e === 16 || e === 24) && t >= 32 && t <= 47, i = (e === 23 || e === 31) && t >= 45 && t <= 47;\n if (!(s || i))\n return !1;\n let r;\n const n = {};\n e === 16 || e === 24 ? (r = Math.floor((t - 32) / 2), n.background = qo[r], t % 2 === 1 && (n.background = n.background + \"_semi\")) : t === 45 ? n.background = \"transparent\" : (n.foreground = \"black\", t === 47 && (n.underline = !0));\n const o = e <= 23 ? 1 : 2;\n return this.channels[o].setBkgData(n), it(e, t, this.cmdHistory), !0;\n }\n /**\n * Reset state of parser and its channels.\n */\n reset() {\n for (let e = 0; e < Object.keys(this.channels).length; e++) {\n const t = this.channels[e];\n t && t.reset();\n }\n this.cmdHistory = Ui();\n }\n /**\n * Trigger the generation of a cue, and the start of a new one if displayScreens are not empty.\n */\n cueSplitAtTime(e) {\n for (let t = 0; t < this.channels.length; t++) {\n const s = this.channels[t];\n s && s.cueSplitAtTime(e);\n }\n }\n}\nfunction it(a, e, t) {\n t.a = a, t.b = e;\n}\nfunction Ni(a, e, t) {\n return t.a === a && t.b === e;\n}\nfunction Ui() {\n return {\n a: null,\n b: null\n };\n}\nclass wt {\n constructor(e, t) {\n this.timelineController = void 0, this.cueRanges = [], this.trackName = void 0, this.startTime = null, this.endTime = null, this.screen = null, this.timelineController = e, this.trackName = t;\n }\n dispatchCue() {\n this.startTime !== null && (this.timelineController.addCues(this.trackName, this.startTime, this.endTime, this.screen, this.cueRanges), this.startTime = null);\n }\n newCue(e, t, s) {\n (this.startTime === null || this.startTime > e) && (this.startTime = e), this.endTime = t, this.screen = s, this.timelineController.createCaptionsTrack(this.trackName);\n }\n reset() {\n this.cueRanges = [], this.startTime = null;\n }\n}\nvar Vs = function() {\n if (typeof self < \"u\" && self.VTTCue)\n return self.VTTCue;\n const a = [\"\", \"lr\", \"rl\"], e = [\"start\", \"middle\", \"end\", \"left\", \"right\"];\n function t(o, l) {\n if (typeof l != \"string\" || !Array.isArray(o))\n return !1;\n const h = l.toLowerCase();\n return ~o.indexOf(h) ? h : !1;\n }\n function s(o) {\n return t(a, o);\n }\n function i(o) {\n return t(e, o);\n }\n function r(o, ...l) {\n let h = 1;\n for (; h < arguments.length; h++) {\n const c = arguments[h];\n for (const d in c)\n o[d] = c[d];\n }\n return o;\n }\n function n(o, l, h) {\n const c = this, d = {\n enumerable: !0\n };\n c.hasBeenReset = !1;\n let u = \"\", f = !1, g = o, p = l, y = h, v = null, E = \"\", T = !0, A = \"auto\", b = \"start\", D = 50, I = \"middle\", C = 50, _ = \"middle\";\n Object.defineProperty(c, \"id\", r({}, d, {\n get: function() {\n return u;\n },\n set: function(R) {\n u = \"\" + R;\n }\n })), Object.defineProperty(c, \"pauseOnExit\", r({}, d, {\n get: function() {\n return f;\n },\n set: function(R) {\n f = !!R;\n }\n })), Object.defineProperty(c, \"startTime\", r({}, d, {\n get: function() {\n return g;\n },\n set: function(R) {\n if (typeof R != \"number\")\n throw new TypeError(\"Start time must be set to a number.\");\n g = R, this.hasBeenReset = !0;\n }\n })), Object.defineProperty(c, \"endTime\", r({}, d, {\n get: function() {\n return p;\n },\n set: function(R) {\n if (typeof R != \"number\")\n throw new TypeError(\"End time must be set to a number.\");\n p = R, this.hasBeenReset = !0;\n }\n })), Object.defineProperty(c, \"text\", r({}, d, {\n get: function() {\n return y;\n },\n set: function(R) {\n y = \"\" + R, this.hasBeenReset = !0;\n }\n })), Object.defineProperty(c, \"region\", r({}, d, {\n get: function() {\n return v;\n },\n set: function(R) {\n v = R, this.hasBeenReset = !0;\n }\n })), Object.defineProperty(c, \"vertical\", r({}, d, {\n get: function() {\n return E;\n },\n set: function(R) {\n const F = s(R);\n if (F === !1)\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n E = F, this.hasBeenReset = !0;\n }\n })), Object.defineProperty(c, \"snapToLines\", r({}, d, {\n get: function() {\n return T;\n },\n set: function(R) {\n T = !!R, this.hasBeenReset = !0;\n }\n })), Object.defineProperty(c, \"line\", r({}, d, {\n get: function() {\n return A;\n },\n set: function(R) {\n if (typeof R != \"number\" && R !== \"auto\")\n throw new SyntaxError(\"An invalid number or illegal string was specified.\");\n A = R, this.hasBeenReset = !0;\n }\n })), Object.defineProperty(c, \"lineAlign\", r({}, d, {\n get: function() {\n return b;\n },\n set: function(R) {\n const F = i(R);\n if (!F)\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n b = F, this.hasBeenReset = !0;\n }\n })), Object.defineProperty(c, \"position\", r({}, d, {\n get: function() {\n return D;\n },\n set: function(R) {\n if (R < 0 || R > 100)\n throw new Error(\"Position must be between 0 and 100.\");\n D = R, this.hasBeenReset = !0;\n }\n })), Object.defineProperty(c, \"positionAlign\", r({}, d, {\n get: function() {\n return I;\n },\n set: function(R) {\n const F = i(R);\n if (!F)\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n I = F, this.hasBeenReset = !0;\n }\n })), Object.defineProperty(c, \"size\", r({}, d, {\n get: function() {\n return C;\n },\n set: function(R) {\n if (R < 0 || R > 100)\n throw new Error(\"Size must be between 0 and 100.\");\n C = R, this.hasBeenReset = !0;\n }\n })), Object.defineProperty(c, \"align\", r({}, d, {\n get: function() {\n return _;\n },\n set: function(R) {\n const F = i(R);\n if (!F)\n throw new SyntaxError(\"An invalid or illegal string was specified.\");\n _ = F, this.hasBeenReset = !0;\n }\n })), c.displayState = void 0;\n }\n return n.prototype.getCueAsHTML = function() {\n return self.WebVTT.convertCueToDOMTree(self, this.text);\n }, n;\n}();\nclass Jo {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n decode(e, t) {\n if (!e)\n return \"\";\n if (typeof e != \"string\")\n throw new Error(\"Error - expected string data.\");\n return decodeURIComponent(encodeURIComponent(e));\n }\n}\nfunction Hr(a) {\n function e(s, i, r, n) {\n return (s | 0) * 3600 + (i | 0) * 60 + (r | 0) + parseFloat(n || 0);\n }\n const t = a.match(/^(?:(\\d+):)?(\\d{2}):(\\d{2})(\\.\\d+)?/);\n return t ? parseFloat(t[2]) > 59 ? e(t[2], t[3], 0, t[4]) : e(t[1], t[2], t[3], t[4]) : null;\n}\nclass el {\n constructor() {\n this.values = /* @__PURE__ */ Object.create(null);\n }\n // Only accept the first assignment to any key.\n set(e, t) {\n !this.get(e) && t !== \"\" && (this.values[e] = t);\n }\n // Return the value for a key, or a default value.\n // If 'defaultKey' is passed then 'dflt' is assumed to be an object with\n // a number of possible default values as properties where 'defaultKey' is\n // the key of the property that will be chosen; otherwise it's assumed to be\n // a single value.\n get(e, t, s) {\n return s ? this.has(e) ? this.values[e] : t[s] : this.has(e) ? this.values[e] : t;\n }\n // Check whether we have a value for a key.\n has(e) {\n return e in this.values;\n }\n // Accept a setting if its one of the given alternatives.\n alt(e, t, s) {\n for (let i = 0; i < s.length; ++i)\n if (t === s[i]) {\n this.set(e, t);\n break;\n }\n }\n // Accept a setting if its a valid (signed) integer.\n integer(e, t) {\n /^-?\\d+$/.test(t) && this.set(e, parseInt(t, 10));\n }\n // Accept a setting if its a valid percentage.\n percent(e, t) {\n if (/^([\\d]{1,3})(\\.[\\d]*)?%$/.test(t)) {\n const s = parseFloat(t);\n if (s >= 0 && s <= 100)\n return this.set(e, s), !0;\n }\n return !1;\n }\n}\nfunction Kr(a, e, t, s) {\n const i = s ? a.split(s) : [a];\n for (const r in i) {\n if (typeof i[r] != \"string\")\n continue;\n const n = i[r].split(t);\n if (n.length !== 2)\n continue;\n const o = n[0], l = n[1];\n e(o, l);\n }\n}\nconst bs = new Vs(0, 0, \"\"), Ct = bs.align === \"middle\" ? \"middle\" : \"center\";\nfunction tl(a, e, t) {\n const s = a;\n function i() {\n const o = Hr(a);\n if (o === null)\n throw new Error(\"Malformed timestamp: \" + s);\n return a = a.replace(/^[^\\sa-zA-Z-]+/, \"\"), o;\n }\n function r(o, l) {\n const h = new el();\n Kr(o, function(u, f) {\n let g;\n switch (u) {\n case \"region\":\n for (let p = t.length - 1; p >= 0; p--)\n if (t[p].id === f) {\n h.set(u, t[p].region);\n break;\n }\n break;\n case \"vertical\":\n h.alt(u, f, [\"rl\", \"lr\"]);\n break;\n case \"line\":\n g = f.split(\",\"), h.integer(u, g[0]), h.percent(u, g[0]) && h.set(\"snapToLines\", !1), h.alt(u, g[0], [\"auto\"]), g.length === 2 && h.alt(\"lineAlign\", g[1], [\"start\", Ct, \"end\"]);\n break;\n case \"position\":\n g = f.split(\",\"), h.percent(u, g[0]), g.length === 2 && h.alt(\"positionAlign\", g[1], [\"start\", Ct, \"end\", \"line-left\", \"line-right\", \"auto\"]);\n break;\n case \"size\":\n h.percent(u, f);\n break;\n case \"align\":\n h.alt(u, f, [\"start\", Ct, \"end\", \"left\", \"right\"]);\n break;\n }\n }, /:/, /\\s/), l.region = h.get(\"region\", null), l.vertical = h.get(\"vertical\", \"\");\n let c = h.get(\"line\", \"auto\");\n c === \"auto\" && bs.line === -1 && (c = -1), l.line = c, l.lineAlign = h.get(\"lineAlign\", \"start\"), l.snapToLines = h.get(\"snapToLines\", !0), l.size = h.get(\"size\", 100), l.align = h.get(\"align\", Ct);\n let d = h.get(\"position\", \"auto\");\n d === \"auto\" && bs.position === 50 && (d = l.align === \"start\" || l.align === \"left\" ? 0 : l.align === \"end\" || l.align === \"right\" ? 100 : 50), l.position = d;\n }\n function n() {\n a = a.replace(/^\\s+/, \"\");\n }\n if (n(), e.startTime = i(), n(), a.slice(0, 3) !== \"-->\")\n throw new Error(\"Malformed time stamp (time stamps must be separated by '-->'): \" + s);\n a = a.slice(3), n(), e.endTime = i(), n(), r(a, e);\n}\nfunction Wr(a) {\n return a.replace(/<br(?: \\/)?>/gi, `\n`);\n}\nclass sl {\n constructor() {\n this.state = \"INITIAL\", this.buffer = \"\", this.decoder = new Jo(), this.regionList = [], this.cue = null, this.oncue = void 0, this.onparsingerror = void 0, this.onflush = void 0;\n }\n parse(e) {\n const t = this;\n e && (t.buffer += t.decoder.decode(e, {\n stream: !0\n }));\n function s() {\n let r = t.buffer, n = 0;\n for (r = Wr(r); n < r.length && r[n] !== \"\\r\" && r[n] !== `\n`; )\n ++n;\n const o = r.slice(0, n);\n return r[n] === \"\\r\" && ++n, r[n] === `\n` && ++n, t.buffer = r.slice(n), o;\n }\n function i(r) {\n Kr(r, function(n, o) {\n }, /:/);\n }\n try {\n let r = \"\";\n if (t.state === \"INITIAL\") {\n if (!/\\r\\n|\\n/.test(t.buffer))\n return this;\n r = s();\n const o = r.match(/^()?WEBVTT([ \\t].*)?$/);\n if (!(o != null && o[0]))\n throw new Error(\"Malformed WebVTT signature.\");\n t.state = \"HEADER\";\n }\n let n = !1;\n for (; t.buffer; ) {\n if (!/\\r\\n|\\n/.test(t.buffer))\n return this;\n switch (n ? n = !1 : r = s(), t.state) {\n case \"HEADER\":\n /:/.test(r) ? i(r) : r || (t.state = \"ID\");\n continue;\n case \"NOTE\":\n r || (t.state = \"ID\");\n continue;\n case \"ID\":\n if (/^NOTE($|[ \\t])/.test(r)) {\n t.state = \"NOTE\";\n break;\n }\n if (!r)\n continue;\n if (t.cue = new Vs(0, 0, \"\"), t.state = \"CUE\", r.indexOf(\"-->\") === -1) {\n t.cue.id = r;\n continue;\n }\n case \"CUE\":\n if (!t.cue) {\n t.state = \"BADCUE\";\n continue;\n }\n try {\n tl(r, t.cue, t.regionList);\n } catch {\n t.cue = null, t.state = \"BADCUE\";\n continue;\n }\n t.state = \"CUETEXT\";\n continue;\n case \"CUETEXT\":\n {\n const o = r.indexOf(\"-->\") !== -1;\n if (!r || o && (n = !0)) {\n t.oncue && t.cue && t.oncue(t.cue), t.cue = null, t.state = \"ID\";\n continue;\n }\n if (t.cue === null)\n continue;\n t.cue.text && (t.cue.text += `\n`), t.cue.text += r;\n }\n continue;\n case \"BADCUE\":\n r || (t.state = \"ID\");\n }\n }\n } catch {\n t.state === \"CUETEXT\" && t.cue && t.oncue && t.oncue(t.cue), t.cue = null, t.state = t.state === \"INITIAL\" ? \"BADWEBVTT\" : \"BADCUE\";\n }\n return this;\n }\n flush() {\n const e = this;\n try {\n if ((e.cue || e.state === \"HEADER\") && (e.buffer += `\n\n`, e.parse()), e.state === \"INITIAL\" || e.state === \"BADWEBVTT\")\n throw new Error(\"Malformed WebVTT signature.\");\n } catch (t) {\n e.onparsingerror && e.onparsingerror(t);\n }\n return e.onflush && e.onflush(), this;\n }\n}\nconst il = /\\r\\n|\\n\\r|\\n|\\r/g, hs = function(e, t, s = 0) {\n return e.slice(s, s + t.length) === t;\n}, rl = function(e) {\n let t = parseInt(e.slice(-3));\n const s = parseInt(e.slice(-6, -4)), i = parseInt(e.slice(-9, -7)), r = e.length > 9 ? parseInt(e.substring(0, e.indexOf(\":\"))) : 0;\n if (!M(t) || !M(s) || !M(i) || !M(r))\n throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);\n return t += 1e3 * s, t += 60 * 1e3 * i, t += 60 * 60 * 1e3 * r, t;\n}, cs = function(e) {\n let t = 5381, s = e.length;\n for (; s; )\n t = t * 33 ^ e.charCodeAt(--s);\n return (t >>> 0).toString();\n};\nfunction Hs(a, e, t) {\n return cs(a.toString()) + cs(e.toString()) + cs(t);\n}\nconst nl = function(e, t, s) {\n let i = e[t], r = e[i.prevCC];\n if (!r || !r.new && i.new) {\n e.ccOffset = e.presentationOffset = i.start, i.new = !1;\n return;\n }\n for (; (n = r) != null && n.new; ) {\n var n;\n e.ccOffset += i.start - r.start, i.new = !1, i = r, r = e[i.prevCC];\n }\n e.presentationOffset = s;\n};\nfunction al(a, e, t, s, i, r, n) {\n const o = new sl(), l = Fe(new Uint8Array(a)).trim().replace(il, `\n`).split(`\n`), h = [], c = e ? yo(e.baseTime, e.timescale) : 0;\n let d = \"00:00.000\", u = 0, f = 0, g, p = !0;\n o.oncue = function(y) {\n const v = t[s];\n let E = t.ccOffset;\n const T = (u - c) / 9e4;\n if (v != null && v.new && (f !== void 0 ? E = t.ccOffset = v.start : nl(t, s, T)), T) {\n if (!e) {\n g = new Error(\"Missing initPTS for VTT MPEGTS\");\n return;\n }\n E = T - t.presentationOffset;\n }\n const A = y.endTime - y.startTime, b = Ie((y.startTime + E - f) * 9e4, i * 9e4) / 9e4;\n y.startTime = Math.max(b, 0), y.endTime = Math.max(b + A, 0);\n const D = y.text.trim();\n y.text = decodeURIComponent(encodeURIComponent(D)), y.id || (y.id = Hs(y.startTime, y.endTime, D)), y.endTime > 0 && h.push(y);\n }, o.onparsingerror = function(y) {\n g = y;\n }, o.onflush = function() {\n if (g) {\n n(g);\n return;\n }\n r(h);\n }, l.forEach((y) => {\n if (p)\n if (hs(y, \"X-TIMESTAMP-MAP=\")) {\n p = !1, y.slice(16).split(\",\").forEach((v) => {\n hs(v, \"LOCAL:\") ? d = v.slice(6) : hs(v, \"MPEGTS:\") && (u = parseInt(v.slice(7)));\n });\n try {\n f = rl(d) / 1e3;\n } catch (v) {\n g = v;\n }\n return;\n } else\n y === \"\" && (p = !1);\n o.parse(y + `\n`);\n }), o.flush();\n}\nconst ds = \"stpp.ttml.im1t\", Yr = /^(\\d{2,}):(\\d{2}):(\\d{2}):(\\d{2})\\.?(\\d+)?$/, zr = /^(\\d*(?:\\.\\d*)?)(h|m|s|ms|f|t)$/, ol = {\n left: \"start\",\n center: \"center\",\n right: \"end\",\n start: \"start\",\n end: \"end\"\n};\nfunction Bi(a, e, t, s) {\n const i = H(new Uint8Array(a), [\"mdat\"]);\n if (i.length === 0) {\n s(new Error(\"Could not parse IMSC1 mdat\"));\n return;\n }\n const r = i.map((o) => Fe(o)), n = po(e.baseTime, 1, e.timescale);\n try {\n r.forEach((o) => t(ll(o, n)));\n } catch (o) {\n s(o);\n }\n}\nfunction ll(a, e) {\n const i = new DOMParser().parseFromString(a, \"text/xml\").getElementsByTagName(\"tt\")[0];\n if (!i)\n throw new Error(\"Invalid ttml\");\n const r = {\n frameRate: 30,\n subFrameRate: 1,\n frameRateMultiplier: 0,\n tickRate: 0\n }, n = Object.keys(r).reduce((d, u) => (d[u] = i.getAttribute(`ttp:${u}`) || r[u], d), {}), o = i.getAttribute(\"xml:space\") !== \"preserve\", l = $i(us(i, \"styling\", \"style\")), h = $i(us(i, \"layout\", \"region\")), c = us(i, \"body\", \"[begin]\");\n return [].map.call(c, (d) => {\n const u = jr(d, o);\n if (!u || !d.hasAttribute(\"begin\"))\n return null;\n const f = gs(d.getAttribute(\"begin\"), n), g = gs(d.getAttribute(\"dur\"), n);\n let p = gs(d.getAttribute(\"end\"), n);\n if (f === null)\n throw Gi(d);\n if (p === null) {\n if (g === null)\n throw Gi(d);\n p = f + g;\n }\n const y = new Vs(f - e, p - e, u);\n y.id = Hs(y.startTime, y.endTime, y.text);\n const v = h[d.getAttribute(\"region\")], E = l[d.getAttribute(\"style\")], T = hl(v, E, l), {\n textAlign: A\n } = T;\n if (A) {\n const b = ol[A];\n b && (y.lineAlign = b), y.align = A;\n }\n return ne(y, T), y;\n }).filter((d) => d !== null);\n}\nfunction us(a, e, t) {\n const s = a.getElementsByTagName(e)[0];\n return s ? [].slice.call(s.querySelectorAll(t)) : [];\n}\nfunction $i(a) {\n return a.reduce((e, t) => {\n const s = t.getAttribute(\"xml:id\");\n return s && (e[s] = t), e;\n }, {});\n}\nfunction jr(a, e) {\n return [].slice.call(a.childNodes).reduce((t, s, i) => {\n var r;\n return s.nodeName === \"br\" && i ? t + `\n` : (r = s.childNodes) != null && r.length ? jr(s, e) : e ? t + s.textContent.trim().replace(/\\s+/g, \" \") : t + s.textContent;\n }, \"\");\n}\nfunction hl(a, e, t) {\n const s = \"http://www.w3.org/ns/ttml#styling\";\n let i = null;\n const r = [\n \"displayAlign\",\n \"textAlign\",\n \"color\",\n \"backgroundColor\",\n \"fontSize\",\n \"fontFamily\"\n // 'fontWeight',\n // 'lineHeight',\n // 'wrapOption',\n // 'fontStyle',\n // 'direction',\n // 'writingMode'\n ], n = a != null && a.hasAttribute(\"style\") ? a.getAttribute(\"style\") : null;\n return n && t.hasOwnProperty(n) && (i = t[n]), r.reduce((o, l) => {\n const h = fs(e, s, l) || fs(a, s, l) || fs(i, s, l);\n return h && (o[l] = h), o;\n }, {});\n}\nfunction fs(a, e, t) {\n return a && a.hasAttributeNS(e, t) ? a.getAttributeNS(e, t) : null;\n}\nfunction Gi(a) {\n return new Error(`Could not parse ttml timestamp ${a}`);\n}\nfunction gs(a, e) {\n if (!a)\n return null;\n let t = Hr(a);\n return t === null && (Yr.test(a) ? t = cl(a, e) : zr.test(a) && (t = dl(a, e))), t;\n}\nfunction cl(a, e) {\n const t = Yr.exec(a), s = (t[4] | 0) + (t[5] | 0) / e.subFrameRate;\n return (t[1] | 0) * 3600 + (t[2] | 0) * 60 + (t[3] | 0) + s / e.frameRate;\n}\nfunction dl(a, e) {\n const t = zr.exec(a), s = Number(t[1]);\n switch (t[2]) {\n case \"h\":\n return s * 3600;\n case \"m\":\n return s * 60;\n case \"ms\":\n return s * 1e3;\n case \"f\":\n return s / e.frameRate;\n case \"t\":\n return s / e.tickRate;\n }\n return s;\n}\nclass ul {\n constructor(e) {\n if (this.hls = void 0, this.media = null, this.config = void 0, this.enabled = !0, this.Cues = void 0, this.textTracks = [], this.tracks = [], this.initPTS = [], this.unparsedVttFrags = [], this.captionsTracks = {}, this.nonNativeCaptionsTracks = {}, this.cea608Parser1 = void 0, this.cea608Parser2 = void 0, this.lastSn = -1, this.lastPartIndex = -1, this.prevCC = -1, this.vttCCs = Vi(), this.captionsProperties = void 0, this.hls = e, this.config = e.config, this.Cues = e.config.cueHandler, this.captionsProperties = {\n textTrack1: {\n label: this.config.captionsTextTrack1Label,\n languageCode: this.config.captionsTextTrack1LanguageCode\n },\n textTrack2: {\n label: this.config.captionsTextTrack2Label,\n languageCode: this.config.captionsTextTrack2LanguageCode\n },\n textTrack3: {\n label: this.config.captionsTextTrack3Label,\n languageCode: this.config.captionsTextTrack3LanguageCode\n },\n textTrack4: {\n label: this.config.captionsTextTrack4Label,\n languageCode: this.config.captionsTextTrack4LanguageCode\n }\n }, this.config.enableCEA708Captions) {\n const t = new wt(this, \"textTrack1\"), s = new wt(this, \"textTrack2\"), i = new wt(this, \"textTrack3\"), r = new wt(this, \"textTrack4\");\n this.cea608Parser1 = new Mi(1, t, s), this.cea608Parser2 = new Mi(3, i, r);\n }\n e.on(m.MEDIA_ATTACHING, this.onMediaAttaching, this), e.on(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.on(m.MANIFEST_LOADING, this.onManifestLoading, this), e.on(m.MANIFEST_LOADED, this.onManifestLoaded, this), e.on(m.SUBTITLE_TRACKS_UPDATED, this.onSubtitleTracksUpdated, this), e.on(m.FRAG_LOADING, this.onFragLoading, this), e.on(m.FRAG_LOADED, this.onFragLoaded, this), e.on(m.FRAG_PARSING_USERDATA, this.onFragParsingUserdata, this), e.on(m.FRAG_DECRYPTED, this.onFragDecrypted, this), e.on(m.INIT_PTS_FOUND, this.onInitPtsFound, this), e.on(m.SUBTITLE_TRACKS_CLEARED, this.onSubtitleTracksCleared, this), e.on(m.BUFFER_FLUSHING, this.onBufferFlushing, this);\n }\n destroy() {\n const {\n hls: e\n } = this;\n e.off(m.MEDIA_ATTACHING, this.onMediaAttaching, this), e.off(m.MEDIA_DETACHING, this.onMediaDetaching, this), e.off(m.MANIFEST_LOADING, this.onManifestLoading, this), e.off(m.MANIFEST_LOADED, this.onManifestLoaded, this), e.off(m.SUBTITLE_TRACKS_UPDATED, this.onSubtitleTracksUpdated, this), e.off(m.FRAG_LOADING, this.onFragLoading, this), e.off(m.FRAG_LOADED, this.onFragLoaded, this), e.off(m.FRAG_PARSING_USERDATA, this.onFragParsingUserdata, this), e.off(m.FRAG_DECRYPTED, this.onFragDecrypted, this), e.off(m.INIT_PTS_FOUND, this.onInitPtsFound, this), e.off(m.SUBTITLE_TRACKS_CLEARED, this.onSubtitleTracksCleared, this), e.off(m.BUFFER_FLUSHING, this.onBufferFlushing, this), this.hls = this.config = this.cea608Parser1 = this.cea608Parser2 = null;\n }\n addCues(e, t, s, i, r) {\n let n = !1;\n for (let o = r.length; o--; ) {\n const l = r[o], h = gl(l[0], l[1], t, s);\n if (h >= 0 && (l[0] = Math.min(l[0], t), l[1] = Math.max(l[1], s), n = !0, h / (s - t) > 0.5))\n return;\n }\n if (n || r.push([t, s]), this.config.renderTextTracksNatively) {\n const o = this.captionsTracks[e];\n this.Cues.newCue(o, t, s, i);\n } else {\n const o = this.Cues.newCue(null, t, s, i);\n this.hls.trigger(m.CUES_PARSED, {\n type: \"captions\",\n cues: o,\n track: e\n });\n }\n }\n // Triggered when an initial PTS is found; used for synchronisation of WebVTT.\n onInitPtsFound(e, {\n frag: t,\n id: s,\n initPTS: i,\n timescale: r\n }) {\n const {\n unparsedVttFrags: n\n } = this;\n s === \"main\" && (this.initPTS[t.cc] = {\n baseTime: i,\n timescale: r\n }), n.length && (this.unparsedVttFrags = [], n.forEach((o) => {\n this.onFragLoaded(m.FRAG_LOADED, o);\n }));\n }\n getExistingTrack(e) {\n const {\n media: t\n } = this;\n if (t)\n for (let s = 0; s < t.textTracks.length; s++) {\n const i = t.textTracks[s];\n if (i[e])\n return i;\n }\n return null;\n }\n createCaptionsTrack(e) {\n this.config.renderTextTracksNatively ? this.createNativeTrack(e) : this.createNonNativeTrack(e);\n }\n createNativeTrack(e) {\n if (this.captionsTracks[e])\n return;\n const {\n captionsProperties: t,\n captionsTracks: s,\n media: i\n } = this, {\n label: r,\n languageCode: n\n } = t[e], o = this.getExistingTrack(e);\n if (o)\n s[e] = o, rt(s[e]), pr(s[e], i);\n else {\n const l = this.createTextTrack(\"captions\", r, n);\n l && (l[e] = !0, s[e] = l);\n }\n }\n createNonNativeTrack(e) {\n if (this.nonNativeCaptionsTracks[e])\n return;\n const t = this.captionsProperties[e];\n if (!t)\n return;\n const s = t.label, i = {\n _id: e,\n label: s,\n kind: \"captions\",\n default: t.media ? !!t.media.default : !1,\n closedCaptions: t.media\n };\n this.nonNativeCaptionsTracks[e] = i, this.hls.trigger(m.NON_NATIVE_TEXT_TRACKS_FOUND, {\n tracks: [i]\n });\n }\n createTextTrack(e, t, s) {\n const i = this.media;\n if (i)\n return i.addTextTrack(e, t, s);\n }\n onMediaAttaching(e, t) {\n this.media = t.media, this._cleanTracks();\n }\n onMediaDetaching() {\n const {\n captionsTracks: e\n } = this;\n Object.keys(e).forEach((t) => {\n rt(e[t]), delete e[t];\n }), this.nonNativeCaptionsTracks = {};\n }\n onManifestLoading() {\n this.lastSn = -1, this.lastPartIndex = -1, this.prevCC = -1, this.vttCCs = Vi(), this._cleanTracks(), this.tracks = [], this.captionsTracks = {}, this.nonNativeCaptionsTracks = {}, this.textTracks = [], this.unparsedVttFrags = [], this.initPTS = [], this.cea608Parser1 && this.cea608Parser2 && (this.cea608Parser1.reset(), this.cea608Parser2.reset());\n }\n _cleanTracks() {\n const {\n media: e\n } = this;\n if (!e)\n return;\n const t = e.textTracks;\n if (t)\n for (let s = 0; s < t.length; s++)\n rt(t[s]);\n }\n onSubtitleTracksUpdated(e, t) {\n const s = t.subtitleTracks || [], i = s.some((r) => r.textCodec === ds);\n if (this.config.enableWebVTT || i && this.config.enableIMSC1) {\n if ($r(this.tracks, s)) {\n this.tracks = s;\n return;\n }\n if (this.textTracks = [], this.tracks = s, this.config.renderTextTracksNatively) {\n const n = this.media ? this.media.textTracks : null;\n this.tracks.forEach((o, l) => {\n let h;\n if (n && l < n.length) {\n let c = null;\n for (let d = 0; d < n.length; d++)\n if (fl(n[d], o)) {\n c = n[d];\n break;\n }\n c && (h = c);\n }\n if (h)\n rt(h);\n else {\n const c = this._captionsOrSubtitlesFromCharacteristics(o);\n h = this.createTextTrack(c, o.name, o.lang), h && (h.mode = \"disabled\");\n }\n h && (h.groupId = o.groupId, this.textTracks.push(h));\n });\n } else if (this.tracks.length) {\n const n = this.tracks.map((o) => ({\n label: o.name,\n kind: o.type.toLowerCase(),\n default: o.default,\n subtitleTrack: o\n }));\n this.hls.trigger(m.NON_NATIVE_TEXT_TRACKS_FOUND, {\n tracks: n\n });\n }\n }\n }\n _captionsOrSubtitlesFromCharacteristics(e) {\n if (e.attrs.CHARACTERISTICS) {\n const t = /transcribes-spoken-dialog/gi.test(e.attrs.CHARACTERISTICS), s = /describes-music-and-sound/gi.test(e.attrs.CHARACTERISTICS);\n if (t && s)\n return \"captions\";\n }\n return \"subtitles\";\n }\n onManifestLoaded(e, t) {\n this.config.enableCEA708Captions && t.captions && t.captions.forEach((s) => {\n const i = /(?:CC|SERVICE)([1-4])/.exec(s.instreamId);\n if (!i)\n return;\n const r = `textTrack${i[1]}`, n = this.captionsProperties[r];\n n && (n.label = s.name, s.lang && (n.languageCode = s.lang), n.media = s);\n });\n }\n closedCaptionsForLevel(e) {\n const t = this.hls.levels[e.level];\n return t == null ? void 0 : t.attrs[\"CLOSED-CAPTIONS\"];\n }\n onFragLoading(e, t) {\n const {\n cea608Parser1: s,\n cea608Parser2: i,\n lastSn: r,\n lastPartIndex: n\n } = this;\n if (!(!this.enabled || !(s && i)) && t.frag.type === B.MAIN) {\n var o, l;\n const h = t.frag.sn, c = (o = t == null || (l = t.part) == null ? void 0 : l.index) != null ? o : -1;\n h === r + 1 || h === r && c === n + 1 || (s.reset(), i.reset()), this.lastSn = h, this.lastPartIndex = c;\n }\n }\n onFragLoaded(e, t) {\n const {\n frag: s,\n payload: i\n } = t;\n if (s.type === B.SUBTITLE)\n if (i.byteLength) {\n const r = s.decryptdata, n = \"stats\" in t;\n if (r == null || !r.encrypted || n) {\n const o = this.tracks[s.level], l = this.vttCCs;\n l[s.cc] || (l[s.cc] = {\n start: s.start,\n prevCC: this.prevCC,\n new: !0\n }, this.prevCC = s.cc), o && o.textCodec === ds ? this._parseIMSC1(s, i) : this._parseVTTs(t);\n }\n } else\n this.hls.trigger(m.SUBTITLE_FRAG_PROCESSED, {\n success: !1,\n frag: s,\n error: new Error(\"Empty subtitle payload\")\n });\n }\n _parseIMSC1(e, t) {\n const s = this.hls;\n Bi(t, this.initPTS[e.cc], (i) => {\n this._appendCues(i, e.level), s.trigger(m.SUBTITLE_FRAG_PROCESSED, {\n success: !0,\n frag: e\n });\n }, (i) => {\n x.log(`Failed to parse IMSC1: ${i}`), s.trigger(m.SUBTITLE_FRAG_PROCESSED, {\n success: !1,\n frag: e,\n error: i\n });\n });\n }\n _parseVTTs(e) {\n var t;\n const {\n frag: s,\n payload: i\n } = e, {\n initPTS: r,\n unparsedVttFrags: n\n } = this, o = r.length - 1;\n if (!r[s.cc] && o === -1) {\n n.push(e);\n return;\n }\n const l = this.hls, h = (t = s.initSegment) != null && t.data ? Ze(s.initSegment.data, new Uint8Array(i)) : i;\n al(h, this.initPTS[s.cc], this.vttCCs, s.cc, s.start, (c) => {\n this._appendCues(c, s.level), l.trigger(m.SUBTITLE_FRAG_PROCESSED, {\n success: !0,\n frag: s\n });\n }, (c) => {\n const d = c.message === \"Missing initPTS for VTT MPEGTS\";\n d ? n.push(e) : this._fallbackToIMSC1(s, i), x.log(`Failed to parse VTT cue: ${c}`), !(d && o > s.cc) && l.trigger(m.SUBTITLE_FRAG_PROCESSED, {\n success: !1,\n frag: s,\n error: c\n });\n });\n }\n _fallbackToIMSC1(e, t) {\n const s = this.tracks[e.level];\n s.textCodec || Bi(t, this.initPTS[e.cc], () => {\n s.textCodec = ds, this._parseIMSC1(e, t);\n }, () => {\n s.textCodec = \"wvtt\";\n });\n }\n _appendCues(e, t) {\n const s = this.hls;\n if (this.config.renderTextTracksNatively) {\n const i = this.textTracks[t];\n if (!i || i.mode === \"disabled\")\n return;\n e.forEach((r) => yr(i, r));\n } else {\n const i = this.tracks[t];\n if (!i)\n return;\n const r = i.default ? \"default\" : \"subtitles\" + t;\n s.trigger(m.CUES_PARSED, {\n type: \"subtitles\",\n cues: e,\n track: r\n });\n }\n }\n onFragDecrypted(e, t) {\n const {\n frag: s\n } = t;\n s.type === B.SUBTITLE && this.onFragLoaded(m.FRAG_LOADED, t);\n }\n onSubtitleTracksCleared() {\n this.tracks = [], this.captionsTracks = {};\n }\n onFragParsingUserdata(e, t) {\n const {\n cea608Parser1: s,\n cea608Parser2: i\n } = this;\n if (!this.enabled || !(s && i))\n return;\n const {\n frag: r,\n samples: n\n } = t;\n if (!(r.type === B.MAIN && this.closedCaptionsForLevel(r) === \"NONE\"))\n for (let o = 0; o < n.length; o++) {\n const l = n[o].bytes;\n if (l) {\n const h = this.extractCea608Data(l);\n s.addData(n[o].pts, h[0]), i.addData(n[o].pts, h[1]);\n }\n }\n }\n onBufferFlushing(e, {\n startOffset: t,\n endOffset: s,\n endOffsetSubtitles: i,\n type: r\n }) {\n const {\n media: n\n } = this;\n if (!(!n || n.currentTime < s)) {\n if (!r || r === \"video\") {\n const {\n captionsTracks: o\n } = this;\n Object.keys(o).forEach((l) => ys(o[l], t, s));\n }\n if (this.config.renderTextTracksNatively && t === 0 && i !== void 0) {\n const {\n textTracks: o\n } = this;\n Object.keys(o).forEach((l) => ys(o[l], t, i));\n }\n }\n }\n extractCea608Data(e) {\n const t = [[], []], s = e[0] & 31;\n let i = 2;\n for (let r = 0; r < s; r++) {\n const n = e[i++], o = 127 & e[i++], l = 127 & e[i++];\n if (o === 0 && l === 0)\n continue;\n if ((4 & n) !== 0) {\n const c = 3 & n;\n (c === 0 || c === 1) && (t[c].push(o), t[c].push(l));\n }\n }\n return t;\n }\n}\nfunction fl(a, e) {\n return !!a && a.label === e.name && !(a.textTrack1 || a.textTrack2);\n}\nfunction gl(a, e, t, s) {\n return Math.min(e, s) - Math.max(a, t);\n}\nfunction Vi() {\n return {\n ccOffset: 0,\n presentationOffset: 0,\n 0: {\n start: 0,\n prevCC: -1,\n new: !0\n }\n };\n}\nclass Ks {\n constructor(e) {\n this.hls = void 0, this.autoLevelCapping = void 0, this.firstLevel = void 0, this.media = void 0, this.restrictedLevels = void 0, this.timer = void 0, this.clientRect = void 0, this.streamController = void 0, this.hls = e, this.autoLevelCapping = Number.POSITIVE_INFINITY, this.firstLevel = -1, this.media = null, this.restrictedLevels = [], this.timer = void 0, this.clientRect = null, this.registerListeners();\n }\n setStreamController(e) {\n this.streamController = e;\n }\n destroy() {\n this.unregisterListener(), this.hls.config.capLevelToPlayerSize && this.stopCapping(), this.media = null, this.clientRect = null, this.hls = this.streamController = null;\n }\n registerListeners() {\n const {\n hls: e\n } = this;\n e.on(m.FPS_DROP_LEVEL_CAPPING, this.onFpsDropLevelCapping, this), e.on(m.MEDIA_ATTACHING, this.onMediaAttaching, this), e.on(m.MANIFEST_PARSED, this.onManifestParsed, this), e.on(m.BUFFER_CODECS, this.onBufferCodecs, this), e.on(m.MEDIA_DETACHING, this.onMediaDetaching, this);\n }\n unregisterListener() {\n const {\n hls: e\n } = this;\n e.off(m.FPS_DROP_LEVEL_CAPPING, this.onFpsDropLevelCapping, this), e.off(m.MEDIA_ATTACHING, this.onMediaAttaching, this), e.off(m.MANIFEST_PARSED, this.onManifestParsed, this), e.off(m.BUFFER_CODECS, this.onBufferCodecs, this), e.off(m.MEDIA_DETACHING, this.onMediaDetaching, this);\n }\n onFpsDropLevelCapping(e, t) {\n const s = this.hls.levels[t.droppedLevel];\n this.isLevelAllowed(s) && this.restrictedLevels.push({\n bitrate: s.bitrate,\n height: s.height,\n width: s.width\n });\n }\n onMediaAttaching(e, t) {\n this.media = t.media instanceof HTMLVideoElement ? t.media : null, this.clientRect = null;\n }\n onManifestParsed(e, t) {\n const s = this.hls;\n this.restrictedLevels = [], this.firstLevel = t.firstLevel, s.config.capLevelToPlayerSize && t.video && this.startCapping();\n }\n // Only activate capping when playing a video stream; otherwise, multi-bitrate audio-only streams will be restricted\n // to the first level\n onBufferCodecs(e, t) {\n this.hls.config.capLevelToPlayerSize && t.video && this.startCapping();\n }\n onMediaDetaching() {\n this.stopCapping();\n }\n detectPlayerSize() {\n if (this.media && this.mediaHeight > 0 && this.mediaWidth > 0) {\n const e = this.hls.levels;\n if (e.length) {\n const t = this.hls;\n t.autoLevelCapping = this.getMaxLevel(e.length - 1), t.autoLevelCapping > this.autoLevelCapping && this.streamController && this.streamController.nextLevelSwitch(), this.autoLevelCapping = t.autoLevelCapping;\n }\n }\n }\n /*\n * returns level should be the one with the dimensions equal or greater than the media (player) dimensions (so the video will be downscaled)\n */\n getMaxLevel(e) {\n const t = this.hls.levels;\n if (!t.length)\n return -1;\n const s = t.filter((i, r) => this.isLevelAllowed(i) && r <= e);\n return this.clientRect = null, Ks.getMaxLevelByMediaSize(s, this.mediaWidth, this.mediaHeight);\n }\n startCapping() {\n this.timer || (this.autoLevelCapping = Number.POSITIVE_INFINITY, this.hls.firstLevel = this.getMaxLevel(this.firstLevel), self.clearInterval(this.timer), this.timer = self.setInterval(this.detectPlayerSize.bind(this), 1e3), this.detectPlayerSize());\n }\n stopCapping() {\n this.restrictedLevels = [], this.firstLevel = -1, this.autoLevelCapping = Number.POSITIVE_INFINITY, this.timer && (self.clearInterval(this.timer), this.timer = void 0);\n }\n getDimensions() {\n if (this.clientRect)\n return this.clientRect;\n const e = this.media, t = {\n width: 0,\n height: 0\n };\n if (e) {\n const s = e.getBoundingClientRect();\n t.width = s.width, t.height = s.height, !t.width && !t.height && (t.width = s.right - s.left || e.width || 0, t.height = s.bottom - s.top || e.height || 0);\n }\n return this.clientRect = t, t;\n }\n get mediaWidth() {\n return this.getDimensions().width * this.contentScaleFactor;\n }\n get mediaHeight() {\n return this.getDimensions().height * this.contentScaleFactor;\n }\n get contentScaleFactor() {\n let e = 1;\n if (!this.hls.config.ignoreDevicePixelRatio)\n try {\n e = self.devicePixelRatio;\n } catch {\n }\n return e;\n }\n isLevelAllowed(e) {\n return !this.restrictedLevels.some((s) => e.bitrate === s.bitrate && e.width === s.width && e.height === s.height);\n }\n static getMaxLevelByMediaSize(e, t, s) {\n if (!(e != null && e.length))\n return -1;\n const i = (n, o) => o ? n.width !== o.width || n.height !== o.height : !0;\n let r = e.length - 1;\n for (let n = 0; n < e.length; n += 1) {\n const o = e[n];\n if ((o.width >= t || o.height >= s) && i(o, e[n + 1])) {\n r = n;\n break;\n }\n }\n return r;\n }\n}\nclass ml {\n // stream controller must be provided as a dependency!\n constructor(e) {\n this.hls = void 0, this.isVideoPlaybackQualityAvailable = !1, this.timer = void 0, this.media = null, this.lastTime = void 0, this.lastDroppedFrames = 0, this.lastDecodedFrames = 0, this.streamController = void 0, this.hls = e, this.registerListeners();\n }\n setStreamController(e) {\n this.streamController = e;\n }\n registerListeners() {\n this.hls.on(m.MEDIA_ATTACHING, this.onMediaAttaching, this);\n }\n unregisterListeners() {\n this.hls.off(m.MEDIA_ATTACHING, this.onMediaAttaching, this);\n }\n destroy() {\n this.timer && clearInterval(this.timer), this.unregisterListeners(), this.isVideoPlaybackQualityAvailable = !1, this.media = null;\n }\n onMediaAttaching(e, t) {\n const s = this.hls.config;\n if (s.capLevelOnFPSDrop) {\n const i = t.media instanceof self.HTMLVideoElement ? t.media : null;\n this.media = i, i && typeof i.getVideoPlaybackQuality == \"function\" && (this.isVideoPlaybackQualityAvailable = !0), self.clearInterval(this.timer), this.timer = self.setInterval(this.checkFPSInterval.bind(this), s.fpsDroppedMonitoringPeriod);\n }\n }\n checkFPS(e, t, s) {\n const i = performance.now();\n if (t) {\n if (this.lastTime) {\n const r = i - this.lastTime, n = s - this.lastDroppedFrames, o = t - this.lastDecodedFrames, l = 1e3 * n / r, h = this.hls;\n if (h.trigger(m.FPS_DROP, {\n currentDropped: n,\n currentDecoded: o,\n totalDroppedFrames: s\n }), l > 0 && n > h.config.fpsDroppedMonitoringThreshold * o) {\n let c = h.currentLevel;\n x.warn(\"drop FPS ratio greater than max allowed value for currentLevel: \" + c), c > 0 && (h.autoLevelCapping === -1 || h.autoLevelCapping >= c) && (c = c - 1, h.trigger(m.FPS_DROP_LEVEL_CAPPING, {\n level: c,\n droppedLevel: h.currentLevel\n }), h.autoLevelCapping = c, this.streamController.nextLevelSwitch());\n }\n }\n this.lastTime = i, this.lastDroppedFrames = s, this.lastDecodedFrames = t;\n }\n }\n checkFPSInterval() {\n const e = this.media;\n if (e)\n if (this.isVideoPlaybackQualityAvailable) {\n const t = e.getVideoPlaybackQuality();\n this.checkFPS(e, t.totalVideoFrames, t.droppedVideoFrames);\n } else\n this.checkFPS(e, e.webkitDecodedFrameCount, e.webkitDroppedFrameCount);\n }\n}\nconst Dt = \"[eme]\";\nclass nt {\n constructor(e) {\n this.hls = void 0, this.config = void 0, this.media = null, this.keyFormatPromise = null, this.keySystemAccessPromises = {}, this._requestLicenseFailureCount = 0, this.mediaKeySessions = [], this.keyIdToKeySessionPromise = {}, this.setMediaKeysQueue = nt.CDMCleanupPromise ? [nt.CDMCleanupPromise] : [], this.onMediaEncrypted = this._onMediaEncrypted.bind(this), this.onWaitingForKey = this._onWaitingForKey.bind(this), this.debug = x.debug.bind(x, Dt), this.log = x.log.bind(x, Dt), this.warn = x.warn.bind(x, Dt), this.error = x.error.bind(x, Dt), this.hls = e, this.config = e.config, this.registerListeners();\n }\n destroy() {\n this.unregisterListeners(), this.onMediaDetached();\n const e = this.config;\n e.requestMediaKeySystemAccessFunc = null, e.licenseXhrSetup = e.licenseResponseCallback = void 0, e.drmSystems = e.drmSystemOptions = {}, this.hls = this.onMediaEncrypted = this.onWaitingForKey = this.keyIdToKeySessionPromise = null, this.config = null;\n }\n registerListeners() {\n this.hls.on(m.MEDIA_ATTACHED, this.onMediaAttached, this), this.hls.on(m.MEDIA_DETACHED, this.onMediaDetached, this), this.hls.on(m.MANIFEST_LOADING, this.onManifestLoading, this), this.hls.on(m.MANIFEST_LOADED, this.onManifestLoaded, this);\n }\n unregisterListeners() {\n this.hls.off(m.MEDIA_ATTACHED, this.onMediaAttached, this), this.hls.off(m.MEDIA_DETACHED, this.onMediaDetached, this), this.hls.off(m.MANIFEST_LOADING, this.onManifestLoading, this), this.hls.off(m.MANIFEST_LOADED, this.onManifestLoaded, this);\n }\n getLicenseServerUrl(e) {\n const {\n drmSystems: t,\n widevineLicenseUrl: s\n } = this.config, i = t[e];\n if (i)\n return i.licenseUrl;\n if (e === se.WIDEVINE && s)\n return s;\n throw new Error(`no license server URL configured for key-system \"${e}\"`);\n }\n getServerCertificateUrl(e) {\n const {\n drmSystems: t\n } = this.config, s = t[e];\n if (s)\n return s.serverCertificateUrl;\n this.log(`No Server Certificate in config.drmSystems[\"${e}\"]`);\n }\n attemptKeySystemAccess(e) {\n const t = this.hls.levels, s = (n, o, l) => !!n && l.indexOf(n) === o, i = t.map((n) => n.audioCodec).filter(s), r = t.map((n) => n.videoCodec).filter(s);\n return i.length + r.length === 0 && r.push(\"avc1.42e01e\"), new Promise((n, o) => {\n const l = (h) => {\n const c = h.shift();\n this.getMediaKeysPromise(c, i, r).then((d) => n({\n keySystem: c,\n mediaKeys: d\n })).catch((d) => {\n h.length ? l(h) : d instanceof Ae ? o(d) : o(new Ae({\n type: U.KEY_SYSTEM_ERROR,\n details: L.KEY_SYSTEM_NO_ACCESS,\n error: d,\n fatal: !0\n }, d.message));\n });\n };\n l(e);\n });\n }\n requestMediaKeySystemAccess(e, t) {\n const {\n requestMediaKeySystemAccessFunc: s\n } = this.config;\n if (typeof s != \"function\") {\n let i = `Configured requestMediaKeySystemAccess is not a function ${s}`;\n return rr === null && self.location.protocol === \"http:\" && (i = `navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`), Promise.reject(new Error(i));\n }\n return s(e, t);\n }\n getMediaKeysPromise(e, t, s) {\n const i = wn(e, t, s, this.config.drmSystemOptions), r = this.keySystemAccessPromises[e];\n let n = r == null ? void 0 : r.keySystemAccess;\n if (!n) {\n this.log(`Requesting encrypted media \"${e}\" key-system access with config: ${JSON.stringify(i)}`), n = this.requestMediaKeySystemAccess(e, i);\n const o = this.keySystemAccessPromises[e] = {\n keySystemAccess: n\n };\n return n.catch((l) => {\n this.log(`Failed to obtain access to key-system \"${e}\": ${l}`);\n }), n.then((l) => {\n this.log(`Access for key-system \"${l.keySystem}\" obtained`);\n const h = this.fetchServerCertificate(e);\n return this.log(`Create media-keys for \"${e}\"`), o.mediaKeys = l.createMediaKeys().then((c) => (this.log(`Media-keys created for \"${e}\"`), h.then((d) => d ? this.setMediaKeysServerCertificate(c, e, d) : c))), o.mediaKeys.catch((c) => {\n this.error(`Failed to create media-keys for \"${e}\"}: ${c}`);\n }), o.mediaKeys;\n });\n }\n return n.then(() => r.mediaKeys);\n }\n createMediaKeySessionContext({\n decryptdata: e,\n keySystem: t,\n mediaKeys: s\n }) {\n this.log(`Creating key-system session \"${t}\" keyId: ${Pe.hexDump(e.keyId || [])}`);\n const i = s.createSession(), r = {\n decryptdata: e,\n keySystem: t,\n mediaKeys: s,\n mediaKeysSession: i,\n keyStatus: \"status-pending\"\n };\n return this.mediaKeySessions.push(r), r;\n }\n renewKeySession(e) {\n const t = e.decryptdata;\n if (t.pssh) {\n const s = this.createMediaKeySessionContext(e), i = this.getKeyIdString(t), r = \"cenc\";\n this.keyIdToKeySessionPromise[i] = this.generateRequestWithPreferredKeySession(s, r, t.pssh, \"expired\");\n } else\n this.warn(\"Could not renew expired session. Missing pssh initData.\");\n this.removeSession(e);\n }\n getKeyIdString(e) {\n if (!e)\n throw new Error(\"Could not read keyId of undefined decryptdata\");\n if (e.keyId === null)\n throw new Error(\"keyId is null\");\n return Pe.hexDump(e.keyId);\n }\n updateKeySession(e, t) {\n var s;\n const i = e.mediaKeysSession;\n return this.log(`Updating key-session \"${i.sessionId}\" for keyID ${Pe.hexDump(((s = e.decryptdata) == null ? void 0 : s.keyId) || [])}\n } (data length: ${t && t.byteLength})`), i.update(t);\n }\n selectKeySystemFormat(e) {\n const t = Object.keys(e.levelkeys || {});\n return this.keyFormatPromise || (this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(\", \")}`), this.keyFormatPromise = this.getKeyFormatPromise(t)), this.keyFormatPromise;\n }\n getKeyFormatPromise(e) {\n return new Promise((t, s) => {\n const i = zt(this.config), r = e.map(Js).filter((n) => !!n && i.indexOf(n) !== -1);\n return this.getKeySystemSelectionPromise(r).then(({\n keySystem: n\n }) => {\n const o = ei(n);\n o ? t(o) : s(new Error(`Unable to find format for key-system \"${n}\"`));\n }).catch(s);\n });\n }\n loadKey(e) {\n const t = e.keyInfo.decryptdata, s = this.getKeyIdString(t), i = `(keyId: ${s} format: \"${t.keyFormat}\" method: ${t.method} uri: ${t.uri})`;\n this.log(`Starting session for key ${i}`);\n let r = this.keyIdToKeySessionPromise[s];\n return r || (r = this.keyIdToKeySessionPromise[s] = this.getKeySystemForKeyPromise(t).then(({\n keySystem: n,\n mediaKeys: o\n }) => (this.throwIfDestroyed(), this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`), this.attemptSetMediaKeys(n, o).then(() => {\n this.throwIfDestroyed();\n const l = this.createMediaKeySessionContext({\n keySystem: n,\n mediaKeys: o,\n decryptdata: t\n }), h = \"cenc\";\n return this.generateRequestWithPreferredKeySession(l, h, t.pssh, \"playlist-key\");\n }))), r.catch((n) => this.handleError(n))), r;\n }\n throwIfDestroyed(e = \"Invalid state\") {\n if (!this.hls)\n throw new Error(\"invalid state\");\n }\n handleError(e) {\n this.hls && (this.error(e.message), e instanceof Ae ? this.hls.trigger(m.ERROR, e.data) : this.hls.trigger(m.ERROR, {\n type: U.KEY_SYSTEM_ERROR,\n details: L.KEY_SYSTEM_NO_KEYS,\n error: e,\n fatal: !0\n }));\n }\n getKeySystemForKeyPromise(e) {\n const t = this.getKeyIdString(e), s = this.keyIdToKeySessionPromise[t];\n if (!s) {\n const i = Js(e.keyFormat), r = i ? [i] : zt(this.config);\n return this.attemptKeySystemAccess(r);\n }\n return s;\n }\n getKeySystemSelectionPromise(e) {\n if (e.length || (e = zt(this.config)), e.length === 0)\n throw new Ae({\n type: U.KEY_SYSTEM_ERROR,\n details: L.KEY_SYSTEM_NO_CONFIGURED_LICENSE,\n fatal: !0\n }, `Missing key-system license configuration options ${JSON.stringify({\n drmSystems: this.config.drmSystems\n })}`);\n return this.attemptKeySystemAccess(e);\n }\n _onMediaEncrypted(e) {\n const {\n initDataType: t,\n initData: s\n } = e;\n if (this.debug(`\"${e.type}\" event: init data type: \"${t}\"`), s === null)\n return;\n let i, r;\n if (t === \"sinf\" && this.config.drmSystems[se.FAIRPLAY]) {\n const c = de(new Uint8Array(s));\n try {\n const d = Ds(JSON.parse(c).sinf), u = ur(new Uint8Array(d));\n if (!u)\n return;\n i = u.subarray(8, 24), r = se.FAIRPLAY;\n } catch {\n this.warn('Failed to parse sinf \"encrypted\" event message initData');\n return;\n }\n } else {\n const c = Qn(s);\n if (c === null)\n return;\n c.version === 0 && c.systemId === ir.WIDEVINE && c.data && (i = c.data.subarray(8, 24)), r = In(c.systemId);\n }\n if (!r || !i)\n return;\n const n = Pe.hexDump(i), {\n keyIdToKeySessionPromise: o,\n mediaKeySessions: l\n } = this;\n let h = o[n];\n for (let c = 0; c < l.length; c++) {\n const d = l[c], u = d.decryptdata;\n if (u.pssh || !u.keyId)\n continue;\n const f = Pe.hexDump(u.keyId);\n if (n === f || u.uri.replace(/-/g, \"\").indexOf(n) !== -1) {\n h = o[f], delete o[f], u.pssh = new Uint8Array(s), u.keyId = i, h = o[n] = h.then(() => this.generateRequestWithPreferredKeySession(d, t, s, \"encrypted-event-key-match\"));\n break;\n }\n }\n h || (h = o[n] = this.getKeySystemSelectionPromise([r]).then(({\n keySystem: c,\n mediaKeys: d\n }) => {\n var u;\n this.throwIfDestroyed();\n const f = new gt(\"ISO-23001-7\", n, (u = ei(c)) != null ? u : \"\");\n return f.pssh = new Uint8Array(s), f.keyId = i, this.attemptSetMediaKeys(c, d).then(() => {\n this.throwIfDestroyed();\n const g = this.createMediaKeySessionContext({\n decryptdata: f,\n keySystem: c,\n mediaKeys: d\n });\n return this.generateRequestWithPreferredKeySession(g, t, s, \"encrypted-event-no-match\");\n });\n })), h.catch((c) => this.handleError(c));\n }\n _onWaitingForKey(e) {\n this.log(`\"${e.type}\" event`);\n }\n attemptSetMediaKeys(e, t) {\n const s = this.setMediaKeysQueue.slice();\n this.log(`Setting media-keys for \"${e}\"`);\n const i = Promise.all(s).then(() => {\n if (!this.media)\n throw new Error(\"Attempted to set mediaKeys without media element attached\");\n return this.media.setMediaKeys(t);\n });\n return this.setMediaKeysQueue.push(i), i.then(() => {\n this.log(`Media-keys set for \"${e}\"`), s.push(i), this.setMediaKeysQueue = this.setMediaKeysQueue.filter((r) => s.indexOf(r) === -1);\n });\n }\n generateRequestWithPreferredKeySession(e, t, s, i) {\n var r, n;\n const o = (r = this.config.drmSystems) == null || (n = r[e.keySystem]) == null ? void 0 : n.generateRequest;\n if (o)\n try {\n const u = o.call(this.hls, t, s, e);\n if (!u)\n throw new Error(\"Invalid response from configured generateRequest filter\");\n t = u.initDataType, s = e.decryptdata.pssh = u.initData ? new Uint8Array(u.initData) : null;\n } catch (u) {\n var l;\n if (this.warn(u.message), (l = this.hls) != null && l.config.debug)\n throw u;\n }\n if (s === null)\n return this.log(`Skipping key-session request for \"${i}\" (no initData)`), Promise.resolve(e);\n const h = this.getKeyIdString(e.decryptdata);\n this.log(`Generating key-session request for \"${i}\": ${h} (init data type: ${t} length: ${s ? s.byteLength : null})`);\n const c = new Gs();\n e.mediaKeysSession.onmessage = (u) => {\n const f = e.mediaKeysSession;\n if (!f) {\n c.emit(\"error\", new Error(\"invalid state\"));\n return;\n }\n const {\n messageType: g,\n message: p\n } = u;\n this.log(`\"${g}\" message event for session \"${f.sessionId}\" message size: ${p.byteLength}`), g === \"license-request\" || g === \"license-renewal\" ? this.renewLicense(e, p).catch((y) => {\n this.handleError(y), c.emit(\"error\", y);\n }) : g === \"license-release\" ? e.keySystem === se.FAIRPLAY && (this.updateKeySession(e, sr(\"acknowledged\")), this.removeSession(e)) : this.warn(`unhandled media key message type \"${g}\"`);\n }, e.mediaKeysSession.onkeystatuseschange = (u) => {\n if (!e.mediaKeysSession) {\n c.emit(\"error\", new Error(\"invalid state\"));\n return;\n }\n this.onKeyStatusChange(e);\n const g = e.keyStatus;\n c.emit(\"keyStatus\", g), g === \"expired\" && (this.warn(`${e.keySystem} expired for key ${h}`), this.renewKeySession(e));\n };\n const d = new Promise((u, f) => {\n c.on(\"error\", f), c.on(\"keyStatus\", (g) => {\n g.startsWith(\"usable\") ? u() : g === \"output-restricted\" ? f(new Ae({\n type: U.KEY_SYSTEM_ERROR,\n details: L.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,\n fatal: !1\n }, \"HDCP level output restricted\")) : g === \"internal-error\" ? f(new Ae({\n type: U.KEY_SYSTEM_ERROR,\n details: L.KEY_SYSTEM_STATUS_INTERNAL_ERROR,\n fatal: !0\n }, `key status changed to \"${g}\"`)) : g === \"expired\" ? f(new Error(\"key expired while generating request\")) : this.warn(`unhandled key status change \"${g}\"`);\n });\n });\n return e.mediaKeysSession.generateRequest(t, s).then(() => {\n var u;\n this.log(`Request generated for key-session \"${(u = e.mediaKeysSession) == null ? void 0 : u.sessionId}\" keyId: ${h}`);\n }).catch((u) => {\n throw new Ae({\n type: U.KEY_SYSTEM_ERROR,\n details: L.KEY_SYSTEM_NO_SESSION,\n error: u,\n fatal: !1\n }, `Error generating key-session request: ${u}`);\n }).then(() => d).catch((u) => {\n throw c.removeAllListeners(), this.removeSession(e), u;\n }).then(() => (c.removeAllListeners(), e));\n }\n onKeyStatusChange(e) {\n e.mediaKeysSession.keyStatuses.forEach((t, s) => {\n this.log(`key status change \"${t}\" for keyStatuses keyId: ${Pe.hexDump(\"buffer\" in s ? new Uint8Array(s.buffer, s.byteOffset, s.byteLength) : new Uint8Array(s))} session keyId: ${Pe.hexDump(new Uint8Array(e.decryptdata.keyId || []))} uri: ${e.decryptdata.uri}`), e.keyStatus = t;\n });\n }\n fetchServerCertificate(e) {\n const t = this.config, s = t.loader, i = new s(t), r = this.getServerCertificateUrl(e);\n return r ? (this.log(`Fetching serverCertificate for \"${e}\"`), new Promise((n, o) => {\n const l = {\n responseType: \"arraybuffer\",\n url: r\n }, h = t.certLoadPolicy.default, c = {\n loadPolicy: h,\n timeout: h.maxLoadTimeMs,\n maxRetry: 0,\n retryDelay: 0,\n maxRetryDelay: 0\n }, d = {\n onSuccess: (u, f, g, p) => {\n n(u.data);\n },\n onError: (u, f, g, p) => {\n o(new Ae({\n type: U.KEY_SYSTEM_ERROR,\n details: L.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,\n fatal: !0,\n networkDetails: g,\n response: xe({\n url: l.url,\n data: void 0\n }, u)\n }, `\"${e}\" certificate request failed (${r}). Status: ${u.code} (${u.text})`));\n },\n onTimeout: (u, f, g) => {\n o(new Ae({\n type: U.KEY_SYSTEM_ERROR,\n details: L.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,\n fatal: !0,\n networkDetails: g,\n response: {\n url: l.url,\n data: void 0\n }\n }, `\"${e}\" certificate request timed out (${r})`));\n },\n onAbort: (u, f, g) => {\n o(new Error(\"aborted\"));\n }\n };\n i.load(l, c, d);\n })) : Promise.resolve();\n }\n setMediaKeysServerCertificate(e, t, s) {\n return new Promise((i, r) => {\n e.setServerCertificate(s).then((n) => {\n this.log(`setServerCertificate ${n ? \"success\" : \"not supported by CDM\"} (${s == null ? void 0 : s.byteLength}) on \"${t}\"`), i(e);\n }).catch((n) => {\n r(new Ae({\n type: U.KEY_SYSTEM_ERROR,\n details: L.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,\n error: n,\n fatal: !0\n }, n.message));\n });\n });\n }\n renewLicense(e, t) {\n return this.requestLicense(e, new Uint8Array(t)).then((s) => this.updateKeySession(e, new Uint8Array(s)).catch((i) => {\n throw new Ae({\n type: U.KEY_SYSTEM_ERROR,\n details: L.KEY_SYSTEM_SESSION_UPDATE_FAILED,\n error: i,\n fatal: !0\n }, i.message);\n }));\n }\n setupLicenseXHR(e, t, s, i) {\n const r = this.config.licenseXhrSetup;\n return r ? Promise.resolve().then(() => {\n if (!s.decryptdata)\n throw new Error(\"Key removed\");\n return r.call(this.hls, e, t, s, i);\n }).catch((n) => {\n if (!s.decryptdata)\n throw n;\n return e.open(\"POST\", t, !0), r.call(this.hls, e, t, s, i);\n }).then((n) => (e.readyState || e.open(\"POST\", t, !0), {\n xhr: e,\n licenseChallenge: n || i\n })) : (e.open(\"POST\", t, !0), Promise.resolve({\n xhr: e,\n licenseChallenge: i\n }));\n }\n requestLicense(e, t) {\n const s = this.config.keyLoadPolicy.default;\n return new Promise((i, r) => {\n const n = this.getLicenseServerUrl(e.keySystem);\n this.log(`Sending license request to URL: ${n}`);\n const o = new XMLHttpRequest();\n o.responseType = \"arraybuffer\", o.onreadystatechange = () => {\n if (!this.hls || !e.mediaKeysSession)\n return r(new Error(\"invalid state\"));\n if (o.readyState === 4)\n if (o.status === 200) {\n this._requestLicenseFailureCount = 0;\n let l = o.response;\n this.log(`License received ${l instanceof ArrayBuffer ? l.byteLength : l}`);\n const h = this.config.licenseResponseCallback;\n if (h)\n try {\n l = h.call(this.hls, o, n, e);\n } catch (c) {\n this.error(c);\n }\n i(l);\n } else {\n const l = s.errorRetry, h = l ? l.maxNumRetry : 0;\n if (this._requestLicenseFailureCount++, this._requestLicenseFailureCount > h || o.status >= 400 && o.status < 500)\n r(new Ae({\n type: U.KEY_SYSTEM_ERROR,\n details: L.KEY_SYSTEM_LICENSE_REQUEST_FAILED,\n fatal: !0,\n networkDetails: o,\n response: {\n url: n,\n data: void 0,\n code: o.status,\n text: o.statusText\n }\n }, `License Request XHR failed (${n}). Status: ${o.status} (${o.statusText})`));\n else {\n const c = h - this._requestLicenseFailureCount + 1;\n this.warn(`Retrying license request, ${c} attempts left`), this.requestLicense(e, t).then(i, r);\n }\n }\n }, e.licenseXhr && e.licenseXhr.readyState !== XMLHttpRequest.DONE && e.licenseXhr.abort(), e.licenseXhr = o, this.setupLicenseXHR(o, n, e, t).then(({\n xhr: l,\n licenseChallenge: h\n }) => {\n l.send(h);\n });\n });\n }\n onMediaAttached(e, t) {\n if (!this.config.emeEnabled)\n return;\n const s = t.media;\n this.media = s, s.addEventListener(\"encrypted\", this.onMediaEncrypted), s.addEventListener(\"waitingforkey\", this.onWaitingForKey);\n }\n onMediaDetached() {\n const e = this.media, t = this.mediaKeySessions;\n e && (e.removeEventListener(\"encrypted\", this.onMediaEncrypted), e.removeEventListener(\"waitingforkey\", this.onWaitingForKey), this.media = null), this._requestLicenseFailureCount = 0, this.setMediaKeysQueue = [], this.mediaKeySessions = [], this.keyIdToKeySessionPromise = {}, gt.clearKeyUriToKeyIdMap();\n const s = t.length;\n nt.CDMCleanupPromise = Promise.all(t.map((i) => this.removeSession(i)).concat(e == null ? void 0 : e.setMediaKeys(null).catch((i) => {\n this.log(`Could not clear media keys: ${i}. media.src: ${e == null ? void 0 : e.src}`);\n }))).then(() => {\n s && (this.log(\"finished closing key sessions and clearing media keys\"), t.length = 0);\n }).catch((i) => {\n this.log(`Could not close sessions and clear media keys: ${i}. media.src: ${e == null ? void 0 : e.src}`);\n });\n }\n onManifestLoading() {\n this.keyFormatPromise = null;\n }\n onManifestLoaded(e, {\n sessionKeys: t\n }) {\n if (!(!t || !this.config.emeEnabled) && !this.keyFormatPromise) {\n const s = t.reduce((i, r) => (i.indexOf(r.keyFormat) === -1 && i.push(r.keyFormat), i), []);\n this.log(`Selecting key-system from session-keys ${s.join(\", \")}`), this.keyFormatPromise = this.getKeyFormatPromise(s);\n }\n }\n removeSession(e) {\n const {\n mediaKeysSession: t,\n licenseXhr: s\n } = e;\n if (t) {\n this.log(`Remove licenses and keys and close session ${t.sessionId}`), t.onmessage = null, t.onkeystatuseschange = null, s && s.readyState !== XMLHttpRequest.DONE && s.abort(), e.mediaKeysSession = e.decryptdata = e.licenseXhr = void 0;\n const i = this.mediaKeySessions.indexOf(e);\n return i > -1 && this.mediaKeySessions.splice(i, 1), t.remove().catch((r) => {\n this.log(`Could not remove session: ${r}`);\n }).then(() => t.close()).catch((r) => {\n this.log(`Could not close session: ${r}`);\n });\n }\n }\n}\nnt.CDMCleanupPromise = void 0;\nclass Ae extends Error {\n constructor(e, t) {\n super(t), this.data = void 0, e.error || (e.error = new Error(t)), this.data = e, e.err = e.error;\n }\n}\nconst pl = 1;\nvar ye = {\n MANIFEST: \"m\",\n AUDIO: \"a\",\n VIDEO: \"v\",\n MUXED: \"av\",\n INIT: \"i\",\n CAPTION: \"c\",\n TIMED_TEXT: \"tt\",\n KEY: \"k\",\n OTHER: \"o\"\n};\nconst yl = \"h\";\nclass Ke {\n // eslint-disable-line no-restricted-globals\n // eslint-disable-line no-restricted-globals\n constructor(e) {\n this.hls = void 0, this.config = void 0, this.media = void 0, this.sid = void 0, this.cid = void 0, this.useHeaders = !1, this.initialized = !1, this.starved = !1, this.buffering = !0, this.audioBuffer = void 0, this.videoBuffer = void 0, this.onWaiting = () => {\n this.initialized && (this.starved = !0), this.buffering = !0;\n }, this.onPlaying = () => {\n this.initialized || (this.initialized = !0), this.buffering = !1;\n }, this.applyPlaylistData = (i) => {\n try {\n this.apply(i, {\n ot: ye.MANIFEST,\n su: !this.initialized\n });\n } catch (r) {\n x.warn(\"Could not generate manifest CMCD data.\", r);\n }\n }, this.applyFragmentData = (i) => {\n try {\n const r = i.frag, n = this.hls.levels[r.level], o = this.getObjectType(r), l = {\n d: r.duration * 1e3,\n ot: o\n };\n (o === ye.VIDEO || o === ye.AUDIO || o == ye.MUXED) && (l.br = n.bitrate / 1e3, l.tb = this.getTopBandwidth(o) / 1e3, l.bl = this.getBufferLength(o)), this.apply(i, l);\n } catch (r) {\n x.warn(\"Could not generate segment CMCD data.\", r);\n }\n }, this.hls = e;\n const t = this.config = e.config, {\n cmcd: s\n } = t;\n s != null && (t.pLoader = this.createPlaylistLoader(), t.fLoader = this.createFragmentLoader(), this.sid = s.sessionId || Ke.uuid(), this.cid = s.contentId, this.useHeaders = s.useHeaders === !0, this.registerListeners());\n }\n registerListeners() {\n const e = this.hls;\n e.on(m.MEDIA_ATTACHED, this.onMediaAttached, this), e.on(m.MEDIA_DETACHED, this.onMediaDetached, this), e.on(m.BUFFER_CREATED, this.onBufferCreated, this);\n }\n unregisterListeners() {\n const e = this.hls;\n e.off(m.MEDIA_ATTACHED, this.onMediaAttached, this), e.off(m.MEDIA_DETACHED, this.onMediaDetached, this), e.off(m.BUFFER_CREATED, this.onBufferCreated, this);\n }\n destroy() {\n this.unregisterListeners(), this.onMediaDetached(), this.hls = this.config = this.audioBuffer = this.videoBuffer = null;\n }\n onMediaAttached(e, t) {\n this.media = t.media, this.media.addEventListener(\"waiting\", this.onWaiting), this.media.addEventListener(\"playing\", this.onPlaying);\n }\n onMediaDetached() {\n this.media && (this.media.removeEventListener(\"waiting\", this.onWaiting), this.media.removeEventListener(\"playing\", this.onPlaying), this.media = null);\n }\n onBufferCreated(e, t) {\n var s, i;\n this.audioBuffer = (s = t.tracks.audio) == null ? void 0 : s.buffer, this.videoBuffer = (i = t.tracks.video) == null ? void 0 : i.buffer;\n }\n /**\n * Create baseline CMCD data\n */\n createData() {\n var e;\n return {\n v: pl,\n sf: yl,\n sid: this.sid,\n cid: this.cid,\n pr: (e = this.media) == null ? void 0 : e.playbackRate,\n mtp: this.hls.bandwidthEstimate / 1e3\n };\n }\n /**\n * Apply CMCD data to a request.\n */\n apply(e, t = {}) {\n ne(t, this.createData());\n const s = t.ot === ye.INIT || t.ot === ye.VIDEO || t.ot === ye.MUXED;\n if (this.starved && s && (t.bs = !0, t.su = !0, this.starved = !1), t.su == null && (t.su = this.buffering), this.useHeaders) {\n const i = Ke.toHeaders(t);\n if (!Object.keys(i).length)\n return;\n e.headers || (e.headers = {}), ne(e.headers, i);\n } else {\n const i = Ke.toQuery(t);\n if (!i)\n return;\n e.url = Ke.appendQueryToUri(e.url, i);\n }\n }\n /**\n * The CMCD object type.\n */\n getObjectType(e) {\n const {\n type: t\n } = e;\n if (t === \"subtitle\")\n return ye.TIMED_TEXT;\n if (e.sn === \"initSegment\")\n return ye.INIT;\n if (t === \"audio\")\n return ye.AUDIO;\n if (t === \"main\")\n return this.hls.audioTracks.length ? ye.VIDEO : ye.MUXED;\n }\n /**\n * Get the highest bitrate.\n */\n getTopBandwidth(e) {\n let t = 0, s;\n const i = this.hls;\n if (e === ye.AUDIO)\n s = i.audioTracks;\n else {\n const r = i.maxAutoLevel, n = r > -1 ? r + 1 : i.levels.length;\n s = i.levels.slice(0, n);\n }\n for (const r of s)\n r.bitrate > t && (t = r.bitrate);\n return t > 0 ? t : NaN;\n }\n /**\n * Get the buffer length for a media type in milliseconds\n */\n getBufferLength(e) {\n const t = this.hls.media, s = e === ye.AUDIO ? this.audioBuffer : this.videoBuffer;\n return !s || !t ? NaN : J.bufferInfo(s, t.currentTime, this.config.maxBufferHole).len * 1e3;\n }\n /**\n * Create a playlist loader\n */\n createPlaylistLoader() {\n const {\n pLoader: e\n } = this.config, t = this.applyPlaylistData, s = e || this.config.loader;\n return class {\n constructor(r) {\n this.loader = void 0, this.loader = new s(r);\n }\n get stats() {\n return this.loader.stats;\n }\n get context() {\n return this.loader.context;\n }\n destroy() {\n this.loader.destroy();\n }\n abort() {\n this.loader.abort();\n }\n load(r, n, o) {\n t(r), this.loader.load(r, n, o);\n }\n };\n }\n /**\n * Create a playlist loader\n */\n createFragmentLoader() {\n const {\n fLoader: e\n } = this.config, t = this.applyFragmentData, s = e || this.config.loader;\n return class {\n constructor(r) {\n this.loader = void 0, this.loader = new s(r);\n }\n get stats() {\n return this.loader.stats;\n }\n get context() {\n return this.loader.context;\n }\n destroy() {\n this.loader.destroy();\n }\n abort() {\n this.loader.abort();\n }\n load(r, n, o) {\n t(r), this.loader.load(r, n, o);\n }\n };\n }\n /**\n * Generate a random v4 UUI\n *\n * @returns {string}\n */\n static uuid() {\n const e = URL.createObjectURL(new Blob()), t = e.toString();\n return URL.revokeObjectURL(e), t.slice(t.lastIndexOf(\"/\") + 1);\n }\n /**\n * Serialize a CMCD data object according to the rules defined in the\n * section 3.2 of\n * [CTA-5004](https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5004-final.pdf).\n */\n static serialize(e) {\n const t = [], s = (h) => !Number.isNaN(h) && h != null && h !== \"\" && h !== !1, i = (h) => Math.round(h), r = (h) => i(h / 100) * 100, o = {\n br: i,\n d: i,\n bl: r,\n dl: r,\n mtp: r,\n nor: (h) => encodeURIComponent(h),\n rtp: r,\n tb: i\n }, l = Object.keys(e || {}).sort();\n for (const h of l) {\n let c = e[h];\n if (!s(c) || h === \"v\" && c === 1 || h == \"pr\" && c === 1)\n continue;\n const d = o[h];\n d && (c = d(c));\n const u = typeof c;\n let f;\n h === \"ot\" || h === \"sf\" || h === \"st\" ? f = `${h}=${c}` : u === \"boolean\" ? f = h : u === \"number\" ? f = `${h}=${c}` : f = `${h}=${JSON.stringify(c)}`, t.push(f);\n }\n return t.join(\",\");\n }\n /**\n * Convert a CMCD data object to request headers according to the rules\n * defined in the section 2.1 and 3.2 of\n * [CTA-5004](https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5004-final.pdf).\n */\n static toHeaders(e) {\n const t = Object.keys(e), s = {}, i = [\"Object\", \"Request\", \"Session\", \"Status\"], r = [{}, {}, {}, {}], n = {\n br: 0,\n d: 0,\n ot: 0,\n tb: 0,\n bl: 1,\n dl: 1,\n mtp: 1,\n nor: 1,\n nrr: 1,\n su: 1,\n cid: 2,\n pr: 2,\n sf: 2,\n sid: 2,\n st: 2,\n v: 2,\n bs: 3,\n rtp: 3\n };\n for (const o of t) {\n const l = n[o] != null ? n[o] : 1;\n r[l][o] = e[o];\n }\n for (let o = 0; o < r.length; o++) {\n const l = Ke.serialize(r[o]);\n l && (s[`CMCD-${i[o]}`] = l);\n }\n return s;\n }\n /**\n * Convert a CMCD data object to query args according to the rules\n * defined in the section 2.2 and 3.2 of\n * [CTA-5004](https://cdn.cta.tech/cta/media/media/resources/standards/pdfs/cta-5004-final.pdf).\n */\n static toQuery(e) {\n return `CMCD=${encodeURIComponent(Ke.serialize(e))}`;\n }\n /**\n * Append query args to a uri.\n */\n static appendQueryToUri(e, t) {\n if (!t)\n return e;\n const s = e.includes(\"?\") ? \"&\" : \"?\";\n return `${e}${s}${t}`;\n }\n}\nconst vl = 3e5;\nclass Tl {\n constructor(e) {\n this.hls = void 0, this.log = void 0, this.loader = null, this.uri = null, this.pathwayId = \".\", this.pathwayPriority = null, this.timeToLoad = 300, this.reloadTimer = -1, this.updated = 0, this.started = !1, this.enabled = !0, this.levels = null, this.audioTracks = null, this.subtitleTracks = null, this.penalizedPathways = {}, this.hls = e, this.log = x.log.bind(x, \"[content-steering]:\"), this.registerListeners();\n }\n registerListeners() {\n const e = this.hls;\n e.on(m.MANIFEST_LOADING, this.onManifestLoading, this), e.on(m.MANIFEST_LOADED, this.onManifestLoaded, this), e.on(m.MANIFEST_PARSED, this.onManifestParsed, this), e.on(m.ERROR, this.onError, this);\n }\n unregisterListeners() {\n const e = this.hls;\n e && (e.off(m.MANIFEST_LOADING, this.onManifestLoading, this), e.off(m.MANIFEST_LOADED, this.onManifestLoaded, this), e.off(m.MANIFEST_PARSED, this.onManifestParsed, this), e.off(m.ERROR, this.onError, this));\n }\n startLoad() {\n if (this.started = !0, self.clearTimeout(this.reloadTimer), this.enabled && this.uri)\n if (this.updated) {\n const e = Math.max(this.timeToLoad * 1e3 - (performance.now() - this.updated), 0);\n this.scheduleRefresh(this.uri, e);\n } else\n this.loadSteeringManifest(this.uri);\n }\n stopLoad() {\n this.started = !1, this.loader && (this.loader.destroy(), this.loader = null), self.clearTimeout(this.reloadTimer);\n }\n destroy() {\n this.unregisterListeners(), this.stopLoad(), this.hls = null, this.levels = this.audioTracks = this.subtitleTracks = null;\n }\n removeLevel(e) {\n const t = this.levels;\n t && (this.levels = t.filter((s) => s !== e));\n }\n onManifestLoading() {\n this.stopLoad(), this.enabled = !0, this.timeToLoad = 300, this.updated = 0, this.uri = null, this.pathwayId = \".\", this.levels = this.audioTracks = this.subtitleTracks = null;\n }\n onManifestLoaded(e, t) {\n const {\n contentSteering: s\n } = t;\n s !== null && (this.pathwayId = s.pathwayId, this.uri = s.uri, this.started && this.startLoad());\n }\n onManifestParsed(e, t) {\n this.audioTracks = t.audioTracks, this.subtitleTracks = t.subtitleTracks;\n }\n onError(e, t) {\n const {\n errorAction: s\n } = t;\n if ((s == null ? void 0 : s.action) === ge.SendAlternateToPenaltyBox && s.flags === Re.MoveAllAlternatesMatchingHost) {\n let i = this.pathwayPriority;\n const r = this.pathwayId;\n this.penalizedPathways[r] || (this.penalizedPathways[r] = performance.now()), !i && this.levels && (i = this.levels.reduce((n, o) => (n.indexOf(o.pathwayId) === -1 && n.push(o.pathwayId), n), [])), i && i.length > 1 && (this.updatePathwayPriority(i), s.resolved = this.pathwayId !== r);\n }\n }\n filterParsedLevels(e) {\n this.levels = e;\n let t = this.getLevelsForPathway(this.pathwayId);\n if (t.length === 0) {\n const s = e[0].pathwayId;\n this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to \"${s}\"`), t = this.getLevelsForPathway(s), this.pathwayId = s;\n }\n return t.length !== e.length ? (this.log(`Found ${t.length}/${e.length} levels in Pathway \"${this.pathwayId}\"`), t) : e;\n }\n getLevelsForPathway(e) {\n return this.levels === null ? [] : this.levels.filter((t) => e === t.pathwayId);\n }\n updatePathwayPriority(e) {\n this.pathwayPriority = e;\n let t;\n const s = this.penalizedPathways, i = performance.now();\n Object.keys(s).forEach((r) => {\n i - s[r] > vl && delete s[r];\n });\n for (let r = 0; r < e.length; r++) {\n const n = e[r];\n if (s[n])\n continue;\n if (n === this.pathwayId)\n return;\n const o = this.hls.nextLoadLevel, l = this.hls.levels[o];\n if (t = this.getLevelsForPathway(n), t.length > 0) {\n this.log(`Setting Pathway to \"${n}\"`), this.pathwayId = n, this.hls.trigger(m.LEVELS_UPDATED, {\n levels: t\n });\n const h = this.hls.levels[o];\n l && h && this.levels && (h.attrs[\"STABLE-VARIANT-ID\"] !== l.attrs[\"STABLE-VARIANT-ID\"] && h.bitrate !== l.bitrate && this.log(`Unstable Pathways change from bitrate ${l.bitrate} to ${h.bitrate}`), this.hls.nextLoadLevel = o);\n break;\n }\n }\n }\n clonePathways(e) {\n const t = this.levels;\n if (!t)\n return;\n const s = {}, i = {};\n e.forEach((r) => {\n const {\n ID: n,\n \"BASE-ID\": o,\n \"URI-REPLACEMENT\": l\n } = r;\n if (t.some((c) => c.pathwayId === n))\n return;\n const h = this.getLevelsForPathway(o).map((c) => {\n const d = ne({}, c);\n d.details = void 0, d.url = qr(c.uri, c.attrs[\"STABLE-VARIANT-ID\"], \"PER-VARIANT-URIS\", l);\n const u = new ee(c.attrs);\n u[\"PATHWAY-ID\"] = n;\n const f = u.AUDIO && `${u.AUDIO}_clone_${n}`, g = u.SUBTITLES && `${u.SUBTITLES}_clone_${n}`;\n f && (s[u.AUDIO] = f, u.AUDIO = f), g && (i[u.SUBTITLES] = g, u.SUBTITLES = g), d.attrs = u;\n const p = new mt(d);\n return Mt(p, \"audio\", f), Mt(p, \"text\", g), p;\n });\n t.push(...h), Hi(this.audioTracks, s, l, n), Hi(this.subtitleTracks, i, l, n);\n });\n }\n loadSteeringManifest(e) {\n const t = this.hls.config, s = t.loader;\n this.loader && this.loader.destroy(), this.loader = new s(t);\n let i;\n try {\n i = new self.URL(e);\n } catch {\n this.enabled = !1, this.log(`Failed to parse Steering Manifest URI: ${e}`);\n return;\n }\n if (i.protocol !== \"data:\") {\n const c = (this.hls.bandwidthEstimate || t.abrEwmaDefaultEstimate) | 0;\n i.searchParams.set(\"_HLS_pathway\", this.pathwayId), i.searchParams.set(\"_HLS_throughput\", \"\" + c);\n }\n const r = {\n responseType: \"json\",\n url: i.href\n }, n = t.steeringManifestLoadPolicy.default, o = n.errorRetry || n.timeoutRetry || {}, l = {\n loadPolicy: n,\n timeout: n.maxLoadTimeMs,\n maxRetry: o.maxNumRetry || 0,\n retryDelay: o.retryDelayMs || 0,\n maxRetryDelay: o.maxRetryDelayMs || 0\n }, h = {\n onSuccess: (c, d, u, f) => {\n this.log(`Loaded steering manifest: \"${i}\"`);\n const g = c.data;\n if (g.VERSION !== 1) {\n this.log(`Steering VERSION ${g.VERSION} not supported!`);\n return;\n }\n this.updated = performance.now(), this.timeToLoad = g.TTL;\n const {\n \"RELOAD-URI\": p,\n \"PATHWAY-CLONES\": y,\n \"PATHWAY-PRIORITY\": v\n } = g;\n if (p)\n try {\n this.uri = new self.URL(p, i).href;\n } catch {\n this.enabled = !1, this.log(`Failed to parse Steering Manifest RELOAD-URI: ${p}`);\n return;\n }\n this.scheduleRefresh(this.uri || u.url), y && this.clonePathways(y), v && this.updatePathwayPriority(v);\n },\n onError: (c, d, u, f) => {\n if (this.log(`Error loading steering manifest: ${c.code} ${c.text} (${d.url})`), this.stopLoad(), c.code === 410) {\n this.enabled = !1, this.log(`Steering manifest ${d.url} no longer available`);\n return;\n }\n let g = this.timeToLoad * 1e3;\n if (c.code === 429) {\n const p = this.loader;\n if (typeof (p == null ? void 0 : p.getResponseHeader) == \"function\") {\n const y = p.getResponseHeader(\"Retry-After\");\n y && (g = parseFloat(y) * 1e3);\n }\n this.log(`Steering manifest ${d.url} rate limited`);\n return;\n }\n this.scheduleRefresh(this.uri || d.url, g);\n },\n onTimeout: (c, d, u) => {\n this.log(`Timeout loading steering manifest (${d.url})`), this.scheduleRefresh(this.uri || d.url);\n }\n };\n this.log(`Requesting steering manifest: ${i}`), this.loader.load(r, l, h);\n }\n scheduleRefresh(e, t = this.timeToLoad * 1e3) {\n self.clearTimeout(this.reloadTimer), this.reloadTimer = self.setTimeout(() => {\n this.loadSteeringManifest(e);\n }, t);\n }\n}\nfunction Hi(a, e, t, s) {\n a && Object.keys(e).forEach((i) => {\n const r = a.filter((n) => n.groupId === i).map((n) => {\n const o = ne({}, n);\n return o.details = void 0, o.attrs = new ee(o.attrs), o.url = o.attrs.URI = qr(n.url, n.attrs[\"STABLE-RENDITION-ID\"], \"PER-RENDITION-URIS\", t), o.groupId = o.attrs[\"GROUP-ID\"] = e[i], o.attrs[\"PATHWAY-ID\"] = s, o;\n });\n a.push(...r);\n });\n}\nfunction qr(a, e, t, s) {\n const {\n HOST: i,\n PARAMS: r,\n [t]: n\n } = s;\n let o;\n e && (o = n == null ? void 0 : n[e], o && (a = o));\n const l = new self.URL(a);\n return i && !o && (l.host = i), r && Object.keys(r).sort().forEach((h) => {\n h && l.searchParams.set(h, r[h]);\n }), l.href;\n}\nconst xl = /^age:\\s*[\\d.]+\\s*$/im;\nclass Xr {\n constructor(e) {\n this.xhrSetup = void 0, this.requestTimeout = void 0, this.retryTimeout = void 0, this.retryDelay = void 0, this.config = null, this.callbacks = null, this.context = void 0, this.loader = null, this.stats = void 0, this.xhrSetup = e && e.xhrSetup || null, this.stats = new Gt(), this.retryDelay = 0;\n }\n destroy() {\n this.callbacks = null, this.abortInternal(), this.loader = null, this.config = null;\n }\n abortInternal() {\n const e = this.loader;\n self.clearTimeout(this.requestTimeout), self.clearTimeout(this.retryTimeout), e && (e.onreadystatechange = null, e.onprogress = null, e.readyState !== 4 && (this.stats.aborted = !0, e.abort()));\n }\n abort() {\n var e;\n this.abortInternal(), (e = this.callbacks) != null && e.onAbort && this.callbacks.onAbort(this.stats, this.context, this.loader);\n }\n load(e, t, s) {\n if (this.stats.loading.start)\n throw new Error(\"Loader can only be used once.\");\n this.stats.loading.start = self.performance.now(), this.context = e, this.config = t, this.callbacks = s, this.loadInternal();\n }\n loadInternal() {\n const {\n config: e,\n context: t\n } = this;\n if (!e)\n return;\n const s = this.loader = new self.XMLHttpRequest(), i = this.stats;\n i.loading.first = 0, i.loaded = 0, i.aborted = !1;\n const r = this.xhrSetup;\n r ? Promise.resolve().then(() => {\n if (!this.stats.aborted)\n return r(s, t.url);\n }).catch((n) => (s.open(\"GET\", t.url, !0), r(s, t.url))).then(() => {\n this.stats.aborted || this.openAndSendXhr(s, t, e);\n }).catch((n) => {\n this.callbacks.onError({\n code: s.status,\n text: n.message\n }, t, s, i);\n }) : this.openAndSendXhr(s, t, e);\n }\n openAndSendXhr(e, t, s) {\n e.readyState || e.open(\"GET\", t.url, !0);\n const i = this.context.headers, {\n maxTimeToFirstByteMs: r,\n maxLoadTimeMs: n\n } = s.loadPolicy;\n if (i)\n for (const o in i)\n e.setRequestHeader(o, i[o]);\n t.rangeEnd && e.setRequestHeader(\"Range\", \"bytes=\" + t.rangeStart + \"-\" + (t.rangeEnd - 1)), e.onreadystatechange = this.readystatechange.bind(this), e.onprogress = this.loadprogress.bind(this), e.responseType = t.responseType, self.clearTimeout(this.requestTimeout), s.timeout = r && M(r) ? r : n, this.requestTimeout = self.setTimeout(this.loadtimeout.bind(this), s.timeout), e.send();\n }\n readystatechange() {\n const {\n context: e,\n loader: t,\n stats: s\n } = this;\n if (!e || !t)\n return;\n const i = t.readyState, r = this.config;\n if (!s.aborted && i >= 2 && (s.loading.first === 0 && (s.loading.first = Math.max(self.performance.now(), s.loading.start), r.timeout !== r.loadPolicy.maxLoadTimeMs && (self.clearTimeout(this.requestTimeout), r.timeout = r.loadPolicy.maxLoadTimeMs, this.requestTimeout = self.setTimeout(this.loadtimeout.bind(this), r.loadPolicy.maxLoadTimeMs - (s.loading.first - s.loading.start)))), i === 4)) {\n self.clearTimeout(this.requestTimeout), t.onreadystatechange = null, t.onprogress = null;\n const n = t.status, o = t.responseType !== \"text\";\n if (n >= 200 && n < 300 && (o && t.response || t.responseText !== null)) {\n s.loading.end = Math.max(self.performance.now(), s.loading.first);\n const l = o ? t.response : t.responseText, h = t.responseType === \"arraybuffer\" ? l.byteLength : l.length;\n if (s.loaded = s.total = h, s.bwEstimate = s.total * 8e3 / (s.loading.end - s.loading.first), !this.callbacks)\n return;\n const c = this.callbacks.onProgress;\n if (c && c(s, e, l, t), !this.callbacks)\n return;\n const d = {\n url: t.responseURL,\n data: l,\n code: n\n };\n this.callbacks.onSuccess(d, s, e, t);\n } else {\n const l = r.loadPolicy.errorRetry, h = s.retry;\n Ft(l, h, !1, n) ? this.retry(l) : (x.error(`${n} while loading ${e.url}`), this.callbacks.onError({\n code: n,\n text: t.statusText\n }, e, t, s));\n }\n }\n }\n loadtimeout() {\n var e;\n const t = (e = this.config) == null ? void 0 : e.loadPolicy.timeoutRetry, s = this.stats.retry;\n if (Ft(t, s, !0))\n this.retry(t);\n else {\n x.warn(`timeout while loading ${this.context.url}`);\n const i = this.callbacks;\n i && (this.abortInternal(), i.onTimeout(this.stats, this.context, this.loader));\n }\n }\n retry(e) {\n const {\n context: t,\n stats: s\n } = this;\n this.retryDelay = ks(e, s.retry), s.retry++, x.warn(`${status ? \"HTTP Status \" + status : \"Timeout\"} while loading ${t.url}, retrying ${s.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`), this.abortInternal(), this.loader = null, self.clearTimeout(this.retryTimeout), this.retryTimeout = self.setTimeout(this.loadInternal.bind(this), this.retryDelay);\n }\n loadprogress(e) {\n const t = this.stats;\n t.loaded = e.loaded, e.lengthComputable && (t.total = e.total);\n }\n getCacheAge() {\n let e = null;\n if (this.loader && xl.test(this.loader.getAllResponseHeaders())) {\n const t = this.loader.getResponseHeader(\"age\");\n e = t ? parseFloat(t) : null;\n }\n return e;\n }\n getResponseHeader(e) {\n return this.loader && new RegExp(`^${e}:\\\\s*[\\\\d.]+\\\\s*$`, \"im\").test(this.loader.getAllResponseHeaders()) ? this.loader.getResponseHeader(e) : null;\n }\n}\nfunction El() {\n if (\n // @ts-ignore\n self.fetch && self.AbortController && self.ReadableStream && self.Request\n )\n try {\n return new self.ReadableStream({}), !0;\n } catch {\n }\n return !1;\n}\nconst Sl = /(\\d+)-(\\d+)\\/(\\d+)/;\nclass Ki {\n constructor(e) {\n this.fetchSetup = void 0, this.requestTimeout = void 0, this.request = void 0, this.response = void 0, this.controller = void 0, this.context = void 0, this.config = null, this.callbacks = null, this.stats = void 0, this.loader = null, this.fetchSetup = e.fetchSetup || Rl, this.controller = new self.AbortController(), this.stats = new Gt();\n }\n destroy() {\n this.loader = this.callbacks = null, this.abortInternal();\n }\n abortInternal() {\n const e = this.response;\n e != null && e.ok || (this.stats.aborted = !0, this.controller.abort());\n }\n abort() {\n var e;\n this.abortInternal(), (e = this.callbacks) != null && e.onAbort && this.callbacks.onAbort(this.stats, this.context, this.response);\n }\n load(e, t, s) {\n const i = this.stats;\n if (i.loading.start)\n throw new Error(\"Loader can only be used once.\");\n i.loading.start = self.performance.now();\n const r = bl(e, this.controller.signal), n = s.onProgress, o = e.responseType === \"arraybuffer\", l = o ? \"byteLength\" : \"length\", {\n maxTimeToFirstByteMs: h,\n maxLoadTimeMs: c\n } = t.loadPolicy;\n this.context = e, this.config = t, this.callbacks = s, this.request = this.fetchSetup(e, r), self.clearTimeout(this.requestTimeout), t.timeout = h && M(h) ? h : c, this.requestTimeout = self.setTimeout(() => {\n this.abortInternal(), s.onTimeout(i, e, this.response);\n }, t.timeout), self.fetch(this.request).then((d) => {\n this.response = this.loader = d;\n const u = Math.max(self.performance.now(), i.loading.start);\n if (self.clearTimeout(this.requestTimeout), t.timeout = c, this.requestTimeout = self.setTimeout(() => {\n this.abortInternal(), s.onTimeout(i, e, this.response);\n }, c - (u - i.loading.start)), !d.ok) {\n const {\n status: f,\n statusText: g\n } = d;\n throw new Il(g || \"fetch, bad network response\", f, d);\n }\n return i.loading.first = u, i.total = Al(d.headers) || i.total, n && M(t.highWaterMark) ? this.loadProgressively(d, i, e, t.highWaterMark, n) : o ? d.arrayBuffer() : e.responseType === \"json\" ? d.json() : d.text();\n }).then((d) => {\n const {\n response: u\n } = this;\n self.clearTimeout(this.requestTimeout), i.loading.end = Math.max(self.performance.now(), i.loading.first);\n const f = d[l];\n f && (i.loaded = i.total = f);\n const g = {\n url: u.url,\n data: d,\n code: u.status\n };\n n && !M(t.highWaterMark) && n(i, e, d, u), s.onSuccess(g, i, e, u);\n }).catch((d) => {\n if (self.clearTimeout(this.requestTimeout), i.aborted)\n return;\n const u = d && d.code || 0, f = d ? d.message : null;\n s.onError({\n code: u,\n text: f\n }, e, d ? d.details : null, i);\n });\n }\n getCacheAge() {\n let e = null;\n if (this.response) {\n const t = this.response.headers.get(\"age\");\n e = t ? parseFloat(t) : null;\n }\n return e;\n }\n getResponseHeader(e) {\n return this.response ? this.response.headers.get(e) : null;\n }\n loadProgressively(e, t, s, i = 0, r) {\n const n = new Br(), o = e.body.getReader(), l = () => o.read().then((h) => {\n if (h.done)\n return n.dataLength && r(t, s, n.flush(), e), Promise.resolve(new ArrayBuffer(0));\n const c = h.value, d = c.length;\n return t.loaded += d, d < i || n.dataLength ? (n.push(c), n.dataLength >= i && r(t, s, n.flush(), e)) : r(t, s, c, e), l();\n }).catch(() => Promise.reject());\n return l();\n }\n}\nfunction bl(a, e) {\n const t = {\n method: \"GET\",\n mode: \"cors\",\n credentials: \"same-origin\",\n signal: e,\n headers: new self.Headers(ne({}, a.headers))\n };\n return a.rangeEnd && t.headers.set(\"Range\", \"bytes=\" + a.rangeStart + \"-\" + String(a.rangeEnd - 1)), t;\n}\nfunction Ll(a) {\n const e = Sl.exec(a);\n if (e)\n return parseInt(e[2]) - parseInt(e[1]) + 1;\n}\nfunction Al(a) {\n const e = a.get(\"Content-Range\");\n if (e) {\n const s = Ll(e);\n if (M(s))\n return s;\n }\n const t = a.get(\"Content-Length\");\n if (t)\n return parseInt(t);\n}\nfunction Rl(a, e) {\n return new self.Request(a.url, e);\n}\nclass Il extends Error {\n constructor(e, t, s) {\n super(e), this.code = void 0, this.details = void 0, this.code = t, this.details = s;\n }\n}\nconst wl = /\\s/, Cl = {\n newCue(a, e, t, s) {\n const i = [];\n let r, n, o, l, h;\n const c = self.VTTCue || self.TextTrackCue;\n for (let u = 0; u < s.rows.length; u++)\n if (r = s.rows[u], o = !0, l = 0, h = \"\", !r.isEmpty()) {\n var d;\n for (let p = 0; p < r.chars.length; p++)\n wl.test(r.chars[p].uchar) && o ? l++ : (h += r.chars[p].uchar, o = !1);\n r.cueStartTime = e, e === t && (t += 1e-4), l >= 16 ? l-- : l++;\n const f = Wr(h.trim()), g = Hs(e, t, f);\n a != null && (d = a.cues) != null && d.getCueById(g) || (n = new c(e, t, f), n.id = g, n.line = u + 1, n.align = \"left\", n.position = 10 + Math.min(80, Math.floor(l * 8 / 32) * 10), i.push(n));\n }\n return a && i.length && (i.sort((u, f) => u.line === \"auto\" || f.line === \"auto\" ? 0 : u.line > 8 && f.line > 8 ? f.line - u.line : u.line - f.line), i.forEach((u) => yr(a, u))), i;\n }\n}, Dl = {\n maxTimeToFirstByteMs: 8e3,\n maxLoadTimeMs: 2e4,\n timeoutRetry: null,\n errorRetry: null\n}, _l = xe(xe({\n autoStartLoad: !0,\n // used by stream-controller\n startPosition: -1,\n // used by stream-controller\n defaultAudioCodec: void 0,\n // used by stream-controller\n debug: !1,\n // used by logger\n capLevelOnFPSDrop: !1,\n // used by fps-controller\n capLevelToPlayerSize: !1,\n // used by cap-level-controller\n ignoreDevicePixelRatio: !1,\n // used by cap-level-controller\n initialLiveManifestSize: 1,\n // used by stream-controller\n maxBufferLength: 30,\n // used by stream-controller\n backBufferLength: 1 / 0,\n // used by buffer-controller\n maxBufferSize: 60 * 1e3 * 1e3,\n // used by stream-controller\n maxBufferHole: 0.1,\n // used by stream-controller\n highBufferWatchdogPeriod: 2,\n // used by stream-controller\n nudgeOffset: 0.1,\n // used by stream-controller\n nudgeMaxRetry: 3,\n // used by stream-controller\n maxFragLookUpTolerance: 0.25,\n // used by stream-controller\n liveSyncDurationCount: 3,\n // used by latency-controller\n liveMaxLatencyDurationCount: 1 / 0,\n // used by latency-controller\n liveSyncDuration: void 0,\n // used by latency-controller\n liveMaxLatencyDuration: void 0,\n // used by latency-controller\n maxLiveSyncPlaybackRate: 1,\n // used by latency-controller\n liveDurationInfinity: !1,\n // used by buffer-controller\n /**\n * @deprecated use backBufferLength\n */\n liveBackBufferLength: null,\n // used by buffer-controller\n maxMaxBufferLength: 600,\n // used by stream-controller\n enableWorker: !0,\n // used by transmuxer\n workerPath: null,\n // used by transmuxer\n enableSoftwareAES: !0,\n // used by decrypter\n startLevel: void 0,\n // used by level-controller\n startFragPrefetch: !1,\n // used by stream-controller\n fpsDroppedMonitoringPeriod: 5e3,\n // used by fps-controller\n fpsDroppedMonitoringThreshold: 0.2,\n // used by fps-controller\n appendErrorMaxRetry: 3,\n // used by buffer-controller\n loader: Xr,\n // loader: FetchLoader,\n fLoader: void 0,\n // used by fragment-loader\n pLoader: void 0,\n // used by playlist-loader\n xhrSetup: void 0,\n // used by xhr-loader\n licenseXhrSetup: void 0,\n // used by eme-controller\n licenseResponseCallback: void 0,\n // used by eme-controller\n abrController: Fo,\n bufferController: Ko,\n capLevelController: Ks,\n errorController: Ra,\n fpsController: ml,\n stretchShortVideoTrack: !1,\n // used by mp4-remuxer\n maxAudioFramesDrift: 1,\n // used by mp4-remuxer\n forceKeyFrameOnDiscontinuity: !0,\n // used by ts-demuxer\n abrEwmaFastLive: 3,\n // used by abr-controller\n abrEwmaSlowLive: 9,\n // used by abr-controller\n abrEwmaFastVoD: 3,\n // used by abr-controller\n abrEwmaSlowVoD: 9,\n // used by abr-controller\n abrEwmaDefaultEstimate: 5e5,\n // 500 kbps // used by abr-controller\n abrBandWidthFactor: 0.95,\n // used by abr-controller\n abrBandWidthUpFactor: 0.7,\n // used by abr-controller\n abrMaxWithRealBitrate: !1,\n // used by abr-controller\n maxStarvationDelay: 4,\n // used by abr-controller\n maxLoadingDelay: 4,\n // used by abr-controller\n minAutoBitrate: 0,\n // used by hls\n emeEnabled: !1,\n // used by eme-controller\n widevineLicenseUrl: void 0,\n // used by eme-controller\n drmSystems: {},\n // used by eme-controller\n drmSystemOptions: {},\n // used by eme-controller\n requestMediaKeySystemAccessFunc: rr,\n // used by eme-controller\n testBandwidth: !0,\n progressive: !1,\n lowLatencyMode: !0,\n cmcd: void 0,\n enableDateRangeMetadataCues: !0,\n enableEmsgMetadataCues: !0,\n enableID3MetadataCues: !0,\n certLoadPolicy: {\n default: Dl\n },\n keyLoadPolicy: {\n default: {\n maxTimeToFirstByteMs: 8e3,\n maxLoadTimeMs: 2e4,\n timeoutRetry: {\n maxNumRetry: 1,\n retryDelayMs: 1e3,\n maxRetryDelayMs: 2e4,\n backoff: \"linear\"\n },\n errorRetry: {\n maxNumRetry: 8,\n retryDelayMs: 1e3,\n maxRetryDelayMs: 2e4,\n backoff: \"linear\"\n }\n }\n },\n manifestLoadPolicy: {\n default: {\n maxTimeToFirstByteMs: 1 / 0,\n maxLoadTimeMs: 2e4,\n timeoutRetry: {\n maxNumRetry: 2,\n retryDelayMs: 0,\n maxRetryDelayMs: 0\n },\n errorRetry: {\n maxNumRetry: 1,\n retryDelayMs: 1e3,\n maxRetryDelayMs: 8e3\n }\n }\n },\n playlistLoadPolicy: {\n default: {\n maxTimeToFirstByteMs: 1e4,\n maxLoadTimeMs: 2e4,\n timeoutRetry: {\n maxNumRetry: 2,\n retryDelayMs: 0,\n maxRetryDelayMs: 0\n },\n errorRetry: {\n maxNumRetry: 2,\n retryDelayMs: 1e3,\n maxRetryDelayMs: 8e3\n }\n }\n },\n fragLoadPolicy: {\n default: {\n maxTimeToFirstByteMs: 1e4,\n maxLoadTimeMs: 12e4,\n timeoutRetry: {\n maxNumRetry: 4,\n retryDelayMs: 0,\n maxRetryDelayMs: 0\n },\n errorRetry: {\n maxNumRetry: 6,\n retryDelayMs: 1e3,\n maxRetryDelayMs: 8e3\n }\n }\n },\n steeringManifestLoadPolicy: {\n default: {\n maxTimeToFirstByteMs: 1e4,\n maxLoadTimeMs: 2e4,\n timeoutRetry: {\n maxNumRetry: 2,\n retryDelayMs: 0,\n maxRetryDelayMs: 0\n },\n errorRetry: {\n maxNumRetry: 1,\n retryDelayMs: 1e3,\n maxRetryDelayMs: 8e3\n }\n }\n },\n // These default settings are deprecated in favor of the above policies\n // and are maintained for backwards compatibility\n manifestLoadingTimeOut: 1e4,\n manifestLoadingMaxRetry: 1,\n manifestLoadingRetryDelay: 1e3,\n manifestLoadingMaxRetryTimeout: 64e3,\n levelLoadingTimeOut: 1e4,\n levelLoadingMaxRetry: 4,\n levelLoadingRetryDelay: 1e3,\n levelLoadingMaxRetryTimeout: 64e3,\n fragLoadingTimeOut: 2e4,\n fragLoadingMaxRetry: 6,\n fragLoadingRetryDelay: 1e3,\n fragLoadingMaxRetryTimeout: 64e3\n}, kl()), {}, {\n subtitleStreamController: $o,\n subtitleTrackController: Vo,\n timelineController: ul,\n audioStreamController: No,\n audioTrackController: Uo,\n emeController: nt,\n cmcdController: Ke,\n contentSteeringController: Tl\n});\nfunction kl() {\n return {\n cueHandler: Cl,\n // used by timeline-controller\n enableWebVTT: !0,\n // used by timeline-controller\n enableIMSC1: !0,\n // used by timeline-controller\n enableCEA708Captions: !0,\n // used by timeline-controller\n captionsTextTrack1Label: \"English\",\n // used by timeline-controller\n captionsTextTrack1LanguageCode: \"en\",\n // used by timeline-controller\n captionsTextTrack2Label: \"Spanish\",\n // used by timeline-controller\n captionsTextTrack2LanguageCode: \"es\",\n // used by timeline-controller\n captionsTextTrack3Label: \"Unknown CC\",\n // used by timeline-controller\n captionsTextTrack3LanguageCode: \"\",\n // used by timeline-controller\n captionsTextTrack4Label: \"Unknown CC\",\n // used by timeline-controller\n captionsTextTrack4LanguageCode: \"\",\n // used by timeline-controller\n renderTextTracksNatively: !0\n };\n}\nfunction Pl(a, e) {\n if ((e.liveSyncDurationCount || e.liveMaxLatencyDurationCount) && (e.liveSyncDuration || e.liveMaxLatencyDuration))\n throw new Error(\"Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration\");\n if (e.liveMaxLatencyDurationCount !== void 0 && (e.liveSyncDurationCount === void 0 || e.liveMaxLatencyDurationCount <= e.liveSyncDurationCount))\n throw new Error('Illegal hls.js config: \"liveMaxLatencyDurationCount\" must be greater than \"liveSyncDurationCount\"');\n if (e.liveMaxLatencyDuration !== void 0 && (e.liveSyncDuration === void 0 || e.liveMaxLatencyDuration <= e.liveSyncDuration))\n throw new Error('Illegal hls.js config: \"liveMaxLatencyDuration\" must be greater than \"liveSyncDuration\"');\n const t = Ls(a), s = [\"manifest\", \"level\", \"frag\"], i = [\"TimeOut\", \"MaxRetry\", \"RetryDelay\", \"MaxRetryTimeout\"];\n return s.forEach((r) => {\n const n = `${r === \"level\" ? \"playlist\" : r}LoadPolicy`, o = e[n] === void 0, l = [];\n i.forEach((h) => {\n const c = `${r}Loading${h}`, d = e[c];\n if (d !== void 0 && o) {\n l.push(c);\n const u = t[n].default;\n switch (e[n] = {\n default: u\n }, h) {\n case \"TimeOut\":\n u.maxLoadTimeMs = d, u.maxTimeToFirstByteMs = d;\n break;\n case \"MaxRetry\":\n u.errorRetry.maxNumRetry = d, u.timeoutRetry.maxNumRetry = d;\n break;\n case \"RetryDelay\":\n u.errorRetry.retryDelayMs = d, u.timeoutRetry.retryDelayMs = d;\n break;\n case \"MaxRetryTimeout\":\n u.errorRetry.maxRetryDelayMs = d, u.timeoutRetry.maxRetryDelayMs = d;\n break;\n }\n }\n }), l.length && x.warn(`hls.js config: \"${l.join('\", \"')}\" setting(s) are deprecated, use \"${n}\": ${JSON.stringify(e[n])}`);\n }), xe(xe({}, t), e);\n}\nfunction Ls(a) {\n return a && typeof a == \"object\" ? Array.isArray(a) ? a.map(Ls) : Object.keys(a).reduce((e, t) => (e[t] = Ls(a[t]), e), {}) : a;\n}\nfunction Ol(a) {\n const e = a.loader;\n e !== Ki && e !== Xr ? (x.log(\"[config]: Custom loader detected, cannot enable progressive streaming\"), a.progressive = !1) : El() && (a.loader = Ki, a.progressive = !0, a.enableSoftwareAES = !0, x.log(\"[config]: Progressive streaming enabled, using FetchLoader\"));\n}\nclass Ge {\n /**\n * The runtime configuration used by the player. At instantiation this is combination of `hls.userConfig` merged over `Hls.DefaultConfig`.\n */\n /**\n * The configuration object provided on player instantiation.\n */\n /**\n * Get the video-dev/hls.js package version.\n */\n static get version() {\n return \"1.4.12\";\n }\n /**\n * Check if the required MediaSource Extensions are available.\n */\n static isSupported() {\n return Wa();\n }\n static get Events() {\n return m;\n }\n static get ErrorTypes() {\n return U;\n }\n static get ErrorDetails() {\n return L;\n }\n /**\n * Get the default configuration applied to new instances.\n */\n static get DefaultConfig() {\n return Ge.defaultConfig ? Ge.defaultConfig : _l;\n }\n /**\n * Replace the default configuration applied to new instances.\n */\n static set DefaultConfig(e) {\n Ge.defaultConfig = e;\n }\n /**\n * Creates an instance of an HLS client that can attach to exactly one `HTMLMediaElement`.\n * @param userConfig - Configuration options applied over `Hls.DefaultConfig`\n */\n constructor(e = {}) {\n this.config = void 0, this.userConfig = void 0, this.coreComponents = void 0, this.networkControllers = void 0, this._emitter = new Gs(), this._autoLevelCapping = void 0, this._maxHdcpLevel = null, this.abrController = void 0, this.bufferController = void 0, this.capLevelController = void 0, this.latencyController = void 0, this.levelController = void 0, this.streamController = void 0, this.audioTrackController = void 0, this.subtitleTrackController = void 0, this.emeController = void 0, this.cmcdController = void 0, this._media = null, this.url = null, yn(e.debug || !1, \"Hls instance\");\n const t = this.config = Pl(Ge.DefaultConfig, e);\n this.userConfig = e, this._autoLevelCapping = -1, t.progressive && Ol(t);\n const {\n abrController: s,\n bufferController: i,\n capLevelController: r,\n errorController: n,\n fpsController: o\n } = t, l = new n(this), h = this.abrController = new s(this), c = this.bufferController = new i(this), d = this.capLevelController = new r(this), u = new o(this), f = new oa(this), g = new ua(this), p = t.contentSteeringController, y = p ? new p(this) : null, v = this.levelController = new wa(this, y), E = new Ca(this), T = new _a(this.config), A = this.streamController = new Po(this, E, T);\n d.setStreamController(A), u.setStreamController(A);\n const b = [f, v, A];\n y && b.splice(1, 0, y), this.networkControllers = b;\n const D = [h, c, d, u, g, E];\n this.audioTrackController = this.createController(t.audioTrackController, b);\n const I = t.audioStreamController;\n I && b.push(new I(this, E, T)), this.subtitleTrackController = this.createController(t.subtitleTrackController, b);\n const C = t.subtitleStreamController;\n C && b.push(new C(this, E, T)), this.createController(t.timelineController, D), T.emeController = this.emeController = this.createController(t.emeController, D), this.cmcdController = this.createController(t.cmcdController, D), this.latencyController = this.createController(fa, D), this.coreComponents = D, b.push(l);\n const _ = l.onErrorOut;\n typeof _ == \"function\" && this.on(m.ERROR, _, l);\n }\n createController(e, t) {\n if (e) {\n const s = new e(this);\n return t && t.push(s), s;\n }\n return null;\n }\n // Delegate the EventEmitter through the public API of Hls.js\n on(e, t, s = this) {\n this._emitter.on(e, t, s);\n }\n once(e, t, s = this) {\n this._emitter.once(e, t, s);\n }\n removeAllListeners(e) {\n this._emitter.removeAllListeners(e);\n }\n off(e, t, s = this, i) {\n this._emitter.off(e, t, s, i);\n }\n listeners(e) {\n return this._emitter.listeners(e);\n }\n emit(e, t, s) {\n return this._emitter.emit(e, t, s);\n }\n trigger(e, t) {\n if (this.config.debug)\n return this.emit(e, e, t);\n try {\n return this.emit(e, e, t);\n } catch (s) {\n x.error(\"An internal error happened while handling event \" + e + '. Error message: \"' + s.message + '\". Here is a stacktrace:', s), this.trigger(m.ERROR, {\n type: U.OTHER_ERROR,\n details: L.INTERNAL_EXCEPTION,\n fatal: !1,\n event: e,\n error: s\n });\n }\n return !1;\n }\n listenerCount(e) {\n return this._emitter.listenerCount(e);\n }\n /**\n * Dispose of the instance\n */\n destroy() {\n x.log(\"destroy\"), this.trigger(m.DESTROYING, void 0), this.detachMedia(), this.removeAllListeners(), this._autoLevelCapping = -1, this.url = null, this.networkControllers.forEach((t) => t.destroy()), this.networkControllers.length = 0, this.coreComponents.forEach((t) => t.destroy()), this.coreComponents.length = 0;\n const e = this.config;\n e.xhrSetup = e.fetchSetup = void 0, this.userConfig = null;\n }\n /**\n * Attaches Hls.js to a media element\n */\n attachMedia(e) {\n x.log(\"attachMedia\"), this._media = e, this.trigger(m.MEDIA_ATTACHING, {\n media: e\n });\n }\n /**\n * Detach Hls.js from the media\n */\n detachMedia() {\n x.log(\"detachMedia\"), this.trigger(m.MEDIA_DETACHING, void 0), this._media = null;\n }\n /**\n * Set the source URL. Can be relative or absolute.\n */\n loadSource(e) {\n this.stopLoad();\n const t = this.media, s = this.url, i = this.url = Cs.buildAbsoluteURL(self.location.href, e, {\n alwaysNormalize: !0\n });\n x.log(`loadSource:${i}`), t && s && (s !== i || this.bufferController.hasSourceTypes()) && (this.detachMedia(), this.attachMedia(t)), this.trigger(m.MANIFEST_LOADING, {\n url: e\n });\n }\n /**\n * Start loading data from the stream source.\n * Depending on default config, client starts loading automatically when a source is set.\n *\n * @param startPosition - Set the start position to stream from.\n * Defaults to -1 (None: starts from earliest point)\n */\n startLoad(e = -1) {\n x.log(`startLoad(${e})`), this.networkControllers.forEach((t) => {\n t.startLoad(e);\n });\n }\n /**\n * Stop loading of any stream data.\n */\n stopLoad() {\n x.log(\"stopLoad\"), this.networkControllers.forEach((e) => {\n e.stopLoad();\n });\n }\n /**\n * Swap through possible audio codecs in the stream (for example to switch from stereo to 5.1)\n */\n swapAudioCodec() {\n x.log(\"swapAudioCodec\"), this.streamController.swapAudioCodec();\n }\n /**\n * When the media-element fails, this allows to detach and then re-attach it\n * as one call (convenience method).\n *\n * Automatic recovery of media-errors by this process is configurable.\n */\n recoverMediaError() {\n x.log(\"recoverMediaError\");\n const e = this._media;\n this.detachMedia(), e && this.attachMedia(e);\n }\n removeLevel(e, t = 0) {\n this.levelController.removeLevel(e, t);\n }\n /**\n * @returns an array of levels (variants) sorted by HDCP-LEVEL, BANDWIDTH, SCORE, and RESOLUTION (height)\n */\n get levels() {\n const e = this.levelController.levels;\n return e || [];\n }\n /**\n * Index of quality level (variant) currently played\n */\n get currentLevel() {\n return this.streamController.currentLevel;\n }\n /**\n * Set quality level index immediately. This will flush the current buffer to replace the quality asap. That means playback will interrupt at least shortly to re-buffer and re-sync eventually. Set to -1 for automatic level selection.\n */\n set currentLevel(e) {\n x.log(`set currentLevel:${e}`), this.loadLevel = e, this.abrController.clearTimer(), this.streamController.immediateLevelSwitch();\n }\n /**\n * Index of next quality level loaded as scheduled by stream controller.\n */\n get nextLevel() {\n return this.streamController.nextLevel;\n }\n /**\n * Set quality level index for next loaded data.\n * This will switch the video quality asap, without interrupting playback.\n * May abort current loading of data, and flush parts of buffer (outside currently played fragment region).\n * @param newLevel - Pass -1 for automatic level selection\n */\n set nextLevel(e) {\n x.log(`set nextLevel:${e}`), this.levelController.manualLevel = e, this.streamController.nextLevelSwitch();\n }\n /**\n * Return the quality level of the currently or last (of none is loaded currently) segment\n */\n get loadLevel() {\n return this.levelController.level;\n }\n /**\n * Set quality level index for next loaded data in a conservative way.\n * This will switch the quality without flushing, but interrupt current loading.\n * Thus the moment when the quality switch will appear in effect will only be after the already existing buffer.\n * @param newLevel - Pass -1 for automatic level selection\n */\n set loadLevel(e) {\n x.log(`set loadLevel:${e}`), this.levelController.manualLevel = e;\n }\n /**\n * get next quality level loaded\n */\n get nextLoadLevel() {\n return this.levelController.nextLoadLevel;\n }\n /**\n * Set quality level of next loaded segment in a fully \"non-destructive\" way.\n * Same as `loadLevel` but will wait for next switch (until current loading is done).\n */\n set nextLoadLevel(e) {\n this.levelController.nextLoadLevel = e;\n }\n /**\n * Return \"first level\": like a default level, if not set,\n * falls back to index of first level referenced in manifest\n */\n get firstLevel() {\n return Math.max(this.levelController.firstLevel, this.minAutoLevel);\n }\n /**\n * Sets \"first-level\", see getter.\n */\n set firstLevel(e) {\n x.log(`set firstLevel:${e}`), this.levelController.firstLevel = e;\n }\n /**\n * Return start level (level of first fragment that will be played back)\n * if not overrided by user, first level appearing in manifest will be used as start level\n * if -1 : automatic start level selection, playback will start from level matching download bandwidth\n * (determined from download of first segment)\n */\n get startLevel() {\n return this.levelController.startLevel;\n }\n /**\n * set start level (level of first fragment that will be played back)\n * if not overrided by user, first level appearing in manifest will be used as start level\n * if -1 : automatic start level selection, playback will start from level matching download bandwidth\n * (determined from download of first segment)\n */\n set startLevel(e) {\n x.log(`set startLevel:${e}`), e !== -1 && (e = Math.max(e, this.minAutoLevel)), this.levelController.startLevel = e;\n }\n /**\n * Whether level capping is enabled.\n * Default value is set via `config.capLevelToPlayerSize`.\n */\n get capLevelToPlayerSize() {\n return this.config.capLevelToPlayerSize;\n }\n /**\n * Enables or disables level capping. If disabled after previously enabled, `nextLevelSwitch` will be immediately called.\n */\n set capLevelToPlayerSize(e) {\n const t = !!e;\n t !== this.config.capLevelToPlayerSize && (t ? this.capLevelController.startCapping() : (this.capLevelController.stopCapping(), this.autoLevelCapping = -1, this.streamController.nextLevelSwitch()), this.config.capLevelToPlayerSize = t);\n }\n /**\n * Capping/max level value that should be used by automatic level selection algorithm (`ABRController`)\n */\n get autoLevelCapping() {\n return this._autoLevelCapping;\n }\n /**\n * Returns the current bandwidth estimate in bits per second, when available. Otherwise, `NaN` is returned.\n */\n get bandwidthEstimate() {\n const {\n bwEstimator: e\n } = this.abrController;\n return e ? e.getEstimate() : NaN;\n }\n /**\n * get time to first byte estimate\n * @type {number}\n */\n get ttfbEstimate() {\n const {\n bwEstimator: e\n } = this.abrController;\n return e ? e.getEstimateTTFB() : NaN;\n }\n /**\n * Capping/max level value that should be used by automatic level selection algorithm (`ABRController`)\n */\n set autoLevelCapping(e) {\n this._autoLevelCapping !== e && (x.log(`set autoLevelCapping:${e}`), this._autoLevelCapping = e);\n }\n get maxHdcpLevel() {\n return this._maxHdcpLevel;\n }\n set maxHdcpLevel(e) {\n Ts.indexOf(e) > -1 && (this._maxHdcpLevel = e);\n }\n /**\n * True when automatic level selection enabled\n */\n get autoLevelEnabled() {\n return this.levelController.manualLevel === -1;\n }\n /**\n * Level set manually (if any)\n */\n get manualLevel() {\n return this.levelController.manualLevel;\n }\n /**\n * min level selectable in auto mode according to config.minAutoBitrate\n */\n get minAutoLevel() {\n const {\n levels: e,\n config: {\n minAutoBitrate: t\n }\n } = this;\n if (!e)\n return 0;\n const s = e.length;\n for (let i = 0; i < s; i++)\n if (e[i].maxBitrate >= t)\n return i;\n return 0;\n }\n /**\n * max level selectable in auto mode according to autoLevelCapping\n */\n get maxAutoLevel() {\n const {\n levels: e,\n autoLevelCapping: t,\n maxHdcpLevel: s\n } = this;\n let i;\n if (t === -1 && e && e.length ? i = e.length - 1 : i = t, s)\n for (let r = i; r--; ) {\n const n = e[r].attrs[\"HDCP-LEVEL\"];\n if (n && n <= s)\n return r;\n }\n return i;\n }\n /**\n * next automatically selected quality level\n */\n get nextAutoLevel() {\n return Math.min(Math.max(this.abrController.nextAutoLevel, this.minAutoLevel), this.maxAutoLevel);\n }\n /**\n * this setter is used to force next auto level.\n * this is useful to force a switch down in auto mode:\n * in case of load error on level N, hls.js can set nextAutoLevel to N-1 for example)\n * forced value is valid for one fragment. upon successful frag loading at forced level,\n * this value will be resetted to -1 by ABR controller.\n */\n set nextAutoLevel(e) {\n this.abrController.nextAutoLevel = Math.max(this.minAutoLevel, e);\n }\n /**\n * get the datetime value relative to media.currentTime for the active level Program Date Time if present\n */\n get playingDate() {\n return this.streamController.currentProgramDateTime;\n }\n get mainForwardBufferInfo() {\n return this.streamController.getMainFwdBufferInfo();\n }\n /**\n * Get the list of selectable audio tracks\n */\n get audioTracks() {\n const e = this.audioTrackController;\n return e ? e.audioTracks : [];\n }\n /**\n * index of the selected audio track (index in audio track lists)\n */\n get audioTrack() {\n const e = this.audioTrackController;\n return e ? e.audioTrack : -1;\n }\n /**\n * selects an audio track, based on its index in audio track lists\n */\n set audioTrack(e) {\n const t = this.audioTrackController;\n t && (t.audioTrack = e);\n }\n /**\n * get alternate subtitle tracks list from playlist\n */\n get subtitleTracks() {\n const e = this.subtitleTrackController;\n return e ? e.subtitleTracks : [];\n }\n /**\n * index of the selected subtitle track (index in subtitle track lists)\n */\n get subtitleTrack() {\n const e = this.subtitleTrackController;\n return e ? e.subtitleTrack : -1;\n }\n get media() {\n return this._media;\n }\n /**\n * select an subtitle track, based on its index in subtitle track lists\n */\n set subtitleTrack(e) {\n const t = this.subtitleTrackController;\n t && (t.subtitleTrack = e);\n }\n /**\n * Whether subtitle display is enabled or not\n */\n get subtitleDisplay() {\n const e = this.subtitleTrackController;\n return e ? e.subtitleDisplay : !1;\n }\n /**\n * Enable/disable subtitle display rendering\n */\n set subtitleDisplay(e) {\n const t = this.subtitleTrackController;\n t && (t.subtitleDisplay = e);\n }\n /**\n * get mode for Low-Latency HLS loading\n */\n get lowLatencyMode() {\n return this.config.lowLatencyMode;\n }\n /**\n * Enable/disable Low-Latency HLS part playlist and segment loading, and start live streams at playlist PART-HOLD-BACK rather than HOLD-BACK.\n */\n set lowLatencyMode(e) {\n this.config.lowLatencyMode = e;\n }\n /**\n * Position (in seconds) of live sync point (ie edge of live position minus safety delay defined by ```hls.config.liveSyncDuration```)\n * @returns null prior to loading live Playlist\n */\n get liveSyncPosition() {\n return this.latencyController.liveSyncPosition;\n }\n /**\n * Estimated position (in seconds) of live edge (ie edge of live playlist plus time sync playlist advanced)\n * @returns 0 before first playlist is loaded\n */\n get latency() {\n return this.latencyController.latency;\n }\n /**\n * maximum distance from the edge before the player seeks forward to ```hls.liveSyncPosition```\n * configured using ```liveMaxLatencyDurationCount``` (multiple of target duration) or ```liveMaxLatencyDuration```\n * @returns 0 before first playlist is loaded\n */\n get maxLatency() {\n return this.latencyController.maxLatency;\n }\n /**\n * target distance from the edge as calculated by the latency controller\n */\n get targetLatency() {\n return this.latencyController.targetLatency;\n }\n /**\n * the rate at which the edge of the current live playlist is advancing or 1 if there is none\n */\n get drift() {\n return this.latencyController.drift;\n }\n /**\n * set to true when startLoad is called before MANIFEST_PARSED event\n */\n get forceStartLoad() {\n return this.streamController.forceStartLoad;\n }\n}\nGe.defaultConfig = void 0;\nconst Fl = (a, e, t, s) => {\n if (t === \"length\" || t === \"prototype\" || t === \"arguments\" || t === \"caller\")\n return;\n const i = Object.getOwnPropertyDescriptor(a, t), r = Object.getOwnPropertyDescriptor(e, t);\n !Ml(i, r) && s || Object.defineProperty(a, t, r);\n}, Ml = function(a, e) {\n return a === void 0 || a.configurable || a.writable === e.writable && a.enumerable === e.enumerable && a.configurable === e.configurable && (a.writable || a.value === e.value);\n}, Nl = (a, e) => {\n const t = Object.getPrototypeOf(e);\n t !== Object.getPrototypeOf(a) && Object.setPrototypeOf(a, t);\n}, Ul = (a, e) => `/* Wrapped ${a}*/\n${e}`, Bl = Object.getOwnPropertyDescriptor(Function.prototype, \"toString\"), $l = Object.getOwnPropertyDescriptor(Function.prototype.toString, \"name\"), Gl = (a, e, t) => {\n const s = t === \"\" ? \"\" : `with ${t.trim()}() `, i = Ul.bind(null, s, e.toString());\n Object.defineProperty(i, \"name\", $l), Object.defineProperty(a, \"toString\", { ...Bl, value: i });\n};\nfunction Vl(a, e, { ignoreNonConfigurable: t = !1 } = {}) {\n const { name: s } = a;\n for (const i of Reflect.ownKeys(e))\n Fl(a, e, i, t);\n return Nl(a, e), Gl(a, e, s), a;\n}\nconst Hl = /* @__PURE__ */ new WeakMap();\nfunction As(a, { cacheKey: e = ([s]) => s, cache: t = /* @__PURE__ */ new Map() } = {}) {\n const s = /* @__PURE__ */ new Map(), i = function(...r) {\n const n = e(r);\n if (s.has(n))\n return s.get(n);\n const o = (async () => {\n try {\n if (t && await t.has(n))\n return await t.get(n);\n const h = await a.apply(this, r);\n try {\n return h;\n } finally {\n t && await t.set(n, h);\n }\n } finally {\n s.delete(n);\n }\n })();\n return s.set(n, o), o;\n };\n return Vl(i, a, {\n ignoreNonConfigurable: !0\n }), Hl.set(i, t), i;\n}\nfunction Kl() {\n return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n}\nfunction Wl() {\n return [\"iPad Simulator\", \"iPhone Simulator\", \"iPod Simulator\", \"iPad\", \"iPhone\", \"iPod\"].includes(navigator.platform) || // iPad on iOS 13 detection\n navigator.userAgent.includes(\"Mac\") && \"ontouchend\" in document;\n}\nconst Yl = As(\n async function(e) {\n return new FontFace(e.name, `url(${e.url})`, {\n style: e.style,\n weight: e.weight\n }).load();\n },\n {\n cacheKey: ([a]) => JSON.stringify(a)\n }\n);\nasync function zl(a) {\n return a.duration === 1 / 0 ? new Promise((e) => {\n a.currentTime = Number.MAX_SAFE_INTEGER, a.ontimeupdate = () => {\n a.ontimeupdate = null, e(a.duration), a.currentTime = 0;\n };\n }) : a.duration;\n}\nclass jl {\n constructor(e) {\n this._memoKey = null, this._lastDeps = null, this._duration = 0, this._processing = !1, this._scenes = null, this._videos = {}, this._videoMeta = {}, this._videoState = {}, this._resolveVideo = As(\n (t) => {\n const { id: s, src: i, playlist: r, duration: n } = t;\n return this._cleanupVideo(s), new Promise((o) => {\n let l = null;\n const h = document.createElement(\"video\");\n h.playsInline = !0, h.muted = !0, h.loop = !1, h.volume = this.host.volume, h.playbackRate = this.host.playbackRate;\n const c = {\n loadeddata: this._handleLoadedData,\n waiting: this._handleWaiting,\n canplay: this._handleCanPlay,\n progress: this._handleProgress,\n seeked: this._handleSeeked,\n play: this._handlePlay,\n playing: this._handlePlaying,\n pause: this._handlePause,\n stalled: this._handleStalled,\n timeupdate: this._handleTimeUpdate,\n ended: this._handleEnded,\n error: this._handleError\n }, d = Object.keys(c).reduce((u, f) => {\n const g = f, p = c[g](s, h);\n return u[g] = p, h.addEventListener(f, p), u;\n }, {});\n if (r && !Kl() && Ge.isSupported()) {\n let u = !1;\n l = new Ge({\n autoStartLoad: !0,\n xhrSetup: (f) => {\n const { open: g } = f, p = r.split(\"?\")[1];\n f.open = function(y, v, E) {\n v.toString().includes(\"?\") || (v += \"?\" + p), g.apply(this, [y, v, E]);\n };\n }\n }), l.loadSource(r), l.attachMedia(h), l.startLoadOnce = (f = -1) => {\n l && !u && (l.startLoad(f), u = !0);\n }, l.on(Ge.Events.LEVEL_LOADED, async () => {\n u || l == null || l.stopLoad(), o({\n id: s,\n hls: l,\n node: h\n });\n });\n } else {\n h.src = i;\n let u = !1;\n if (h.startLoadOnce = () => {\n u || (h.preload = \"auto\", h.load(), u = !0);\n }, n)\n h.preload = \"none\", o({\n id: s,\n hls: l,\n node: h\n });\n else {\n h.preload = \"metadata\";\n const f = async () => {\n o({\n id: s,\n hls: l,\n node: h\n }), h.removeEventListener(\"loadedmetadata\", f);\n };\n h.addEventListener(\"loadedmetadata\", f);\n }\n }\n this.videos[s] = {\n id: s,\n hls: l,\n node: h,\n listeners: d\n }, this.videoState[s] = {\n initialised: !1,\n waiting: !0,\n buffered: []\n };\n });\n },\n {\n cacheKey: ([{ id: t, src: s, playlist: i }]) => JSON.stringify({ id: t, src: s.split(\"?\")[0], playlist: i == null ? void 0 : i.split(\"?\")[0] })\n }\n ), this._resolveVideoMeta = As(\n async (t, s) => {\n const { id: i, captions: r, duration: n, startOffset: o, endOffset: l } = t, h = n ?? await zl(s), c = (o ?? 0) * h, d = (1 - (l ?? 0)) * h, u = {\n id: i,\n captions: r,\n start: c,\n duration: d\n };\n return this.videoMeta[i] = u, u;\n },\n {\n cacheKey: ([{ id: t, captions: s, duration: i, startOffset: r, endOffset: n }]) => JSON.stringify({ id: t, captions: s, duration: i, startOffset: r, endOffset: n })\n }\n ), this._handleLoadedData = (t, s) => () => {\n const i = this.videoState[t];\n i != null && i.initialised || (this.videoState = {\n ...this.videoState,\n [t]: {\n ...i,\n initialised: !0,\n waiting: !1,\n // Sometimes the video seems to buffer before the onloadeddata callback is fired :/\n buffered: (i == null ? void 0 : i.buffered) ?? []\n }\n }, this.setVideosCurrentTime(this.host.currentTime), this.host.dispatchEvent(new CustomEvent(\"video:loadeddata\", { detail: { id: t, node: s } })));\n }, this._handleWaiting = (t) => () => {\n const s = this.videoState[t];\n s != null && s.initialised && !(s != null && s.waiting) && (this.videoState = {\n ...this.videoState,\n [t]: {\n ...s,\n waiting: !0\n }\n });\n }, this._handleCanPlay = (t) => () => {\n const s = this.videoState[t];\n s != null && s.initialised && (s != null && s.waiting) && (this.videoState = {\n ...this.videoState,\n [t]: {\n ...s,\n waiting: !1\n }\n });\n }, this._handleProgress = (t, s) => () => {\n var h;\n const i = s == null ? void 0 : s.buffered, r = [], { start: n, video: o, videoMeta: l } = ((h = this.scenes) == null ? void 0 : h.scenes.find(({ video: c }) => t === (c == null ? void 0 : c.id))) ?? {};\n if (s && i && o && l && typeof n < \"u\") {\n for (let d = 0; d < i.length; d++) {\n const u = i.start(d), f = i.end(d);\n Math.max(u, l.start) <= Math.min(f, l.start + l.duration) && r.push({\n // We need to offset the start and end of the buffer by the start time of this video's place in the compilation\n start: Math.max(0, (Math.max(u - l.start, 0) + n) / this.host.duration * 100),\n end: Math.min(\n (Math.min(f - l.start, l.duration) + n) / this.host.duration * 100,\n 100\n )\n });\n }\n const c = this.videoState[t];\n this.videoState = {\n ...this.videoState,\n [t]: {\n ...c,\n buffered: r\n }\n };\n }\n }, this._handleSeeked = (t, s) => () => {\n const i = this.videoState[t];\n i != null && i.initialised && (this.host.draw(), this.host.dispatchEvent(new CustomEvent(\"video:seeked\", { detail: { id: t, node: s } })));\n }, this._handlePlay = (t, s) => () => {\n this.host.dispatchEvent(new CustomEvent(\"video:play\", { detail: { id: t, node: s } }));\n }, this._handlePlaying = (t, s) => () => {\n this.host.dispatchEvent(new CustomEvent(\"video:playing\", { detail: { id: t, node: s } }));\n }, this._handlePause = (t, s) => () => {\n this.host.dispatchEvent(new CustomEvent(\"video:pause\", { detail: { id: t, node: s } }));\n }, this._handleStalled = (t, s) => () => {\n this.host.dispatchEvent(new CustomEvent(\"video:stalled\", { detail: { id: t, node: s } }));\n }, this._handleTimeUpdate = (t, s) => () => {\n this.host.dispatchEvent(new CustomEvent(\"video:timeupdate\", { detail: { id: t, node: s } }));\n }, this._handleEnded = (t, s) => () => {\n this.host.dispatchEvent(new CustomEvent(\"video:ended\", { detail: { id: t, node: s } }));\n }, this._handleError = (t, s) => () => {\n this.host.dispatchEvent(new CustomEvent(\"video:error\", { detail: { id: t, node: s } }));\n }, this.host = e, this.host.addController(this);\n }\n set processing(e) {\n e !== this._processing && (this._processing = e, this.host.requestUpdate());\n }\n get processing() {\n return this._processing;\n }\n set duration(e) {\n !isNaN(e) && e !== this._duration && (this._duration = e, this.host.requestUpdate(), this.host.dispatchEvent(new CustomEvent(\"durationchange\", { detail: this._duration })));\n }\n get duration() {\n return this._duration;\n }\n set scenes(e) {\n this._scenes = e, this.host.requestUpdate();\n }\n get scenes() {\n return this._scenes;\n }\n set videos(e) {\n this._videos = e, this.host.requestUpdate();\n }\n get videos() {\n return this._videos;\n }\n set videoMeta(e) {\n this._videoMeta = e, this.host.requestUpdate();\n }\n get videoMeta() {\n return this._videoMeta;\n }\n set videoState(e) {\n this._videoState = e, this.host.requestUpdate();\n }\n get videoState() {\n return this._videoState;\n }\n _setupTask() {\n new nn(\n this.host,\n async ([e, t, s, i, r]) => {\n try {\n if (s || e) {\n if (this.processing = !0, s) {\n let o = null;\n if (i)\n try {\n o = await (await fetch(i, { method: \"GET\" })).text();\n } catch {\n this.host.dispatchEvent(new ErrorEvent(\"error\", new Error(\"Track failed to fetch\")));\n }\n const l = s.includes(\".m3u8\") ? \"playlist\" : \"video\";\n this.scenes = await Xs(\n {\n data: {\n questions: {\n items: [\n {\n answer: {\n id: \"source\",\n media: {\n [l]: s\n },\n captions: {\n current: o\n }\n }\n }\n ]\n }\n },\n template: t,\n burnCaptions: r\n },\n this._resolveVideo,\n this._resolveVideoMeta\n );\n } else\n this.scenes = await Xs(\n { data: e, template: t, burnCaptions: r },\n this._resolveVideo,\n this._resolveVideoMeta\n );\n (await Promise.all(this.scenes.fonts.map((o) => Yl(o)))).forEach((o) => {\n document.fonts.add(o);\n }), this.duration = this.scenes.duration, this.host.paused && this.host.reset(this.host.currentTime, !this.host.paused), this.host.autoplay && this.host.play();\n }\n } catch {\n this.scenes = null, this.duration = 0, this.host.dispatchEvent(new ErrorEvent(\"error\", new Error(\"Failed to create scenes\")));\n } finally {\n this.processing = !1;\n }\n },\n () => {\n const e = JSON.stringify({\n data: this.host.data,\n template: this.host.template,\n src: this.host.src,\n track: this.host.track,\n burnCaptions: this.host.burnCaptions\n });\n if (this._lastDeps && this._memoKey === e)\n return this._lastDeps;\n const t = [\n this.host.data,\n this.host.template,\n this.host.src,\n this.host.track,\n this.host.burnCaptions\n ];\n return this._memoKey = e, this._lastDeps = t, t;\n }\n );\n }\n _setVideoCurrentTime({ time: e, scene: t }) {\n const { start: s, video: i, videoMeta: r } = t;\n if (i && i.node && r && typeof s < \"u\") {\n const n = e - s;\n i.node.currentTime = Math.max(\n // The lower bound is the trimmed video start\n r.start,\n Math.min(\n // The upper bound is the trimmed video end\n r.start + r.duration,\n // This is the time of the video as it's active\n n + r.start\n )\n );\n }\n }\n setVideosCurrentTime(e) {\n var t;\n (t = this.scenes) == null || t.scenes.forEach((s) => {\n this._setVideoCurrentTime({ time: e, scene: s });\n });\n }\n _cleanupVideo(e) {\n var s;\n const t = this.videos[e];\n t && ((s = t.hls) == null || s.destroy(), t.node.pause(), t.node.src = \"\", Object.keys(t.listeners).forEach((i) => {\n var r;\n if ((r = this.videos) != null && r[e]) {\n const n = t.listeners[i];\n t.node.removeEventListener(i, n);\n }\n }), delete this.videos[e]);\n }\n hostConnected() {\n this._setupTask();\n }\n hostDisconnected() {\n Object.keys(this.videos).forEach((e) => {\n this._cleanupVideo(e);\n }), this.videos = {};\n }\n}\nfunction ql(a) {\n a.requestFullscreen ? a.requestFullscreen() : a.mozRequestFullScreen ? a.mozRequestFullScreen() : a.webkitRequestFullscreen ? a.webkitRequestFullscreen() : a.msRequestFullscreen && a.msRequestFullscreen();\n}\nfunction Xl() {\n document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitExitFullscreen && document.webkitExitFullscreen();\n}\nconst Ws = [\n \"progress\",\n \"play-large\",\n \"navigation\",\n \"play\",\n \"volume\",\n \"current-time\",\n \"duration\",\n \"speed\",\n \"captions\",\n \"fullscreen\"\n], Zl = {\n id: \"captions\",\n event: \"captions:click\",\n label: \"Closed Captions\"\n}, Ql = {\n id: \"fullscreen\",\n event: \"fullscreen:click\",\n label: \"Full Screen\"\n}, Zr = {\n title: \"Playback Speed\",\n items: [\n {\n id: \"playback-rate-0.5\",\n event: \"playbackRate:click\",\n label: \"0.5x\",\n value: 0.5\n },\n {\n id: \"playback-rate-1\",\n event: \"playbackRate:click\",\n label: \"1.0x\",\n value: 1\n },\n {\n id: \"playback-rate-1.5\",\n event: \"playbackRate:click\",\n label: \"1.5x\",\n value: 1.5\n },\n {\n id: \"playback-rate-2\",\n event: \"playbackRate:click\",\n label: \"2.0x\",\n value: 2\n }\n ]\n}, Jl = {\n id: \"playbackRate\",\n label: \"Playback playbackRate\",\n subItems: Zr\n};\nclass eh extends an {\n constructor(e) {\n if (super(e), this.element = null, this.observer = void 0, e.type !== Zi.ELEMENT)\n throw new Error(\"Resize directive must be used in an Element expression\");\n }\n disconnected() {\n var e;\n (e = this.observer) == null || e.disconnect(), this.observer = void 0;\n }\n reconnected() {\n var e;\n this.element && ((e = this.observer) == null || e.observe(this.element));\n }\n update(e, [t]) {\n return this.isConnected && !this.observer && (this.observer = new ResizeObserver(t), this.element = e.element, this.observer.observe(this.element)), qi;\n }\n}\nconst Rs = Xi(eh), ke = {\n \"red-120\": \"#feeded\",\n \"red-130\": \"#fcd5d0\",\n \"red-400\": \"#e84a4a\",\n \"red-500\": \"#c51c3a\",\n \"red-700\": \"#a21c39\",\n \"red-800\": \"#850231\",\n \"red-900\": \"#580A2D\",\n \"teal-100\": \"#a5e9ed\",\n \"teal-600\": \"#006776\",\n \"purple-100\": \"#d7cfff\",\n \"purple-700\": \"#5f2fe9\",\n \"green-200\": \"#a4d7aa\",\n \"green-500\": \"#38b319\",\n \"green-800\": \"#2b3c2f\",\n \"grey-100\": \"#f0f0f0\",\n \"light-50\": \"rgba(255, 255, 255, .05)\",\n \"light-100\": \"rgba(255, 255, 255, .1)\",\n \"light-200\": \"rgba(255, 255, 255, .2)\",\n \"light-400\": \"rgba(255, 255, 255, .4)\",\n \"light-500\": \"rgba(255, 255, 255, .5)\",\n \"light-640\": \"rgba(255, 255, 255, .64)\",\n \"light-800\": \"rgba(255, 255, 255, .8)\",\n \"light-1000\": \"#fff\",\n \"dark-50\": \"rgba(0, 0, 0, .05)\",\n \"dark-80\": \"rgba(0, 0, 0, .08)\",\n \"dark-100\": \"rgba(0, 0, 0, .1)\",\n \"dark-200\": \"rgba(0, 0, 0, .2)\",\n \"dark-250\": \"rgba(0, 0, 0, .25)\",\n \"dark-400\": \"rgba(0, 0, 0, .4)\",\n \"dark-500\": \"rgba(0, 0, 0, .5)\",\n \"dark-640\": \"rgba(0, 0, 0, .64)\",\n \"dark-800\": \"rgba(0, 0, 0, .8)\",\n \"dark-900\": \"rgba(0, 0, 0, .9)\",\n \"dark-1000\": \"#000\"\n}, th = {\n colors: ke,\n space: {\n xxs: \".25rem\",\n xs: \".5rem\",\n small: \".75rem\",\n medium: \"1rem\",\n large: \"1.5rem\",\n xl: \"2.5rem\"\n },\n sizes: {\n xxs: \"1rem\",\n xs: \"1.5rem\",\n small: \"2rem\",\n medium: \"2.5rem\",\n large: \"3rem\"\n },\n fontWeights: {\n regular: 400,\n semibold: 600\n },\n lineHeights: {\n small: 1.1,\n medium: 1.25,\n large: 1.4\n },\n letterSpacings: {\n xxs: \"-.04rem\",\n xs: \"-.03rem\",\n small: \"-.02rem\",\n medium: \"-.01rem\",\n large: 0\n },\n fontSizes: {\n micro: \".625rem\",\n small: \".75rem\",\n medium: \".875rem\",\n large: \"1rem\",\n xl: \"1.25rem\",\n xxl: \"1.5rem\",\n xxxl: \"2rem\",\n huge: \"2.75rem\"\n },\n fontFamilies: {\n sans: 'Roobert, \"Times New Roman\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial,\"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"',\n mono: '\"Maison Neue Mono\", Menlo, Monaco, Consolas, Liberation Mono, \"Courier New\", monospace'\n },\n borderWidths: {\n thin: \".0625rem\"\n },\n radii: {\n small: \".25rem\",\n medium: \".5rem\",\n large: \".75rem\",\n xl: \"1rem\"\n },\n shadows: {\n small: `.25rem .25rem .25rem ${ke[\"dark-100\"]}`,\n medium: `0 .125rem .625rem ${ke[\"dark-100\"]}`,\n large: `0 .25rem 1rem ${ke[\"dark-50\"]}`,\n xl: `.25rem .25rem 1rem ${ke[\"dark-250\"]}`,\n xxl: `0 .25rem 2rem ${ke[\"dark-100\"]}`,\n xxxl: `.25rem .25rem 3rem ${ke[\"dark-250\"]}`,\n toolbar: `0 -.625rem .625rem ${ke[\"dark-50\"]}`,\n text: `0 0 .25rem ${ke[\"dark-250\"]}`\n },\n timings: {\n fast: \".1s\",\n normal: \".2s\",\n slow: \".3s\"\n },\n easings: {\n linear: \"linear\"\n },\n focusOutline: {\n width: \".2rem\",\n color: ke[\"dark-400\"]\n },\n iconSizes: {\n small: \"0.75rem\",\n medium: \"1rem\",\n large: \"1.5rem\"\n }\n}, Wi = ln.flatten(th, { delimiter: \"-\" }), sh = Object.keys(Wi).map((a) => $t(`:host { --${a}: ${Wi[a]}; }`)), ih = (a) => {\n class e extends a {\n // Add fonts to parent document as long as they don't exist already\n firstUpdated() {\n const s = new FontFace(\n \"Roobert\",\n \"url(https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/Roobert-Regular.woff2)\",\n {\n style: \"normal\",\n weight: \"400\"\n }\n ), i = new FontFace(\n \"Roobert\",\n \"url(https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/Roobert-SemiBold.woff2)\",\n {\n style: \"normal\",\n weight: \"600\"\n }\n );\n document.fonts.add(s), document.fonts.add(i);\n }\n }\n return e.styles = [\n (a == null ? void 0 : a.styles) ?? [],\n sh,\n pe`\n :host {\n font-family: var(--fontFamilies-sans);\n font-size: var(--fontSizes-medium);\n line-height: var(--lineHeights-medium);\n font-weight: var(--fontWeights-regular);\n }\n `,\n // Reset\n pe`\n *,\n *::before,\n *::after,\n ::slotted(*) {\n box-sizing: border-box;\n }\n\n body,\n h1,\n h2,\n h3,\n h4,\n p,\n figure,\n blockquote,\n dl,\n dd,\n ::slotted(h1),\n ::slotted(h2),\n ::slotted(h3),\n ::slotted(h4),\n ::slotted(p),\n ::slotted(figure),\n ::slotted(blockquote),\n ::slotted(dl),\n ::slotted(dd) {\n margin: 0;\n }\n\n ul[role='list'],\n ol[role='list'],\n ::slotted(ul[role='list']),\n ::slotted(ol[role='list']) {\n list-style: none;\n }\n\n a:not([class]),\n ::slotted(a:not([class])) {\n text-decoration-skip-ink: auto;\n }\n\n img,\n picture,\n ::slotted(img),\n ::slotted(picture) {\n max-width: 100%;\n display: block;\n }\n\n input,\n button,\n textarea,\n select,\n ::slotted(input),\n ::slotted(button),\n ::slotted(textarea),\n ::slotted(select) {\n font: inherit;\n }\n\n @media (prefers-reduced-motion) {\n *,\n *::before,\n *::after,\n ::slotted(*),\n ::slotted(*::before),\n ::slotted(*::after) {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }\n `\n ], e;\n}, Z = ih(rn), rh = (a, e) => (typeof window < \"u\" && (window.customElements.get(a) ?? window.customElements.define(a, e)), e), nh = (a, e) => {\n const { kind: t, elements: s } = e;\n return {\n kind: t,\n elements: s,\n // This callback is called once the class is otherwise fully defined\n finisher(i) {\n typeof window < \"u\" && (window.customElements.get(a) ?? window.customElements.define(a, i));\n }\n };\n}, Se = (a) => (e) => typeof e == \"function\" ? rh(a, e) : nh(a, e);\nclass ah extends on {\n constructor(e) {\n if (super(e), e.type !== Zi.ELEMENT)\n throw new Error(\"Resize directive must be used in an Element expression\");\n }\n update(e, [t]) {\n return t == null || t(e.element), qi;\n }\n}\nconst Yi = Xi(ah);\nclass oh {\n constructor(e) {\n this.hiddenControls = [], this._measureRef = Me(), this._prevControlsWidth = 0, this._hideables = {}, this._showables = {}, this._onResize = (t) => {\n var r, n, o;\n const s = this._measureRef.value, i = (o = (n = (r = t == null ? void 0 : t[0]) == null ? void 0 : r.borderBoxSize) == null ? void 0 : n[0]) == null ? void 0 : o.inlineSize;\n if (s && i && i !== this._prevControlsWidth) {\n Object.keys(this._hideables).forEach((h) => {\n this._hideables[h].element.style.display = \"\";\n }), Object.keys(this._showables).forEach((h) => {\n this._showables[h].element.style.display = \"none\";\n });\n const l = [];\n for (; s.scrollWidth > s.offsetWidth; ) {\n const h = Object.keys(this._hideables).find(\n (c) => this._hideables[c].hideIndex === l.length\n );\n if (h) {\n const c = this._hideables[h].element;\n c && (c.style.display = \"none\"), l.push(h);\n }\n Object.keys(this._showables).forEach((c) => {\n this._showables[c].showOn.some((d) => l.includes(d)) && (this._showables[c].element.style.display = \"flex\");\n });\n }\n this.hiddenControls = l, this._prevControlsWidth = i, this.host.requestUpdate();\n }\n }, this.host = e;\n }\n measure() {\n return Ne(this._measureRef);\n }\n contain() {\n return Rs(this._onResize);\n }\n hide(e, t) {\n return Yi((s) => {\n this._hideables[e] = { element: s, hideIndex: t };\n });\n }\n show(e, t) {\n return Yi((s) => {\n this._showables[e] = { element: s, showOn: t };\n });\n }\n}\nfunction zi(a, e = {}) {\n const t = Math.max(0, a || 0), s = Math.floor(t / 3600), i = Math.floor(t % 3600 / 60), r = Math.floor(t % 3600 % 60), n = Math.floor(t % 1 * 1e3);\n let o = s ? `${s}:${`${i}`.padStart(2, \"0\")}:${`${r}`.padStart(2, \"0\")}` : `${i}:${`${r}`.padStart(2, \"0\")}`;\n return e.includeMs && (o += `:${`${n}`.padStart(3, \"0\")}`), o;\n}\nvar lh = Object.defineProperty, hh = Object.getOwnPropertyDescriptor, ot = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? hh(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && lh(e, t, i), i;\n};\nlet We = class extends Z {\n constructor() {\n super(...arguments), this.active = !1, this.size = \"small\", this.rounded = \"medium\", this.weight = \"light\";\n }\n render() {\n return G`<button\n class=${te({\n active: this.active,\n \"size-tiny\": this.size === \"tiny\",\n \"size-small\": this.size === \"small\",\n \"size-large\": this.size === \"large\",\n \"radius-medium\": this.rounded === \"medium\",\n \"radius-full\": this.rounded === \"full\",\n \"weight-light\": this.weight === \"light\",\n \"weight-heavy\": this.weight === \"heavy\"\n })}\n >\n <slot></slot>\n ${this.icon && G`<vmp-new-icon icon=${this.icon}></vmp-new-icon>`}\n </button>`;\n }\n};\nWe.styles = [\n Z.styles ?? [],\n pe`\n :host {\n --button-color: var(--vu-button-color, var(--colors-dark-640));\n --button-background: var(--vu-button-background, var(--colors-light-1000));\n\n display: flex;\n }\n\n button {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: var(--space-xxs);\n padding: 0;\n border: none;\n cursor: pointer;\n font-weight: var(--fontWeights-semibold);\n pointer-events: all;\n transition: background 150ms ease;\n\n color: var(--button-color);\n background: var(--button-background);\n }\n\n button:focus {\n outline: var(--borderWidths-thin) solid var(--colors-dark-1000);\n }\n\n .size-tiny {\n height: 20px;\n min-width: 20px;\n padding: var(--space-xxs);\n }\n\n .size-small {\n height: 32px;\n min-width: 32px;\n padding: 6px;\n }\n\n .size-large {\n height: 48px;\n min-width: 48px;\n padding: var(--space-s);\n }\n\n .radius-medium {\n border-radius: var(--radii-small);\n }\n\n .radius-full {\n border-radius: 100rem;\n }\n\n .weight-light {\n --button-color: var(--vu-button-color, var(--colors-light-1000));\n --button-background: var(--vu-button-background, transparent);\n }\n\n .weight-heavy {\n --button-color: var(--vu-button-color, var(--colors-dark-640));\n --button-background: var(--vu-button-background, var(--colors-light-1000));\n }\n\n .weight-heavy.active,\n .weight-heavy:hover,\n .weight-heavy:focus {\n background: #cccccc;\n }\n\n .weight-light.active,\n .weight-light:hover,\n .weight-light:focus {\n background: #9d9d9d;\n }\n `\n];\not([\n P({ type: Boolean })\n], We.prototype, \"active\", 2);\not([\n P({ type: String })\n], We.prototype, \"size\", 2);\not([\n P({ type: String })\n], We.prototype, \"rounded\", 2);\not([\n P({ type: String })\n], We.prototype, \"weight\", 2);\not([\n P({ type: String })\n], We.prototype, \"icon\", 2);\nWe = ot([\n Se(\"vmp-new-button\")\n], We);\nconst ji = {\n \"arrow-left\": () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path\n d=\"M16.6666 9.21875H6.52492L11.1833 4.85156L9.99992 3.75L3.33325 10L9.99992 16.25L11.1749 15.1484L6.52492 10.7812H16.6666V9.21875Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n \"arrow-right\": () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path\n d=\"M3.75 9.21875H13.2578L8.89062 4.85156L10 3.75L16.25 10L10 16.25L8.89844 15.1484L13.2578 10.7812H3.75V9.21875Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n \"captions-cross\": () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path\n d=\"M17.0625 19.4167L14.3125 16.6667H3.33333C2.875 16.6667 2.4825 16.5036 2.15583 16.1775C1.82972 15.8509 1.66667 15.4584 1.66667 15V4.16669C1.66667 4.13891 1.66667 4.11446 1.66667 4.09335C1.66667 4.0728 1.66667 4.04863 1.66667 4.02085L0.5625 2.91669L1.75 1.72919L18.25 18.2292L17.0625 19.4167ZM18.3333 15.9375L14.7083 12.3125C14.8056 12.2431 14.8786 12.1495 14.9275 12.0317C14.9758 11.9134 15 11.7917 15 11.6667V10.8334H13.75V11.25H13.6458L12.0833 9.68752V8.75002H13.75V9.16669H15V8.33335C15 8.09724 14.92 7.89919 14.76 7.73919C14.6006 7.57974 14.4028 7.50002 14.1667 7.50002H11.6667C11.4306 7.50002 11.2328 7.57974 11.0733 7.73919C10.9133 7.89919 10.8333 8.09724 10.8333 8.33335V8.43752L5.72917 3.33335H16.6667C17.125 3.33335 17.5175 3.49669 17.8442 3.82335C18.1703 4.14946 18.3333 4.54169 18.3333 5.00002V15.9375ZM5.83333 12.5H8.33333C8.56944 12.5 8.7675 12.42 8.9275 12.26C9.08694 12.1006 9.16667 11.9028 9.16667 11.6667V11.5209L8.47917 10.8334H7.91667V11.25H6.25V8.60419L5.3125 7.66669C5.21528 7.73613 5.13889 7.82974 5.08333 7.94752C5.02778 8.06585 5 8.19446 5 8.33335V11.6667C5 11.9028 5.07972 12.1006 5.23917 12.26C5.39917 12.42 5.59722 12.5 5.83333 12.5Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n captions: () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path\n d=\"M5.83342 12.5H8.33342C8.56953 12.5 8.76758 12.42 8.92758 12.26C9.08703 12.1005 9.16675 11.9028 9.16675 11.6666V10.8333H7.91675V11.25H6.25008V8.74998H7.91675V9.16665H9.16675V8.33331C9.16675 8.0972 9.08703 7.89915 8.92758 7.73915C8.76758 7.5797 8.56953 7.49998 8.33342 7.49998H5.83342C5.5973 7.49998 5.39925 7.5797 5.23925 7.73915C5.0798 7.89915 5.00008 8.0972 5.00008 8.33331V11.6666C5.00008 11.9028 5.0798 12.1005 5.23925 12.26C5.39925 12.42 5.5973 12.5 5.83342 12.5ZM11.6667 12.5H14.1667C14.4029 12.5 14.6006 12.42 14.7601 12.26C14.9201 12.1005 15.0001 11.9028 15.0001 11.6666V10.8333H13.7501V11.25H12.0834V8.74998H13.7501V9.16665H15.0001V8.33331C15.0001 8.0972 14.9201 7.89915 14.7601 7.73915C14.6006 7.5797 14.4029 7.49998 14.1667 7.49998H11.6667C11.4306 7.49998 11.2329 7.5797 11.0734 7.73915C10.9134 7.89915 10.8334 8.0972 10.8334 8.33331V11.6666C10.8334 11.9028 10.9134 12.1005 11.0734 12.26C11.2329 12.42 11.4306 12.5 11.6667 12.5ZM3.33341 16.6666C2.87508 16.6666 2.48258 16.5036 2.15591 16.1775C1.8298 15.8508 1.66675 15.4583 1.66675 15V4.99998C1.66675 4.54165 1.8298 4.14942 2.15591 3.82331C2.48258 3.49665 2.87508 3.33331 3.33341 3.33331H16.6667C17.1251 3.33331 17.5176 3.49665 17.8442 3.82331C18.1704 4.14942 18.3334 4.54165 18.3334 4.99998V15C18.3334 15.4583 18.1704 15.8508 17.8442 16.1775C17.5176 16.5036 17.1251 16.6666 16.6667 16.6666H3.33341Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n \"chevron-down\": () => G`<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" part=\"svg\">\n <path\n d=\"M11.8032 7.13666L10.8632 6.19666L7.80322 9.24999L4.74322 6.19666L3.80322 7.13666L7.80322 11.1367L11.8032 7.13666Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n close: () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" part=\"svg\">\n <path\n d=\"M15.8334 5.34163L14.6584 4.16663L10 8.82496L5.34169 4.16663L4.16669 5.34163L8.82502 9.99996L4.16669 14.6583L5.34169 15.8333L10 11.175L14.6584 15.8333L15.8334 14.6583L11.175 9.99996L15.8334 5.34163Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n loading: () => G`<svg class=\"spinner\" width=\"50\" height=\"50\" viewBox=\"0 0 50 50\" part=\"svg\">\n <style>\n /* SVG spinner icon animation */\n .spinner {\n -webkit-animation: rotate 2s linear infinite;\n animation: rotate 2s linear infinite;\n }\n\n .spinner .path {\n stroke: currentColor;\n stroke-linecap: round;\n -webkit-animation: dash 1.5s ease-in-out infinite;\n animation: dash 1.5s ease-in-out infinite;\n }\n\n @-webkit-keyframes rotate {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @keyframes rotate {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @-webkit-keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n }\n\n @keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n }\n </style>\n <circle class=\"path\" cx=\"25\" cy=\"25\" r=\"20\" fill=\"none\" stroke-width=\"5\" />\n </svg>`,\n maximize: () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M6.66675 3.33331H3.33341H1.66675V4.99998V8.33331H3.33341V4.99998H6.66675V3.33331ZM6.66675 15H3.33341V11.6666H1.66675V15V16.6666H3.33341H6.66675V15ZM13.3334 3.33331H16.6667H18.3334V4.99998V8.33331H16.6667V4.99998H13.3334V3.33331ZM16.6667 15H13.3334V16.6666H16.6667H18.3334V15V11.6666H16.6667V15Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n minimize: () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M5.00008 3.33331H6.66675V6.66665V8.33331H5.00008H1.66675V6.66665H5.00008V3.33331ZM5.00008 11.6666H1.66675V13.3333H5.00008V16.6666H6.66675V13.3333V11.6666H5.00008ZM15.0001 6.66665H18.3334V8.33331H15.0001H13.3334V6.66665V3.33331H15.0001V6.66665ZM18.3334 11.6666H15.0001H13.3334V13.3333V16.6666H15.0001V13.3333H18.3334V11.6666Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n muted: () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path\n d=\"M13.75 10C13.75 8.525 12.9 7.25833 11.6667 6.64167V8.48333L13.7083 10.525C13.7333 10.3583 13.75 10.1833 13.75 10ZM15.8333 10C15.8333 10.7833 15.6667 11.5167 15.3833 12.2L16.6417 13.4583C17.1917 12.425 17.5 11.25 17.5 10C17.5 6.43333 15.0083 3.45 11.6667 2.69167V4.40833C14.075 5.125 15.8333 7.35833 15.8333 10ZM3.55833 2.5L2.5 3.55833L6.44167 7.5H2.5V12.5H5.83333L10 16.6667V11.0583L13.5417 14.6C12.9833 15.0333 12.3583 15.375 11.6667 15.5833V17.3C12.8167 17.0417 13.8583 16.5083 14.7417 15.7917L16.4417 17.5L17.5 16.4417L10 8.94167L3.55833 2.5ZM10 3.33333L8.25833 5.075L10 6.81667V3.33333Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n pause: () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M8.33333 2.5H5V17.5H8.33333V2.5ZM15 2.5H11.6667V17.5H15V2.5Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n \"play-large\": () => G`<svg width=\"45\" height=\"53\" viewBox=\"0 0 45 53\" fill=\"none\" part=\"svg\">\n <path\n d=\"M43.5 23.8319C45.5 25.0083 45.5 27.9492 43.5 29.1256L4.5 52.0647C2.5 53.2411 0 51.7706 0 49.4179V3.53961C0 1.18687 2.5 -0.283582 4.5 0.892785L43.5 23.8319Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n play: () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path d=\"M17.3803 9.99998L5.83325 16.6666V3.33331L17.3803 9.99998Z\" fill=\"currentColor\" />\n </svg>`,\n settings: () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path\n d=\"M7.70833 18.3334L7.375 15.6667C7.19445 15.5972 7.02444 15.5139 6.865 15.4167C6.705 15.3195 6.54861 15.2153 6.39583 15.1042L3.91667 16.1459L1.625 12.1875L3.77083 10.5625C3.75694 10.4653 3.75 10.3714 3.75 10.2809C3.75 10.1909 3.75 10.0972 3.75 10C3.75 9.9028 3.75 9.80891 3.75 9.71835C3.75 9.62835 3.75694 9.53474 3.77083 9.43752L1.625 7.81252L3.91667 3.85419L6.39583 4.89585C6.54861 4.78474 6.70833 4.68058 6.875 4.58335C7.04167 4.48613 7.20833 4.4028 7.375 4.33335L7.70833 1.66669H12.2917L12.625 4.33335C12.8056 4.4028 12.9758 4.48613 13.1358 4.58335C13.2953 4.68058 13.4514 4.78474 13.6042 4.89585L16.0833 3.85419L18.375 7.81252L16.2292 9.43752C16.2431 9.53474 16.25 9.62835 16.25 9.71835C16.25 9.80891 16.25 9.9028 16.25 10C16.25 10.0972 16.25 10.1909 16.25 10.2809C16.25 10.3714 16.2361 10.4653 16.2083 10.5625L18.3542 12.1875L16.0625 16.1459L13.6042 15.1042C13.4514 15.2153 13.2917 15.3195 13.125 15.4167C12.9583 15.5139 12.7917 15.5972 12.625 15.6667L12.2917 18.3334H7.70833ZM10.0417 12.9167C10.8472 12.9167 11.5347 12.632 12.1042 12.0625C12.6736 11.4931 12.9583 10.8056 12.9583 10C12.9583 9.19447 12.6736 8.50696 12.1042 7.93752C11.5347 7.36808 10.8472 7.08335 10.0417 7.08335C9.22222 7.08335 8.53111 7.36808 7.96833 7.93752C7.40611 8.50696 7.125 9.19447 7.125 10C7.125 10.8056 7.40611 11.4931 7.96833 12.0625C8.53111 12.632 9.22222 12.9167 10.0417 12.9167ZM10.0417 11.25C9.69445 11.25 9.39945 11.1284 9.15667 10.885C8.91333 10.6422 8.79167 10.3472 8.79167 10C8.79167 9.6528 8.91333 9.3578 9.15667 9.11502C9.39945 8.87169 9.69445 8.75002 10.0417 8.75002C10.3889 8.75002 10.6842 8.87169 10.9275 9.11502C11.1703 9.3578 11.2917 9.6528 11.2917 10C11.2917 10.3472 11.1703 10.6422 10.9275 10.885C10.6842 11.1284 10.3889 11.25 10.0417 11.25ZM9.16667 16.6667H10.8125L11.1042 14.4584C11.5347 14.3472 11.9342 14.1839 12.3025 13.9684C12.6703 13.7534 13.0069 13.4931 13.3125 13.1875L15.375 14.0417L16.1875 12.625L14.3958 11.2709C14.4653 11.0764 14.5139 10.8714 14.5417 10.6559C14.5694 10.4409 14.5833 10.2222 14.5833 10C14.5833 9.7778 14.5694 9.55891 14.5417 9.34335C14.5139 9.12835 14.4653 8.92363 14.3958 8.72919L16.1875 7.37502L15.375 5.95835L13.3125 6.83335C13.0069 6.51391 12.6703 6.24641 12.3025 6.03085C11.9342 5.81585 11.5347 5.6528 11.1042 5.54169L10.8333 3.33335H9.1875L8.89583 5.54169C8.46528 5.6528 8.06611 5.81585 7.69833 6.03085C7.33 6.24641 6.99306 6.50697 6.6875 6.81252L4.625 5.95835L3.8125 7.37502L5.60417 8.70835C5.53472 8.91669 5.48611 9.12502 5.45833 9.33335C5.43056 9.54169 5.41667 9.76391 5.41667 10C5.41667 10.2222 5.43056 10.4375 5.45833 10.6459C5.48611 10.8542 5.53472 11.0625 5.60417 11.2709L3.8125 12.625L4.625 14.0417L6.6875 13.1667C6.99306 13.4861 7.33 13.7534 7.69833 13.9684C8.06611 14.1839 8.46528 14.3472 8.89583 14.4584L9.16667 16.6667Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n tick: () => G`<svg width=\"20\" height=\"21\" viewBox=\"0 0 20 21\" fill=\"none\" part=\"svg\">\n <path\n d=\"M7.50016 14.0001L4.00016 10.5001L2.8335 11.6667L7.50016 16.3334L17.5002 6.33341L16.3335 5.16675L7.50016 14.0001Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n \"volume-high\": () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path\n d=\"M2.5 7.49998V12.5H5.83333L10 16.6667V3.33332L5.83333 7.49998H2.5ZM13.75 9.99998C13.75 8.52498 12.9 7.25832 11.6667 6.64165V13.35C12.9 12.7417 13.75 11.475 13.75 9.99998ZM11.6667 2.69165V4.40832C14.075 5.12498 15.8333 7.35832 15.8333 9.99998C15.8333 12.6417 14.075 14.875 11.6667 15.5917V17.3083C15.0083 16.55 17.5 13.5667 17.5 9.99998C17.5 6.43332 15.0083 3.44998 11.6667 2.69165Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n \"volume-low\": () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path d=\"M5.83325 7.49998V12.5H9.16658L13.3333 16.6666V3.33331L9.16658 7.49998H5.83325Z\" fill=\"currentColor\" />\n </svg>`,\n \"volume-medium\": () => G`<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" part=\"svg\">\n <path\n d=\"M15.4167 9.99998C15.4167 8.52498 14.5667 7.25831 13.3334 6.64165V13.35C14.5667 12.7416 15.4167 11.475 15.4167 9.99998ZM4.16675 7.49998V12.5H7.50008L11.6667 16.6666V3.33331L7.50008 7.49998H4.16675Z\"\n fill=\"currentColor\"\n />\n </svg>`,\n vouch: () => G`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"28\"\n width=\"105\"\n viewBox=\"0 0 105 28\"\n fill=\"currentColor\"\n part=\"svg\"\n >\n <path\n d=\"M9.853 23.246L4.86 7.688H0L7 27.42h5.52l7.265-19.733h-4.65L9.854 23.246zM95.12 7.08a8.905 8.905 0 00-4.648 1.294V0H86.14v27.419h4.332V16.087a4.656 4.656 0 014.649-4.65 4.656 4.656 0 014.649 4.65v11.332h4.332V16.087c.026-4.966-4.015-9.008-8.981-9.008zM57.188 19.02a4.656 4.656 0 01-4.649 4.649 4.656 4.656 0 01-4.649-4.65V7.689h-4.332V19.02c0 4.966 4.041 8.98 8.981 8.98 4.94 0 8.981-4.04 8.981-8.98V7.688h-4.332V19.02zM30.483 7.133c-5.732 0-10.408 4.675-10.408 10.407s4.676 10.408 10.408 10.408c5.732 0 10.408-4.676 10.408-10.408 0-5.732-4.676-10.407-10.408-10.407zm0 16.483a6.076 6.076 0 116.075-6.076c0 3.355-2.747 6.076-6.075 6.076zM74.517 23.616a6.076 6.076 0 010-12.151 6.132 6.132 0 015.045 2.668l3.592-2.43a10.473 10.473 0 00-8.637-4.57c-5.732 0-10.408 4.675-10.408 10.407s4.676 10.408 10.408 10.408a10.35 10.35 0 008.611-4.596l-3.593-2.43a5.975 5.975 0 01-5.018 2.694z\"\n />\n </svg>`\n};\nvar ch = Object.defineProperty, dh = Object.getOwnPropertyDescriptor, Qr = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? dh(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && ch(e, t, i), i;\n};\nlet Ut = class extends Z {\n render() {\n return !this.icon || !Object.keys(ji).includes(this.icon) ? null : ji[this.icon]();\n }\n};\nUt.styles = [\n Z.styles ?? [],\n pe`\n :host {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n `\n];\nQr([\n P({ type: String })\n], Ut.prototype, \"icon\", 2);\nUt = Qr([\n Se(\"vmp-new-icon\")\n], Ut);\nvar uh = Object.defineProperty, fh = Object.getOwnPropertyDescriptor, lt = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? fh(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && uh(e, t, i), i;\n};\nlet Ye = class extends Z {\n constructor() {\n super(...arguments), this.active = !1, this.size = \"small\", this.rounded = \"medium\", this.weight = \"light\";\n }\n render() {\n return G`\n <vmp-new-button\n ?active=${this.active}\n size=${dt(this.size)}\n rounded=${dt(this.rounded)}\n weight=${dt(this.weight)}\n >\n <vmp-new-icon\n class=${te({\n tiny: this.size === \"tiny\",\n small: this.size === \"small\",\n large: this.size === \"large\"\n })}\n icon=${dt(this.icon)}\n ></vmp-new-icon>\n </vmp-new-button>\n `;\n }\n};\nYe.styles = [\n Z.styles ?? [],\n pe`\n .tiny::part(svg) {\n height: 12px;\n width: 12px;\n }\n\n .small::part(svg) {\n height: 20px;\n width: 20px;\n }\n\n .large::part(svg) {\n height: 32px;\n width: 32px;\n }\n `\n];\nlt([\n P({ type: Boolean })\n], Ye.prototype, \"active\", 2);\nlt([\n P({ type: String })\n], Ye.prototype, \"size\", 2);\nlt([\n P({ type: String })\n], Ye.prototype, \"rounded\", 2);\nlt([\n P({ type: String })\n], Ye.prototype, \"weight\", 2);\nlt([\n P({ type: String })\n], Ye.prototype, \"icon\", 2);\nYe = lt([\n Se(\"vmp-new-icon-button\")\n], Ye);\nconst Ys = `.tippy-box[data-animation=shift-away-subtle][data-state=hidden]{opacity:0}.tippy-box[data-animation=shift-away-subtle][data-state=hidden][data-placement^=top]{transform:translateY(5px)}.tippy-box[data-animation=shift-away-subtle][data-state=hidden][data-placement^=bottom]{transform:translateY(-5px)}.tippy-box[data-animation=shift-away-subtle][data-state=hidden][data-placement^=left]{transform:translate(5px)}.tippy-box[data-animation=shift-away-subtle][data-state=hidden][data-placement^=right]{transform:translate(-5px)}\n`;\nvar gh = Object.defineProperty, mh = Object.getOwnPropertyDescriptor, Tt = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? mh(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && gh(e, t, i), i;\n};\nlet Qe = class extends Z {\n constructor() {\n super(...arguments), this.semibold = !1, this.truncate = !1, this.size = \"medium\", this.content = \"\";\n }\n render() {\n return G`\n <div\n part=\"content\"\n class=${te({\n semibold: this.semibold,\n truncate: this.truncate,\n [this.size]: !0\n })}\n >\n ${this.content}\n </div>\n `;\n }\n};\nQe.styles = [\n Z.styles ?? [],\n pe`\n :host {\n --text-size: var(--fontSizes-medium);\n --text-line-height: var(--lineHeights-medium);\n --text-weight: var(--fontWeights-regular);\n }\n\n div {\n font-family: var(--fontFamilies-sans);\n font-size: var(--text-size);\n line-height: var(--text-line-height);\n font-weight: var(--text-weight);\n }\n\n .small {\n --text-size: var(--fontSizes-small);\n --text-line-height: var(--lineHeights-small);\n }\n\n .medium {\n --text-size: var(--fontSizes-medium);\n --text-line-height: var(--lineHeights-medium);\n }\n\n .large {\n --text-size: var(--fontSizes-large);\n --text-line-height: var(--lineHeights-large);\n }\n\n .semibold {\n --text-weight: var(--fontWeights-semibold);\n }\n\n .truncate {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n }\n `\n];\nTt([\n P({ type: Boolean })\n], Qe.prototype, \"semibold\", 2);\nTt([\n P({ type: Boolean })\n], Qe.prototype, \"truncate\", 2);\nTt([\n P({ type: String })\n], Qe.prototype, \"size\", 2);\nTt([\n P({ type: String })\n], Qe.prototype, \"content\", 2);\nQe = Tt([\n Se(\"vmp-new-text\")\n], Qe);\nvar ph = Object.defineProperty, yh = Object.getOwnPropertyDescriptor, xt = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? yh(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && ph(e, t, i), i;\n};\nlet Je = class extends Z {\n constructor() {\n super(...arguments), this.activeItems = [], this.visibleItems = null, this.subItemsActive = null, this.tippy = null, this._contentRef = Me();\n }\n _handleBackClick() {\n this.subItemsActive = null, this.visibleItems = this.items ?? null;\n }\n willUpdate() {\n this.visibleItems = this.visibleItems ?? this.items ?? null;\n }\n updated() {\n var e, t;\n const a = (t = (e = this.items) == null ? void 0 : e.items.find(({ id: s }) => this.subItemsActive === s)) == null ? void 0 : t.subItems;\n this.visibleItems = a ?? this.items ?? null, a || (this.subItemsActive = null);\n }\n connectedCallback() {\n super.connectedCallback(), requestAnimationFrame(() => {\n var t;\n const a = (t = this.shadowRoot) == null ? void 0 : t.querySelector(\"slot\"), e = a == null ? void 0 : a.assignedElements()[0];\n e && this._contentRef.value && (this.tippy = ws(e, {\n content: this._contentRef.value,\n allowHTML: !0,\n arrow: !1,\n animation: \"shift-away-subtle\",\n interactive: !0,\n placement: \"top\",\n trigger: \"click\",\n onShow: () => {\n this.dispatchEvent(new CustomEvent(\"menu:toggle\", { detail: !0 }));\n },\n onHide: () => {\n this.dispatchEvent(new CustomEvent(\"menu:toggle\", { detail: !1 }));\n },\n appendTo: () => this.shadowRoot\n }));\n });\n }\n disconnectedCallback() {\n var a;\n super.disconnectedCallback(), (a = this.tippy) == null || a.destroy();\n }\n render() {\n var a, e;\n return G`\n <slot></slot>\n <div ${Ne(this._contentRef)} class=\"content\">\n <div class=\"title\">\n ${this.subItemsActive ? G`\n <button class=\"back\" @click=${this._handleBackClick}>\n <vmp-new-icon icon=\"chevron-down\"></vmp-new-icon>\n </button>\n ` : null}\n <vmp-new-text\n ?bold=${!0}\n ?truncate=${!0}\n size=\"small\"\n .content=${((a = this.visibleItems) == null ? void 0 : a.title) ?? \"Sub Menu\"}\n ></vmp-new-text>\n </div>\n ${Qi(\n ((e = this.visibleItems) == null ? void 0 : e.items) ?? [],\n ({ id: t }) => t,\n (t) => G`\n <button\n class=\"item\"\n @click=${() => {\n t.subItems && (this.subItemsActive = t.id, this.visibleItems = t.subItems), t.event && this.dispatchEvent(new CustomEvent(t.event, { detail: t, bubbles: !0, composed: !0 }));\n }}\n >\n <vmp-new-text ?semibold=${!0} size=\"small\" content=${t.label}></vmp-new-text>\n ${t.subItems ? G`<vmp-new-icon class=\"forward\" icon=\"chevron-down\"></vmp-new-icon>` : this.activeItems.includes(t.id) ? G`<vmp-new-icon icon=\"tick\"></vmp-new-icon>` : null}\n </button>\n `\n )}\n </div>\n `;\n }\n};\nJe.styles = [\n Z.styles ?? [],\n $t(Ys),\n pe`\n :host {\n display: flex;\n }\n\n .content {\n display: flex;\n min-width: 140px;\n overflow: hidden;\n flex-direction: column;\n color: var(--colors-dark-1000);\n background: var(--colors-light-1000);\n border-radius: var(--radii-medium);\n transition: height 150ms ease-out;\n }\n\n .back {\n padding: 0;\n margin: 0;\n border: 0;\n cursor: pointer;\n background: transparent;\n color: var(--colors-dark-400);\n /* TODO: Kinda eyeballing this one */\n margin-left: calc(var(--space-xxs) * -1);\n transform: rotate(90deg);\n }\n\n .forward {\n transform: rotate(-90deg);\n }\n\n .title {\n display: flex;\n align-items: center;\n gap: var(--space-xxs);\n color: var(--colors-dark-400);\n text-transform: uppercase;\n height: 36px;\n padding: var(--space-small) var(--space-small) var(--space-xxs) var(--space-small);\n }\n\n .item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 42px;\n border: none;\n cursor: pointer;\n color: var(--colors-dark-1000);\n background: transparent;\n padding: 0 var(--space-small);\n }\n\n vmp-new-icon::part(svg) {\n height: 20px;\n width: 20px;\n }\n `\n];\nxt([\n P({ type: Object })\n], Je.prototype, \"items\", 2);\nxt([\n P({ type: Array })\n], Je.prototype, \"activeItems\", 2);\nxt([\n Ee()\n], Je.prototype, \"visibleItems\", 2);\nxt([\n Ee()\n], Je.prototype, \"subItemsActive\", 2);\nJe = xt([\n Se(\"vmp-new-menu\")\n], Je);\nvar vh = Object.defineProperty, Th = Object.getOwnPropertyDescriptor, zs = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? Th(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && vh(e, t, i), i;\n};\nlet yt = class extends Z {\n constructor() {\n super(...arguments), this.content = \"\", this.disabled = !1, this.tippy = null, this._contentRef = Me();\n }\n connectedCallback() {\n super.connectedCallback(), requestAnimationFrame(() => {\n var t;\n const a = (t = this.shadowRoot) == null ? void 0 : t.querySelector(\"slot\"), e = a == null ? void 0 : a.assignedElements()[0];\n e && this._contentRef.value && (this.tippy = ws(e, {\n content: this._contentRef.value,\n allowHTML: !0,\n arrow: !1,\n animation: \"shift-away-subtle\",\n interactive: !1,\n placement: \"top\",\n // To be above the vmp-new-menu\n zIndex: 1e4,\n appendTo: () => this.shadowRoot\n }));\n });\n }\n disconnectedCallback() {\n var a;\n super.disconnectedCallback(), (a = this.tippy) == null || a.destroy();\n }\n updated() {\n var a, e;\n this.disabled ? (a = this.tippy) == null || a.disable() : (e = this.tippy) == null || e.enable();\n }\n render() {\n return G`\n <slot></slot>\n <div ${Ne(this._contentRef)} class=\"content\">\n <vmp-new-text content=${this.content}></vmp-new-text>\n </div>\n `;\n }\n};\nyt.styles = [\n Z.styles ?? [],\n $t(Ys),\n pe`\n :host {\n display: flex;\n }\n\n .content {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--space-small);\n color: var(--colors-light-1000);\n background: var(--colors-dark-800);\n border-radius: var(--radii-medium);\n }\n `\n];\nzs([\n P({ type: String })\n], yt.prototype, \"content\", 2);\nzs([\n P({ type: Boolean })\n], yt.prototype, \"disabled\", 2);\nyt = zs([\n Se(\"vmp-new-tooltip\")\n], yt);\nvar xh = Object.defineProperty, Eh = Object.getOwnPropertyDescriptor, js = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? Eh(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && xh(e, t, i), i;\n};\nlet vt = class extends Z {\n constructor() {\n super(...arguments), this.volume = 1, this.muted = !1, this.tippy = null, this._contentRef = Me(), this._anchorRef = Me(), this._menuOpen = !1;\n }\n connectedCallback() {\n super.connectedCallback(), requestAnimationFrame(() => {\n this._anchorRef.value && this._contentRef.value && (this.tippy = ws(this._anchorRef.value, {\n content: this._contentRef.value,\n allowHTML: !0,\n arrow: !1,\n animation: \"shift-away-subtle\",\n interactive: !0,\n placement: \"top\",\n interactiveBorder: 20,\n onShow: () => {\n this._menuOpen = !0, this.dispatchEvent(new CustomEvent(\"menu:toggle\", { detail: !0 }));\n },\n onHide: () => {\n this._menuOpen = !1, this.dispatchEvent(new CustomEvent(\"menu:toggle\", { detail: !1 }));\n },\n appendTo: () => this.shadowRoot\n }));\n });\n }\n disconnectedCallback() {\n var a;\n super.disconnectedCallback(), (a = this.tippy) == null || a.destroy();\n }\n render() {\n return G`\n <vmp-new-icon-button\n ${Ne(this._anchorRef)}\n icon=${this.muted || this.volume === 0 ? \"muted\" : this.volume < 1 / 3 ? \"volume-low\" : this.volume < 2 / 3 ? \"volume-medium\" : \"volume-high\"}\n weight=\"heavy\"\n rounded=\"full\"\n @pointerdown=${(a) => {\n this._menuOpen && a.preventDefault();\n }}\n @click=${() => {\n this._menuOpen && this.dispatchEvent(new CustomEvent(\"volume:click\", { bubbles: !0, composed: !0, detail: this.muted }));\n }}\n ></vmp-new-icon-button>\n <div ${Ne(this._contentRef)} class=\"content\">\n <input key=\"volume\" type=\"range\" min=\"0\" max=\"1\" step=\"0.01\" .value=${this.volume.toString()} />\n </div>\n `;\n }\n};\nvt.styles = [\n Z.styles ?? [],\n $t(Ys),\n pe`\n .content {\n --volume-slider-height: 4px;\n --volume-slider-width: 78px;\n\n display: flex;\n height: var(--volume-slider-width);\n width: var(--volume-slider-height);\n }\n\n .spacer {\n display: flex;\n height: var(--volume-slider-width);\n width: var(--volume-slider-height);\n }\n\n input {\n position: absolute;\n appearance: none !important;\n height: var(--volume-slider-height);\n width: var(--volume-slider-width);\n overflow: hidden;\n border-radius: 1000rem;\n cursor: pointer;\n background: var(--colors-light-200);\n rotate: -90deg;\n /* Minus the input margin */\n translate: 0 calc(var(--volume-slider-width) - 4px);\n transform-origin: left;\n transition: height 100ms ease-out, transform 100ms ease-out;\n }\n\n input:hover {\n height: calc(var(--volume-slider-height) * 2);\n }\n\n input::-webkit-slider-runnable-track {\n appearance: none !important;\n height: var(--volume-slider-height);\n color: var(--colors-light-1000);\n transition: height 100ms ease-out;\n }\n\n input::-moz-range-track {\n appearance: none !important;\n height: var(--volume-slider-height);\n color: var(--colors-light-1000);\n transition: height 100ms ease-out;\n }\n\n input::-ms-track {\n appearance: none !important;\n height: var(--volume-slider-height);\n color: var(--colors-light-1000);\n transition: height 100ms ease-out;\n }\n\n input:hover::-webkit-slider-runnable-track {\n height: calc(var(--volume-slider-height) * 2);\n }\n\n input:hover::-moz-range-track {\n height: calc(var(--volume-slider-height) * 2);\n }\n\n input:hover::-ms-track {\n height: calc(var(--volume-slider-height) * 2);\n }\n\n input::-webkit-slider-thumb {\n appearance: none !important;\n height: var(--volume-slider-height) !important;\n width: var(--volume-slider-height) !important;\n color: var(--colors-light-1000);\n border-radius: 50%;\n border: none;\n background: var(--colors-light-1000);\n box-shadow: calc((var(--volume-slider-width) + var(--volume-slider-height) / 2) * -1) 0 0\n var(--volume-slider-width),\n calc((var(--volume-slider-width) + var(--volume-slider-height) / 2)) 0 0 var(--volume-slider-width)\n var(--colors-dark-640);\n transition: height 100ms ease-out, width 100ms ease-out, box-shadow 100ms ease-out, color 200ms ease-out;\n }\n\n input::-moz-range-thumb {\n appearance: none !important;\n height: var(--volume-slider-height) !important;\n width: var(--volume-slider-height) !important;\n color: var(--colors-light-1000);\n border-radius: 50%;\n border: none;\n background: var(--colors-light-1000);\n box-shadow: calc((var(--volume-slider-width) + var(--volume-slider-height) / 2) * -1) 0 0\n var(--volume-slider-width),\n calc((var(--volume-slider-width) + var(--volume-slider-height) / 2)) 0 0 var(--volume-slider-width)\n var(--colors-dark-640);\n transition: height 100ms ease-out, width 100ms ease-out, box-shadow 100ms ease-out, color 200ms ease-out;\n }\n\n input::-ms-thumb {\n appearance: none !important;\n height: var(--volume-slider-height) !important;\n width: var(--volume-slider-height) !important;\n color: var(--colors-light-1000);\n border-radius: 50%;\n border: none;\n background: var(--colors-light-1000);\n box-shadow: calc((var(--volume-slider-width) + var(--volume-slider-height) / 2) * -1) 0 0\n var(--volume-slider-width),\n calc((var(--volume-slider-width) + var(--volume-slider-height) / 2)) 0 0 var(--volume-slider-width)\n var(--colors-dark-640);\n transition: height 100ms ease-out, width 100ms ease-out, box-shadow 100ms ease-out, color 200ms ease-out;\n }\n\n input:hover::-webkit-slider-thumb {\n --volume-slider-height: 8px;\n color: var(--colors-light-800);\n }\n\n input:hover::-moz-range-thumb {\n --volume-slider-height: 8px;\n color: var(--colors-light-800);\n }\n\n input:hover::-ms-thumb {\n --volume-slider-height: 8px;\n color: var(--colors-light-800);\n }\n `\n];\njs([\n P({ type: Number })\n], vt.prototype, \"volume\", 2);\njs([\n P({ type: Boolean })\n], vt.prototype, \"muted\", 2);\nvt = js([\n Se(\"vmp-new-volume-button\")\n], vt);\nvar Sh = Object.defineProperty, bh = Object.getOwnPropertyDescriptor, Kt = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? bh(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && Sh(e, t, i), i;\n};\nlet at = class extends Z {\n constructor() {\n super(...arguments), this.duration = 0, this.currentTime = 0, this.buffer = [];\n }\n render() {\n var e;\n const a = ((e = this.buffer) == null ? void 0 : e.sort((t, s) => t.start < s.start ? -1 : s.start < t.start ? 1 : 0).reduce((t, { start: s, end: i }, r) => {\n const n = t[r - 1], o = Math.floor(s), l = Math.ceil(i);\n return t.push({ id: s, start: Math.max(0, o), end: Math.min(l, 100) }), n && n.end >= s - 1 && (t[r].start = n.end), t;\n }, [])) ?? [];\n return G`\n <div class=\"container\">\n <input\n key=\"scrubber\"\n aria-label=\"Progress scrubber\"\n type=\"range\"\n min=\"0\"\n max=${this.duration}\n step=\"0.01\"\n .value=${this.currentTime.toString()}\n data-testid=\"scrubber\"\n />\n ${Qi(\n a,\n ({ id: t }) => t,\n (t) => G`\n <div class=\"buffer\" style=${`left: ${t.start}%; width: ${t.end - t.start}%`}></div>\n `\n )}\n </div>\n `;\n }\n};\nat.styles = [\n Z.styles ?? [],\n pe`\n :host {\n --player-scrubber-height: 8px;\n --player-scrubber-shadow-width: 4000px;\n\n display: flex;\n }\n\n .container {\n position: relative;\n display: flex;\n width: 100%;\n opacity: 1;\n border-radius: 1000rem;\n overflow: hidden;\n transition: opacity 150ms ease-out;\n }\n\n input {\n appearance: none !important;\n height: var(--player-scrubber-height);\n width: 100%;\n margin: 0;\n overflow: hidden;\n cursor: pointer;\n background: var(--colors-light-200);\n transition: height 100ms ease-out, transform 100ms ease-out;\n }\n\n .buffer {\n position: absolute;\n height: var(--player-scrubber-height);\n width: var(--player-buffered-percentage);\n background: var(--colors-light-400);\n pointer-events: none;\n transition: height 100ms ease-out, width 250ms ease-out, left 250ms ease-out;\n }\n\n .container:hover .buffer {\n height: calc(var(--player-scrubber-height) * 2);\n }\n\n .container:hover input {\n height: calc(var(--player-scrubber-height) * 2);\n }\n\n input::-webkit-slider-runnable-track {\n appearance: none !important;\n height: var(--player-scrubber-height);\n color: var(--colors-light-1000);\n z-index: 2;\n transition: height 100ms ease-out;\n }\n\n input::-moz-range-track {\n appearance: none !important;\n height: var(--player-scrubber-height);\n color: var(--colors-light-1000);\n transition: height 100ms ease-out;\n }\n\n input::-ms-track {\n appearance: none !important;\n height: var(--player-scrubber-height);\n color: var(--colors-light-1000);\n transition: height 100ms ease-out;\n }\n\n .container:hover input::-webkit-slider-runnable-track {\n height: calc(var(--player-scrubber-height) * 2);\n }\n\n .container:hover input::-moz-range-track {\n height: calc(var(--player-scrubber-height) * 2);\n }\n\n .container:hover input::-ms-track {\n height: calc(var(--player-scrubber-height) * 2);\n }\n\n input::-webkit-slider-thumb {\n appearance: none !important;\n height: var(--player-scrubber-height) !important;\n width: var(--player-scrubber-height) !important;\n color: var(--colors-light-1000);\n border-radius: 50%;\n border: none;\n background: var(--colors-light-1000);\n box-shadow: calc((var(--player-scrubber-shadow-width) + var(--player-scrubber-height) / 2) * -1) 0 0\n var(--player-scrubber-shadow-width);\n transition: height 100ms ease-out, width 100ms ease-out, box-shadow 100ms ease-out, color 200ms ease-out;\n }\n\n input::-moz-range-thumb {\n appearance: none !important;\n height: var(--player-scrubber-height) !important;\n width: var(--player-scrubber-height) !important;\n color: var(--colors-light-1000);\n border-radius: 50%;\n border: none;\n background: var(--colors-light-1000);\n box-shadow: calc((var(--player-scrubber-shadow-width) + var(--player-scrubber-height) / 2) * -1) 0 0\n var(--player-scrubber-shadow-width);\n transition: height 100ms ease-out, width 100ms ease-out, box-shadow 100ms ease-out, color 200ms ease-out;\n }\n\n input::-ms-thumb {\n appearance: none !important;\n height: var(--player-scrubber-height) !important;\n width: var(--player-scrubber-height) !important;\n color: var(--colors-light-1000);\n border-radius: 50%;\n border: none;\n background: var(--colors-light-1000);\n box-shadow: calc((var(--player-scrubber-shadow-width) + var(--player-scrubber-height) / 2) * -1) 0 0\n var(--player-scrubber-shadow-width);\n transition: height 100ms ease-out, width 100ms ease-out, box-shadow 100ms ease-out, color 200ms ease-out;\n }\n\n .container:hover input::-webkit-slider-thumb {\n --player-scrubber-height: 16px;\n color: var(--colors-light-800);\n }\n\n .container:hover input::-moz-range-thumb {\n --player-scrubber-height: 16px;\n color: var(--colors-light-800);\n }\n\n .container:hover input::-ms-thumb {\n --player-scrubber-height: 16px;\n color: var(--colors-light-800);\n }\n `\n];\nKt([\n P({ type: Number })\n], at.prototype, \"duration\", 2);\nKt([\n P({ type: Number })\n], at.prototype, \"currentTime\", 2);\nKt([\n P({ type: Array })\n], at.prototype, \"buffer\", 2);\nat = Kt([\n Se(\"vmp-new-progress-scrubber\")\n], at);\nvar Lh = Object.defineProperty, Ah = Object.getOwnPropertyDescriptor, ue = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? Ah(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && Lh(e, t, i), i;\n};\nlet ae = class extends Z {\n constructor() {\n super(...arguments), this.resizeHider = new oh(this), this.playing = !1, this.volume = 1, this.muted = !1, this.currentTime = 0, this.duration = 0, this.level = -1, this.playbackRate = 1, this.buffer = [], this.levels = [], this.captions = !1, this.fullscreen = !1, this.controls = Ws, this.volumeMenuOpen = !1, this.levelsMenuOpen = !1, this.playbackRateMenuOpen = !1, this.settingsMenuOpen = !1;\n }\n _handleNavigateBackClick() {\n this.dispatchEvent(new CustomEvent(\"navigate:back\", { bubbles: !0, composed: !0 }));\n }\n _handleNavigateForwardClick() {\n this.dispatchEvent(new CustomEvent(\"navigate:forward\", { bubbles: !0, composed: !0 }));\n }\n _handlePlayClick() {\n this.dispatchEvent(new CustomEvent(\"play:click\", { bubbles: !0, composed: !0, detail: this.playing }));\n }\n _handleCaptionsClick() {\n this.dispatchEvent(new CustomEvent(\"captions:click\", { bubbles: !0, composed: !0, detail: this.captions }));\n }\n _handleFullscreenClick() {\n this.dispatchEvent(new CustomEvent(\"fullscreen:click\", { bubbles: !0, composed: !0, detail: this.fullscreen }));\n }\n _handleVolumeMenuToggle({ detail: a }) {\n this.volumeMenuOpen = a;\n }\n _handleLevelsMenuOpen({ detail: a }) {\n this.levelsMenuOpen = a;\n }\n _handlePlaybackMenuToggle({ detail: a }) {\n this.playbackRateMenuOpen = a;\n }\n _handleSettingsMenuToggle({ detail: a }) {\n this.settingsMenuOpen = a;\n }\n hideMenus() {\n var a, e;\n (e = Array.from(\n (a = this.shadowRoot) == null ? void 0 : a.querySelectorAll(\"vmp-new-menu, vmp-new-tooltip, vmp-new-volume-button\")\n )) == null || e.forEach((t) => {\n var s;\n (s = t.tippy) == null || s.hide();\n });\n }\n render() {\n var E, T, A, b, D, I, C, _, R, F, k, W, oe;\n const a = ((E = this.levels) == null ? void 0 : E.map((V, Y) => {\n const q = Math.min(V.width, V.height);\n return {\n id: `level-${Y.toString()}`,\n event: \"level:click\",\n label: `${q}p`,\n value: {\n resolution: q,\n level: Y\n }\n };\n })) ?? [], e = {\n title: \"Quality\",\n items: [\n ...a.reverse(),\n {\n id: \"level--1\",\n event: \"level:click\",\n label: \"Auto\",\n value: {\n level: -1,\n resolution: \"auto\"\n }\n }\n ]\n }, t = {\n id: \"levels\",\n label: \"Quality\",\n subItems: e\n }, s = (T = e.items) == null ? void 0 : T.find(({ value: V }) => V.level === this.level), i = [\"levels\", \"playback-rate\", \"captions\", \"fullscreen\"].filter(\n (V) => {\n var Y;\n return (Y = this.controls) == null ? void 0 : Y.includes(V);\n }\n ), r = {\n title: \"Settings\",\n items: [Zl, Ql, t, Jl].filter(\n ({ id: V }) => i.includes(V) && this.resizeHider.hiddenControls.includes(V)\n )\n }, n = (A = this.controls) == null ? void 0 : A.includes(\"progress\"), o = (b = this.controls) == null ? void 0 : b.includes(\"navigation\"), l = (D = this.controls) == null ? void 0 : D.includes(\"play\"), h = (I = this.controls) == null ? void 0 : I.includes(\"volume\"), c = (C = this.controls) == null ? void 0 : C.includes(\"current-time\"), d = (_ = this.controls) == null ? void 0 : _.includes(\"duration\"), u = (R = this.controls) == null ? void 0 : R.includes(\"levels\"), f = (F = this.controls) == null ? void 0 : F.includes(\"speed\"), g = (k = this.controls) == null ? void 0 : k.includes(\"captions\"), p = (W = this.controls) == null ? void 0 : W.includes(\"fullscreen\"), y = l || h || c || d || u || f || g || p, v = [\n `level-${(oe = this.level) == null ? void 0 : oe.toString()}`,\n `playback-rate-${this.playbackRate.toString()}`,\n this.captions && \"captions\",\n this.fullscreen && \"fullscreen\"\n ].filter(Boolean);\n return G`\n <div\n ${this.resizeHider.measure()}\n ${this.resizeHider.contain()}\n class=${te({\n container: !0,\n hidden: !n && !y\n })}\n >\n <div\n class=${te({\n \"scrubber-container\": !0,\n hidden: !n\n })}\n >\n <vmp-new-progress-scrubber\n class=${te({\n scrubber: !0,\n invisible: this.volumeMenuOpen || this.levelsMenuOpen || this.playbackRateMenuOpen || this.settingsMenuOpen\n })}\n duration=${this.duration}\n currentTime=${this.currentTime}\n .buffer=${this.buffer}\n ></vmp-new-progress-scrubber>\n </div>\n <div\n ${this.resizeHider.contain()}\n class=${te({\n buttons: !0,\n hidden: !y\n })}\n >\n <div class=\"section\">\n <div\n ${this.resizeHider.hide(\"navigation\", 6)}\n class=${te({\n navigation: !0,\n hidden: !o\n })}\n >\n <vmp-new-icon-button\n icon=\"arrow-left\"\n weight=\"heavy\"\n rounded=\"full\"\n @click=${this._handleNavigateBackClick}\n ></vmp-new-icon-button>\n <vmp-new-icon-button\n icon=\"arrow-right\"\n weight=\"heavy\"\n rounded=\"full\"\n @click=${this._handleNavigateForwardClick}\n ></vmp-new-icon-button>\n </div>\n <vmp-new-icon-button\n class=${te({\n hidden: !l\n })}\n icon=${this.playing ? \"pause\" : \"play\"}\n weight=\"heavy\"\n rounded=\"full\"\n data-testid=\"play\"\n @click=${this._handlePlayClick}\n ></vmp-new-icon-button>\n <vmp-new-volume-button\n class=${te({\n hidden: !h\n })}\n ?muted=${this.muted}\n volume=${this.volume}\n @menu:toggle=${this._handleVolumeMenuToggle}\n ></vmp-new-volume-button>\n <div class=\"time\">\n <vmp-new-text\n ${this.resizeHider.hide(\"current-time\", 1)}\n class=${te({\n hidden: !c\n })}\n ?semibold=${!0}\n content=\"${zi(this.currentTime)}${d ? \"/\" : null}\"\n ></vmp-new-text>\n <vmp-new-text\n ${this.resizeHider.hide(\"duration\", 5)}\n class=${te({\n hidden: !d\n })}\n ?semibold=${!0}\n content=${zi(this.duration)}\n ></vmp-new-text>\n </div>\n </div>\n <div class=\"section\">\n <vmp-new-menu\n ${this.resizeHider.hide(\"levels\", 0)}\n class=${te({\n hidden: !u || a.length <= 0\n })}\n .items=${e}\n .activeItems=${v}\n @menu:toggle=${this._handleLevelsMenuOpen}\n >\n <vmp-new-tooltip content=\"Quality\" ?disabled=${this.levelsMenuOpen}>\n <vmp-new-button ?active=${this.levelsMenuOpen} icon=\"chevron-down\"\n >${s == null ? void 0 : s.label}</vmp-new-button\n >\n </vmp-new-tooltip>\n </vmp-new-menu>\n <vmp-new-menu\n ${this.resizeHider.hide(\"playback-rate\", 4)}\n class=${te({\n hidden: !f\n })}\n .items=${Zr}\n .activeItems=${v}\n @menu:toggle=${this._handlePlaybackMenuToggle}\n >\n <vmp-new-tooltip content=\"Playback speed\" ?disabled=${this.playbackRateMenuOpen}>\n <vmp-new-button ?active=${this.playbackRateMenuOpen} icon=\"chevron-down\"\n >${this.playbackRate.toFixed(1)}x</vmp-new-button\n >\n </vmp-new-tooltip>\n </vmp-new-menu>\n <vmp-new-tooltip\n ${this.resizeHider.hide(\"captions\", 3)}\n class=${te({\n hidden: !g\n })}\n content=\"Captions\"\n >\n <vmp-new-icon-button\n ?active=${this.captions}\n icon=${this.captions ? \"captions\" : \"captions-cross\"}\n rounded=\"full\"\n @click=${this._handleCaptionsClick}\n ></vmp-new-icon-button>\n </vmp-new-tooltip>\n <vmp-new-tooltip\n ${this.resizeHider.hide(\"fullscreen\", 2)}\n content=\"Fullscreen\"\n class=${te({\n hidden: !p\n })}\n >\n <vmp-new-icon-button\n ?active=${this.fullscreen}\n icon=${this.fullscreen ? \"minimize\" : \"maximize\"}\n rounded=\"full\"\n data-testid=\"fullscreen\"\n @click=${this._handleFullscreenClick}\n ></vmp-new-icon-button>\n </vmp-new-tooltip>\n <vmp-new-menu\n ${this.resizeHider.show(\"settings\", [\"levels\", \"playback-rate\", \"captions\", \"fullscreen\"])}\n .items=${r}\n .activeItems=${v}\n @menu:toggle=${this._handleSettingsMenuToggle}\n >\n <vmp-new-tooltip content=\"Settings\" ?disabled=${this.settingsMenuOpen}>\n <vmp-new-icon-button\n ?active=${this.settingsMenuOpen}\n icon=\"settings\"\n rounded=\"full\"\n ></vmp-new-icon-button>\n </vmp-new-tooltip>\n </vmp-new-menu>\n </div>\n </div>\n </div>\n `;\n }\n};\nae.styles = [\n Z.styles ?? [],\n pe`\n :host {\n --controls-border-radius: var(--player-border-radius, 0px);\n\n display: flex;\n width: 100%;\n isolation: isolate;\n }\n\n .container {\n display: flex;\n flex-direction: column;\n gap: var(--space-small);\n flex: 1;\n min-width: 0;\n overflow: auto;\n padding: var(--space-xl) var(--space-xs) var(--space-xs) var(--space-xs);\n background: linear-gradient(to bottom, transparent 20%, var(--colors-dark-800) 100%);\n border-radius: var(--controls-border-radius);\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n .buttons {\n display: flex;\n justify-content: space-between;\n gap: var(--space-xs);\n width: max-content;\n min-width: 100%;\n }\n\n .section {\n display: flex;\n gap: var(--space-xs);\n }\n\n .scrubber-container {\n position: relative;\n display: flex;\n height: 8px;\n }\n\n .scrubber {\n position: absolute;\n width: 100%;\n bottom: 0;\n transition: opacity 150ms ease-out;\n }\n\n .invisible {\n opacity: 0;\n pointer-events: none;\n }\n\n .navigation {\n display: flex;\n background: var(--colors-light-1000);\n border-radius: 1000rem;\n }\n\n .time {\n display: flex;\n align-items: center;\n color: var(--colors-light-1000);\n white-space: nowrap;\n font-variant-numeric: tabular-nums;\n }\n\n .hidden {\n display: none;\n }\n `\n];\nue([\n P({ type: Boolean })\n], ae.prototype, \"playing\", 2);\nue([\n P({ type: Number })\n], ae.prototype, \"volume\", 2);\nue([\n P({ type: Boolean })\n], ae.prototype, \"muted\", 2);\nue([\n P({ type: Number })\n], ae.prototype, \"currentTime\", 2);\nue([\n P({ type: Number })\n], ae.prototype, \"duration\", 2);\nue([\n P({ type: Number })\n], ae.prototype, \"level\", 2);\nue([\n P({ type: Number })\n], ae.prototype, \"playbackRate\", 2);\nue([\n P({ type: Array })\n], ae.prototype, \"buffer\", 2);\nue([\n P({ type: Array, attribute: !1 })\n], ae.prototype, \"levels\", 2);\nue([\n P({ type: Boolean })\n], ae.prototype, \"captions\", 2);\nue([\n P({ type: Boolean })\n], ae.prototype, \"fullscreen\", 2);\nue([\n P({ type: Array })\n], ae.prototype, \"controls\", 2);\nue([\n Ee()\n], ae.prototype, \"volumeMenuOpen\", 2);\nue([\n Ee()\n], ae.prototype, \"levelsMenuOpen\", 2);\nue([\n Ee()\n], ae.prototype, \"playbackRateMenuOpen\", 2);\nue([\n Ee()\n], ae.prototype, \"settingsMenuOpen\", 2);\nae = ue([\n Se(\"vmp-new-player-controls\")\n], ae);\nvar Rh = Object.defineProperty, Ih = Object.getOwnPropertyDescriptor, wh = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? Ih(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && Rh(e, t, i), i;\n};\nlet Is = class extends Z {\n render() {\n return G`<vmp-new-icon icon=\"loading\"></vmp-new-icon>`;\n }\n};\nIs.styles = [\n Z.styles ?? [],\n pe`\n :host {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n `\n];\nIs = wh([\n Se(\"vmp-new-loading-spinner\")\n], Is);\nvar Ch = Object.defineProperty, Dh = Object.getOwnPropertyDescriptor, Jr = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? Dh(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && Ch(e, t, i), i;\n};\nlet Bt = class extends Z {\n constructor() {\n super(...arguments), this.caption = \"\";\n }\n render() {\n return G`\n <div class=\"container\">\n <vmp-new-text content=${this.caption} size=\"large\"></vmp-new-text>\n </div>\n `;\n }\n};\nBt.styles = [\n Z.styles ?? [],\n pe`\n .container {\n display: block;\n margin: 0 var(--space-small);\n text-align: center;\n }\n\n vmp-new-text::part(content) {\n display: inline;\n padding: var(--space-xxs) var(--space-xs);\n text-align: center;\n border-radius: var(--radii-small);\n box-decoration-break: clone;\n -webkit-box-decoration-break: clone;\n color: var(--colors-light-1000);\n background: var(--colors-dark-800);\n /* Line height controls the spacing between the cloned boxes so has to override the default */\n line-height: 2.2;\n }\n `\n];\nJr([\n P({ type: String })\n], Bt.prototype, \"caption\", 2);\nBt = Jr([\n Se(\"vmp-new-captions\")\n], Bt);\nvar _h = Object.defineProperty, kh = Object.getOwnPropertyDescriptor, me = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? kh(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && _h(e, t, i), i;\n};\nconst Ph = 3e3;\nlet he = class extends Z {\n constructor() {\n super(...arguments), this.loading = !1, this.playing = !1, this.volume = 1, this.muted = !1, this.currentTime = 0, this.duration = 0, this.levels = [], this.level = -1, this.playbackRate = 1, this.caption = \"\", this.buffer = [], this.captions = !1, this.fullscreen = !1, this.controls = Ws, this.showControls = !0, this._hasTouched = !1, this._playerControlsRef = Me();\n }\n _startHideControls() {\n clearTimeout(this._controlHideTimeout), this._controlHideTimeout = setTimeout(() => {\n this.showControls = !1, this._hasTouched = !1;\n }, Ph);\n }\n _immediateShowControls() {\n this.showControls = !0, clearTimeout(this._controlHideTimeout);\n }\n _immediateHideControls() {\n this.showControls = !1, this._hasTouched = !1, clearTimeout(this._controlHideTimeout);\n }\n willUpdate(a) {\n var e;\n a.has(\"showControls\") && this.playing && !this.showControls && ((e = this._playerControlsRef.value) == null || e.hideMenus());\n }\n render() {\n var s;\n const a = (s = this.controls) == null ? void 0 : s.includes(\"play-large\"), e = this.playing && !this.showControls, t = !!(a && !this.playing);\n return G`\n <div\n class=${te({\n container: !0,\n hide: e\n })}\n @mousemove=${() => {\n this._immediateShowControls(), this._startHideControls();\n }}\n @mouseleave=${this._immediateHideControls}\n @touchstart=${(i) => {\n this.playing && !this.showControls && !this._hasTouched && (i.preventDefault(), this._hasTouched = !0, this._immediateShowControls(), this._startHideControls());\n }}\n >\n <div\n class=${te({\n fixtures: !0,\n invisible: !this.loading && !t\n })}\n @click=${() => {\n this.showControls && this.dispatchEvent(\n new CustomEvent(\"play:click\", { bubbles: !0, composed: !0, detail: this.playing })\n );\n }}\n >\n <vmp-new-icon\n class=${te({\n hidden: !t\n })}\n icon=\"play-large\"\n ></vmp-new-icon>\n <vmp-new-loading-spinner\n class=${te({\n hidden: !this.loading || t\n })}\n ></vmp-new-loading-spinner>\n </div>\n <div\n class=${te({\n controls: !0,\n hide: e\n })}\n @focusin=${this._immediateShowControls}\n @mousemove=${(i) => {\n i.stopPropagation(), this._immediateShowControls();\n }}\n @click=${this._immediateShowControls}\n >\n ${this.captions ? G`<vmp-new-captions\n class=${te({\n hidden: !this.caption,\n hiddenControls: e\n })}\n caption=${this.caption}\n ></vmp-new-captions>` : null}\n <vmp-new-player-controls\n ${Ne(this._playerControlsRef)}\n ?playing=${this.playing}\n ?muted=${this.muted}\n volume=${this.volume}\n currentTime=${this.currentTime}\n duration=${this.duration}\n .levels=${this.levels}\n .level=${this.level}\n playbackRate=${this.playbackRate}\n .buffer=${this.buffer}\n .controls=${this.controls}\n ?captions=${this.captions}\n ?fullscreen=${this.fullscreen}\n ></vmp-new-player-controls>\n </div>\n </div>\n `;\n }\n};\nhe.styles = [\n Z.styles ?? [],\n pe`\n :host {\n --overlay-border-radius: var(--player-border-radius, 0px);\n }\n\n .container {\n position: relative;\n display: flex;\n justify-content: space-between;\n height: 100%;\n width: 100%;\n overflow: hidden;\n border-radius: var(--overlay-border-radius);\n }\n\n .container.hide {\n cursor: none;\n }\n\n .fixtures {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 1;\n color: var(--colors-light-1000);\n background: var(--colors-dark-200);\n border-radius: var(--overlay-border-radius);\n transition: opacity 150ms ease-out;\n }\n\n .hidden {\n display: none;\n }\n\n .invisible {\n opacity: 0;\n }\n\n .controls {\n position: relative;\n display: flex;\n flex-direction: column;\n align-self: flex-end;\n flex: 1;\n min-width: 0;\n opacity: 1;\n isolation: isolate;\n transform: translateY(0%);\n transition: transform 200ms ease-out;\n }\n\n .controls.hide {\n pointer-events: none;\n transform: translateY(100%);\n }\n\n vmp-new-captions {\n position: absolute;\n bottom: calc(100%);\n width: 100%;\n transform: translateY(var(--space-medium));\n transition: transform 200ms ease-out;\n }\n\n vmp-new-captions.hiddenControls {\n transform: translateY(calc(var(--space-small) * -1));\n }\n `\n];\nme([\n P({ type: Boolean })\n], he.prototype, \"loading\", 2);\nme([\n P({ type: Boolean })\n], he.prototype, \"playing\", 2);\nme([\n P({ type: Number })\n], he.prototype, \"volume\", 2);\nme([\n P({ type: Boolean })\n], he.prototype, \"muted\", 2);\nme([\n P({ type: Number })\n], he.prototype, \"currentTime\", 2);\nme([\n P({ type: Number })\n], he.prototype, \"duration\", 2);\nme([\n P({ type: Array, attribute: !1 })\n], he.prototype, \"levels\", 2);\nme([\n P({ type: Number })\n], he.prototype, \"level\", 2);\nme([\n P({ type: Number })\n], he.prototype, \"playbackRate\", 2);\nme([\n P({ type: String })\n], he.prototype, \"caption\", 2);\nme([\n P({ type: Array })\n], he.prototype, \"buffer\", 2);\nme([\n P({ type: Boolean })\n], he.prototype, \"captions\", 2);\nme([\n P({ type: Boolean })\n], he.prototype, \"fullscreen\", 2);\nme([\n P({ type: Array })\n], he.prototype, \"controls\", 2);\nme([\n Ee()\n], he.prototype, \"showControls\", 2);\nhe = me([\n Se(\"vmp-new-player-overlay\")\n], he);\nvar Oh = Object.defineProperty, Fh = Object.getOwnPropertyDescriptor, ce = (a, e, t, s) => {\n for (var i = s > 1 ? void 0 : s ? Fh(e, t) : e, r = a.length - 1, n; r >= 0; r--)\n (n = a[r]) && (i = (s ? n(e, t, i) : n(i)) || i);\n return s && i && Oh(e, t, i), i;\n};\nlet ie = class extends Z {\n constructor() {\n super(...arguments), this.burnCaptions = !1, this.propAspectRatio = 0, this.preload = \"auto\", this.autoplay = !1, this.loading = !1, this.compilation = tn, this._sceneController = new jl(this), this._drawController = new cn(this), this._wasPlaying = !1, this._manualMute = this.muted, this._seekerRAF = null, this._lastWaiting = !1, this._lastTimestamp = null, this._lastTimeUpdate = null, this._playerRef = Me(), this._canvasRef = Me(), this._aspectRatio = this.propAspectRatio, this._waiting = !1, this._stalled = !1, this._seeking = !1, this._captions = !1, this._fullscreen = !1, this._paused = !0, this._playbackRate = 1, this._volume = null, this._muted = null, this._videoResolution = -1, this._handleContainerResize = () => {\n this._playerRef.value && (this.propAspectRatio || (this._aspectRatio = this._playerRef.value.offsetWidth / this._playerRef.value.offsetHeight));\n }, this._handleCanvasResize = () => {\n this.draw();\n }, this._seeker = (a) => {\n var e;\n this.sceneConfig && this.scenes.length > 0 && (this._waiting = this._drawController.activeScenes.some(({ video: t }) => {\n if (t) {\n const s = this._sceneController.videoState[t.id];\n return !s || !s.initialised || s.waiting;\n }\n }), this.waiting ? (this._lastTimestamp = null, this._lastWaiting || this.dispatchEvent(new CustomEvent(\"waiting\"))) : this._lastWaiting && this.dispatchEvent(new CustomEvent(\"playing\")), !this.stalled && a - (this._lastTimestamp ?? 0) > 1e3 / this.sceneConfig.frameRate && (this._drawController.currentTime = this._drawController.currentTime + (a - (this._lastTimestamp ?? a)) / 1e3 * this.playbackRate, this._lastTimestamp = a), this._lastWaiting = this._waiting, this._drawController.currentTime >= this.duration && (this.pause(), this.dispatchEvent(new CustomEvent(\"ended\")))), this.paused || ((e = this.scene) != null && e.video ? this._lastTimeUpdate && a - this._lastTimeUpdate > 1e3 && (this._stalled = !0) : (this._stalled = !1, this._lastTimeUpdate = a), this._seekerRAF = requestAnimationFrame(this._seeker));\n }, this._handleFullscreenChange = () => {\n document.fullscreenElement ? this._fullscreen = !0 : this._fullscreen = !1;\n };\n }\n get aspectRatio() {\n return this._aspectRatio;\n }\n get waiting() {\n return !this.paused && this._waiting;\n }\n get stalled() {\n return this._stalled;\n }\n get seeking() {\n return this._seeking;\n }\n get captions() {\n return this._captions;\n }\n get fullscreen() {\n return this._fullscreen;\n }\n get processing() {\n return this._sceneController.processing;\n }\n get duration() {\n return this._sceneController.duration;\n }\n get scene() {\n return this._drawController.activeScenes[this._drawController.activeScenes.length - 1];\n }\n get scenes() {\n var a;\n return ((a = this._sceneController.scenes) == null ? void 0 : a.scenes) ?? [];\n }\n get sceneConfig() {\n return this._sceneController.scenes;\n }\n get videos() {\n return this._sceneController.videos ?? {};\n }\n get videoState() {\n return this._sceneController.videoState;\n }\n set paused(a) {\n a !== this._paused && (this._paused = a, this.requestUpdate(), this.dispatchEvent(new CustomEvent(a ? \"pause\" : \"play\")));\n }\n get paused() {\n return this._paused;\n }\n set playbackRate(a) {\n a !== this._playbackRate && (this._playbackRate = a, this.scenes.forEach(({ video: e }) => {\n e && (e.node.playbackRate = a);\n }), this.requestUpdate(), this.dispatchEvent(new CustomEvent(\"ratechange\", { detail: a })));\n }\n get playbackRate() {\n return this._playbackRate;\n }\n set volume(a) {\n const e = Math.min(1, Math.max(0, a));\n e !== this._volume && (this.scenes.forEach(({ video: t }) => {\n t && (t.node.volume = e);\n }), localStorage.setItem(\"vmp-new-player-volume\", e.toString()), this._volume = e, e > 0 && (this.muted = !1), this.requestUpdate(), this.dispatchEvent(new CustomEvent(\"volumechange\", { detail: a })));\n }\n get volume() {\n return this._volume ?? (this._volume = parseFloat(localStorage.getItem(\"vmp-new-player-volume\") ?? \"1\"));\n }\n set muted(a) {\n this.scenes.forEach(({ video: e }) => {\n e && (e.node.muted = a);\n }), a !== this._muted && (this._muted = a, localStorage.setItem(\"vmp-new-player-muted\", a.toString()), this.requestUpdate(), this.dispatchEvent(new CustomEvent(\"volumechange\", { detail: a ? 0 : this.volume })));\n }\n get muted() {\n return this._muted ?? (this._muted = this.autoplay || localStorage.getItem(\"vmp-new-player-muted\") === \"true\");\n }\n set videoResolution(a) {\n a !== this._videoResolution && (this._videoResolution = a, this.scenes.forEach(({ video: e }) => {\n if (e != null && e.hls) {\n const t = e.hls.levels.findIndex((s) => Math.min(s.height, s.width) === a);\n e.hls.currentLevel = t ?? -1;\n }\n }), this.requestUpdate());\n }\n get videoResolution() {\n return this._videoResolution;\n }\n set currentTime(a) {\n a !== this._drawController.currentTime && (this._drawController.currentTime = a, this._sceneController.setVideosCurrentTime(a));\n }\n get currentTime() {\n return this._drawController.currentTime;\n }\n reset(a = 0, e = !1) {\n this._lastTimestamp = null, this._drawController.currentTime = a, this._sceneController.setVideosCurrentTime(a), e ? this.play() : this.pause();\n }\n clear() {\n this._drawController.clear();\n }\n play() {\n this.paused = !1, this._lastTimestamp = null, this._lastTimeUpdate = 1 / 0, this.duration > 0 && this._drawController.currentTime >= this.duration && this.reset(0, !0), this._seekerRAF || (this._seekerRAF = requestAnimationFrame(this._seeker));\n }\n pause() {\n this._seekerRAF && (cancelAnimationFrame(this._seekerRAF), this._seekerRAF = null), this.paused = !0, this.scenes.forEach(({ video: a }) => {\n a && a.node.pause();\n });\n }\n draw(a) {\n return this._drawController.draw(a);\n }\n setScene(a) {\n var e, t;\n if ((e = this._sceneController) != null && e.scenes) {\n const s = (t = this.scenes) == null ? void 0 : t[a];\n if (!s)\n return this.dispatchEvent(new ErrorEvent(\"error\", new Error(`No scene at index: ${a}`)));\n this.reset(s.start + this._sceneController.scenes.transitionDuration, !this.paused);\n }\n }\n // This must be called in an event handler that occurs as a result of user action as the browser does not allow programmatic fullscreen\n toggleFullscreen(a) {\n a ?? this.fullscreen ? Xl() : this._playerRef.value && ql(this._playerRef.value);\n }\n connectedCallback() {\n super.connectedCallback(), document.addEventListener(\"fullscreenchange\", this._handleFullscreenChange), this.addEventListener(\"video:timeupdate\", (a) => {\n this._stalled = !1, this._lastTimeUpdate = a.timeStamp;\n });\n }\n willUpdate() {\n this.propAspectRatio && (this._aspectRatio = this.propAspectRatio);\n }\n updated(a) {\n a.has(\"_stalled\") && this.stalled && this.dispatchEvent(new CustomEvent(\"stalled\")), a.has(\"propAspectRatio\") && !this.propAspectRatio && this._handleContainerResize();\n }\n disconnectedCallback() {\n super.disconnectedCallback(), document.removeEventListener(\"fullscreenchange\", this._handleFullscreenChange);\n }\n render() {\n var l, h, c, d, u, f;\n const a = this.loading || !this.scenes || this.duration <= 0, { height: e, width: t } = sn({\n resolution: ((l = this.sceneConfig) == null ? void 0 : l.resolution) ?? 720,\n aspectRatio: this.aspectRatio\n }), s = Object.keys(this.videoState).reduce(\n (g, p) => g.concat(this.videoState[p].buffered ?? []),\n [...this._drawController.fakeBufferSegments]\n ), i = (\n // Don't show any controls when disabled because we haven't created the `videos` yet\n // This means that if the user was to play the video then it would have to start muted because we can only unmute videos\n // within user events for autoplay reasons\n a ? [] : (h = this.controls ?? Ws) == null ? void 0 : h.filter((g) => !(g === \"fullscreen\" && Wl() || g === \"navigation\" && (!this.scenes || this.scenes.length <= 1)))\n ), r = (((c = this.scenes) == null ? void 0 : c.length) ?? 0) - 1, n = ((d = this.scenes) == null ? void 0 : d.findIndex((g) => g === this._drawController.activeScenes[0])) ?? 0, o = (f = (u = this._drawController.activeScenes[0]) == null ? void 0 : u.video) == null ? void 0 : f.hls;\n return G`\n <div\n ${Ne(this._playerRef)}\n ${Rs(this._handleContainerResize)}\n class=${te({\n player: !0,\n responsive: !this.propAspectRatio\n })}\n >\n <canvas\n ${Ne(this._canvasRef)}\n ${this._drawController.canvas()}\n ${Rs(this._handleCanvasResize)}\n height=${e}\n width=${t}\n ></canvas>\n <vmp-new-player-overlay\n ${this._drawController.controls()}\n ?disabled=${a}\n ?playing=${!this.paused}\n ?loading=${this.loading || this.waiting || this.stalled}\n ?muted=${this.muted}\n volume=${this.volume}\n duration=${this.duration}\n .levels=${(o == null ? void 0 : o.levels) ?? []}\n level=${dt(o != null && o.autoLevelEnabled ? -1 : o == null ? void 0 : o.currentLevel)}\n playbackRate=${this.playbackRate}\n caption=${this._drawController.caption}\n .buffer=${s}\n .controls=${i}\n ?captions=${this.captions}\n ?fullscreen=${this.fullscreen}\n @navigate:back=${(g) => {\n g.defaultPrevented || this.setScene(n <= 0 ? r : n - 1);\n }}\n @navigate:forward=${(g) => {\n g.defaultPrevented || this.setScene(n >= r ? 0 : n + 1);\n }}\n @play:click=${({ detail: g }) => {\n a || (g ? this.pause() : (this.muted = this._manualMute, this.play()));\n }}\n @volume:click=${({ detail: g }) => {\n this.muted = !g, this._manualMute = !g;\n }}\n @level:click=${({ detail: g }) => {\n this.videoResolution = g.value.resolution;\n }}\n @playbackRate:click=${({ detail: g }) => {\n this.playbackRate = g.value ?? 1;\n }}\n @captions:click=${() => {\n this._captions = !this._captions;\n }}\n @fullscreen:click=${() => {\n this.toggleFullscreen();\n }}\n @input=${(g) => {\n const p = g.composedPath()[0], y = p.getAttribute(\"key\");\n if (y === \"scrubber\") {\n const v = parseFloat(p.value);\n this._drawController.currentTime = v, this._sceneController.setVideosCurrentTime(v), this.dispatchEvent(new CustomEvent(\"seeking\", { detail: v }));\n }\n y === \"volume\" && (this.volume = parseFloat(p.value));\n }}\n @pointerdown=${(g) => {\n g.composedPath()[0].getAttribute(\"key\") === \"scrubber\" && (this._seeking = !0, this._wasPlaying = !this.paused, this.paused || this.pause());\n }}\n @pointerup=${(g) => {\n g.composedPath()[0].getAttribute(\"key\") === \"scrubber\" && (this._seeking = !1, this._wasPlaying && (this.play(), this._wasPlaying = !1), this.dispatchEvent(new CustomEvent(\"seeked\", { detail: this._drawController.currentTime })));\n }}\n ></vmp-new-player-overlay>\n </div>\n `;\n }\n};\nie.styles = [\n Z.styles ?? [],\n pe`\n :host {\n --player-border-radius: var(--vouch-media-player-border-radius, 0px);\n }\n\n .player {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--colors-dark-1000);\n border-radius: var(--player-border-radius);\n }\n\n .responsive {\n height: 100%;\n width: 100%;\n }\n\n canvas {\n width: 100%;\n max-height: 100%;\n object-fit: contain;\n border-radius: var(--player-border-radius);\n }\n\n vmp-new-player-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n `\n];\nce([\n P({ type: Object })\n], ie.prototype, \"data\", 2);\nce([\n P({ type: Object })\n], ie.prototype, \"template\", 2);\nce([\n P({ type: Boolean })\n], ie.prototype, \"burnCaptions\", 2);\nce([\n P({ type: String })\n], ie.prototype, \"src\", 2);\nce([\n P({ type: String })\n], ie.prototype, \"track\", 2);\nce([\n P({ type: Number, attribute: \"aspectratio\" })\n], ie.prototype, \"propAspectRatio\", 2);\nce([\n P({ type: String })\n], ie.prototype, \"preload\", 2);\nce([\n P({ type: Boolean })\n], ie.prototype, \"autoplay\", 2);\nce([\n P({ type: Boolean })\n], ie.prototype, \"loading\", 2);\nce([\n P({ type: Array })\n], ie.prototype, \"controls\", 2);\nce([\n P({ attribute: !1 })\n], ie.prototype, \"compilation\", 2);\nce([\n Ee()\n], ie.prototype, \"_aspectRatio\", 2);\nce([\n Ee()\n], ie.prototype, \"_waiting\", 2);\nce([\n Ee()\n], ie.prototype, \"_stalled\", 2);\nce([\n Ee()\n], ie.prototype, \"_seeking\", 2);\nce([\n Ee()\n], ie.prototype, \"_captions\", 2);\nce([\n Ee()\n], ie.prototype, \"_fullscreen\", 2);\nie = ce([\n Se(\"vmp-new-media-player\")\n], ie);\nexport {\n ie as MediaPlayer\n};\n//# sourceMappingURL=media-player.js.map\n","import { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { createRef, ref } from 'lit/directives/ref.js';\n\nimport type { Scene, TemplateInstance } from '@vouchfor/canvas-video';\nimport type { MediaPlayer, MediaPlayerProps } from '@vouchfor/media-player';\nimport type { Ref } from 'lit/directives/ref.js';\nimport type { Environment } from '~/utils/env';\n\nimport { EventForwardController } from './controllers/event-forwarder';\nimport { FetcherController } from './controllers/fetcher';\nimport { TrackingController } from './controllers/tracking';\n\nimport '@vouchfor/media-player';\n\ntype EmbedProps = Pick<MediaPlayerProps, 'data' | 'aspectRatio' | 'preload' | 'autoplay' | 'controls'> & {\n env: Environment;\n apiKey: string;\n vouchId?: string;\n templateId?: string;\n};\n\n@customElement('vouch-embed')\nclass Embed extends LitElement {\n private _mediaPlayerRef: Ref<MediaPlayer> = createRef();\n\n @property({ type: Object, attribute: 'data' }) data: EmbedProps['data'];\n @property({ type: String }) vouchId: EmbedProps['vouchId'];\n @property({ type: String }) templateId: EmbedProps['templateId'];\n\n @property({ type: String }) env: EmbedProps['env'] = 'prod';\n @property({ type: String }) apiKey: EmbedProps['apiKey'] = '';\n\n @property({ type: Array }) controls: EmbedProps['controls'];\n @property({ type: String }) preload: EmbedProps['preload'] = 'auto';\n @property({ type: Boolean }) autoplay: EmbedProps['autoplay'] = false;\n @property({ type: Number }) aspectRatio: EmbedProps['aspectRatio'] = 0;\n\n private eventController = new EventForwardController(this, [\n 'durationchange',\n 'ended',\n 'error',\n 'loadeddata',\n 'pause',\n 'stalled',\n 'play',\n 'playing',\n 'ratechange',\n 'scenechange',\n 'seeking',\n 'seeked',\n 'timeupdate',\n 'volumechange',\n 'waiting',\n\n 'video:loadeddata',\n 'video:seeked',\n 'video:play',\n 'video:playing',\n 'video:pause',\n 'video:stalled',\n 'video:timeupdate',\n 'video:ended',\n 'video:error'\n ]);\n private _fetcherController = new FetcherController(this);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n private _trackingController = new TrackingController(this);\n\n @state() vouch: EmbedProps['data'];\n @state() template: TemplateInstance | undefined;\n\n get fetching() {\n return this._fetcherController.fetching;\n }\n\n get waiting() {\n return this._mediaPlayerRef.value?.waiting;\n }\n\n get seeking() {\n return this._mediaPlayerRef.value?.seeking;\n }\n\n get paused() {\n return this._mediaPlayerRef.value?.paused;\n }\n\n get captions() {\n return this._mediaPlayerRef.value?.captions;\n }\n\n get fullscreen() {\n return this._mediaPlayerRef.value?.fullscreen;\n }\n\n get duration() {\n return this._mediaPlayerRef.value?.duration;\n }\n\n set currentTime(value: number) {\n if (this._mediaPlayerRef.value) {\n this._mediaPlayerRef.value.currentTime = value;\n }\n }\n get currentTime() {\n return this._mediaPlayerRef.value?.currentTime ?? 0;\n }\n\n set playbackRate(value: number) {\n if (this._mediaPlayerRef.value) {\n this._mediaPlayerRef.value.playbackRate = value;\n }\n }\n get playbackRate() {\n return this._mediaPlayerRef.value?.playbackRate ?? 1;\n }\n\n set volume(value: number) {\n if (this._mediaPlayerRef.value) {\n this._mediaPlayerRef.value.volume = value;\n }\n }\n get volume() {\n return this._mediaPlayerRef.value?.volume ?? 1;\n }\n\n set muted(value: boolean) {\n if (this._mediaPlayerRef.value) {\n this._mediaPlayerRef.value.muted = value;\n }\n }\n get muted() {\n return this._mediaPlayerRef.value?.muted ?? false;\n }\n\n get scene(): Scene | null {\n return this._mediaPlayerRef.value?.scene ?? null;\n }\n\n get scenes(): Scene[] {\n return this._mediaPlayerRef.value?.scenes ?? [];\n }\n\n get videoState() {\n return this._mediaPlayerRef.value?.videoState;\n }\n\n get mediaPlayer() {\n return this._mediaPlayerRef.value;\n }\n\n play() {\n this._mediaPlayerRef.value?.play();\n }\n\n pause() {\n this._mediaPlayerRef.value?.pause();\n }\n\n setScene(index: number) {\n this._mediaPlayerRef.value?.setScene(index);\n }\n\n render() {\n return html`\n <vmp-new-media-player\n ${ref(this._mediaPlayerRef)}\n ${this.eventController.register()}\n ?autoplay=${this.autoplay}\n ?loading=${this.fetching}\n .data=${this.vouch}\n .template=${this.template}\n aspectRatio=${ifDefined(this.aspectRatio)}\n preload=${ifDefined(this.preload)}\n .controls=${this.controls}\n ></vmp-new-media-player>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'vouch-embed': Embed;\n }\n\n namespace JSX {\n interface IntrinsicElements {\n 'vouch-embed': Embed;\n }\n }\n}\n\nexport { Embed };\nexport type { EmbedProps };\n","// 'path' module extracted from Node.js v8.11.1 (only the posix part)\n// transplited with Babel\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction assertPath(path) {\n if (typeof path !== 'string') {\n throw new TypeError('Path must be a string. Received ' + JSON.stringify(path));\n }\n}\n\n// Resolves . and .. elements in a path with directory names\nfunction normalizeStringPosix(path, allowAboveRoot) {\n var res = '';\n var lastSegmentLength = 0;\n var lastSlash = -1;\n var dots = 0;\n var code;\n for (var i = 0; i <= path.length; ++i) {\n if (i < path.length)\n code = path.charCodeAt(i);\n else if (code === 47 /*/*/)\n break;\n else\n code = 47 /*/*/;\n if (code === 47 /*/*/) {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 /*.*/ || res.charCodeAt(res.length - 2) !== 46 /*.*/) {\n if (res.length > 2) {\n var lastSlashIndex = res.lastIndexOf('/');\n if (lastSlashIndex !== res.length - 1) {\n if (lastSlashIndex === -1) {\n res = '';\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/');\n }\n lastSlash = i;\n dots = 0;\n continue;\n }\n } else if (res.length === 2 || res.length === 1) {\n res = '';\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0)\n res += '/..';\n else\n res = '..';\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0)\n res += '/' + path.slice(lastSlash + 1, i);\n else\n res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === 46 /*.*/ && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\nfunction _format(sep, pathObject) {\n var dir = pathObject.dir || pathObject.root;\n var base = pathObject.base || (pathObject.name || '') + (pathObject.ext || '');\n if (!dir) {\n return base;\n }\n if (dir === pathObject.root) {\n return dir + base;\n }\n return dir + sep + base;\n}\n\nvar posix = {\n // path.resolve([from ...], to)\n resolve: function resolve() {\n var resolvedPath = '';\n var resolvedAbsolute = false;\n var cwd;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path;\n if (i >= 0)\n path = arguments[i];\n else {\n if (cwd === undefined)\n cwd = process.cwd();\n path = cwd;\n }\n\n assertPath(path);\n\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charCodeAt(0) === 47 /*/*/;\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);\n\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0)\n return '/' + resolvedPath;\n else\n return '/';\n } else if (resolvedPath.length > 0) {\n return resolvedPath;\n } else {\n return '.';\n }\n },\n\n normalize: function normalize(path) {\n assertPath(path);\n\n if (path.length === 0) return '.';\n\n var isAbsolute = path.charCodeAt(0) === 47 /*/*/;\n var trailingSeparator = path.charCodeAt(path.length - 1) === 47 /*/*/;\n\n // Normalize the path\n path = normalizeStringPosix(path, !isAbsolute);\n\n if (path.length === 0 && !isAbsolute) path = '.';\n if (path.length > 0 && trailingSeparator) path += '/';\n\n if (isAbsolute) return '/' + path;\n return path;\n },\n\n isAbsolute: function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && path.charCodeAt(0) === 47 /*/*/;\n },\n\n join: function join() {\n if (arguments.length === 0)\n return '.';\n var joined;\n for (var i = 0; i < arguments.length; ++i) {\n var arg = arguments[i];\n assertPath(arg);\n if (arg.length > 0) {\n if (joined === undefined)\n joined = arg;\n else\n joined += '/' + arg;\n }\n }\n if (joined === undefined)\n return '.';\n return posix.normalize(joined);\n },\n\n relative: function relative(from, to) {\n assertPath(from);\n assertPath(to);\n\n if (from === to) return '';\n\n from = posix.resolve(from);\n to = posix.resolve(to);\n\n if (from === to) return '';\n\n // Trim any leading backslashes\n var fromStart = 1;\n for (; fromStart < from.length; ++fromStart) {\n if (from.charCodeAt(fromStart) !== 47 /*/*/)\n break;\n }\n var fromEnd = from.length;\n var fromLen = fromEnd - fromStart;\n\n // Trim any leading backslashes\n var toStart = 1;\n for (; toStart < to.length; ++toStart) {\n if (to.charCodeAt(toStart) !== 47 /*/*/)\n break;\n }\n var toEnd = to.length;\n var toLen = toEnd - toStart;\n\n // Compare paths to find the longest common path from root\n var length = fromLen < toLen ? fromLen : toLen;\n var lastCommonSep = -1;\n var i = 0;\n for (; i <= length; ++i) {\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === 47 /*/*/) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === 47 /*/*/) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n var fromCode = from.charCodeAt(fromStart + i);\n var toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode)\n break;\n else if (fromCode === 47 /*/*/)\n lastCommonSep = i;\n }\n\n var out = '';\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {\n if (i === fromEnd || from.charCodeAt(i) === 47 /*/*/) {\n if (out.length === 0)\n out += '..';\n else\n out += '/..';\n }\n }\n\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0)\n return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (to.charCodeAt(toStart) === 47 /*/*/)\n ++toStart;\n return to.slice(toStart);\n }\n },\n\n _makeLong: function _makeLong(path) {\n return path;\n },\n\n dirname: function dirname(path) {\n assertPath(path);\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) return '//';\n return path.slice(0, end);\n },\n\n basename: function basename(path, ext) {\n if (ext !== undefined && typeof ext !== 'string') throw new TypeError('\"ext\" argument must be a string');\n assertPath(path);\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n if (ext !== undefined && ext.length > 0 && ext.length <= path.length) {\n if (ext.length === path.length && ext === path) return '';\n var extIdx = ext.length - 1;\n var firstNonSlashEnd = -1;\n for (i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd === -1) {\n // We saw the first non-path separator, remember this index in case\n // we need it if the extension ends up not matching\n matchedSlash = false;\n firstNonSlashEnd = i + 1;\n }\n if (extIdx >= 0) {\n // Try to match the explicit extension\n if (code === ext.charCodeAt(extIdx)) {\n if (--extIdx === -1) {\n // We matched the extension, so mark this as the end of our path\n // component\n end = i;\n }\n } else {\n // Extension does not match, so our result is the entire path\n // component\n extIdx = -1;\n end = firstNonSlashEnd;\n }\n }\n }\n }\n\n if (start === end) end = firstNonSlashEnd;else if (end === -1) end = path.length;\n return path.slice(start, end);\n } else {\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n }\n },\n\n extname: function extname(path) {\n assertPath(path);\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n },\n\n format: function format(pathObject) {\n if (pathObject === null || typeof pathObject !== 'object') {\n throw new TypeError('The \"pathObject\" argument must be of type Object. Received type ' + typeof pathObject);\n }\n return _format('/', pathObject);\n },\n\n parse: function parse(path) {\n assertPath(path);\n\n var ret = { root: '', dir: '', base: '', ext: '', name: '' };\n if (path.length === 0) return ret;\n var code = path.charCodeAt(0);\n var isAbsolute = code === 47 /*/*/;\n var start;\n if (isAbsolute) {\n ret.root = '/';\n start = 1;\n } else {\n start = 0;\n }\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n var i = path.length - 1;\n\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n\n // Get non-dir info\n for (; i >= start; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);else ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n\n if (startPart > 0) ret.dir = path.slice(0, startPart - 1);else if (isAbsolute) ret.dir = '/';\n\n return ret;\n },\n\n sep: '/',\n delimiter: ':',\n win32: null,\n posix: null\n};\n\nposix.posix = posix;\n\nmodule.exports = posix;\n","\"use strict\"\n\nconst {basename, extname} = require('path')\n\n//\n// Mime type <-> File extension mappings\n//\n\nclass Format{\n constructor(){\n let isWeb = (() => typeof global=='undefined')(),\n png = \"image/png\",\n jpg = \"image/jpeg\",\n jpeg = \"image/jpeg\",\n webp = \"image/webp\",\n pdf = \"application/pdf\",\n svg = \"image/svg+xml\"\n\n Object.assign(this, {\n toMime: this.toMime.bind(this),\n fromMime: this.fromMime.bind(this),\n expected: isWeb ? `\"png\", \"jpg\", or \"webp\"`\n : `\"png\", \"jpg\", \"pdf\", or \"svg\"`,\n formats: isWeb ? {png, jpg, jpeg, webp}\n : {png, jpg, jpeg, pdf, svg},\n mimes: isWeb ? {[png]: \"png\", [jpg]: \"jpg\", [webp]: \"webp\"}\n : {[png]: \"png\", [jpg]: \"jpg\", [pdf]: \"pdf\", [svg]: \"svg\"},\n })\n }\n\n toMime(ext){\n return this.formats[(ext||'').replace(/^\\./, '').toLowerCase()]\n }\n\n fromMime(mime){\n return this.mimes[mime]\n }\n}\n\n//\n// Validation of the options dict shared by the Canvas saveAs, toBuffer, and toDataURL methods\n//\n\nfunction options(pages, {filename='', extension='', format, page, quality, matte, density, outline, archive}={}){\n var {fromMime, toMime, expected} = new Format(),\n archive = archive || 'canvas',\n ext = format || extension.replace(/@\\d+x$/i,'') || extname(filename),\n format = fromMime(toMime(ext) || ext),\n mime = toMime(format),\n pp = pages.length\n\n if(!ext) throw new Error(`Cannot determine image format (use a filename extension or 'format' argument)`)\n if (!format) throw new Error(`Unsupported file format \"${ext}\" (expected ${expected})`)\n if (!pp) throw new RangeError(`Canvas has no associated contexts (try calling getContext or newPage first)`)\n\n let padding, isSequence, pattern = filename.replace(/{(\\d*)}/g, (_, width) => {\n isSequence = true\n width = parseInt(width, 10)\n padding = isFinite(width) ? width : isFinite(padding) ? padding : -1\n return \"{}\"\n })\n\n // allow negative indexing if a specific page is specified\n let idx = page > 0 ? page - 1\n : page < 0 ? pp + page\n : undefined;\n\n if (isFinite(idx) && idx < 0 || idx >= pp) throw new RangeError(\n pp == 1 ? `Canvas only has a ‘page 1’ (${idx} is out of bounds)`\n : `Canvas has pages 1–${pp} (${idx} is out of bounds)`\n )\n\n pages = isFinite(idx) ? [pages[idx]]\n : isSequence || format=='pdf' ? pages\n : pages.slice(-1) // default to the 'current' context\n\n if (quality===undefined){\n quality = 0.92\n }else{\n if (typeof quality!='number' || !isFinite(quality) || quality<0 || quality>1){\n throw new TypeError(\"The quality option must be an number in the 0.0–1.0 range\")\n }\n }\n\n if (density===undefined){\n let m = (extension || basename(filename, ext)).match(/@(\\d+)x$/i)\n density = m ? parseInt(m[1], 10) : 1\n }else if (typeof density!='number' || !Number.isInteger(density) || density<1){\n throw new TypeError(\"The density option must be a non-negative integer\")\n }\n\n if (outline===undefined){\n outline = true\n }else if (format == 'svg'){\n outline = !!outline\n }\n\n return {filename, pattern, format, mime, pages, padding, quality, matte, density, outline, archive}\n}\n\n//\n// Zip (pace Phil Katz & q.v. https://github.com/jimmywarting/StreamSaver.js)\n//\n\nclass Crc32 {\n static for(data){\n return new Crc32().append(data).get()\n }\n\n constructor(){ this.crc = -1 }\n\n get(){ return ~this.crc }\n\n append(data){\n var crc = this.crc | 0,\n table = this.table\n for (var offset = 0, len = data.length | 0; offset < len; offset++) {\n crc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF]\n }\n this.crc = crc\n return this\n }\n\n}\n\nCrc32.prototype.table = (() => {\n var i, j, t, table = []\n for (i = 0; i < 256; i++) {\n t = i\n for (j = 0; j < 8; j++) {\n t = (t & 1)\n ? (t >>> 1) ^ 0xEDB88320\n : t >>> 1\n }\n table[i] = t\n }\n return table\n})()\n\nfunction calloc(size){\n let array = new Uint8Array(size),\n view = new DataView(array.buffer),\n buf = {\n array, view, size,\n set8(at, to){ view.setUint8(at, to); return buf },\n set16(at, to){ view.setUint16(at, to, true); return buf },\n set32(at, to){ view.setUint32(at, to, true); return buf },\n bytes(at, to){ array.set(to, at); return buf },\n }\n return buf\n}\n\nclass Zip{\n static encoder = new TextEncoder()\n\n constructor(directory){\n let now = new Date()\n Object.assign(this, {\n directory,\n offset: 0,\n files: [],\n time: (((now.getHours() << 6) | now.getMinutes()) << 5) | now.getSeconds() / 2,\n date: ((((now.getFullYear() - 1980) << 4) | (now.getMonth() + 1)) << 5) | now.getDate(),\n })\n this.add(directory)\n }\n\n async add(filename, blob){\n let folder = !blob,\n name = Zip.encoder.encode(`${this.directory}/${folder ? '' : filename}`),\n data = new Uint8Array(folder ? 0 : await blob.arrayBuffer()),\n preamble = 30 + name.length,\n descriptor = preamble + data.length,\n postamble = 16,\n {offset} = this\n\n let header = calloc(26)\n .set32(0, 0x08080014) // zip version\n .set16(6, this.time) // time\n .set16(8, this.date) // date\n .set32(10, Crc32.for(data)) // checksum\n .set32(14, data.length) // compressed size (w/ zero compression)\n .set32(18, data.length) // un-compressed size\n .set16(22, name.length) // filename length (utf8 bytes)\n offset += preamble\n\n let payload = calloc(preamble + data.length + postamble)\n .set32(0, 0x04034b50) // local header signature\n .bytes(4, header.array) // ...header fields...\n .bytes(30, name) // filename\n .bytes(preamble, data) // blob bytes\n offset += data.length\n\n payload\n .set32(descriptor, 0x08074b50) // signature\n .bytes(descriptor + 4, header.array.slice(10,22)) // length & filemame\n offset += postamble\n\n this.files.push({offset, folder, name, header, payload})\n this.offset = offset\n }\n\n toBuffer(){\n // central directory record\n let length = this.files.reduce((len, {name}) => 46 + name.length + len, 0),\n cdr = calloc(length + 22),\n index = 0\n\n for (var {offset, name, header, folder} of this.files){\n cdr.set32(index, 0x02014b50) // archive file signature\n .set16(index + 4, 0x0014) // version\n .bytes(index + 6, header.array) // ...header fields...\n .set8(index + 38, folder ? 0x10 : 0) // is_dir flag\n .set32(index + 42, offset) // file offset\n .bytes(index + 46, name) // filename\n index += 46 + name.length\n }\n cdr.set32(index, 0x06054b50) // signature\n .set16(index + 8, this.files.length) // № files per-segment\n .set16(index + 10, this.files.length) // № files this segment\n .set32(index + 12, length) // central directory length\n .set32(index + 16, this.offset) // file-offset of directory\n\n // concatenated zipfile data\n let output = new Uint8Array(this.offset + cdr.size),\n cursor = 0;\n\n for (var {payload} of this.files){\n output.set(payload.array, cursor)\n cursor += payload.size\n }\n output.set(cdr.array, cursor)\n\n return output\n }\n\n get blob(){\n return new Blob([this.toBuffer()], {type:\"application/zip\"})\n }\n}\n\n\n//\n// Browser helpers for converting canvas elements to blobs/buffers/files/zips\n//\n\nconst asBlob = (canvas, mime, quality, matte) => {\n if (matte){\n let {width, height} = canvas,\n comp = Object.assign(document.createElement('canvas'), {width, height}),\n ctx = comp.getContext(\"2d\")\n ctx.fillStyle = matte\n ctx.fillRect(0, 0, width, height)\n ctx.drawImage(canvas, 0, 0)\n canvas = comp\n }\n\n return new Promise((res, rej) => canvas.toBlob(res, mime, quality))\n}\n\nconst asBuffer = (...args) => asBlob(...args).then(b => b.arrayBuffer())\n\nconst asDownload = async (canvas, mime, quality, matte, filename) => {\n _download(filename, await asBlob(canvas, mime, quality, matte))\n}\n\nconst asZipDownload = async (pages, mime, quality, matte, archive, pattern, padding) => {\n let filenames = i => pattern.replace('{}', String(i+1).padStart(padding, '0')),\n folder = basename(archive, '.zip') || 'archive',\n zip = new Zip(folder)\n\n await Promise.all(pages.map(async (page, i) => {\n let filename = filenames(i) // serialize filename(s) before awaiting\n await zip.add(filename, await asBlob(page, mime, quality, matte))\n }))\n\n _download(`${folder}.zip`, zip.blob)\n}\n\nconst _download = (filename, blob) => {\n const href = window.URL.createObjectURL(blob),\n link = document.createElement('a')\n link.style.display = 'none'\n link.href = href\n link.setAttribute('download', filename)\n if (typeof link.download === 'undefined') {\n link.setAttribute('target', '_blank')\n }\n document.body.appendChild(link)\n link.click()\n document.body.removeChild(link)\n setTimeout(() => window.URL.revokeObjectURL(href), 100)\n}\n\nconst atScale = (pages, density, matte) => pages.map(page => {\n if (density == 1 && !matte) return page.canvas\n\n let scaled = document.createElement('canvas'),\n ctx = scaled.getContext(\"2d\"),\n src = page.canvas ? page.canvas : page\n scaled.width = src.width * density\n scaled.height = src.height * density\n if (matte){\n ctx.fillStyle = matte\n ctx.fillRect(0, 0, scaled.width, scaled.height)\n }\n ctx.scale(density, density)\n ctx.drawImage(src, 0, 0)\n return scaled\n})\n\nmodule.exports = {asBuffer, asDownload, asZipDownload, atScale, options}\n","\"use strict\"\n\nconst {asBuffer, asDownload, asZipDownload, atScale, options} = require('./io')\n\n//\n// Browser equivalents of the skia-canvas convenience initializers and polyfills for\n// the Canvas object’s newPage & export methods\n//\n\nconst _toURL_ = Symbol.for(\"toDataURL\")\n\nconst loadImage = src => {\n let img = Object.assign(new Image(), {crossOrigin:'Anonymous', src})\n return img.decode().then(() => img)\n}\n\nclass Canvas{\n constructor(width, height){\n let elt = document.createElement('canvas'),\n pages = []\n\n Object.defineProperty(elt, \"async\", {value:true, writable:false, enumerable:true})\n\n for (var [prop, get] of Object.entries({\n png: () => asBuffer(elt, 'image/png'),\n jpg: () => asBuffer(elt, 'image/jpeg'),\n pages: () => pages.concat(elt).map(c => c.getContext(\"2d\")),\n })) Object.defineProperty(elt, prop, {get})\n\n return Object.assign(elt, {\n width, height,\n\n newPage(...size){\n var {width, height} = elt,\n page = Object.assign(document.createElement('canvas'), {width, height})\n page.getContext(\"2d\").drawImage(elt, 0, 0)\n pages.push(page)\n\n var [width, height] = size.length ? size : [width, height]\n return Object.assign(elt, {width, height}).getContext(\"2d\")\n },\n\n saveAs(filename, args){\n args = typeof args=='number' ? {quality:args} : args\n let opts = options(this.pages, {filename, ...args}),\n {pattern, padding, mime, quality, matte, density, archive} = opts,\n pages = atScale(opts.pages, density);\n return padding==undefined ? asDownload(pages[0], mime, quality, matte, filename)\n : asZipDownload(pages, mime, quality, matte, archive, pattern, padding)\n },\n\n toBuffer(extension=\"png\", args={}){\n args = typeof args=='number' ? {quality:args} : args\n let opts = options(this.pages, {extension, ...args}),\n {mime, quality, matte, pages, density} = opts,\n canvas = atScale(pages, density, matte)[0]\n return asBuffer(canvas, mime, quality, matte)\n },\n\n [_toURL_]: elt.toDataURL.bind(elt),\n toDataURL(extension=\"png\", args={}){\n args = typeof args=='number' ? {quality:args} : args\n let opts = options(this.pages, {extension, ...args}),\n {mime, quality, matte, pages, density} = opts,\n canvas = atScale(pages, density, matte)[0],\n url = canvas[canvas===elt ? _toURL_ : 'toDataURL'](mime, quality);\n return Promise.resolve(url)\n }\n })\n }\n}\n\nconst {CanvasRenderingContext2D, CanvasGradient, CanvasPattern,\n Image, ImageData, Path2D, DOMMatrix, DOMRect, DOMPoint} = window;\n\nmodule.exports = {\n Canvas, loadImage,\n CanvasRenderingContext2D, CanvasGradient, CanvasPattern,\n Image, ImageData, Path2D, DOMMatrix, DOMRect, DOMPoint\n}"],"names":["t","e","s","n","o$b","r","o","i","S","c","h","a","l","d","u$5","u","v","f","_","m","p","g","$","y","T","A","E","C","P","V","w","N","H","L","z","k","M$2","R","Z","R$1","M","k$1","H$2","I","L$2","z$1","Z$3","B","x","S$2","M$1","L$1","j","i$3","c$5","forwardEvent","type","fromElement","toElement","forwarder","event","EventForwardController","host","events","createRef","ref","fn","n$3","b","_a","h$2","_b","_c","_d","_e","marketingUrl","devVideoUrl","stagingVideoUrl","prodVideoUrl","devPublicApiUrl","stagingPublicApiUrl","prodPublicApiUrl","devEmbedApiUrl","stagingEmbedApiUrl","prodEmbedApiUrl","devPublicRecorderUrl","stagingPublicRecorderUrl","prodPublicRecorderUrl","getEnvUrls","env","FetcherController","Task","apiKey","data","vouchId","templateId","template","vouch","value","embedApiUrl","response","getRandomValues","rnds8","rng","byteToHex","unsafeStringify","arr","offset","native","v4","options","buf","rnds","STREAMED_THROTTLE","TrackingController","visitorId","publicApiUrl","country","region","utmParams","key","param","group","payload","client","tab","request","visitor","id","node","currentTimestamp","uuidv4","clientId","tabId","_f","requestId","_h","_g","_j","_i","_l","_k","promiseImpl","asyncFunc","hasOwnProp","obj","prop","copyProps","toObj","fromObj","notConfig","trimWS","str","wsLeft","wsRight","leftTrim","rightTrim","Cacher","cache","val","cacheObj","setPrototypeOf","proto","SqrlErr","message","err","ParseErr","indx","whitespace","lineNo","colNo","asyncRegExp","templateLitReg","singleQuoteReg","doubleQuoteReg","specialCharsReg","escapeRegExp","string","parse","envPrefixes","prefixes","accumulator","prefix","parseCloseReg","tagOpenReg","startInd","trimNextLeftWs","parseTag","tagOpenIndex","currentType","currentObj","numParens","currentAttribute","addAttrValue","valUnprocessed","found","char","punctuator","tagClose","slash","wsControl","commentCloseInd","singleQuoteMatch","doubleQuoteMatch","templateLitMatch","parseContext","parentObj","firstParse","lastBlock","buffer","pushString","strng","shouldTrimRightOfString","tagOpenMatch","precedingString","shouldTrimRightPrecedingString","prefixType","hName","blockName","selfClosingHName","parseResult","plugin","compileToString","res","compileScope","filter","filters","name","params","isFilterAsync","compileHelper","descendants","isAsync","ret","compileScopeIntoFunction","compileBlocks","blocks","block","buff","buffLength","returnStr","currentBlock","content","filtered","helperReturn","errWithBlocksOrFilters","asyncArrLoop","index","cb","asyncObjLoop","keys","escMap","replaceChar","XMLEscape","newStr","templates","helpers","resolve","config","nativeHelpers","defaultConfig","container","hRet","fRet","getConfig","override","baseConfig","compile","ctor","fs","path","_BOM","getWholeFilePath","parentfile","isDirectory","includePath","ext","getPath","filePath","views","match","readFile","loadFile","compiledTemplate","handleCache","filename","func","includeFile","newFileOptions","includeFileHelper","extendsFileHelper","handleCache$1","templateFunc","render","result","reject","__global__","global","__globalThis__","F","globalThis","exports","support","isDataView","viewClasses","isArrayBufferView","normalizeName","normalizeValue","iteratorFor","items","iterator","Headers","headers","header","oldValue","callback","thisArg","consumed","body","fileReaderReady","reader","readBlobAsArrayBuffer","blob","promise","readBlobAsText","readArrayBufferAsText","view","chars","bufferClone","Body","rejected","isConsumed","decode","methods","normalizeMethod","method","upcased","Request","input","reParamSearch","reQueryString","form","bytes","split","parseHeaders","rawHeaders","preProcessedHeaders","line","parts","Response","bodyInit","redirectStatuses","url","status","error","fetch","init","xhr","abortXhr","fixUrl","ctx","module","ne","It","Lt","At","et","dt","W","O","kt","Dt","jt","wt","xt","J","tt","zt","st","it","Tt","ot","Ct","St","G","q","X","at","D","K","U","ht","Y","Q","lt","Wt","vt","mt","gt","qt","nt","Pt","Ot","ct","$t","Bt","Jt","Gt","_t","Xt","Vt","Kt","Nt","Rt","Yt","Qt","yt","ft","bt","browser$2","Ut","Et","Zt","pt","Mt","rt","Ht","Ft","ut","re","c$1","flat","flatten","unflatten","isBuffer","keyIdentity","target","opts","delimiter","maxDepth","transformKey","output","step","object","prev","currentDepth","isarray","isbuffer","isobject","newKey","overwrite","getkey","parsedKey","addKeys","keyPrefix","recipient","isEmpty","isArray","isObject","key1","key2","top","bottom","right","left","auto","basePlacements","start","end","clippingParents","viewport","popper","reference","variationPlacements","acc","placement","placements","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","getNodeName","element","getWindow","ownerDocument","isElement","OwnElement","isHTMLElement","isShadowRoot","applyStyles","_ref","state","style","attributes","effect","_ref2","initialStyles","styleProperties","property","attribute","applyStyles$1","getBasePlacement","max","min","round","getUAString","uaData","item","isLayoutViewport","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","scaleX","scaleY","visualViewport","addVisualOffsets","width","height","getLayoutRect","contains","parent","child","rootNode","next","getComputedStyle","isTableElement","getDocumentElement","getParentNode","getTrueOffsetParent","getContainingBlock","isFirefox","isIE","elementCss","currentNode","css","getOffsetParent","window","offsetParent","getMainAxisFromPlacement","within","mathMax","mathMin","withinMaxClamp","getFreshSideObject","mergePaddingObject","paddingObject","expandToHashMap","hashMap","toPaddingObject","padding","arrow","_state$modifiersData$","arrowElement","popperOffsets","basePlacement","axis","isVertical","len","arrowRect","minProp","maxProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","center","axisProp","_options$element","arrow$1","getVariation","unsetSides","roundOffsetsByDPR","win","dpr","mapToStyles","_Object$assign2","popperRect","variation","offsets","position","gpuAcceleration","adaptive","roundOffsets","isFixed","_offsets$x","_offsets$y","_ref3","hasX","hasY","sideX","sideY","heightProp","widthProp","offsetY","offsetX","commonStyles","_ref4","_Object$assign","computeStyles","_ref5","_options$gpuAccelerat","_options$adaptive","_options$roundOffsets","computeStyles$1","passive","instance","_options$scroll","scroll","_options$resize","resize","scrollParents","scrollParent","eventListeners","hash","getOppositePlacement","matched","getOppositeVariationPlacement","getWindowScroll","scrollLeft","scrollTop","getWindowScrollBarX","getViewportRect","strategy","html","layoutViewport","getDocumentRect","_element$ownerDocumen","winScroll","isScrollParent","_getComputedStyle","overflow","overflowX","overflowY","getScrollParent","listScrollParents","list","isBody","updatedList","rectToClientRect","rect","getInnerBoundingClientRect","getClientRectFromMixedType","clippingParent","getClippingParents","canEscapeClipping","clipperElement","getClippingRect","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","computeOffsets","commonX","commonY","mainAxis","detectOverflow","_options","_options$placement","_options$strategy","_options$boundary","_options$rootBoundary","_options$elementConte","elementContext","_options$altBoundary","altBoundary","_options$padding","altContext","clippingClientRect","referenceClientRect","popperClientRect","elementClientRect","overflowOffsets","offsetData","multiply","computeAutoPlacement","flipVariations","_options$allowedAutoP","allowedAutoPlacements","allPlacements","allowedPlacements","overflows","getExpandedFallbackPlacements","oppositePlacement","flip","_options$mainAxis","checkMainAxis","_options$altAxis","checkAltAxis","specifiedFallbackPlacements","_options$flipVariatio","preferredPlacement","isBasePlacement","fallbackPlacements","referenceRect","checksMap","makeFallbackChecks","firstFittingPlacement","_basePlacement","isStartVariation","mainVariationSide","altVariationSide","checks","check","numberOfChecks","_loop","fittingPlacement","_ret","flip$1","getSideOffsets","preventedOffsets","isAnySideFullyClipped","side","hide","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","hide$1","distanceAndSkiddingToXY","rects","invertDistance","skidding","distance","_options$offset","_data$state$placement","offset$1","popperOffsets$1","getAltAxis","preventOverflow","_options$tether","tether","_options$tetherOffset","tetherOffset","altAxis","tetherOffsetValue","normalizedTetherOffsetValue","offsetModifierState","_offsetModifierState$","mainSide","altSide","additive","minLen","maxLen","arrowPaddingObject","arrowPaddingMin","arrowPaddingMax","arrowLen","minOffset","maxOffset","clientOffset","offsetModifierValue","tetherMin","tetherMax","preventedOffset","_offsetModifierState$2","_mainSide","_altSide","_offset","_len","_min","_max","isOriginSide","_offsetModifierValue","_tetherMin","_tetherMax","_preventedOffset","preventOverflow$1","getHTMLElementScroll","getNodeScroll","isElementScaled","getCompositeRect","elementOrVirtualElement","isOffsetParentAnElement","offsetParentIsScaled","documentElement","order","modifiers","map","visited","modifier","sort","requires","dep","depModifier","orderModifiers","orderedModifiers","phase","debounce","pending","mergeByName","merged","current","existing","DEFAULT_OPTIONS","areValidElements","args","_key","popperGenerator","generatorOptions","_generatorOptions","_generatorOptions$def","defaultModifiers","_generatorOptions$def2","defaultOptions","effectCleanupFns","isDestroyed","setOptionsAction","cleanupModifierEffects","runModifierEffects","_state$elements","_state$orderedModifie","_state$orderedModifie2","_ref$options","cleanupFn","noopFn","createPopper","BOX_CLASS","CONTENT_CLASS","BACKDROP_CLASS","ARROW_CLASS","SVG_ARROW_CLASS","TOUCH_OPTIONS","TIPPY_DEFAULT_APPEND_TO","getValueAtIndexOrReturn","defaultValue","isType","invokeWithArgsOrReturn","ms","timeout","arg","splitBySpaces","normalizeToArray","pushIfUnique","unique","arrayFrom","removeUndefinedProps","div","isNodeList","isMouseEvent","isReferenceElement","getArrayOfElements","setTransitionDuration","els","el","setVisibilityState","getOwnerDocument","elementOrElements","_normalizeToArray","isCursorOutsideInteractiveBorder","popperTreeData","clientX","clientY","popperState","props","interactiveBorder","topDistance","bottomDistance","leftDistance","rightDistance","exceedsTop","exceedsBottom","exceedsLeft","exceedsRight","updateTransitionEndListener","box","action","listener","actualContains","_target$getRootNode","currentInput","lastMouseMoveTime","onDocumentTouchStart","onDocumentMouseMove","now","onWindowBlur","activeElement","bindGlobalEventListeners","isBrowser","isIE11","pluginProps","renderProps","defaultProps","defaultKeys","setDefaultProps","partialProps","getExtendedPassedProps","passedProps","plugins","_name","getDataAttributeProps","propKeys","valueAsString","evaluateProps","out","innerHTML","dangerouslySetInnerHTML","createArrowElement","setContent","getChildren","boxChildren","onUpdate","prevProps","nextProps","_getChildren","idCounter","mouseMoveListeners","mountedInstances","createTippy","showTimeout","hideTimeout","scheduleHideAnimationFrame","isVisibleFromClick","didHideDueToDocumentMouseDown","didTouchMove","ignoreOnFirstUpdate","lastTriggerEvent","currentTransitionEndListener","onFirstUpdate","listeners","debouncedOnMouseMove","onMouseMove","currentTarget","popperInstance","clearDelayTimeouts","setProps","show","hideWithInteractivity","enable","disable","unmount","destroy","_props$render","pluginsHooks","hasAriaExpanded","addListeners","handleAriaExpandedAttribute","handleStyles","invokeHook","scheduleShow","getDocument","getNormalizedTouchSettings","touch","getIsCustomTouchBehavior","getIsDefaultRenderFn","_instance$props$rende","getCurrentTarget","getDefaultTemplateChildren","getDelay","isShow","fromHide","hook","shouldInvokePropsHook","pluginHooks","_instance$props","handleAriaContentAttribute","aria","attr","nodes","currentValue","nextValue","cleanupInteractiveMouseListeners","onDocumentPress","actualTarget","removeDocumentPress","onTouchMove","onTouchStart","addDocumentPress","doc","onTransitionedOut","duration","onTransitionEnd","onTransitionedIn","on","eventType","handler","onTrigger","onMouseLeave","onBlurOrFocusOut","removeListeners","_lastTriggerEvent","shouldScheduleClickHide","isEventListenerStopped","wasFocused","scheduleHide","isCursorOverReferenceOrPopper","getNestedPopperTree","_instance$popperInsta","shouldBail","createPopperInstance","destroyPopperInstance","_instance$props2","popperOptions","getReferenceClientRect","moveTransition","computedReference","tippyModifier","_getDefaultTemplateCh","mount","appendTo","parentNode","delay","_getNormalizedTouchSe","touchValue","touchDelay","nestedPopper","isAlreadyVisible","isDisabled","isTouchAndTouchDisabled","_getDefaultTemplateCh2","_instance$popperInsta2","_getDefaultTemplateCh3","_box","_content","isAlreadyHidden","_getDefaultTemplateCh4","tippy","targets","optionalProps","elements","instances","hn","cn","Me","en","qs","Ne","dn","Ji","Cs","Zs","xe","un","gn","qe","mn","pn","yn","vn","Qs","ee","Tn","xn","er","tr","En","Sn","bn","Ds","Ln","sr","An","Rn","se","Te","Js","ir","In","ei","rr","wn","Cn","Xe","_s","nr","Dn","_n","or","ar","Nn","kn","Pn","On","Mn","Fn","Fe","Un","Pe","Bn","lr","de","hr","cr","$n","dr","Gn","ur","Vn","Hn","Kn","Wn","Yn","Ze","ti","zn","oe","be","we","Le","jn","ze","fr","gr","qn","Xn","Zn","Qn","Jn","mr","si","ve","ps","ii","ea","ta","ri","sa","ni","ai","ia","oi","ra","na","li","hi","ci","fi","di","ui","aa","gi","oa","pr","yr","ys","ha","la","De","ca","vs","da","ua","fa","Ts","ga","mi","vr","ma","va","pa","ya","Tr","xs","Ta","xa","pi","xr","yi","ks","vi","Ea","Er","Sa","ba","Es","La","Aa","ge","Re","Ra","Ia","Ps","es","wa","Ti","le","Ca","xi","Da","Be","Si","Ei","ka","Pa","Os","Sr","Oa","Fa","bi","Fs","Ma","Na","Ua","br","Ba","$a","Ga","Va","Ha","Ms","Ka","Ns","Lr","Wa","Ya","za","ja","qa","Oe","Ar","Xa","Za","Rr","Ir","Us","Qa","Ja","eo","wr","Cr","to","Dr","so","io","ro","no","ao","oo","lo","_r","kr","Bs","Pr","ho","co","Li","uo","fe","He","Ss","fo","go","mo","Ai","Ve","Or","$s","po","yo","vo","Ri","To","ts","ss","Ie","xo","Fr","Mr","Ii","Eo","So","wi","bo","$e","is","Ci","Lo","rs","Ao","Ro","Nr","Io","Gs","ns","Ur","wo","as","Co","Do","_o","ko","Po","Oo","Fo","Br","Mo","Di","No","Uo","$r","Bo","$o","Go","Vo","os","Ho","ki","Pi","Ko","Oi","Gr","Ce","Ue","Wo","Yo","zo","jo","qo","Xo","je","Vr","Zo","Qo","ls","Fi","Mi","Ui","Ni","Vs","Jo","Hr","Kr","bs","tl","Wr","sl","il","hs","rl","cs","Hs","nl","al","ds","Yr","zr","ol","Bi","ll","$i","us","jr","gs","Gi","hl","cl","dl","ul","Vi","gl","fl","Ks","ml","Ae","pl","ye","yl","Ke","vl","Tl","qr","Hi","xl","Xr","El","Sl","Ki","Rl","bl","Il","Al","Ll","wl","Cl","Dl","kl","Pl","Ls","Ol","Ge","Fl","Ml","Nl","Ul","Bl","$l","Gl","Vl","Hl","As","Kl","Wl","Yl","zl","jl","nn","Xs","ql","Xl","Ws","Zl","Ql","Zr","Jl","eh","an","Zi","qi","Rs","Xi","ke","th","Wi","ln","sh","ih","pe","rn","rh","nh","Se","ah","Yi","oh","zi","lh","hh","We","te","ji","ch","dh","Qr","uh","fh","Ye","Ys","gh","mh","Qe","ph","yh","Je","ws","Qi","Ee","vh","Th","zs","xh","Eh","js","Sh","bh","Lh","Ah","ue","ae","Rh","Ih","wh","Is","Ch","Dh","Jr","kh","me","Ph","he","Oh","Fh","ce","ie","tn","sn","Embed","LitElement","ifDefined","__decorateClass","customElement","assertPath","normalizeStringPosix","allowAboveRoot","lastSegmentLength","lastSlash","dots","code","lastSlashIndex","_format","sep","pathObject","dir","base","posix","resolvedPath","resolvedAbsolute","cwd","isAbsolute","trailingSeparator","joined","from","fromStart","fromEnd","fromLen","toStart","toEnd","toLen","length","lastCommonSep","fromCode","toCode","hasRoot","matchedSlash","extIdx","firstNonSlashEnd","startDot","startPart","preDotState","pathBrowserify","basename","extname","require$$0","Format","isWeb","png","jpg","jpeg","webp","pdf","svg","mime","pages","extension","format","page","quality","matte","density","outline","archive","fromMime","toMime","expected","pp","isSequence","pattern","idx","Crc32","crc","table","calloc","size","array","_Zip","directory","folder","preamble","descriptor","postamble","cdr","cursor","__publicField","Zip","asBlob","canvas","comp","rej","asBuffer","asDownload","_download","asZipDownload","filenames","zip","href","link","scaled","src","atScale","_toURL_","loadImage","img","Image","Canvas","elt","get","CanvasRenderingContext2D","CanvasGradient","CanvasPattern","ImageData","Path2D","DOMMatrix","DOMRect","DOMPoint","browser"],"mappings":"6jBAAA;AAAA;AAAA;AAAA;AAAA,GAKA,MAAMA,GAAE,OAAOC,GAAED,GAAE,aAAsBA,GAAE,WAAX,QAAqBA,GAAE,SAAS,eAAe,uBAAuB,SAAS,WAAW,YAAY,cAAc,UAAUE,GAAE,OAAM,EAAGC,GAAE,IAAI,QAAQ,IAAAC,GAAA,KAAO,CAAC,YAAY,EAAE,EAAED,EAAE,CAAC,GAAG,KAAK,aAAa,GAAGA,IAAID,GAAE,MAAM,MAAM,mEAAmE,EAAE,KAAK,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE,MAAMA,EAAE,KAAK,EAAE,GAAGD,IAAY,IAAT,OAAW,CAAC,MAAMA,EAAWC,IAAT,QAAgBA,EAAE,SAAN,EAAaD,IAAI,EAAEE,GAAE,IAAID,CAAC,GAAY,IAAT,UAAc,KAAK,EAAE,EAAE,IAAI,eAAe,YAAY,KAAK,OAAO,EAAED,GAAGE,GAAE,IAAID,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,OAAO,KAAK,OAAO,CAAC,EAAC,MAAMG,GAAEL,GAAG,IAAIM,GAAY,OAAON,GAAjB,SAAmBA,EAAEA,EAAE,GAAG,OAAOE,EAAC,EAAEK,GAAE,CAACP,KAAKC,IAAI,CAAC,MAAME,EAAMH,EAAE,SAAN,EAAaA,EAA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,EAAEF,CAAC,EAAIQ,EAAE,KAAKP,EAAED,CAAC,CAAC,EACpB,OAAOQ,EAAE,IAAI,MAAM,KAAM,CAACA,EAAE,MAAM,KAAM,GAAGN,CAAC,CAAC,CAC9C,CACD,OAAO,KAAKD,EAAGD,EAAG,CAChBA,GAAKC,EACL,MAAMC,EAAI,KAAK,MAAMF,GAAKuuC,GAAK,EAAE,EAAGhuC,EAAI,KAAK,MAAMP,GAAKuuC,GAAK,EAAE,EAAGluC,EAAI,IAAI,WAAW,CACnF,EAEA,EACA,EACA,EAEA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EAEA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EAEAJ,GAAK,GAAK,IACVA,GAAK,GAAK,IACVA,GAAK,EAAI,IACTA,EAAI,IAEJC,GAAK,GACLA,GAAK,GAAK,IACVA,GAAK,EAAI,IACTA,EAAI,IACJK,GAAK,GACLA,GAAK,GAAK,IACVA,GAAK,EAAI,IACTA,EAAI,IACJ,EACA,EACA,EACA,EAEA,EACA,EAEA,EACA,EAEA,EACA,EACA,EACA,EAEA,EACA,EACA,EACA,EAEA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GACA,EACA,EACA,EAEA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EAEA,IACA,IACA,IACA,GAEN,CAAK,EACD,OAAOC,EAAE,IAAIA,EAAE,MAAM,KAAMH,CAAC,CAC7B,CACD,OAAO,KAAKJ,EAAG,CACb,MAAMD,EAAIC,EAAE,SAAW,GAAIC,EAAI,IAAI,WAAW,EAAIF,EAAE,MAAM,EAC1D,IAAIO,EAAGF,EACP,IAAKE,EAAI,EAAGA,EAAIP,EA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AS,SAAAC,EAChD","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,21,22,23,24,26,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,94,95,96]}